Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI Scenario

Former Member
0 Likes
1,221

HI Experts,

Please give one Scenario for BAPI Example.

Thanks & Regards

Raghava

7 REPLIES 7
Read only

Former Member
0 Likes
968

Hi,

Bapis are used in the cross applications.

http://www.erpgenie.com/abap/bapi/example.htm

Regards,

Jagadish

Read only

Former Member
0 Likes
968

Hi,

Refer to the link below:

http://www.saptechnical.com/SampleSpecs/AutoVendorDebitPosting/AVDP.htm

Hope this helps.

Reward if helpful.

Regards,

Sipra

Read only

Former Member
0 Likes
968

Hi,

Refer Example:

Step-by-step procedure for all methods in LSMWhttp://www.saptechnical.com/Tips/LSMW/LSMWMain.htm

Regards,

Shiva Kumar

Read only

Former Member
0 Likes
968

Hi Ragha,

Check the below links,

[http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm|http://www.sap-img.com/abap/bapi-step-by-step-guidance.htm]

[http://help.sap.com/saphelp_nw04/helpdata/en/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/en/e0/9eb2370f9cbe68e10000009b38f8cf/frameset.htm][http://www.sapmaterial.com/bapi.html|http://www.sapmaterial.com/bapi.html]

Regards,

Boobalan Suburaj

Read only

Former Member
0 Likes
968

hi,

To create the custom BAPI, we need to follow this step-by-step procedure. The steps are

Create the BAPI structure.

Create Remote Function Module.

Place the Remote Function Module into BOR (Business Object Repository).

Implement, Generate and Release the BAPI.

Step 1: To create BAPI structure, the structure name should start with the keyword ZBAPI. Here, Two BAPI structures are created in this scenario .The name of these BAPI structures are ZBAPI_IMPORT and ZBAPI_TABLE.

Step 2: ZBAPI_IMPORT structure contains the following fields.

for eg :

Component component type datatype length short desc

vbeln vbeln _va char 10 sales document

Step 3: ZBAPI_TABLE structure contains the following fields.

Component component type datatype length short desc

matnr matnr char 18 material number

posnr posnr _va numc 6sales document item

Step 4: Now, define the Remote Enabled Function Module using T-Code SE37 starting with the ZBAPI . Provide the name of the function module as ZBAPI_DEMO_SD. We must pass the Import and export parameters as value parameters.

select remote-enabled module.

import

parametername type asssociated type passing

vbeln type zbapi_import-vbeln tick in the check box

export

parametername type asssociated type passing

return type Bapi return tick the check box.

Return parameter in the Export parameter contains the error messages. Here, we must create a parameter of type structure BAPIRETURN either in Export Parameter or Table Parameter.

parametername type asssociated type

zitem data like zbapi_table

source code :

select posnr matnr from vbap intotable

zitemdata where vbeln eq vbeln

Step5: Place this Function Module in to BOR using the T-code SWO1. Provide the name of the object and press create

provide object name prog nameand other details.

Step 6: Add our Custom BAPI using Utilities->API Method->Add Method

Now, Provide the created Custom Function Module name and click enter.

Press the Next Step Button.

Press the Next Step Button.

Click the YES button.

Now, Method is added in the BOR.

And Press Save button.

Step 7: Now Implement the BAPI.

Now, Generate the BAPI by clicking symbol u2018ballu2019.

Lastly, Release the BAPI.Step 8: Now test the BAPI by clicking Execute Button.

screen appears and click execute button. Provide the sales document number and press execute button.

now check the output.

pls reward if helpful.

Edited by: Rajyalakshmi Attili on May 23, 2008 3:26 PM