Quantcast
Channel: SCN : Unanswered Discussions - ABAP Development
Viewing all 8768 articles
Browse latest View live

How to select latest set of data records from result pakcge?

$
0
0

Hi all,

 

I need help in routine in 2 ways:

  1. which routine is suitable to achieve this kind of result  field routine or end routine?
  2. without deleting the records from result package how to achieve below results?

 

The current DSO result package has below rows and coulmns

Comp CodeJoint VentureDivision%KF
A12340.2
A12340.3
A12310.1
A12310.4

Now I want to add new KF in the result package to get the % only for latest division so that my result package will become:

comp codejoint venturedivision%KFnew division%KF only for latest division
A12340.240.2
A12340.340.3
A12310.100
A12310.400

 

Basically for a given comp code and joint venture there are 2 report requirements, one report to show all divisions with their % and second report should show only latest division with %. I am not understanding how to achieve this?

 

can some one suggest some way?

 

With kind regards,

Sarika


how to delete the selected record from table control when delete button clicked?

$
0
0

Hi Team,

 

please see the below code and suggest me what i have to write the code under delete button?

 

MODULE USER_COMMAND_1000 INPUT.

   DATA : V_LINES TYPE I.

   DATA : SELECTED TYPE C. " TBCL-COLS[1]-SELECTED

   DATA: COL LIKE LINE OF TBCL-COLS.

 

   DESCRIBE TABLE LT_MARA LINES V_LINES.

   TBCL-LINES = V_LINES.

 

   CASE SY-UCOMM.

     WHEN 'BACK'.

       LEAVE TO SCREEN 0.

     WHEN 'EXIT'.

       LEAVE TO SCREEN 0.

     WHEN 'INSERT'.

 

       TBCL-LINES = TBCL-LINES + 1.

       INSERT INITIAL LINE INTO LT_MARA index TBCL-LINES.

 

 

     WHEN 'DELETE'.

 

 

     WHEN 'SORTCOL'.

     WHEN 'ENABLE'.

     WHEN 'DISABLE'.

     WHEN 'EDITROW'.

     WHEN OTHERS.

   ENDCASE.

 

ENDMODULE


Thanks in advance .

how to Link sap to third party software using webservices

$
0
0

Hello Guys,

I got one scenario, i need to interface third party software to sap software and the data entered in thirdparty  it should be stored in sap database.

Need User Exit's and BADI to block the short text field for purchase order(PO).

$
0
0


Hi Friends,

 

Need your help to block the short text field in ME21n,Me23n,Me24n and Me29n of a purchase order by implementing User Exit and Badi.

I tried to find the user exit and Badi but i didnt find anything to implement logic only for short text(ch_fieldselection-metafield = MMMFD_SHORT_TEXT ).

Can you please help me if anyone has implemented this logic.

 

Thanks,

Janardhan Satya.

Menu exit at MC94 plant not able to implement.

$
0
0

hi.

i would like to use menu exit at MC94  PLANNIG TYPE..

so i found  MCP20003 is the exit name .

 

i opend cmod then i am try to enable the functionality..

then i double click on the   function exit...

EXIT_SAPMMCP6_003 Then i double click on the  include , include name is

ZXSOPU03

 

CASE I_FCODE.

WHEN '+CU1'.

ERROMESSAGE E000(ZRI).

ENDCASE.


But while activating the function ...programming.


plz find the attached file , i am getting the below error.

Can any body solve my problem


Information about deleted QRFC

$
0
0

HI,

 

If I delete any outbound queue (qrfc stuck in SMQ1), may I know, where I can find information about the same queue at a later time.

 

Regards,

Ratnakar

How can I print a watermark in a microsoft office document?

$
0
0

Hi,

 

I would like to know if is possible to print a watermark in a microsoft office document through SAP, I did a "Z" transaction that choose a file in my computer (file.doc), and in the moment of print this document, I need to input a watermark in all the pages of this document. How can I do this?

 

Thanks,

 

Rogério

How to read RFC Destination'Target Host' name from ABAP code

$
0
0

Hi, What is the good way to read 'Target Host' field (URL) from RFC Destination (SM59) in my ABAP code. One way to achieve this is to read table RFCDES. However I am asking for cleaner way to do this. Any Function module or method available to get RFC Destination Target Host in ABAP code?

 

