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

error when inserting code in lsmw

Former Member
0 Likes
506

hello i need to retrieve material number from isbn number.i have written the following code

data:wa_isbn type jptidcdassign,

wa_mara type jptidcdassign,

it_isbn type standard table of jptidcdassign,

it_mara type standard table of mara.

selection-screen: begin of block b1 with frame TITLE TEXT-001.

parameters:p_isbn type ismidentcode.

selection-screen: end of block b1.

start-of-selection

select single matnr identcode from jptidcdassign into corresponding fields of wa_isbn where identcode = p_isbn.

if sy-subrc = 0.

write:/ wa_isbn_matnr.

endif.

this code is working fine in abap editor but giving error as selection-screen and parameter is not allowed when i try to retrieve matnr while transfering legacy data.can any body help me as iam new to lsmw

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
461

Hi Priya,

Pass the ISBN number as a field in the file which you are using for LSMW.

Then there is no need to write the selection screen code.

You can use the value passed in file to get the material number.

Regards,

Atish

3 REPLIES 3
Read only

Former Member
0 Likes
462

Hi Priya,

Pass the ISBN number as a field in the file which you are using for LSMW.

Then there is no need to write the selection screen code.

You can use the value passed in file to get the material number.

Regards,

Atish

Read only

0 Likes
461

hello arith

the logic here is that isbn number comes from legacy system isbn number have corresponding matnr in sap data base .what i need to do is to populate matnr in matnr feild when flat file containing isbn number is uploaded .so please tell me how i should do this in lsmw.

Regards

priya

Read only

0 Likes
461

Hi Priya,

You have to write your piece of code in the tab "Maintain Fixed Values, Translations, User-Defined Routines" of the LSMW.

There you can write a code to get the MATNR field from DB using ISBN number.

Please let me know if you require furthe clarification.

Regards,

Atish