|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Modifying BAPI to fit custom requirements in LSMW
A Typical Business Scenario:
Consider a scenario where the existing BAPI function module doesn’t cater to your needs and you need to make some changes to the code. You can take a copy of the BAPI function module to achieve the functionality. In this case we also need to take a copy of the Business object and the steps are as follows.
Consider the below example for detailed explanation of all
the steps required.
Materials can be uploaded by using a BAPI function module BAPI_MATERIAL_SAVEREPLICA. The corresponding business object is BUS1001006.
Consider a case The Material
Upload LSMW’s that can be created using a BAPI function module (BAPI_MATERIAL_SAVEREPLICA)
for creating different material views. Now there is a requirement, which demands
for some changes in the function module. Then the following steps are to be
1. Copy the original function module BAPI_MATERIAL_SAVEREPLICA as ZBAPI_MATERIAL_SAVEREPLICA. Make necessary code changes to the function module code.
2. Copy the Business Object BUS1001006 as ZMATERIAL using the transaction SWO1 as shown below.
3. Now we need to include our
custom function module (ZBAPI_MATERIAL_SAVEREPLICA) in the SAVEREPLICA method of
the business object as shown below.
4. Generate and Release the Business object (ZMATERIAL).
Goto transaction BDBG to generate ALE interface for the BAPI.
Create the interface as shown below.
The message type, IDOC type and the inbound function module are created.
7. Go to transaction LSMW and on the initial screen, click on SETTINGS à iDoc Inbound Processing. Maintain the Port and Partner Profile by entering the Port and Partner number and Partner Type.
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards