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

Material Master Conversion

Former Member
0 Likes
728

Hi All,

Currently i am developing a material master convesion thru LSMW.

Below are its object attributes.

Object: 0020

Method:0000

Program Name:RMDATIND.

The issue is:

The target SAP field MARA-LVORM(Flag Material for Deletion at Client Level)is also to be populated, but there are not field in LSMW structure where the value for field LVORM can be specified.

Can the field LVORM be populated by LSMW direct input method? If not pls suggest any other proedure by which this can be achived.

Extra notes:

MM06 transaction is used to assign value to LVORM field for a material.

In my program the input file has a source field called LVORM.

Thanks,

Santosh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
470

Hi,

Standard object RMDATIND has no source field as LVORM hence you cannot delete a material in that case.

What i would suggest you is to write your own code at the field mapping level, so that if LVORM eq 'X', once the LSMW object processing is done, call bapi 'BAPI_MATERIAL_DELETE' to delete the material at client level. ( basically this bapi is calling MM06 transaction)

2 REPLIES 2
Read only

Former Member
0 Likes
471

Hi,

Standard object RMDATIND has no source field as LVORM hence you cannot delete a material in that case.

What i would suggest you is to write your own code at the field mapping level, so that if LVORM eq 'X', once the LSMW object processing is done, call bapi 'BAPI_MATERIAL_DELETE' to delete the material at client level. ( basically this bapi is calling MM06 transaction)

Read only

Former Member
0 Likes
470

I think,we cant put this flag while creating Material thru LSMW.So create the material in the normal way & use bapi to delete it or modify the table with LVORM = 'X'.

So proceed in creating material without this field LVORM & then follow as given below, to update LVORM value in the database.

based the value present in the input file for the material call the BAPI "BAPI_MATERIAL_DELETE".

This code you have to write at END OF TRANSACTION EVENT in the "FIELD MAPPING & CONVERSION RULES".

IF INPUTFILE-LVORM = 'X'.

CALL FUNCTION 'BAPI_MATERIAL_DELETE'.

ENDIF.

regards

srikanth

Message was edited by: Srikanth Kidambi

Message was edited by: Srikanth Kidambi