Thank you in advance.

 

Anand.


problem with bdc when updating the group counter in co02 t-code

$
0
0

Hi All,

 

In RFC, BDC code was written to updated group counter against the production order for create and release status,

when i am updating the group counter from external application in create mode, it is not updating and showing the error

When i am updating the group counter from exernal application in release mode, it is updating for first time after that it is throwing n error.

This was the BDC code written in the program

  PERFORM   BCD_DYNPRO USING 'SAPLCOKO1' '0110'..

      PERFORM 'BDC_FIELD'   USING  'BDC_CURSOR' 'CAUFVD-AUFNR'.

      PERFORM 'BDC_FIELD'   USING  'BDC_OKCODE' '=KOZE'.

      PERFORM 'BDC_FIELD'   USING  'BDC_CURSOR' 'CAUFVD-AUFNR' GI_PROD_CHANGE_PROD_ORD_NO.

      PERFORM 'BDC_FIELD'   USING  'R6CLORD-FLG_OVIEW' 'X'.

      PERFORM 'BDC_DYNPRO'   USING  'SAPLCOKO1' '0115'.

      PERFORM 'BDC_FIELD'   USING  'BDC_OKCODE' '=STACK'.

      PERFORM 'BDC_DYNPRO'   USING  'SAPLSPOS' '0300'.

      PERFORM 'BDC_FIELD'   USING  'BDC_OKCODE' '=OPT2'.

      PERFORM  'BDC_DYNPRO'   USING  'SAPLCOKO1' '0131'.

      PERFORM 'BDC_FIELD'   USING  'BDC_OKCODE' '=ENT1'.

      PERFORM 'BDC_FIELD'   USING  'BDC_CURSOR'  'RC62F-NEW_BOM'.

      PERFORM 'BDC_FIELD'   USING  'BDC_CURSOR'  'RC62F-NEW_ROUT' 'X'.

      PERFORM 'BDC_FIELD'   USING  'BDC_CURSOR'  'RC62F-PLAUF'  LV_DATE.

      PERFORM 'BDC_FIELD'   USING 'RC62F-NEW_BOM'.

      PERFORM 'BDC_DYNPRO USING 'SAPLCPSL' '2120'.

      PERFORM BDC_FIELD     USING 'BDC_OKCODE' '=PICK'.

      PERFORM BDC_DYNPRO USING 'SAPLCOKO1' '0115'.

      PERFORM BDC_FIELD     USING 'BDC_OKCODE' '=BU'.

 

required your help to solve the problem, now for create and release production orders group counters have to be updated

Unable to connect to Salesforce using webservices (SOAP protocol)

$
0
0

Hi Team,

 

Our requirement is to consume Sales force WSDL (SOAP) with out PI involvement. We are having two WSDL's, one for Login to Salesforce and second one to exchange data.

We have created consumer service and logical port's. A proxy class with few methods is generated as expected.

The first consumer service for login is working fine. When we login, it returns the session ID which is valid for 2 hours. We tried to pass the session ID using the below code and then call the second service. It then gives error 'INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session'.

 

Could you please let us know what am I missing? Is my approach correct?

Thanks in advance!

 

I have gone through the below links:

Web Services Security using ABAP Proxies

Consume SOAP WebService by SAP and add custom Header - Java Development - SCN Wiki

 

DATA:   lr_login            TYPE REF TO zlogin,

        lr_action           TYPE REF TO zexc,

        ls_request          TYPE        zlogin_request,

        ls_response         TYPE        zlogin_response,

        ls_header           TYPE REF TO if_wsprotocol_ws_header,

        lr_system_fault     TYPE REF TO cx_ai_system_fault,

        lr_flight_not_found TYPE REF TO cx_sxidag_flight_not_found,

        lv_name             TYPE        string,

        lv_namespace        TYPE        string,

        lr_ixml             TYPE REF TO if_ixml,

        lr_xml_document     TYPE REF TO if_ixml_document,

        lr_xml_root         TYPE REF TO if_ixml_element,

        lr_xml_element      TYPE REF TO if_ixml_element,

        lr_xml_node         TYPE REF TO if_ixml_node,

        lv_xstring          TYPE        xstring,

        lv_string           TYPE        string,

        ls_disp_req         TYPE        zexc_reque,

        ls_disp_resp        TYPE        zexc_respo.

 

 

