- TYPES:BEGIN OF TYP_01,
- MATNR TYPE MAKT-MATNR,
- MAKTX TYPE MAKT-MAKTX,
END OF TYP_01.
DATA GT_01 TYPE STANDARD TABLE OF TYP_01.
DATA GS_01 TYPE TYP_01.
- GS_01-MATNR = '1647'.
- GS_01-MAKTX = '不愉快的果实'.
APPEND GS_01 TO GT_01.
include bdcrecx1.
parameters: dataset(132) lower case.
- *** DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
- *
- * If it is nessesary to change the data section use the rules:
- * 1.) Each definition of a field exists of two lines
- * 2.) The first line shows exactly the comment
- * '* data element:' followed with the data element
* which describes the field.
- * If you don't have a data element use the
- * comment without a data element name
- * 3.) The second line shows the fieldname of the
- * structure, the fieldname must consist of
- * a fieldname and optional the character '_' and
- * three numbers and the field length in brackets
* 4.) Each field must be type C.
- *
- *** Generated data section with specific formatting - DO NOT CHANGE ***
- start-of-selection.
perform open_group.
LOOP AT GT_01 INTO GS_01.
- perform bdc_dynpro using 'SAPLMGMM' '0060'.
- perform bdc_field using 'BDC_CURSOR'
- 'RMMG1-MATNR'.
- perform bdc_field using 'BDC_OKCODE'
- '=AUSW'.
- perform bdc_field using 'RMMG1-MATNR'
- GS_01-MATNR.
- perform bdc_dynpro using 'SAPLMGMM' '0070'.
- perform bdc_field using 'BDC_CURSOR'
- 'MSICHTAUSW-DYTXT(09)'.
- perform bdc_field using 'BDC_OKCODE'
- '=SCHL'.
- perform bdc_field using 'MSICHTAUSW-KZSEL(01)'
- 'X'.
- perform bdc_field using 'MSICHTAUSW-KZSEL(02)'
- 'X'.
- perform bdc_field using 'MSICHTAUSW-KZSEL(03)'
- 'X'.
- perform bdc_field using 'MSICHTAUSW-KZSEL(06)'
- 'X'.
- perform bdc_field using 'MSICHTAUSW-KZSEL(07)'
- 'X'.
- perform bdc_field using 'MSICHTAUSW-KZSEL(08)'
- 'X'.
- perform bdc_field using 'MSICHTAUSW-KZSEL(09)'
- 'X'.
- perform bdc_dynpro using 'SAPLMGMM' '0080'.
- perform bdc_field using 'BDC_CURSOR'
- 'RMMG1-LGORT'.
- perform bdc_field using 'BDC_OKCODE'
- '=ENTR'.
- perform bdc_field using 'RMMG1-WERKS'
- '2010'.
- perform bdc_field using 'RMMG1-LGORT'
- '3000'.
- perform bdc_dynpro using 'SAPLMGMM' '4004'.
- perform bdc_field using 'BDC_OKCODE'
- '=BU'.
- perform bdc_field using 'BDC_CURSOR'
- 'MAKT-MAKTX'.
- perform bdc_field using 'MAKT-MAKTX'
- GS_01-MAKTX.
- perform bdc_field using 'MARA-MEINS'
- 'PC'.
- perform bdc_field using 'MARA-MATKL'
- '0001'.
- perform bdc_field using 'MARA-MTPOS_MARA'
- 'NORM'.
- perform bdc_transaction using 'MM02'.
ENDLOOP .
perform close_group.
来源: http://www.bubuko.com/infodetail-3304432.html