REPORT ZTEST4.
data wa_csin type CSIN.
data g_warn_stlnr type STZUB-STLNR.
data g_flwarning type CAPIFLAG-FLWARNING.
cLEAR wa_csin.
* wa_csin-aennr = '009900159470'.
wa_csin-MATNR = '000000000000001223'.
"wa_csin-datuv = sy-datum.
wa_csin-PSPNR = '00032666'.
wa_csin-werks = '2000' .
wa_csin-stlan = '1'. " 4
wa_csin-stlty = 'P'.
data: l_text type string.
CALL FUNCTION 'CSAI_BOM_DELETE'
EXPORTING
ECSIN = wa_csin
FL_COMMIT_AND_WAIT = 'X'
" FL_NO_COMMIT_WORK = ' '
IMPORTING
fl_warning = g_flwarning
EXCEPTIONS
ERROR = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO into l_text
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
write l_text.
else.
write 'ok'.
commit work and wait.
ENDIF.
标签:CSAI,SY,WBS,wa,data,BOM,text,type,csin
From: https://blog.51cto.com/u_8215601/7508968