TRY.

    CREATE OBJECT lr_login

      EXPORTING

        logical_port_name = 'ZLOGIN_PORT'.

  CATCH cx_ai_system_fault INTO lr_system_fault.

ENDTRY.

 

 

ls_request-username = 'zzz.abc.com'.

ls_request-password = 'abcde123'.

 

 

TRY.

    CALL METHOD lr_login->login

      EXPORTING

        input  = ls_request

      IMPORTING

        output = ls_response.

  CATCH cx_ai_system_fault INTO lr_system_fault.

    WRITE:/ 'System Fault'(sye). WRITE:/ lr_system_fault->errortext. EXIT.

 

 

  CATCH zsfcx_login_fault .

    WRITE:/ 'Login Fault'. EXIT.

  CATCH zsfcx_unexpected_error_fault .

    WRITE:/ 'Unexpected Error'. EXIT.

  CATCH zsfcx_invalid_id_fault .

    WRITE:/ 'Invalid Fault'. EXIT.

  CATCH cx_ai_application_fault .

    WRITE:/

  'Application fault'(apf).

    EXIT.

 

 

ENDTRY.

 

 

IF ls_response-result-session_id IS NOT INITIAL.

  TRY.

* create instance

      CREATE OBJECT lr_action

        EXPORTING

          logical_port_name = 'ZEXC_PORT'.

* get ws_header protocol

      ls_header ?= lr_action->get_protocol('IF_WSPROTOCOL_WS_HEADER').

 

 

      CONCATENATE

'<Soap:Header>'

'<ns2:session xmlns:ns2="https://salesforce.com/services/Soap/c/00Dc0000003ue9S">'

'<SessionID>'ls_response-result-session_id'</SessionID>'

'</ns2:session>'

'</Soap:Header>'

       INTO lv_string.

* convert to xstring

      lv_xstring = cl_proxy_service=>cstring2xstring( lv_string ).

      IF NOT lv_xstring IS INITIAL.

* create ixml dom document from xml xstring

        CALL FUNCTION 'SDIXML_XML_TO_DOM'

          EXPORTING

            xml           = lv_xstring

          IMPORTING

            document      = lr_xml_document

          EXCEPTIONS

            invalid_input = 1

            OTHERS        = 2.

        IF sy-subrc = 0 AND NOT lr_xml_document IS INITIAL.

          lr_xml_root = lr_xml_document->get_root_element( ).

          lr_xml_element ?= lr_xml_root->get_first_child( ).

* add header element by element to soap header

          WHILE NOT lr_xml_element IS INITIAL.

            lv_name = lr_xml_element->get_name( ).

            lv_namespace = lr_xml_element->get_namespace_uri( ).

            ls_header->set_request_header( name = lv_name namespace = lv_namespace dom = lr_xml_element ).

            lr_xml_element ?= lr_xml_element->get_next( ).

          ENDWHILE.

        ENDIF.

      ENDIF.

* call outbound

 

      ls_disp_req-data-account_phone        = '123-456-7890'.

      ls_disp_req-data-billing_city         = 'HOUSTON'.

      ls_disp_req-data-billing_postal_code  = '77070'.

      ls_disp_req-data-billing_state        = 'TX'.

      ls_disp_req-data-billing_street       = 'Willow Chase'.

      ls_disp_req-data-check                = '34567'.

      ls_disp_req-data-reason_code          = 'Test'.

      ls_disp_req-data-salutation           = 'Mr.'.

      ls_disp_req-data-subject              = 'Amount not received'.

 

      TRY.

          CALL METHOD lr_action->insert_apdispute_case

            EXPORTING

              input  = ls_disp_req

            IMPORTING

              output = ls_disp_resp.

        CATCH cx_ai_system_fault INTO lr_system_fault.

          WRITE:/ 'System Fault'(sye). WRITE:/ lr_system_fault->errortext. EXIT.

        CATCH cx_ai_application_fault .

          WRITE:/

        'Application fault'(apf).

          EXIT.

      ENDTRY.

 

 

    CATCH cx_ai_system_fault INTO lr_system_fault.

      WRITE:/ 'System Fault'(sye). WRITE:/ lr_system_fault->errortext. EXIT.

    CATCH cx_ai_application_fault .

      WRITE:/

    'Application fault'(apf).

      EXIT.

  ENDTRY.

 

