SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

BAPI_MATINSPCTRL_SAVEREPLICA



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI
View previous topic :: View next topic  
Author Message
vga
Мастер
Мастер


Age: 170
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Fri Aug 27, 2010 9:36 am    Post subject: BAPI_MATINSPCTRL_SAVEREPLICA Reply with quote

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'.

ws_qmat-insptype = 'C003'.
ws_qmat-material = 'AMT1212'.
ws_qmat-plant = 'DM00'.
ws_qmat-ind_insptype_mat_active = 'X'.
ws_qmat-qual_score_procedure = ws_insp.
ws_qmat-preferred_insptype = 'X'.
APPEND ws_qmat.

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.

_________________
Молитва - это запрос разработчику на изменение кода программы.
Back to top
View user's profile Send private message Blog Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> Interfaces | Интерфейсы -> BAPI All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
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.