‎2008 Aug 25 10:38 AM
hi all,
i am using the below code to set the parameter id to project , subproject and object for the t-code in lsmw. but when it goes to lsmw
it does not take these values in lsmw . can anyone please check where i am going wrong? thanks in advance.
*******************************************
at selection-screen.
data: project type /SAPDMC/LSSCREEN-PROJECT,
subproj type /SAPDMC/LSSCREEN-SUBPROJ,
object type /SAPDMC/LSSCREEN-OBJECT.
if sscrfields-ucomm eq 'CLI1'.
if p_up = 'X'.
data: project type c length 20 value 'SIVA',
subproj type c length 20 value 'PRICING',
object type c length 20 value 'SD'.
proj = 'SIVA'.
subproj = 'PRICING'.
obj = 'SD'.
SET PARAMETER ID: PROJECT FIELD PROJECT,
SUBPROJ FIELD SUBPROJ,
OBJECT FIELD OBJECT.
call transaction 'LSMW' and skip first screen.
endif.
*******************************************
saurabh.
‎2008 Aug 25 10:45 AM
hi,
looking at the source code of LSMW, not parameter ID is what you need, but memory id:
IMPORT /SAPDMC/LSMEMORY FROM MEMORY ID '/SAPDMC/LSMW'.
IF SY-SUBRC = 0.
PROJECT = /SAPDMC/LSMEMORY-PROJECT.
SUBPROJ = /SAPDMC/LSMEMORY-SUBPROJ.
OBJECT = /SAPDMC/LSMEMORY-OBJECT.
ELSE.
...
ENDIF.code}
use EXPORT TO MEMORY ... statement in your program acc. to the needs above.
hope this helps
ec
‎2008 Aug 25 10:45 AM
hi,
looking at the source code of LSMW, not parameter ID is what you need, but memory id:
IMPORT /SAPDMC/LSMEMORY FROM MEMORY ID '/SAPDMC/LSMW'.
IF SY-SUBRC = 0.
PROJECT = /SAPDMC/LSMEMORY-PROJECT.
SUBPROJ = /SAPDMC/LSMEMORY-SUBPROJ.
OBJECT = /SAPDMC/LSMEMORY-OBJECT.
ELSE.
...
ENDIF.code}
use EXPORT TO MEMORY ... statement in your program acc. to the needs above.
hope this helps
ec
‎2008 Sep 29 10:29 AM
Hi Eric,
I just tried this method now and it has worked terrific. Thanks a lot.
Regards
SM.