Age: 160 Joined: 04 Oct 2007 Posts: 1218 Location: Санкт-Петербург
Posted: Fri Aug 27, 2010 9:36 am Post subject: BAPI_MATINSPCTRL_SAVEREPLICA
BAPI_MATINSPCTRL_SAVEREPLICA - Replication of QM inspection setup
Code:
REPORT z_update_qmat.
*Internal table to store messages returned from BAPI
DATA:
ws_return LIKE " To store status
bapiret2 OCCURS 0 WITH HEADER LINE.
* Internal table to store Inspection details to pass
* as parameter to BAPI
DATA:
BEGIN OF ws_qmat OCCURS 0.
INCLUDE STRUCTURE bapi1001004_qmat.
DATA:
END OF ws_qmat.
DATA:
ws_insp(2).
* Retrieving Quality Score procedure from TQ34 table
SELECT SINGLE qkzverf
FROM tq34
INTO ws_insp
WHERE art = 'C003'.
CALL FUNCTION 'BAPI_MATINSPCTRL_SAVEREPLICA'
TABLES
return = ws_return
inspectionctrl = ws_qmat.
IF sy-subrc NE 0.
* No sy-subrc check is required
ENDIF. " IF SY-SUBRC NE 0
IF ws_return-type EQ 'S' OR
ws_return-type EQ 'I' OR
ws_return-type EQ 'W'.
* To commit the transation for succesfull records
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
ENDIF.
_________________ Молитва - это запрос разработчику на изменение кода программы.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.