标签:
1.输入事务代码SHBD进入以下界面:
点击新建记录,创建一个新的BDC录屏记录,
然后根据记录条件进行
BDC录屏代码
perform fill_bdc using ANLKL.
call transaction ‘AS02‘ using bdcdata_tab mode lv_mode messages into it_mess.
loop at it_mess into iw_mess where msgtyp eq ‘E‘.
call function ‘MESSAGE_TEXT_BUILD‘
exporting
msgid = iw_mess-msgid
msgnr = iw_mess-msgnr
msgv1 = iw_mess-msgv1
msgv2 = iw_mess-msgv2
msgv3 = iw_mess-msgv3
msgv4 = iw_mess-msgv4
importing
message_text_output = w_msg1.
"itab-msg = w_msg1.
concatenate itab-msg ‘ ‘ w_msg1 into itab-msg.
clear:iw_mess.
endloop.
modify itab.
clear:itab.
free:it_mess,bdcdata_tab.
form fill_bdc using ANLKL type string.
bdcdata_wa-program = ‘SAPLAIST‘.
bdcdata_wa-dynpro = ‘0100‘.
bdcdata_wa-dynbegin = ‘X‘.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = ‘BDC_OKCODE‘.
bdcdata_wa-fval = ‘MAST‘.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = ‘ANLA-BUKRS‘.
bdcdata_wa-fval = ‘9000‘.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = ‘ANLA-ANLN2‘."次级编号
bdcdata_wa-fval = itab-ANLN2.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
bdcdata_wa-fnam = ‘ANLA-ANLN1‘."资产编号
bdcdata_wa-fval = itab-ANLN1.
append bdcdata_wa to bdcdata_tab.
clear bdcdata_wa.
endform.
标签:
原文地址:http://www.cnblogs.com/QIANQIANHAPPY/p/5286063.html