Skip to Content
avatar image
Former Member

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-QMCOD' wa_engine_def_notif-shift,
     ' ' 'RQM02-PARNR_VERA' wa_engine_def_notif-pernr.
*     ' ' 'RQM02-NAME_VERA' empname.


     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.

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


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Dec 25, 2014 at 10:55 AM

    Hi CK,

    Did you check your BDC in foreground/Error mode whether you are getting some message where your BDC is getting stopped.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      So, its working correct, your call transaction is working, but you are not passing parameters to your QM01, so how it will create notification for you?

      Have you done correct recoding in SHDB? I guess, you have not converted the recording into code correctly. You need to work on your code.

      In this screen you need to pass Notification type and then enter OK_CODE as '/00'.