| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
Modifying BAPI to fit custom requirements in LSMWBy Vani 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. Example: 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
implemented. Business Object: 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). Generate ALE
Interface: 5.
Goto transaction BDBG to generate ALE interface for the BAPI.
Create the interface as shown below.
6.
The message type, IDOC type and the inbound function module are created. LSMW: 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 Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
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 |
||