bdc例子
作者:admin 日期:2009-08-06
*&---------------------------------------------------------------------*
*& Report ZBDCTEST
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
report ZBDCTEST
no standard page heading line-size 255.
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 ***
data: begin of record,
* data element: MATNR
MATNR_001(018),
* data element: XFELD
KZSEL_01_002(001),
* data element: XFELD
KZSEL_02_003(001),
* data element: MAKTX
MAKTX_004(040),
* data element: MEINS
MEINS_005(003),
* data element: MTPOS_MARA
MTPOS_MARA_006(004),
* data element: GEWEI
GEWEI_007(003),
end of record.
*** End generated data section ***
start-of-selection.
perform open_dataset using dataset.
perform open_group.
do.
read dataset dataset into record.
if sy-subrc <> 0. exit. endif.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR' 'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE' '=AUSW'.
ENDDO.
*& Report ZBDCTEST
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
report ZBDCTEST
no standard page heading line-size 255.
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 ***
data: begin of record,
* data element: MATNR
MATNR_001(018),
* data element: XFELD
KZSEL_01_002(001),
* data element: XFELD
KZSEL_02_003(001),
* data element: MAKTX
MAKTX_004(040),
* data element: MEINS
MEINS_005(003),
* data element: MTPOS_MARA
MTPOS_MARA_006(004),
* data element: GEWEI
GEWEI_007(003),
end of record.
*** End generated data section ***
start-of-selection.
perform open_dataset using dataset.
perform open_group.
do.
read dataset dataset into record.
if sy-subrc <> 0. exit. endif.
perform bdc_dynpro using 'SAPLMGMM' '0060'.
perform bdc_field using 'BDC_CURSOR' 'RMMG1-MATNR'.
perform bdc_field using 'BDC_OKCODE' '=AUSW'.
ENDDO.
评论: 0 | 引用: 0 | 查看次数: 3020
发表评论
你没有权限发表留言!