Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Updating multiple defect details in QM01 by using BDC


Hi all,

I need to store multiple defect items in one single notification. When i am trying to store one defect details it is working fine. Since production date and reference engine number are not in the BAPIs I went for BDC.

For creating notification i am getting all the details in one internal table.  My code is like as below.

LOOP AT IT_ENGINE_DEF_NOTIF INTO wa_engine_def_notif.

  WRITE sy-datum to wk_date DD/MM/YYYY.

  wk_tabix = sy-tabix.

  AT END OF prdline_code.

    READ TABLE it_engine_def_notif INTO wa_engine_def_notif INDEX wk_tabix.
    IF sy-subrc = 0.
        perform populate_bdc_tab using:
     '1' 'SAPLIQS0' '0200',
     ' ' 'BDC_CURSOR' 'RIWO00-QMART',
     ' ' 'BDC_OKCODE' '/00',
     ' ' 'RIWO00-QMART' 'FE',
     '1' 'SAPLIQS0' '7200',
     ' ' 'BDC_OKCODE' '=10\TAB10',
     ' ' 'RQM00-MATNR'  wa_engine_def_notif-matnr,
     ' ' 'RQM00-MAWERK' wa_engine_def_notif-werks,

     ' ' 'VIQMEL-PRODDAT' wk_date,
     ' ' 'VIQMEL-DEVICEID' wa_engine_def_notif-shiftname,
     ' ' 'VIQMEL-REFNUM' wa_engine_def_notif-engno,
     ' ' 'VIQMEL-ARBPLWERK' wa_engine_def_notif-werks,
     ' ' 'RQM00-ARBPL' wa_engine_def_notif-prdline,
     ' ' 'VIQMEL-QMGRP' 'QSHIFTCD',
     ' ' 'VIQMEL-QMCOD' wa_engine_def_notif-shift,
     ' ' 'RQM02-PARNR_VERA' wa_engine_def_notif-pernr.
*     ' ' 'RQM02-NAME_VERA' empname.
    ENDIF.

  ENDAT.

     perform populate_bdc_tab using:
        '1' 'SAPLIQS0' '7204',
        ' ' 'BDC_OKCODE' '/00',
        ' ' 'BDC_CURSOR' 'VIQMFE-OTGRP(wk_tabix)',
        ' ' 'VIQMFE-FEGRP(wk_tabix)' wa_engine_def_notif-fegrp_x,
        ' ' 'VIQMFE-FECOD(wk_tabix)' wa_engine_def_notif-fecod_x,
        ' ' 'VIQMFE-OTGRP(wk_tabix)' wa_engine_def_notif-fegrp,
        ' ' 'VIQMFE-OTEIL(wk_tabix)' wa_engine_def_notif-fecod.

ENDLOOP.
       perform populate_bdc_tab  using:
        '1' 'SAPLIQS0' '7204',
        ' ' 'BDC_OKCODE' '=BUCH'.

       perform populate_bdc_tab using:
        '1' 'SAPLIQS0' '7204',
        ' ' 'BDC_OKCODE' '=20\TAB01',
        ' ' 'BDC_CURSOR' 'VIQMEL-QMNUM'.
*  ENDLOOP.
call transaction 'QM01' using bdc_tab mode 'A' update 'S' MESSAGES INTO mestab.

The values are filling in work area. But notification number is not creating. In the initial screen itself i am facing difficulty. Can any one give me the solution.

Thanks in Advance

CK

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question