1.SHDB录屏
2.copy代码,可以引入生成的form 或者自己写form
(注意若金额字段报错长度超过屏幕字段则需要转换为char类型的在传给BDC)
DATA: ctu TYPE char1 VALUE 'X',
mode TYPE char1 VALUE 'N',
update TYPE char1 VALUE 'L',
message(200).
DATA: messtab TYPE TABLE OF bdcmsgcoll WITH HEADER LINE.
DATA:lt_bdcdata TYPE TABLE OF bdcdata,
ls_bdcdata TYPE bdcdata.
DEFINE bdc_dynpro.
CLEAR ls_bdcdata.
ls_bdcdata-program = &1.
ls_bdcdata-dynpro = &2.
ls_bdcdata-dynbegin = 'X'.
APPEND ls_bdcdata TO lt_bdcdata.
END-OF-DEFINITION.
DEFINE bdc_field.
CLEAR ls_bdcdata.
ls_bdcdata-fnam = &1.
ls_bdcdata-fval = |{ &2 }|.
APPEND ls_bdcdata TO lt_bdcdata.
END-OF-DEFINITION.
LOOP AT gt_excle INTO gs_excle WHERE checkbox = 'X'.
bdc_dynpro 'SAPMM60X' '0106'.
bdc_field 'BDC_CURSOR'