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: 

Data Conversion Program in LSMW

Former Member
0 Kudos

Hi ,

1. I am new to LSMW. Could you please explain When Data Conversion Program (/1CADMC/SAP_LSMW_CONV_00000010)will be generated. What is the source for this. Can we edit this program.

Since I changed source structure where I need to write convertion routines.

2. How do I transport my changes to Quality/ production servers?

Thanks

Rays

5 REPLIES 5

Former Member
0 Kudos

1. I am new to LSMW. Could you please explain When Data Conversion Program (/1CADMC/SAP_LSMW_CONV_00000010)will be generated. What is the source for this. Can we edit this program.

Since I changed source structure where I need to write convertion routines.

Conversion program is generated depnding on your field mapping. you can change the conversion program. but make sure that changes will be remained after you did some chnages in field mapping again and generate the conversion program again. there are chnaces that the chnages will go out.

so better you can write code in field mapping. you can do that. Conversion routines, validations anything you can write in field mapping.

2. How do I transport my changes to Quality/ production servers?

Go to LSMW intial screen -> Extras --> Generate change request. then you can transport the LSMW. remember that you can transport a full project. not a single object.

0 Kudos

Hi Jyothi,

I got your point. My convertion program getting rewritten every time I execute step 'Maintain Field Mapping and Conversion Rules'.

Problem is I am not able to see the code any where in the steps, Which i am currently in convertion program.

Here is example:

I am not able to see the following code from LSMW steps.

When I open program /1CADMC/SAP_LSMW_CONV_00000010: following code is there.

  • Process last transaction.

perform convert_transaction.

&----


*& Form convert_transaction

&----


  • text

----


form convert_transaction.

check so_tcntr.

  • Begin of transaction

  • __BEGIN_OF_TRANSACTION__

REFRESH BTCH_CHAR.

          • Update Customer Name

MOVE-CORRESPONDING MATL TO BTCH_CHAR.

IF NOT MATL-CUSTNAME IS INITIAL.

MOVE 'MM_CUSTOMER_NAME' TO BTCH_CHAR-CHAR_NAME.

MOVE MATL-CUSTNAME TO BTCH_CHAR-CHAR_VALUE.

APPEND BTCH_CHAR.

ENDIF.

          • Update Customer Part ID

MOVE-CORRESPONDING MATL TO BTCH_CHAR.

IF NOT MATL-CUSTPARTID IS INITIAL.

IF MATL-CUSTPARTID NE 'NA' AND MATL-CUSTPARTID NE 'TBD'.

MOVE 'MM_CUSTOMER_PARTID' TO BTCH_CHAR-CHAR_NAME.

MOVE MATL-CUSTPARTID TO BTCH_CHAR-CHAR_VALUE.

APPEND BTCH_CHAR.

ENDIF.

ENDIF.

          • Update E-Sort Yield Info

CLEAR BTCH_CHAR.

MOVE-CORRESPONDING MATL TO BTCH_CHAR.

IF NOT MATL-ESORT IS INITIAL.

MOVE 'MM_ESORT_YIELD' TO BTCH_CHAR-CHAR_NAME.

IF MATL-ESORT GE 'A'.

CLEAR MATL-ESORT.

ELSE.

MOVE MATL-ESORT TO BTCH_CHAR-CHAR_VALUE.

ENDIF.

APPEND BTCH_CHAR.

ENDIF.

          • Update Defect Density Info

CLEAR BTCH_CHAR.

MOVE-CORRESPONDING MATL TO BTCH_CHAR.

IF NOT MATL-DEFECT IS INITIAL.

MOVE 'MM_DEFECT_DENSITY' TO BTCH_CHAR-CHAR_NAME.

IF MATL-DEFECT GE 'A'.

CLEAR MATL-DEFECT.

ELSE.

MOVE MATL-DEFECT TO BTCH_CHAR-CHAR_VALUE.

ENDIF.

APPEND BTCH_CHAR.

ENDIF.

          • Update Gross Die Per Wafer

CLEAR BTCH_CHAR.

IF NOT MATL-GDPW IS INITIAL.

MOVE-CORRESPONDING MATL TO BTCH_CHAR.

MOVE 'MM_GROSS_DIE_PER_WAFER' TO BTCH_CHAR-CHAR_NAME.

IF MATL-GDPW GE 'A'.

CLEAR MATL-GDPW.

ELSE.

MOVE MATL-GDPW TO BTCH_CHAR-CHAR_VALUE.

ENDIF.

APPEND BTCH_CHAR.

ENDIF.

SEARCH MATL-PARTID FOR 'ZZZZ'.

IF SY-SUBRC NE 0.

MOVE MATL-MATNR TO OBJECT.

CALL FUNCTION 'CLAF_CHECK_ALLOCATION'

EXPORTING

CLASSNAME = 'SSMC_PRODUCT_CLS01'

  • classnumber = ' '

CLASSTYPE = '023'

OBJECT = OBJECT

  • KEY_DATE = SY-DATUM

  • CHANGE_SERVICE_CLF = 'X'

  • CHANGE_NUMBER = ' '

TABLE = 'MARA'

IMPORTING

ALLOCATION_EXIST = EXIST_FLG

  • ALLOCATION_EXIST_IN_FUTURE =

.

IF EXIST_FLG IS INITIAL.

MOVE '023' TO MATL-CLASS_TYPE.

ADD 100000 TO MATL-RECNR_000001.

APPEND MATL.

ENDIF.

ENDIF.

loop at MATL.

perform convert_0001. " BIKSSK

loop at BTCH_CHAR

where recnr_000001 =

MATL-recnr_000001.

perform convert_0002. " BIAUSP

ENDLOOP.

ENDLOOP.

  • End of transaction

transfer_transaction.

endform. "convert_transaction

0 Kudos

Jyothi,

I dont know how system generated that code. Not able to find in LSMW steps.

only i can see this when I open Read Convert program.

Could you help me on this.

1. My source structure is
 MATL                     Material
     BTCH_CHAR                batch characteristics

2. Structure Relations
       BIKSSK Classification: Batch Input                   <<<< MATL      Material
              Select Target Structure BIKSSK .
           BIAUSP Classification: Batch Input    <<<< BTCH_CHAR batch characteristics

Rays

Former Member
0 Kudos

Hi

Here is an example showing the way to use the conversion tool LSMW in SAP. It starts in the start-up screen of LSMW transaction and ends with a screen on which the results of the conversion are displayed

If you want to create or change objects, make sure that you are working in change mode. To activate this mode, click Change in the corresponding processing step. Only this mode provides all functions required for changing objects

Former Member
0 Kudos

HI,

here is solution. Execute step 3(Field mapping and convertion rules).

Here the default layout is Global definitions are not visible.

So Goto Extras-->Layout then check Global data definitions. Thens its visible to you and then can change now.

This global part of code will be excuted Before Transaction Processing Starts.

Thanks & Regards

Rayudu