Custom BAPI creation - Step-by-step Procedure

By Raghava Vakada, Mouri Tech Solutions

Scenario: Step-by-step creation of a BAPI to retrieve fields from table T001.

Procedure: Go to transaction SE11 and create a structure as shown or as per your requirement.

Give the name in the Data type field and click create. 

 

 

In the pop-up that comes up, select the radio button “ structure”. 

In the components tab of the structure, give the different fields and their corresponding field types and press enter to check the compatibility and corrective ness.

 

Do not forget to save it in a package. You can even save it as a local object. For my example, I save it in a package. 

 

Check the structure (ctrl + F2) and activate (ctrl + F3) the structure. 

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Now we are done with the creation of a Structure.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

 

Go to transaction SE37 where you create function modules. Click on create after you enter the name of the Function module. 

A screen as shown above would pop-up where you mention the function group to save the function module and also provide some short text describing your function module. 

 

In the next pop-up that follows, click on continue as shown above. 

 

The function module screen would look like the one above. 

 

Go to the Attributes tab and select the radio button reading “remote-enabled module”. Come back to the imports tab and provide the import parameters as shown or as per your requirement. 

 

Now in the Export tab, provide the export parameters as shown or as per your requirement. 

 

In the tables tab, provide the information as shown or as per your requirement. 

 

The next screen you visit is the source code. It would look like this.

 

In the source code tab, write the following code in order to pick the data based on the input you provide. 

 

Now, save and check the code and activate the function module.

Continued....

 

Please send us your feedback/suggestions at webmaster@SAPTechnical.COM 

HomeContribute About Us Privacy Terms Of Use • Disclaimer • SafeCompanies: Advertise on SAPTechnical.COM | Post JobContact Us  

Graphic Design by Round the Bend Wizards

footer image footer image