04-14-2016 11:06 AM
Hi,
how to convert LSMW batch input recording to abap program?
Is it possible?
04-14-2016 12:29 PM
I think there's no option. You may do a little program to convert it yourself, the LSMW BDC is stored in tables /SAPDMC/LSGBDC*.
04-14-2016 1:56 PM
LSMW programs already are ABAP programs. Each step in LSMW has an ABAP function module behind it. Hence, create a wrapper program to submit each of the LSMW steps sequentially. Don't try to convert LSMW into a single ABAP program.
Eg Function modules for a LSMW using IDocs:
/SAPDMC/LSM_EXE_READPROG_RUN
/SAPDMC/LSM_EXE_CONVPROG_RUN
/SAPDMC/LSM_EXE_IDOCS_CREATE
/SAPDMC/LSM_EXE_IDOCS_PROCESS
Similarly, for BDC
/SAPDMC/LSM_EXE_BI_PROGRAM_RUN
/SAPDMC/LSM_EXE_BI_SESSION_RUN
Other function modules can be found in table /SAPDMC/LSCSTEPS, pass STEPTYPE as EXE.
Thanks,
Juwin
04-14-2016 2:35 PM
In step 1 of LSMW set the radio button to periodic data transfer.
you get then a new step at the end called "Frame program for periodic data transfer"
And this last step can be called using the report /SAPDMC/SAP_LSMW_INTERFACE