Skip to Content
author's profile photo Former Member
Former Member

about bapi

depending on what we will create structure in bapi ?

what is header data and item data in bapi?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Dec 02, 2007 at 01:14 PM

    Depending on your requirement the structure of the BAPI will be created. Header and Item data in BAPI will depend on your requirement. Its not that every BAPI will have a header and Item data.

    Consider the scenario of creating a Sales Order ( Using a BAPI ),

    then the header data will be the Header information for the sales order (sales org, document type, division etc.) and the item data will be the line item information for the sales order. ( material, plant, quantity etc)

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      You can check the documentation of the BAPI to create the sales order. It gives a descrption of the structures to be filled and also list the mandatory fields that have to be filled for the BAPI.



  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2007 at 01:17 PM


    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.

    - 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 Transaction 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 transaction code <SE80>.

    Click on Inactive Objects.

    Select the group that you just created and click on Activate.

    - Go back to <SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.

    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.

    - 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 transaction 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.

    BAPI Links



    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2007 at 04:53 AM

    need more inputs or documentation of this bapi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.