06-07-2011 1:27 PM
Hi All,
Can anyone please tell me if we have any function module to delink a notification from a work order. As we know that a work order can be linked to multiple notification numbers, I have a requirement wherein, I need to delink all the notifications linked to a particular work order. Can anybody tell me how to do this?
06-07-2011 1:56 PM
I tried creating a BDC seesion for the same. I first went to the header notification and pressed the icon to delink the notification. Then in the object list tab, I deleted the notifications one by one by selecting the notifs and pressing the delete button. This was the code that got generated:
perform bdc_dynpro using 'SAPLCOIH' '0101'.
perform bdc_field using 'BDC_CURSOR'
'CAUFVD-AUFNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'CAUFVD-AUFNR'
p_order-aufnr.
perform bdc_dynpro using 'SAPLCOIH' '3000'.
perform bdc_field using 'BDC_OKCODE'
'=IHDL'.
perform bdc_field using 'CAUFVD-KTEXT'
p_order-ktext.
perform bdc_field using 'BDC_CURSOR'
'CAUFVD-QMNUM'.
perform bdc_field using 'CAUFVD-INGPR'
p_order-ingpr.
perform bdc_field using 'CAUFVD-VAPLZ'
p_order-vaplz.
perform bdc_field using 'CAUFVD-VAWRK'
p_order-vawrk.
perform bdc_field using 'CAUFVD-ILART'
p_order-ilart.
perform bdc_field using 'CAUFVD-GSTRP'
p_order-gstrp.
perform bdc_field using 'CAUFVD-PRIOK'
p_order-priok.
perform bdc_field using 'CAUFVD-GLTRP'
p_order-gltrp.
perform bdc_field using 'CAUFVD-TPLNR'
p_order-tplnr.
perform bdc_dynpro using 'SAPLCOIH' '3000'.
perform bdc_field using 'BDC_OKCODE'
'=IOLU'.
perform bdc_field using 'BDC_CURSOR'
'CAUFVD-KTEXT'.
perform bdc_field using 'CAUFVD-KTEXT'
p_order-ktext.
perform bdc_field using 'CAUFVD-INGPR'
p_order-ingpr.
perform bdc_field using 'CAUFVD-VAPLZ'
p_order-vaplz.
perform bdc_field using 'CAUFVD-VAWRK'
p_order-vawrk.
perform bdc_field using 'CAUFVD-ILART'
p_order-ilart.
perform bdc_field using 'CAUFVD-GSTRP'
p_order-gstrp.
perform bdc_field using 'CAUFVD-PRIOK'
p_order-priok.
perform bdc_field using 'CAUFVD-GLTRP'
p_order-gltrp.
perform bdc_field using 'CAUFVD-TPLNR'
p_order-tplnr.
perform bdc_dynpro using 'SAPLCOIH' '3000'.
perform bdc_field using 'BDC_OKCODE'
'=DELE'.
perform bdc_field using 'CAUFVD-KTEXT'
p_order-ktext.
perform bdc_field using 'BDC_CURSOR'
'RIWOL-BEARB(01)'.
perform bdc_field using 'RIWOL0-SELEC(01)'
'X'.
perform bdc_dynpro using 'SAPLSPO1' '0200'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
perform bdc_dynpro using 'SAPLCOIH' '3000'.
perform bdc_field using 'BDC_OKCODE'
'=BU'.
perform bdc_field using 'BDC_CURSOR'
'CAUFVD-KTEXT'.
perform bdc_field using 'CAUFVD-KTEXT'
p_order-ktext.
perform bdc_field using 'BDC_CURSOR'
'RIWOL-BEARB(01)'.
CALL TRANSACTION 'IW32' USING BDCDATA
MODE 'N'
UPDATE 'L'
MESSAGES INTO MESSTAB.
But somehow this is not working. Please help.