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

lsmw problem: for mm01 basic data text two language

WLZ
Advisor
Advisor
0 Likes
792

Dear,

I want to realize, in mm01, under 'basic data text' tab, have English and French text.

I use lsmw, direct input,object:0020, method:0000, program name:RMDATIND.

The basic data text function should be done in structure BMMH7.

Now, I add some codes for BMMH7 after entering 'Display Conversion Program'. But the codes will be covered when the rules changed.

Could you please tell me how to do the same function in 'Maintain Field Mapping and Conversion Rules'?

2 REPLIES 2
Read only

WLZ
Advisor
Advisor
0 Likes
482

Look at the codes I added in conversion program:

***********************************

form convert_transaction.

  check so_tcntr.
  loop at ZMATERIAL.
    perform convert_0001.                                   " BGR00
    perform convert_0002.                                   " BMM00
    perform convert_0003.                                   " BMMH1
    perform convert_0004.                                   " BMMH2
    perform convert_0005.                                   " BMMH3
    perform convert_0006.                                   " BMMH4
    perform convert_0007.                                   " BMMH5
    perform convert_0008.                                   " BMMH6
    perform convert_0009.                                   " BMMH7
* Add start by SAPGD003
    perform convert_0011.                                   " BMMH7
* Add end by SAPGD003
    perform convert_0010.                                   " BMMH8
  ENDLOOP.

* End of transaction
  transfer_transaction.

endform.                    "convert_transaction

***********************************

form convert_0009.                                          " BMMH7

  check g_skip_transaction = no.

  g_skip_record = no.

  g_record = 'BMMH7'.

* --- __BEGIN_OF_RECORD__
  BMMH7 = INIT_BMMH7.

* --- BMMH7-STYPE
  BMMH7-STYPE = '8'.

* --- BMMH7-TDID
  BMMH7-TDID = 'GRUN'.

* --- BMMH7-TDSPRAS
* Add start by SAPGD003
  BMMH7-TDSPRAS = 'F'.
* Add end by SAPGD003

* --- BMMH7-TDFORMAT
  BMMH7-TDFORMAT = '*'.

* --- BMMH7-TDLINE
* Add start by SAPGD003
  BMMH7-TDLINE = zmaterial-TEXTE_CMD_FR .
* Add end by SAPGD003

* --- BMMH7-TDSPRASISO
* Add start by SAPGD003
  BMMH7-TDSPRASISO = 'FR'.
* Add end by SAPGD003

* --- __END_OF_RECORD__
  transfer_record.

  g_skip_record = no.

endform.                    "convert_0009
*************************************************
form convert_0011.                                          " BMMH7

  check g_skip_transaction = no.

  g_skip_record = no.

  g_record = 'BMMH7'.

* --- __BEGIN_OF_RECORD__
  BMMH7 = INIT_BMMH7.

* --- BMMH7-STYPE
  BMMH7-STYPE = '8'.

* --- BMMH7-TDID
  BMMH7-TDID = 'GRUN'.

* --- BMMH7-TDSPRAS
  BMMH7-TDSPRAS = 'E'.

* --- BMMH7-TDFORMAT
  BMMH7-TDFORMAT = '*'.

* --- BMMH7-TDLINE
  BMMH7-TDLINE = zmaterial-TEXTE_CMD_EN .

* --- BMMH7-TDSPRASISO
  BMMH7-TDSPRASISO = 'EN'.

* --- __END_OF_RECORD__
  transfer_record.

  g_skip_record = no.

endform.                    "convert_0011

Read only

Former Member
0 Likes
482

Hi,

If i see your code; I find that you have added the following code

  • Add start by SAPGD003

perform convert_0011. " BMMH7

  • Add end by SAPGD003

Do you want this code from field mapping rules?

In that case you will have to use a separate file for LONG TEXT and that file should have some common field between your main file so that it can be looped.

Regards,

Ankur Parab