How to call BAPI from ABAP Inbound Proxy

Hi All
Can some one provide/giude  a sample code on how to call a BAPI from generated Method (Inbound Proxy) and how are the table parameters passed from Proxy to BAPI.
Thanks
Ravi/

Hello Ravi,
In the proxy before calling the BAPI, construct the table, fill it with the appropiate values by lopping over the proxy request object. Now use this table for calling BAPI
Cheers,
Naveen

Similar Messages

  • Any program for calling bapi from ABAP step by step

    any program for calling bapi from ABAP step by step
    points will be rewarded,
    thank you,
    Jagrut BharatKumar Shukla

    Hi Jagrut,
    BAPI stands for Business API(Application Program Interface).
    A BAPI is remotely enabled function module ie it can be invoked from remote programs like standalone JAVA programs, web interface etc..
    You can make your function module remotely enabled in attributes of Function module but
    A BAPI are standard SAP function modules provided by SAP for remote access. Also they are part of Businees Objest Repository(BOR).
    BAPI are RFC enabled function modules. the difference between RFc and BAPI are business objects. You create business objects and those are then registered in your BOR (Business Object Repository) which can be accessed outside the SAP system by using some other applications (Non-SAP) such as VB or JAVA. in this case u only specify the business object and its method from external system in BAPI there is no direct system call. while RFC are direct system call Some BAPIs provide basic functions and can be used for most SAP business object types. These BAPIs should be implemented the same for all business object types. Standardized BAPIs are easier to use and prevent users having to deal with a number of different BAPIs. Whenever possible, a standardized BAPI must be used in preference to an individual BAPI.
    The following standardized BAPIs are provided:
    Reading instances of SAP business objects
    GetList ( ) With the BAPI GetList you can select a range of object key values, for example, company codes and material numbers.
    The BAPI GetList() is a class method.
    GetDetail() With the BAPI GetDetail() the details of an instance of a business object type are retrieved and returned to the calling program. The instance is identified via its key. The BAPI GetDetail() is an instance method. BAPIs that can create, change or delete instances of a business object type
    The following BAPIs of the same object type have to be programmed so that they can be called several times within one transaction. For example, if, after sales order 1 has been created, a second sales order 2 is created in the same transaction, the second BAPI call must not affect the consistency of the sales order 2. After completing the transaction with a COMMIT WORK, both the orders are saved consistently in the database.
    Create( ) and CreateFromData! ( )
    The BAPIs Create() and CreateFromData() create an instance of an SAP business object type, for example, a purchase order. These BAPIs are class methods.
    Change( )
    The BAPI Change() changes an existing instance of an SAP business object type, for example, a purchase order. The BAPI Change () is an instance method.
    Delete( ) and Undelete( ) The BAPI Delete() deletes an instance of an SAP business object type from the database or sets a deletion flag.
    The BAPI Undelete() removes a deletion flag. These BAPIs are instance methods.
    Cancel ( ) Unlike the BAPI Delete(), the BAPI Cancel() cancels an instance of a business object type. The instance to be cancelled remains in the database and an additional instance is created and this is the one that is actually canceled. The Cancel() BAPI is an instance method.
    Add<subobject> ( ) and Remove<subobject> ( ) The BAPI Add<subobject> adds a subobject to an existing object inst! ance and the BAPI and Remove<subobject> removes a subobject from an object instance. These BAPIs are instance methods.
    ex BAPI:
    API_SALESORDER_CREATEFROMDAT1
    BAPI_SALESORDER_CREATEFROMDAT2
    You can get good help form the following links,
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all bapis
    http://www.planetsap.com/LIST_ALL_BAPIs.htm
    for BAPI's
    http://www.sappoint.com/abap/bapiintro.pdf
    http://www.sappoint.com/abap/bapiprg.pdf
    http://www.sappoint.com/abap/bapiactx.pdf
    http://www.sappoint.com/abap/bapilst.pdf
    http://www.sappoint.com/abap/bapiexer.pdf
    http://service.sap.com/ale
    http://service.sap.com/bapi
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCFESDE8/BCFESDE8.pdf
    http://www.planetsap.com/Bapi_main_page.htm
    http://www.topxml.com/sap/sap_idoc_xml.asp
    http://www.sapdevelopment.co.uk/
    http://www.sapdevelopment.co.uk/java/jco/bapi_jco.pdf
    Also refer to the following links..
    www.sappoint.com/abap/bapiintro.pdf
    www.sap-img.com/bapi.htm
    www.sap-img.com/abap/bapi-conventions.htm
    www.planetsap.com/Bapi_main_page.htm
    www.sapgenie.com/abap/bapi/index.htm
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://sap-img.com/bapi.htm
    <b>EG::</b>
    <b>Here is the step by step procedure for creating BAPIs.</b>
    There are 5 different steps in BAPI.
    - Create BAPI Structure
    - Create BAPI Function Module or API Method.
    - Create BAPI object
    - Release BAPI Function Module.
    - Release BAPI object.
    Step1. Creating BAPI Structure:
    - Go to <SE11>.
    - Select Data Type & Enter a name.
    - Click on Create.
    - Note: Always BAPI should be in a development class with request number (Not Local Object).
    - Select Structure & hit ENTER.
    - Enter the fields from your database. Make sure that the first field is the Primary Key Field.
    - Then SAVE & ACTIVATE.
    Step 2. Creating BAPI module:
    - Enter TR.CODE <SE37>.
    - Before entering any thing, from the present screen that you are in, select the menu
    Goto -> Function Groups -> Create Group.
    Enter a name (Note: This name Must start with ZBAPI)
    Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
    Click on the Third ICON that says Inactive Objects.
    Select the group that you just created and click on Activate.
    Notice that the group you created will disappear from the list of inactive objects.
    - Go back to ><SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
    NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
    Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
    Then click on the second tab that says [IMPORT].
    Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box ‘Pa’. All remotely enabled functional modules MUST be Pa enabled, where Pa means ‘Passed by Value’ and if you don’t select ‘Pa’, then that means it will be passed by reference..
    Then click on tab that says [EXPORT].
    Enter the following as is in the first three fields
    RETURN TYPE BAPIRETURN (These 3 field values are always same)
    Here also select ‘Pa’ meaning Pass by value.
    Note: BAPIRETURN contains structure with message fields.
    Then SAVE and ACTIVATE.
    Step 3. Creating BAPI object:
    - Enter Tr.Code <SWO1> (Note. It is letter ‘O’ and not Zero).
    - Enter a name and then click on create. Enter details.
    NOTE: Make sure that that Object Type and Program name are SAME.
    - Enter Application ‘M’, if you are using standard table Mara. If you are using your own database then select ‘Z’ at the bottom.
    - Then hit <ENTER>.
    - Now we have to add ‘Methods’. High light METHODS and then select the following from the menu:
    Goto Utilities -> API Methods -> Add Methods.
    - Enter function Module name and hit <ENTER>.
    - Select the second FORWARD ARROW button (>)to go to next step.
    - Check if every thing looks ok and again click on FORWARD ARROW button (>).
    - Then select ‘YES’ and click on <SAVE>.
    - Now on a different screen goto TR.CODE <SE37>. Enter Function Module name and select from the top menu Function Module -> Release -> Release.
    - Goback to TR.CODE <SWO1>.
    Here select the menu combination shown below in the same order.
    - Edit -> Change Release Status -> Object Type Component -> To Implemented.
    - Edit -> Change Release Status -> Object Type Component -> To Released.
    - Edit -> Change Release Status -> Object Type -> To Implemented.
    - Edit -> Change Release Status -> Object Type -> To Released.
    - Then click on <SAVE>.
    - Then click on Generate Button (4th button from left hand side looks like spinning wheel).
    - Then Click on the button that says ‘PROGRAM’ to see the source code.
    To check if this is present in work flow goto TR.CODE <BAPI>.
    Here it shows business object repository.
    - First click on the middle button and then select “ALL” and hit ENTER.
    - Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully
    <b>Reward pts if found usefull :)</b>
    regards
    Sathish

  • Call transaction in ABAP Inbound proxy

    Hi All,
    I am processing transaction KKPAN in inbound proxy. As per my knowledge, there is no BAPI or other way of processing this transaction. I have recorded a BDC, and I am calling this BDC using Call Transaction in my Inbound proxy.
    The problem is, control never returns back to the proxy after I call this BDC using Call Transaction.  However, interestingly, If there is an error in BDC, the control comes back to the proxy. Any ideas, why it does not successfully update data using BDC in inbound proxy?
    Your inputs are appreciated.
    Thanks,
    Navdeep

    Thanks for you response Akshay !
    However, It didn't solve my problem. In my case, the inbound proxy class is being called successfully. The problem comes, when I use Call Transaction in the class. The call transaction works and returns error message, if there is some error in the processing; however, for when there is no error in the BDC data, the control never comes back after call transaction.
    However, if I use SPROXY to test this interface, by copying the payload of the message and using the same user (As in Comm Channel), I am able to call Call Transaction without any problem. The data gets created successfully.
    Now this is getting really tricky.
    Still looking for ideas
    Regards,
    Navdeep
    Message was edited by:
            Navdeep Singla

  • How to call BAPI from R/3 system

    hi,
    i am doing small application by using Model. that is calling BAPI from R/3 system. but i am not able to get data from the back end system. please suggest me regarding this problem
    thanx
    tanvi

    steps:
    1) create Model
    2) bind Model to component controller ( you can use data modeler.) 2.1) open data modeler; if your model is not there, you can add by clicking add existing model;
    2.2) create data link between model and controller, it will open map dialog.
    2.3) click and drag BAPI_xxx_Input to context of controller and select all nodes inside
      - if there is any duplicate nodes, just rename it.
    3) map context to view controller
    3.1) map input parameters separately ( which takes value for IMPORT to BAPI. select only that fields
    3.2) do map for output (exact node which contains BAPI output)
    coding:
    1) in component controller you need to instantiate model and bind to context
    BAPI_xxx_Input my_input = new BAPI_xxx_input();
    wdContext.nodeBAPI_xxx_Input my_input().bind( my_input);
    2) create a method in the component controller so that we can execute it from any of views used.
    try{
      wdContext.currentBAPI_xxx_Input my_input().modelObject().execute();
    }catch(WDRFCException e) {
    e.printStackTrace();
    wdContext.node<ExactOutput>().invalidate();
    // this stmt will reflect new values
    3) Go to view and bind values to UI Elements
    in wdDoInit()
    IPrivate<Comp_Name>View.I<ExactOutput>Element  input = wdContext.create<BAPI_xxx_Input>Element();
    // see if this may demand model instance as parameter
    wdContext.node<BAPI_xxx_Input>().addElement( input);
    4) In OnAction you just executes the component controller method
    wdThis.wdGet<Com_Name>Controller().executeMyBapi();
    // executeMyBapi() is the method contains the mentioned try..catch code
    nikhiL

  • How to Call BAPI From the Custom Controller

    Hi
    I developed frist WD Application Using RFC Adapter.
    i did the following steps
    1. created the project
    2. created the model.
    3. created the customer controller and mapped the model of the controller to the model.
    4. mapped controller context to the views
    5. created one action in the start view
    6. created one method in the customer controller.
    so please let me know the lines of code to call BAPI using RFC.
    and  how to pass input valus to the bapi and how to execute the BAPI
    plese send the reply ASAP
    regards
    mmukesh

    Hi
    i did like this
    In  Start View OnActionSearch () method code
    public void onActionsearch (com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
           wdThis.wdGetTestCustControllerController().executeGetlistBapi();
    in CustomController Init method
    public void wdDoInit()
        Bapi_Flight_Getlist_Input input = new Bapi_Flight_Getlist_Input();
        wdContext.nodeBapi_FlightGetlist_Input().bind(input);
        input.setDestination_From(new Bapisfldst());
        input.setDestination_To(new Bapisfldst());
    In CUSTOMECONTROLLER executeGetlistBapi();
    METHOD
    public void executeGetlistBapi( )
        //@@begin executeGetlistBapi()
        try{
           wdContext.currentBapi_FlightGetlist_InputElement().modelObject().execute();
           wdContext.nodeOutput().invalidate();
        }catch(Exception ex){
           ex.printStackTrace();
    Then let me know what is wrong in this
    i did as per pdf
    please correct if there is any worng in this code.
    this is flight example .
    regards
    mmukesh

  • How to Call Java from ABAP

    Hi all,
    I have installed JCO & created the RFC in SAP. i have used below code to test my RFC connection & it's working fine.
    But In the below report, where to call the JAVA Program & what code i should use to call java code .
    Actually my ABAP requirement is to download a file. Then i need to call JAVA program, inside ABAP, to encrypt the downloaded file. Here, Java program is used to encrypt the file. Now question is, how to call the Java program inside the ABAP code.  Please advice with the code sample. Thanks a lot.
    REPORT  z_jco_test.
    PARAMETERS: requtext LIKE sy-lisel.
    DATA: echotext LIKE sy-lisel,
          resptext LIKE sy-lisel,
          rfctest TYPE TABLE OF rfctest,
          wa_rfctest TYPE rfctest.
    wa_rfctest-rfcdata1 = requtext.
    wa_rfctest-rfcdata2 = 'Hello World'.
    APPEND wa_rfctest TO rfctest.
    CALL FUNCTION 'RFC_PING'
      DESTINATION 'JCO'.
    CALL FUNCTION 'STFC_CONNECTION'
      DESTINATION 'JCO'
      EXPORTING
        requtext = requtext
      IMPORTING
        echotext = echotext
        resptext = resptext
      TABLES
        rfctest  = rfctest.
    WRITE: 'Echo Text: ', echotext.
    WRITE: 'Response Text: ', resptext.
    LOOP AT rfctest INTO wa_rfctest.
      WRITE: / 'rfcdata1: ', wa_rfctest-rfcdata1.
      WRITE: / 'rfcdata2: ', wa_rfctest-rfcdata2.
    ENDLOOP.

    Hi,
    You might accomplish your goal using external operating system commands.
    1) Define in SM69 an external command, letu2019s say ZJAVA. This command will execute a script on the operating system, letu2019s call it calljava.sh.
    2) In script calljava.sh you just call java, passing some parameters. For example, java $1 $2 $3 $4 $5 $6 $7
    3) In your ABAP program you call the ZJAVA external command and pass parameters to it. Of course, one of the parameters must be your Java program name.
      CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
        EXPORTING
          commandname                   = l_command
          additional_parameters         = l_param
          trace                         = 'X'
        IMPORTING
          status                        = l_status
          exitcode                      = l_exitcode
        TABLES
          exec_protocol                 = l_exec_protocol_itab
        EXCEPTIONS
          no_permission                 = 1u2026

  • How to call url from abap in background

    Hi,
    I could open url but it opens browser window
    i saw several threads on how to cal url in background but no good answer
    kindly help
    thanks
    B

    Hi,
    Try the following (primitive) example, it calls an url and display the result on screen.
    Hope this will help you.
    <pre>
    REPORT  test.
          CLASS lcx_http_client DEFINITION
          Minimal Error Handling
    CLASS lcx_http_client DEFINITION INHERITING FROM cx_static_check.
      PUBLIC SECTION.
        INTERFACES:
          if_t100_message.
        DATA:
           mv_method TYPE string,                               "#EC NEEDED
           mv_subrc  TYPE i.                                    "#EC NEEDED
        METHODS:
          constructor
            IMPORTING iv_method TYPE string  OPTIONAL
                      iv_subrc  TYPE i       OPTIONAL
                      iv_msgid  TYPE symsgid DEFAULT '00'
                      iv_msgno  TYPE i       DEFAULT 162.
    ENDCLASS.                    "lcx_http_client DEFINITION
          CLASS lcx_http_client IMPLEMENTATION
    CLASS lcx_http_client IMPLEMENTATION.
      METHOD constructor.
        super->constructor( ).
        mv_method = iv_method.
        mv_subrc  = iv_subrc.
        if_t100_message~t100key-msgid = iv_msgid.
        if_t100_message~t100key-msgno = iv_msgno.
        if_t100_message~t100key-attr1 = 'MV_METHOD'.
        if_t100_message~t100key-attr2 = 'MV_SUBRC'.
      ENDMETHOD.                    "constructor
    ENDCLASS.                    "lcx_http_client IMPLEMENTATION
          CLASS lcl_http_client DEFINITION
          Facade for if_http_client
    CLASS lcl_http_client DEFINITION.
      PUBLIC SECTION.
        CLASS-METHODS:
          get_http_client_by_url
            IMPORTING iv_url           TYPE string
                      iv_proxy_host    TYPE string OPTIONAL
                      iv_proxy_service TYPE string OPTIONAL
                      PREFERRED PARAMETER iv_url
            RETURNING value(ro_http_client) TYPE REF TO lcl_http_client
            RAISING lcx_http_client.
        DATA:
          mr_http_client TYPE REF TO if_http_client.
        METHODS:
          send
            RAISING lcx_http_client,
          receive
            RAISING lcx_http_client,
          close
            RAISING lcx_http_client,
          get_response_header_fields
            RETURNING value(rt_fields) TYPE tihttpnvp,
          get_response_cdata
            RETURNING value(rv_data) TYPE string.
    ENDCLASS.                    "lcl_http_client DEFINITION
          CLASS lcl_http_client IMPLEMENTATION
    CLASS lcl_http_client IMPLEMENTATION.
      METHOD get_http_client_by_url.
        DATA: lv_subrc TYPE sysubrc.
        CREATE OBJECT ro_http_client.
        cl_http_client=>create_by_url( EXPORTING url                 = iv_url
                                                 proxy_host          = iv_proxy_host
                                                 proxy_service       = iv_proxy_service
                                       IMPORTING client              = ro_http_client->mr_http_client
                                       EXCEPTIONS argument_not_found = 1
                                                  plugin_not_active  = 2
                                                  internal_error     = 3
                                                  OTHERS             = 999 ).
        CHECK sy-subrc <> 0.
        lv_subrc = sy-subrc.
        RAISE EXCEPTION TYPE lcx_http_client EXPORTING iv_method = 'GET_HTTP_CLIENT_BY_URL' iv_subrc = lv_subrc.
      ENDMETHOD.                    "get_http_client_by_url
      METHOD send.
        DATA: lv_subrc TYPE sysubrc.
        mr_http_client->send( EXCEPTIONS http_communication_failure = 5
                                         http_invalid_state         = 6
                                         http_processing_failed     = 7
                                         http_invalid_timeout       = 8
                                         OTHERS                     = 999 ).
        CHECK sy-subrc <> 0.
        lv_subrc = sy-subrc.
        RAISE EXCEPTION TYPE lcx_http_client EXPORTING iv_method = 'SEND' iv_subrc = lv_subrc.
      ENDMETHOD.                    "send
      METHOD close.
        DATA: lv_subrc TYPE sysubrc.
        CALL METHOD mr_http_client->close
          EXCEPTIONS
            http_invalid_state = 10
            OTHERS             = 999.
        CHECK sy-subrc <> 0.
        lv_subrc = sy-subrc.
        RAISE EXCEPTION TYPE lcx_http_client EXPORTING iv_method = 'CLOSE' iv_subrc = lv_subrc.
      ENDMETHOD.                    "close
      METHOD receive.
        DATA: lv_subrc TYPE sysubrc.
        mr_http_client->receive( EXCEPTIONS http_communication_failure = 9
                                            http_invalid_state         = 10
                                            http_processing_failed     = 11
                                            OTHERS                     = 999 ).
        CHECK sy-subrc <> 0.
        lv_subrc = sy-subrc.
        RAISE EXCEPTION TYPE lcx_http_client EXPORTING iv_method = 'RECEIVE' iv_subrc = lv_subrc.
      ENDMETHOD.                    "receive
      METHOD get_response_header_fields.
        mr_http_client->response->get_header_fields( CHANGING fields = rt_fields ).
      ENDMETHOD.                    "get_response_header_fields
      METHOD get_response_cdata.
        rv_data = mr_http_client->response->get_cdata( ).
      ENDMETHOD.                    "get_response_cdata
    ENDCLASS.                    "lcl_http_client IMPLEMENTATION
    PARAMETERS: p_url   TYPE string DEFAULT 'http://www.google.com' LOWER CASE,
                p_phost TYPE string DEFAULT 'your_proxy_here'       LOWER CASE,
                p_pserv TYPE string DEFAULT '8080'                  LOWER CASE.
    *===================================================================================
    START-OF-SELECTION.
      TRY .
          DATA: gt_data          TYPE string_table,
                gv_data          TYPE string,
                gr_http_client   TYPE REF TO lcl_http_client,
                go_cx            TYPE REF TO lcx_http_client.
          "Initialize the http client
          gr_http_client =
            lcl_http_client=>get_http_client_by_url( iv_url           = p_url
                                                     iv_proxy_host    = p_phost
                                                     iv_proxy_service = p_pserv ).
          "Call the specified URL and retrieve data from the response
          gr_http_client->send( ).
          gr_http_client->receive( ).
          gv_data = gr_http_client->get_response_cdata( ).
          "Its over....
          gr_http_client->close( ).
          "Display result
          REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>cr_lf IN gv_data WITH cl_abap_char_utilities=>newline.
          SPLIT gv_data AT cl_abap_char_utilities=>newline INTO TABLE gt_data.
          LOOP AT gt_data INTO gv_data.
            WRITE: / gv_data.
          ENDLOOP.
        CATCH lcx_http_client INTO go_cx.
          MESSAGE go_cx TYPE 'S' DISPLAY LIKE 'E'.
      ENDTRY.
    </pre>

  • How to call smartforms from abap

    hi experts,
    I TRIED AND NOW I AM GETTING MY SF IN MY PROG.(I TRIED BY OWN)
    NOW I WANT TO CONVERT IT INTO PDF FORM ,AND THEN SAVE THIS SF IN COMPUTER ,
    thanks
    sunny

    hello mr thakur
    please take reference of this  code
    REPORT  ZTESTCURRENCY.
    data : IT_DATA  type table of  zstruct1.
    DATA : FM_NAME TYPE RS38L_FNAM.
    DATA : FORM_NAME TYPE TDSFNAME.
    selection-screen begin of block b1 with frame title text-000.
    parameters p_date type vbak-audat.
    selection-screen pushbutton /10(5) pb1 USER-COMMAND UC01.
    selection-screen end of block b1.
    initialization.
    move 'PRINT' to pb1.
    AT SELECTION-SCREEN.
    case SY-UCOMM.
    when 'UC01'.
    PERFORM SELECT_DATA.
    ENDCASE.
    *&      Form  SELECT_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM SELECT_DATA .
         FM_NAME =  '/1BCDWB/SF00000042'.
         FORM_NAME = 'ZSF_TESTSMARTFORM'.
         SELECT AUDAT
                AUART
                NETWR
                WAERK
                INTO TABLE IT_DATA FROM VBAK WHERE AUDAT = p_date.
                CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
                  EXPORTING
                    FORMNAME                 = FORM_NAME
    *               VARIANT                  = ' '
    *               DIRECT_CALL              = ' '
    *             IMPORTING
    *               FM_NAME                  =
    *             EXCEPTIONS
    *               NO_FORM                  = 1
    *               NO_FUNCTION_MODULE       = 2
    *               OTHERS                   = 3
                IF SY-SUBRC  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                ENDIF.
                CALL FUNCTION FM_NAME
    *             EXPORTING
    *               ARCHIVE_INDEX              =
    *               ARCHIVE_INDEX_TAB          =
    *               ARCHIVE_PARAMETERS         =
    *               CONTROL_PARAMETERS         =
    *               MAIL_APPL_OBJ              =
    *               MAIL_RECIPIENT             =
    *               MAIL_SENDER                =
    *               OUTPUT_OPTIONS             =
    *               USER_SETTINGS              = 'X'
    *             IMPORTING
    *               DOCUMENT_OUTPUT_INFO       =
    *               JOB_OUTPUT_INFO            =
    *               JOB_OUTPUT_OPTIONS         =
                  TABLES
                    IT_DATA                    =  IT_DATA
    *             EXCEPTIONS
    *               FORMATTING_ERROR           = 1
    *               INTERNAL_ERROR             = 2
    *               SEND_ERROR                 = 3
    *               USER_CANCELED              = 4
    *               OTHERS                     = 5
                IF SY-SUBRC  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
                ENDIF.
    ENDFORM.                    " SELECT_DATA

  • Call BAPI from ITS

    hi all,
    i'm wondering to know about how to call BAPI from ITS. Could I call BAPI from ITS? if yes, please advise me on this.
    Thank you so much for your effort.
    Peerasit

    Not solve yet.
    Thank you.

  • Can we call bapi from SAP or ABAP How? Pls Step by step

    Can we call bapi from SAP How? Pls Step by step
    thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi,
    Do you mean you want to access BAPI in ABAP report?
    If yes, then YES we can call,
    1.Create a report -> In pattern write your BAPI name.
    2. It is like your FM , Read correspoding BAPI documentation
    3. Fill required parametes.
    4. Test run and if successful , final run it.
    And from Outside,
    You have to establish a connection and create a wrapper and access using avaialble APIs.
    Reward if useful!

  • From rfc how to call bapi

    Hi
    How to call BAPI FM's from RFC ??
    thanks
    kumar

    Hi Palnati,
                      Use statement  :
                      Call FUNCTION     'Bapi................'
                       DESTINATION     Dest(RFC destination in TCODE SM59)
                         EXPORTING      f1 = …
                                                    f2 = …
                         IMPORTING      f3  = …
                         TABLES            T1 = …
                         EXCEPTIONS ……….
    Reward points if helpful.
    Regards,
    Hemant

  • ABAP inbound proxy deep structure

    Hello Experts,
    This is regarding ABAP inbound proxy structures.
    I have a structure in XI which looks like this
    <Bill of Material> (0:unbounded)
       <Material>     (0:unbounded)
       </Material>
    </Bill of Material>
    When I generate a proxy structure for this message, a similar structure will get generated in proxy with table types for 0:unbounded types.
    Here, how can I loop through the structure and extract the materials associated with each Bill of materials? I have to call BAPI for creating material first if not exists and then BOM for each BOM in the structure.
    Any help with sample coding is really appreciated.
    Thanks
    Ricky

    Hi Ricky !
    Try with something like this:
    LOOP AT your_bill_of_material_object.
        WRITE: your_bill_of_material_object-material_field.
    END-LOOP.
    where the outer object is the bill of material and inside the loop make a reference to the current fields of the bill of material record. You may need another loop inside this one to recover each material record once your are pointing to the current bill of material.
    Regards,
    Matias.

  • Message has Error status on outbound side - in ABAP inbound proxy !!

    Hi All,
    One interesting question for you guys. I have got one of the scenarios like File to ABAP inbound proxy. Message are going properly, no errors in receiving system. But on PI moni I can able in "outbound status" column in red colored flag. No all the messages couple of them with u201CMessage has Error status on outbound side ". Why please?
    Regards
    San

    Hi ,
    Please check whether the  correct data  is coming from sender side .  and check the j2ee engine runtime parameters.
    Cheers,
    Meera
    Edited by: MeeravaliDudekula on Oct 18, 2010 2:36 PM

  • ABAP Inbound Proxy issue

    Hi All,
    I have a file to ABAP Inbound proxy scenario for creating vendor in SAP.
    When I execute from SPROXY test tab, vendor is created in SAP.
    But when i test end to end i.e by feeding the file adapter with the vendor file i don't see the vendor creating in SAP.
    The message is successful in PI moni and in ABAP moni. Cant see any errors
    Appreciate your inputs in this solving this please
    Keerthi

    >
    Keerthika R wrote:
    > The message is successful in PI moni and in ABAP moni. Cant see any errors
    Hello Keerthi,
    I was facing the same issue. I found that we can use SXMB_MONI and SMQ2 in the SAP side as well (Backend ABAP System where the Server Proxy is created). If you are able to see the messages in SXMB_MONI of the ERP system then your proxy is working fine however, have problems in ERP System. Follow through the error message it will be easy for you to perform error analysis.
    You can ignore if you have already done it!
    Thanks & Regards,
    Anand Patil

  • Calling Bapi from Dot Net

    Hi All,
    We are Trying to upload Bapi's From Dot Net.
    When we are uploading Sales Order upload i will get this error ""ERROR: Sales document type DG-1 is not defined"" ,But If i Call Again It is not giving the any error and simply its updating the SAP data base.Not only Sales Order upload but Customer Master upload also First time iam getting :"" Invalid form of address text"" This Error...After Second Exectuion I am getting Sucess Message.
    Why My Bapi Call is Not Sucess for First Call and why it is Getting sucess in Second Exection When i am calling bapi from .Net
    how can i solve my Problem?
    Thank you,
    Madhu
    Edited by: madhubabu rao on Oct 24, 2008 8:20 AM

    Hello,
           Refer to the below Thread & Link respectively.
    Re: Call BAPI WS from .NET
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/12f6d390-0201-0010-e18d-cdb4554a9e75
    Thought it might give you some inputs.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

Maybe you are looking for