1.SAP万能BDC的zjz源码源代码是什么?
SAP万能BDC的源代码是什么?
form bdc_dynpro using program dynpro.
clear bdcdata.
bdcdata-program = program.
bdcdata-dynpro = dynpro.
bdcdata-dynbegin = 'X'.
append bdcdata.
endform. " bdc_dynpro
form bdc_field using fnam fval.
clear bdcdata.
bdcdata-fnam = fnam.
bdcdata-fval = fval.
append bdcdata.
endform. " bdc_field
form bdc_transaction using tcode.
data: l_mstring().
data: l_subrc like sy-subrc.
DATA: zwa_bdcmsgcoll LIKE zbdcmsgcoll.
refresh messtab.
REFRESH ZHEAD_RETURN.
call transaction tcode using bdcdata
mode ctumode
update cupdate
messages into messtab.
LOOP AT messtab.
CLEAR zwa_bdcmsgcoll.
MOVE-CORRESPONDING messtab TO zwa_bdcmsgcoll.
SELECT SINGLE * FROM t WHERE sprsl = messtab-msgspra
AND arbgb = messtab-msgid
AND msgnr = messtab-msgnr.
IF sy-subrc = 0.
l_mstring = t-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH messtab-msgv1 INTO l_mstring.
REPLACE '&2' WITH messtab-msgv2 INTO l_mstring.
REPLACE '&3' WITH messtab-msgv3 INTO l_mstring.
REPLACE '&4' WITH messtab-msgv4 INTO l_mstring.
ELSE.
REPLACE '&' WITH messtab-msgv1 INTO l_mstring.
REPLACE '&' WITH messtab-msgv2 INTO l_mstring.
REPLACE '&' WITH messtab-msgv3 INTO l_mstring.
REPLACE '&' WITH messtab-msgv4 INTO l_mstring.
ENDIF.
CONDENSE l_mstring.
zwa_bdcmsgcoll-ztext = l_mstring.
CLEAR l_mstring.
ENDIF.
APPEND zwa_bdcmsgcoll TO zhead_return.
CLEAR zwa_bdcmsgcoll.
ENDLOOP.
refresh bdcdata.