Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

help required on material master bapi

kabil_g
Active Participant
0 Likes
1,627

Hi Frds,

I have created a material master bapi using these BAPI_MATERIAL_SAVEDATA

i have extended the quality view ... i need to create three inspection set up number

Example : 01

               08

               09 inspection types..... i need to activate these many inspection set up...........

how to acheive these,,,,,,,,,,,,,,,,, pls hel me......

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,530

Did you try BAPI_MATINSPCTRL_SAVEREPLICA

(A quick  search on SE37 with BAPI*MAT* or on SE11 on structure BAPI* with QMAT in designation ?)

Regards,

Raymond

8 REPLIES 8
Read only

Former Member
0 Likes
1,530

This message was moderated.

Read only

0 Likes
1,530

Hi Dhina,

i have extended the quality view 



I need to create three inspection types thats how i need ..........

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,531

Did you try BAPI_MATINSPCTRL_SAVEREPLICA

(A quick  search on SE37 with BAPI*MAT* or on SE11 on structure BAPI* with QMAT in designation ?)

Regards,

Raymond

Read only

0 Likes
1,530

Hi raymond,

can you breif how to use these function module.............

Read only

0 Likes
1,530

Small sample :

PARAMETERS: p_art  TYPE qpart,
             p_matnr TYPE matnr,
             p_werks TYPE werks_d.

DATA: lt_inspectionctrl TYPE TABLE OF bapi1001004_qmat,
       ls_inspectionctrl TYPE bapi1001004_qmat,
       lt_return TYPE TABLE OF bapiret2,
       ls_return TYPE bapiret2,
       ls_tq34 TYPE tq34,
       ls_qmat TYPE qmat.
* prepare data
SELECT SINGLE * INTO ls_tq34
    FROM tq34 WHERE art = p_art .
CHECK sy-subrc EQ 0. " add a message
CLEAR: ls_qmat, ls_inspectionctrl.
MOVE-CORRESPONDING ls_tq34 TO ls_qmat.
ls_qmat-art = p_art.
ls_qmat-matnr = p_matnr.
ls_qmat-werks = p_werks.
* map data
CALL FUNCTION 'MAP2E_QMAT_TO_BAPI1001004_QMAT'
   EXPORTING
     qmat             = ls_qmat
   CHANGING
     bapi1001004_qmat = ls_inspectionctrl.
" force some values
ls_inspectionctrl-ind_insptype_mat_active = 'X'.
ls_inspectionctrl-preferred_insptype = 'X'.
* append
APPEND ls_inspectionctrl TO lt_inspectionctrl.
* execute
CALL FUNCTION 'BAPI_MATINSPCTRL_SAVEREPLICA'
   TABLES
     return         = lt_return
     inspectionctrl = lt_inspectionctrl.
* check
LOOP AT lt_return INTO ls_return
   WHERE type = 'E' OR type = 'A'.
   EXIT.
ENDLOOP.
IF sy-subrc NE 0.
   CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
     EXPORTING
       wait = 'X'.
ENDIF.


Regards,

Raymond

Read only

0 Likes
1,530

Hi Raymond Giuseppi,

Tkanxs a lot

Read only

JL23
Active Contributor
0 Likes
1,530

Do you really want reinvent the wheel by using a BAPI?

Just use QA08 transaction which is a mass transaction to assign inspection data to a material.

Read only

kabil_g
Active Participant
0 Likes
1,530

Hi Jurgen,

My customer wants in upload program itself.............