ENDIF.

 

Regards,

Aravind

WE09 run in background display spool

$
0
0

Is there a way to run the idocs in a collapsed form in the background (not expanding all the data segments) This is what I don't want:background_we09_cba.JPG

This is what I want, how it looks in the non-background processing:

background_we09_cba-2.JPG

Read internal table using secondary key and binary search

$
0
0

Hi, I just checking related to read internal table using secondary key and using binary search.

 

I have taken measurement for both processing block.

 

Binary search on sorted internal table taking less time compare to secondary key in read table statement.

 

Kindly suggest which one is preferable in which scenario.

 

if secondary key takes too much time compare to read table binary search then why we need of secondary key??

 

Thanks & Regards

 

Kishan Rana

How to get the technical information F1

$
0
0

Hello,

I need your help pleaes, how to get the technical information F1,

is there a FM to to give him the current report, and I get the technical information as this screen .

 

I need the field data, MARA, MATNR etc.

 

could any one help me please.

 

$_57 (2).JPG

Runtime example of Lock/Unlock

$
0
0

Hi Experts, I need some runtime example for lock/unlock concept with corresponding MODE(Read/Write/cumulative not exclusive). I will be thankful for kindly guiding. Thanks, Sanjay

EDI - IDOC functionality

$
0
0

Hi Friends,

 

I Have never worked on EDI's and have little knowledge on Idocs.

 

I need your help here, there was an already a zprogram for some functionality in the shipping documents.

Z program is getting data from many standard table and populating the data in 3 Ztables, then Business has decided to send this 3Ztables to another 3rd party tool through SAP IDOCS from PI System.

 

Now Business came up with some changes and they now say that , this process should go purely with trigger basis , execute this functinality on printing of shipping documents via setting up output type in the print control and convert the zreport to Zfunction module and create IDOC structures and pass it through PI.

 

Could any of you help me with this kind of requirement. or route me to any helpful document.

 

Thanks,

Sandhya


ALE/IDOC:Passing transactional/custom data changes

$
0
0

HI experts;

I need to pass transactional/custom data changes from one system to another.

I cant use change pointer for this as change pointer is only for master data.

I will be thankful for kindly guiding through this.

 

Thanks,

Sanjay

How many process code we can assign into a message type and idoc type

$
0
0

Hi Experts,

 

I have a requirement in idoc, we have existing partner's sender and receiver. But our client wants from our outbound setup will same but in inbound setup just add one more partner.so we are copied inbound part from exist partner and changed that partner number.but we need to change that function module inside the process code for as per our client requirement.If we are changing function module in our new partner the changes effecting old partner also because process code is same.

 

So i have one doubt if we create a new process code and assign to that messages type how system will behave. it can capture both process code or it can only one.or we need to create both message type and idoc type.

 

Anyone can help me for this requirement.

 

Thanks,

Unable to populate BKPF-XREF1_HD field using RFBIBL00 program

$
0
0

Hi,

 

We have a custom program to upload a tab delimited text file  to post a FI document.  The file is read and the data is passed to the program RFBIBL00 (using submit statment) which then posts the document. The issue here is, I need to populate BKPF-XREF1_HD field as well. RFBIBL00 program populates data in BBKPF and BBSEG structures which are used to post FI doument. But, BBKPF structure does not contain the field XREF1_HD. So, the document is getting created without populating XREF1_HD field. Can anyone suggest a way to populate BKPF-XREF1_HD using RFBIBL00 program or any other alternative way? Appreciate help on this.

 

Thanks,

Pavan

Call Adobe form in abap program

Error to GL LSMW using program RFBISA00

$
0
0

Hi, I need Help.

 

I use the standard LSMW

 

LSMW DI.PNG

 

When I try to create the batch input

 

create bi.PNG

 

 

I can't  create the batch input because it shows the error.

 

erro bi.PNG

 

What I do to create the batch input in this situation?

Viewing all 8768 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>