Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

problem with set parameter id

Former Member
0 Likes
757

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.

1 ACCEPTED SOLUTION
Read only

JozsefSzikszai
Active Contributor
0 Likes
635

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

2 REPLIES 2
Read only

JozsefSzikszai
Active Contributor
0 Likes
636

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

Read only

0 Likes
635

Hi Eric,

I just tried this method now and it has worked terrific. Thanks a lot.

Regards

SM.