06-09-2008 7:33 AM
In lsmw using bapi in the step u201CMaintain Field Mapping and Conversion Rulesu201D we are supposed to write code under
beginof_record_.how do we do that.i mean does the field
beginof_record_ get automatically generated.if yes then how?
06-09-2008 7:36 AM
HI,
befor going with bapi and idoc u have to specify some setting.
First in LSMW transaction u have to select Settings in the menu bar and specify the Port , Partner type and Partner number.
Now in maintain object attributes specify the business object, methods and continue with other steps.
Refer this links also
http://www.sap-img.com/sap-data-migration.htm
http://www.sapgenie.com/saptech/lsmw.htm
http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
thanks
karthik
06-09-2008 10:38 AM
HI Shah,
First, though the LSMW have 4 way to inbound include IDOC and BAPI, the IDOC mentioned in BAPI is different with IDOC way.
If you want to configure in a BAPI way, first you need to create a ALE message for a BAPI, you can do this in the BAPI explore, show a BAPI, and double click the ALE message field on the screen, or though the tcode BDBG.
After you create the ALE message for this BAPI, the server will automatively generate a new ALE idoc message type, and two function inbound and outbound to handle this kind of idoc. You only need to remeber the new ALE message type name.
Next, you can configure the LSMW for BAPI ,(if you don't do the first step, the BO can't been choosen in the LSMW).
Then you choose the BO and method appropriately. The target structure of this LSMW scenario is the IDOC type of you create for this BAPI.
Then left steps are similar with normally LSMW step. Something specially, you will find the ALE IDOC message is very likely the interface you can BAPI, but added a control header for IDOC.
As the LSMW only inbound in the local, the control header should keep the default value LSMW set, a file port BAPI assigned to the send port.
If everything goes well, when you run LSMW scenario, the target structure will be filled, and send to the ALE layer, just generate a ALE IDOC and send to system, the effect of it just like you call BAPI, but in a asynchronous way.
The below link gives step by step process of creating LSMw with Bapi.
Chk it.
http://www.saptechnical.com/Tutorials/LSMW/MMBAPI/Page1.htm
Reward Points if Useful
Warm Regards
Gokul