Application Development 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: 

Direct Input Program

Former Member
0 Kudos

Hi,

I am using LSMW for loading materials and RMDATIND. I need to load only materials whose old material number does not exist in the table MARA.

For example: in the spreadsheet , if i have Old material number:

RECORD OLD MATERIAL NUMBER

-


REC1 345

REC2 345

Since it does not exist in the table MARA, it is loading both the records.

But I want REC1 to be loaded, not REC2.......

Is it possible to load only REC1?

2 REPLIES 2

Former Member
0 Kudos

Vamsee,

if you want to write any sort of logic u can write in begin of record or begin of transaction in field mapping and conversion step...

while you are passing the material number you can check whether the material is already existing in mara or not...

it is existing then skip the record and write to the error log so that u can have the track of the records..

if it is not existing then load the material

I think it would be helpful for you

~~Guduri

Former Member
0 Kudos

Hi,

You can write your custom code in the "Maintain Field Mapping and conversion rules Step". .

To be able to see all the events available in LSMW , change the layout using ( Ctrl + F7 ) in this step. Then you will be able to see events like "__GLOBAL_DATA__" , "__BEGIN_OF_PROCESSING__" ... etc.

Now write a code in the Begin of processing as below:

1) Check wether we have the material available in MARA , if the material is available the say CONTINUE ( This skips the current record & gets the second record). If there is no record available in MARA then continue your current process.

Hope this helps you..

Regards,

Suresh