重复制造Bapi
SPAN {
font-family: "BatangChe";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}
.L0S31 {
font-style: italic;
color: #808080;
}
.L0S33 {
color: #4DA619;
}
.L0S52 {
color: #0000FF;
}
.L0S55 {
color: #800080;
}
.L0S70 {
color: #808080;
}
FORM CREATE_BAPI USING P_MENGE.
CLEAR :GV_BFLUSHDATAGEN,GV_BFLUSHFLAGS,GV_BFLUSHDATAMTS,
GV_CONFIRMATION,GV_RETURN.
IF GT_DISP_LIST-SFEPR = 'Z001'
OR GT_DISP_LIST-SFEPR = 'Z002'.
GV_BFLUSHFLAGS-BCKFLTYPE = '01'.
GV_BFLUSHFLAGS-ACTIVITIES_TYPE = '1'.
ELSEIF GT_DISP_LIST-SFEPR = 'Z003'.
GV_BFLUSHFLAGS-BCKFLTYPE = '02'.
GV_BFLUSHFLAGS-ACTIVITIES_TYPE = '2'.
GV_BFLUSHDATAMTS-REPPOINT = GT_DISP_LIST-VORNE.
* gv_bflushflags-RP_SCRAPTYPE = 'X'.123
ENDIF.
GV_BFLUSHDATAGEN-MATERIALNR = GT_DISP_LIST-MATNR.
GV_BFLUSHDATAGEN-PRODPLANT = P_WERKS.
GV_BFLUSHDATAGEN-PLANPLANT = P_WERKS.
GV_BFLUSHDATAGEN-STORAGELOC = GT_DISP_LIST-LGORT.
GV_BFLUSHDATAGEN-PRODVERSION = GT_DISP_LIST-VERID.
GV_BFLUSHDATAGEN-PRODLINE = GT_DISP_LIST-MDV01.
GV_BFLUSHDATAGEN-POSTDATE = GT_DISP_LIST-BUDAT.
GV_BFLUSHDATAGEN-DOCDATE = GT_DISP_LIST-BUDAT.
GV_BFLUSHDATAGEN-BACKFLQUANT = P_MENGE.
GV_BFLUSHDATAGEN-UNITOFMEASURE = GT_DISP_LIST-MEINH.
GV_BFLUSHDATAGEN-DOCHEADERTXT = GT_DISP_LIST-LOT.
CALL FUNCTION 'BAPI_REPMANCONF1_CREATE_MTS'
EXPORTING
BFLUSHFLAGS = GV_BFLUSHFLAGS
BFLUSHDATAGEN = GV_BFLUSHDATAGEN
BFLUSHDATAMTS = GV_BFLUSHDATAMTS
IMPORTING
CONFIRMATION = GV_CONFIRMATION
RETURN = GV_RETURN.
IF GV_CONFIRMATION IS NOT INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
CONCATENATE GV_CONFIRMATION '/' GT_DISP_LIST-MESSAGE
INTO GT_DISP_LIST-MESSAGE.
* GT_DISP_LIST-MESSAGE = GV_CONFIRMATION.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
CONCATENATE GV_RETURN-MESSAGE '/' GT_DISP_LIST-MESSAGE
INTO GT_DISP_LIST-MESSAGE.
* GT_DISP_LIST-MESSAGE = GV_RETURN-MESSAGE.
GT_DISP_LIST-ICON = ICON_RED_LIGHT.
ENDIF.
MOVE-CORRESPONDING GV_RETURN TO GS_RET.
APPEND GS_RET TO GT_RET2.
ENDFORM. " CREATE_BAPI
网页标题:重复制造Bapi
转载来于:http://pwwzsj.com/article/piiheo.html
CLEAR :GV_BFLUSHDATAGEN,GV_BFLUSHFLAGS,GV_BFLUSHDATAMTS,
GV_CONFIRMATION,GV_RETURN.
IF GT_DISP_LIST-SFEPR = 'Z001'
OR GT_DISP_LIST-SFEPR = 'Z002'.
GV_BFLUSHFLAGS-BCKFLTYPE = '01'.
GV_BFLUSHFLAGS-ACTIVITIES_TYPE = '1'.
ELSEIF GT_DISP_LIST-SFEPR = 'Z003'.
GV_BFLUSHFLAGS-BCKFLTYPE = '02'.
GV_BFLUSHFLAGS-ACTIVITIES_TYPE = '2'.
GV_BFLUSHDATAMTS-REPPOINT = GT_DISP_LIST-VORNE.
* gv_bflushflags-RP_SCRAPTYPE = 'X'.123
ENDIF.
GV_BFLUSHDATAGEN-MATERIALNR = GT_DISP_LIST-MATNR.
GV_BFLUSHDATAGEN-PRODPLANT = P_WERKS.
GV_BFLUSHDATAGEN-PLANPLANT = P_WERKS.
GV_BFLUSHDATAGEN-STORAGELOC = GT_DISP_LIST-LGORT.
GV_BFLUSHDATAGEN-PRODVERSION = GT_DISP_LIST-VERID.
GV_BFLUSHDATAGEN-PRODLINE = GT_DISP_LIST-MDV01.
GV_BFLUSHDATAGEN-POSTDATE = GT_DISP_LIST-BUDAT.
GV_BFLUSHDATAGEN-DOCDATE = GT_DISP_LIST-BUDAT.
GV_BFLUSHDATAGEN-BACKFLQUANT = P_MENGE.
GV_BFLUSHDATAGEN-UNITOFMEASURE = GT_DISP_LIST-MEINH.
GV_BFLUSHDATAGEN-DOCHEADERTXT = GT_DISP_LIST-LOT.
CALL FUNCTION 'BAPI_REPMANCONF1_CREATE_MTS'
EXPORTING
BFLUSHFLAGS = GV_BFLUSHFLAGS
BFLUSHDATAGEN = GV_BFLUSHDATAGEN
BFLUSHDATAMTS = GV_BFLUSHDATAMTS
IMPORTING
CONFIRMATION = GV_CONFIRMATION
RETURN = GV_RETURN.
IF GV_CONFIRMATION IS NOT INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
CONCATENATE GV_CONFIRMATION '/' GT_DISP_LIST-MESSAGE
INTO GT_DISP_LIST-MESSAGE.
* GT_DISP_LIST-MESSAGE = GV_CONFIRMATION.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
CONCATENATE GV_RETURN-MESSAGE '/' GT_DISP_LIST-MESSAGE
INTO GT_DISP_LIST-MESSAGE.
* GT_DISP_LIST-MESSAGE = GV_RETURN-MESSAGE.
GT_DISP_LIST-ICON = ICON_RED_LIGHT.
ENDIF.
MOVE-CORRESPONDING GV_RETURN TO GS_RET.
APPEND GS_RET TO GT_RET2.
ENDFORM. " CREATE_BAPI
网页标题:重复制造Bapi
转载来于:http://pwwzsj.com/article/piiheo.html