Deleted delivery order tracking

Hi experts,
I wanted to find out whether there is any way to find out all the deleted delivery orders. Any table stores these data?

Hi
Check This Tables CDHDR and CDPOS .
To know the deleted orders, go to CDPOS
enter "VERKBELEG" in change document object.
CHANGE_IND = 'D' .
Ranga

Similar Messages

  • Deleted Sales Order tracking

    Hello Gurus,
    Where can I see the deleted sales order. Is it stored in any table?
    Regards,
    Balu

    Balu,
    In general, one should not delete the sales order, instead we should reject all the line items.
    If some one deletes an order it will be stored in CDHDR and CDPOS tables.
    To know the deleted orders, go to CDPOS
    enter "VERKBELEG" in change document object.
             VBAK in Table name.
              "D"  in Change ID.
    You should get the data.
    Regards,
    Ajai.

  • Delivery order - deleted line items details

    Dear All,
    i want the list of materials and qty which are deleted from the delivery order, i have tried with the CDHDR & CDPOS but there i am getting only changed details, if the material is deleted im unable to get the material number and qty..
    is there any other table where can i get the deleted materials details..
    kindly reply id u have the solution.
    thanks.

    Hi,
    To find out the table, you can do one thing,
    firstly create a dummy material,
    then activate the SQL Trace from ST05 transaction,
    and then delete the dummy material which you had created.
    Now deactivate the SQL Trace from the same transaction,
    And click on Display trace...
    You wll get all the tables which are used when deleting the material.
    Just check for insert statement in the statement column of the SQL trace.
    that will the table which stores the deleted materials information.
    Regards,
    Siddarth

  • Order deleted ,delivery was done

    hello,
    can any one tell me how we can delete a sales order when we have done the delivery

    Hi
    Vipin
                  One can not delete the sales order is the subsequent doc is exits If any delivery is done u can not delete he sales order. But U can short close the order by assiging the reason for rejection in sales order. But to delete the order u have to reverse PGI through VL09 and delete delivery through VL02N.
    Once u reverse/delete all the PGI and DELIVERY only then u r able to delete the sales order.
    Hope this will help you
    Thx

  • Deleted delivery and inspection lot  tracking

    dear all,
    i have an issue please guide me
    the senario is
    At my client , there is a delivery happening in  vl01n i will pick the required quanity  and  send the lot to the QM  for final doc audit then after the QC is passed it will released from the QM then i will do the Post Goods Issue .
    the problem is here in the client    i have created  a delivery document and i have picked the quantity and  issued for the final doc audit report , during that time the goods which have been picked will be in the Scheduled for delivery .
    Now if the quality check fails for( final doc auidit ( ie for pallletization ) or some nails and packing is not done properaly ) it has to go for rework for the final doc auidit .
    If the quantity is rejected and gone for rework.    i will have to delete the delivery document  and create a fresh delivery doccument .
    because only if i delete the delivery document  what ever the quanity is there in the Scheduled for delivery will be  moved backed to the Bonded store .
    and then only it is possible for the goods to be picked and send for QC and after QC pass  PGI will be done
    My problem is  is there any connection can be done from the deleted delivery document and the fresh delivery document
    so that
    i can able to track the inspection lot  generated in the both the deliveries   i.e ( the deleted one and the fresh delivery document for which the PGI is done )
    Based on this i can create a  zreport for the QCheck  , becasue the client wants to  have  a link between the inspection lots generated between the two delivery documents and based on that they wanted to track the inspection lot

    Hi
    regarding  the link between two  delivery documents , as you are deleting the delivery the delivery document  is not there in any table so you wont get the link even in the document flow table. or delivery table .
    So its not feasible to generate link.
    I would suggest a different approach ,pl investigate more before you go ahead,
    You can have   seperate storage locations one with internal QC ,Other FG store and third final dispatch or BSR store.
    When material is transferred from production to quallity store a inspection lot is generated .once it is cleared QM will have stocks in FG store .Materials in FG store should be availble for final audit and only material which is approved in all respects in transferred to BSR store from where it is immediately dispatched. so QM and other departments can always access the stock in QM for internal inspection , rework an dfinal dispatch through store location instead of delivery tracking.
    I hope this helps
    regards
    Mandar

  • Delivery Deleted, Showing error when deleting sales order. R3, Oracle9i

    Hi experts,
    One of my users deleted delevery document and when he is trying to delete sales order it is giving error.
    Also it is showing delivery archived. How to retrieve the document.
    Thnx in advance

    Hi Dhanush,
    I suppose there is no need to run any consistency jobs for this issue(as per my understanding).
    As specified above by Senthil just try first running //CCR for the LOC_PRODUCT with category as Sales Order (also tick the VBBE table option) and Purchase Order. I think this will solve your purpose. Also please make sure that the IMs for the LOC_PRODUCT is active.
    Do let us know your findings on the same.
    Thanks and Regards,
    PP.

  • Outbound delivery order customers and deleted

    Hi Exoert
    When I delete outbound deliveries in the transaction VL02N and customer orders by transaction VA02, they are removed entirely managed system.
    Is there a table or a transaction where I can see the delivery and commands removed.
    Thinks in advance
    Edited by: yahya el hammami on May 12, 2011 4:54 PM

    HI
    check the tables CDPOS or CDHDR
    Goto SE16N and enter the table as CDPOS
    OBJECTCLAS: VERKBELEG
    Table: VBAK
    Change ID: "D - Delete"
    Now execute you will get the details of the deleted sales order.
    Similary try for deleted deliveries using the tables LIKP or LIPS.
    regards
    Prashanth

  • Possible to delete delivery even though Transfer Order exists

    Dear Experts
    I am able to delete deliveries even though Transfer order exists and confirmed. How can I restrict this as in this Transfer Order remains open without delivery in Place.
    Regards,
    Neeraj Srivatava

    Hi Frenchy
    Many thanks for your valuable inputs.
    What is the reason I can delete delivery even after Transfer Order is confirmed. This will leave the Picked  stock stranded in Dispatch area which cannot be linked with any delivery.
    Regards,
    Edited by: NEERAJ SRIVASTAVA on Aug 13, 2008 2:42 PM

  • To view the reference sales document of a deleted delivery

    Is there a table in SAP where I can see the reference sales document of a deleted delivery?
    Or is there a way that I can see the reference sales document of a deleted delivery.

    I dont think it is possible to track sale order reference for a deleted delivery through standard tcode.  Of course, you can see the deleted delivery details in MB51.
    thanks
    G. Lakshmipathi

  • OSS notes for a Deleted Delivery

    Hi Experts,
    We have a strange issue. One of the users deleted the deliveries for an order. We  now want to delete the Order too. But we are unable to track the order.
    Since delivery is deleted, it is not possible to identify the related Sales order number or the materials attached to the delivery.
    do we have any OSS note for this ?
    Thanks,
    Arthy

    Dear Lakshmipathi,
    Thank you for your valuable suggestion. But we actually are trying to create a shadow table or a backup table to record the deleted delivery details in future. Could you suggest what this table should be like,how and what details should  we capture and how the new table should work in order to capture the deleted delivery details?
    Please let me knowif you have any possible suggestions for creating this shadow table.
    Thanks in Advance,
    Regards,
    Arthy

  • Customer Service re Order Tracking

    My BT Vision+ box lost its internet connection because of a faulty Powerline Adapter on Monday 9th; problem dealt with efficiently on callcentre chatline and a pair of adapters were to be supplied.  I got an email next day to say they were on the way and due for delivery by Royal Mail on Wednesday 11th.  Tracking number and VOL references were supplied.  The adapters didn't arrive on 11th; the numbers didn't seem to mean anything on Royal Mail's tracking website so I phoned BT on 0800 800 150 and Sharon at BT checked out the order and said the parts would be delivered 'today'(ie Thursday 12th) - but nothing turned up.  Today (Friday 13th) I've been trying on and off to make contact with some human being at BT - totally unsuccessfully other than time spent talking to the Indian (?) callcentre who didn't know who would deal with the issue; they eventually transferred the call which I hung up after listening to music for 30 minutes.
    How long am I supposed to hang around waiting for a delivery that may never arrive; I can't use the BT service I'm paying for.  I don't know what to try next! 

    Just an update;  finally got to speak to someone at BT Order Tracking late on Friday 13th; they said there been some undisclosed delay on my order; they said a new package would be sent out with delivery scheduled for Tuesday 17th.  I told them I was dissatisfied with BT's service as I had been denied full functionality of my BTVision+ service for 5 days so far.  They agreed to log my complaint with a view to compensation.
    AMAZINGLY! - the package containing the Powerline adapters arrived at 9.15 on Saturday morning (14th); but this was the original consignment which was supposed to have been delivered by Royal Mail on Wednesday (11th).
    All's well as ends well!
    But I do wonder about the difficulty in finding the right buttons to press to get action or - at least - a truthful response from BT.

  • Sales order item quantity is not copied to delivery order quantity

    hi,
    i am trying to make a delivery order w.r.t. sales order which have 10 quantity for a certian material. when i create it, all the data on sales order is copied to the delivery order automatically EXCEPT the material quantity which was 10. it was working perfect and i dont know what mistake i made. is there any way out?
    thanks

    Hi,
    While creating delivery, r u getting the following error..
    An item with no delivery quantity is not permitted. Item will be deleted.
    If so, you are maintainig picking location determination for that particular plant and shipping point combination.
    i.e.,
    in OVL3 , for ur plant , Shipping point, Storage condition(Taken from Material master- Plant/Stor1 View)
    you will be maintaining some storage location.
    But for that storage location, you do not maintain a stock..
    If you specify the storage location in sale order, the error won't come..
    Otherwise add stock to the storage location assigned in OVL3..
    It'll work..
    I have also got the same error..
    Hope it may be useful to you..
    Thanks & Regards,
    Venkatesh.S.P

  • Error while deleting an order

    Hi,
    In the planning book  i could see an order displayed as a Replenishment delivery(stk trsf del)in the distribution demand(TLB Confirmed) KF and in the requirements view also i could see the same.
    the order was transferred from R3 and now is in the past, i want to delete this order now.
    i tried to delete it using /sapapo/RLCDELETE report but when i execute it says "order not in the live cache", when i try to delete it from the requirements view it says "no valid order selected" but i could see the order(for a past date)in both planning book(displayed in grey color) and in the requirements view.
    can you pls help.
    Thanks,
    Dhanush

    Hi Dhanush,
    I suppose there is no need to run any consistency jobs for this issue(as per my understanding).
    As specified above by Senthil just try first running //CCR for the LOC_PRODUCT with category as Sales Order (also tick the VBBE table option) and Purchase Order. I think this will solve your purpose. Also please make sure that the IMs for the LOC_PRODUCT is active.
    Do let us know your findings on the same.
    Thanks and Regards,
    PP.

  • Deleted Delivery Unable to do the Goods receipt reversal

    Hello Experts,
    Instead of deleting the particular delivery line items, user has deleted the STO delivery completely by using VL02N transaction code. Now in the purchase order history we have only GR and invoice document related to STO. (We already reversed the billing and deleted the delivery)
    Now we are unable to reverse the GR and getting the error "Delivery cannot be updated". This error because of the deleted delivery.
    Please advice how to proceed further. Now the overall from accounts it is showing imbalance.
    Please note, we are doing STO between company code to company code.
    Regards
    Rifaie M

    Satish,
    From you, i understood that for cancelling the GR i have to give delivery number reference.
    But in my case the delivery number itself deleted. I do not have delivery number in purchase order history. This has been deleted by the end user by mistakenly.
    Please advice
    Regards
    Rifaie M

  • Help: How to add serial number data into Delivery Order document

    Dear Gurus,
    I am creating an interface program and I have problem in attaching the serial number data to the corresponding material code for a certain delivery order document in R/3 4.6C SP22 system.
    The serial number can be attached either during the creation of the Delivery Order itself or in the subsequent step after creating the Delivery Order (i.e.: create the D/O document first, and then update the D/O data).
    The BAPI_OUTB_DELIVERY_CONFIRM_DEC FM does not provide any input parameter to let me put the serial number in this R/3 version.
    By tracing in SE30 the standard program VL02N --> Menu --> Extras --> Serial Number --> Continue (Enter) --> Save (Ctrl+S), I found out that the serial attachment 'might' be done during sub-routine SERIAL_LISTE_POST_LS in program SAPLIPW1. It will in turn executes FM SERIAL_LISTE_POST_LS. The commit to database table will be done in update task by FM OBJK_POST_UPDATE_N and SERIAL_POST_UPDATE_LS.
    <b>My question:</b>
    ============
    1. Is FM SERNR_ADD_TO_LS can be used to attach the serial number to D/O?
    If yes, how to do it please because I already tried it I can not see the serial information in VL02N after that. There is no any insert or update to database in this function module. Should I call other FM after this? I want to try to call FM OBJK_POST_UPDATE_N and SERIAL_POST_UPDATE_LS but I do not know how I can retrieve the global object such as XOBJK_ALL that is necessary for the input parameter.
    2. If SERNR_ADD_TO_LS can not be used, what other FM can I use? Can I call SERIAL_LISTE_POST_LS instead? Is there any reliable way to generate the import parameter for this FM, such as XSER00, XSER01, XOBJK_ALL and XEQUI?
    Thank you in advanced for your kind assistance.
    Best Regards,
    Hiroshi

    Try something similar to this below...
    Afterwards you should do a call transaction to VL02N and immediately SAVE. This is sufficient to ensure the status on the serial numbers is updated correctly.
    FUNCTION z_mob_serialnr_update_ls.
    ""Local interface:
    *" IMPORTING
    *" VALUE(VBELN_I) LIKE LIKP-VBELN
    *" TABLES
    *" SERNO_TAB STRUCTURE RISERLS
    *" YSER00 STRUCTURE SER00 OPTIONAL
    *" YSER01 STRUCTURE RSERXX OPTIONAL
    *" YOBJK_ALL STRUCTURE RIPW0 OPTIONAL
    *" YEQUI STRUCTURE RIEQUI OPTIONAL
    *" YMASE STRUCTURE MASE OPTIONAL
    *" EXCEPTIONS
    *" NO_EQUIPMENT_FOUND
    The modified/confirmed table of serial numbers is supplied in
    SERNO_TAB.
    These are updated in the SAP tables
    YSER00 - General Header Table for Serial Number Management
    YSER01 - Document Header for Serial Numbers for Delivery
    YOBJK_ALL - Internal Table for Object List Editing/Serial Numbers
    YEQUI - Internal Structure for IEQUI
    local data
    DATA: BEGIN OF del_wa,
    vbeln LIKE likp-vbeln,
    posnr LIKE lips-posnr,
    matnr LIKE lips-matnr,
    lfimg LIKE lips-lfimg.
    DATA: END OF del_wa.
    DATA: del_tab LIKE del_wa OCCURS 0.
    DATA: _ct TYPE i.
    DATA: lastobknr LIKE objk-obknr.
    DATA: _debug.
    CLEAR: yser00, yser01, yobjk_all, yequi, ymase.
    REFRESH: yser00, yser01, yobjk_all, yequi, ymase.
    GET PARAMETER ID 'ZEDI_DEBUG' FIELD _debug.
    OBJECT KEYS
    read the delivery items with serial numbers to be processed
    SELECT * INTO CORRESPONDING FIELDS OF TABLE del_tab
    FROM lips
    WHERE vbeln = vbeln_i
    AND serail NE space.
    if nothing is relevant for serial numbers bailout
    DESCRIBE TABLE del_tab LINES _ct.
    IF _ct IS INITIAL.
    EXIT.
    ENDIF.
    ==== read the existing object keys for delivery items
    SELECT * INTO CORRESPONDING FIELDS OF TABLE yser01
    FROM ser01
    WHERE lief_nr = vbeln_i.
    IF sy-subrc = 0.
    yser01-dbknz = 'X'. "entry exists in db
    MODIFY yser01 TRANSPORTING dbknz WHERE dbknz = space.
    ENDIF.
    == check if there is a header entry for the delivery item
    LOOP AT del_tab INTO del_wa.
    READ TABLE yser01 WITH KEY lief_nr = del_wa-vbeln
    posnr = del_wa-posnr.
    IF sy-subrc NE 0.
    create one
    CALL FUNCTION 'OBJECTLIST_NUMBER'
    IMPORTING
    obknr = yser01-obknr.
    yser00-mandt = sy-mandt.
    yser00-obknr = yser01-obknr.
    APPEND yser00.
    SELECT SINGLE kunnr INTO (yser01-kunde)
    FROM likp
    WHERE vbeln = vbeln_i.
    yser01-mandt = sy-mandt.
    yser01-lief_nr = del_wa-vbeln.
    yser01-posnr = del_wa-posnr.
    yser01-vorgang = 'SDLS'.
    yser01-vbtyp = 'J'.
    yser01-bwart = '601'.
    yser01-dbknz = space. "not in db
    yser01-loknz = space. "do not delete
    APPEND yser01.
    ENDIF.
    ENDLOOP.
    check if any entries should be deleted
    LOOP AT yser01.
    READ TABLE serno_tab WITH KEY vbeln = yser01-lief_nr
    posnr = yser01-posnr.
    IF sy-subrc NE 0.
    yser01-loknz = 'X'. "mark for delete
    MODIFY yser01.
    ENDIF.
    ENDLOOP.
    collect all the object keys for the delivery item with s/n's
    LOOP AT yser01.
    READ TABLE serno_tab WITH KEY vbeln = yser01-lief_nr
    posnr = yser01-posnr.
    IF sy-subrc = 0.
    READ TABLE yser00 WITH KEY obknr = yser01-obknr.
    IF sy-subrc NE 0.
    yser00-mandt = yser01-mandt.
    yser00-obknr = yser01-obknr.
    APPEND yser00.
    ENDIF.
    ENDIF.
    ENDLOOP.
    IF NOT _debug IS INITIAL. BREAK-POINT. ENDIF.
    SERIAL NO OBJECTS
    ==== read the existing serial numbers from the database
    via object number into YOBJK_ALL
    LOOP AT yser00.
    SELECT * APPENDING CORRESPONDING FIELDS OF TABLE yobjk_all
    FROM objk
    WHERE obknr = yser00-obknr.
    ENDLOOP.
    yobjk_all-dbknz = 'X'.
    MODIFY yobjk_all TRANSPORTING dbknz WHERE dbknz = space.
    === add any new serial numbers
    LOOP AT serno_tab.
    READ TABLE yser01 WITH KEY lief_nr = serno_tab-vbeln
    posnr = serno_tab-posnr.
    READ TABLE yobjk_all WITH KEY sernr = serno_tab-sernr
    matnr = del_wa-matnr.
    IF sy-subrc NE 0.
    this is a new serial number
    yobjk_all-mandt = sy-mandt.
    yobjk_all-obknr = yser01-obknr.
    yobjk_all-obzae = 0.
    yobjk_all-equnr = yequi-equnr.
    yobjk_all-objvw = 'S'.
    yobjk_all-sernr = serno_tab-sernr.
    yobjk_all-matnr = del_wa-matnr.
    yobjk_all-datum = sy-datum.
    yobjk_all-taser = 'SER01'.
    yobjk_all-equpd = 'X'.
    yobjk_all-objnr = yequi-objnr.
    yobjk_all-dbknz = space.
    yobjk_all-loknz = space.
    APPEND yobjk_all.
    ENDIF.
    ENDLOOP.
    === mark any which are no longer confirmed as deleted
    LOOP AT yobjk_all.
    READ TABLE yser01 WITH KEY obknr = yobjk_all-obknr.
    READ TABLE serno_tab WITH KEY vbeln = yser01-lief_nr
    posnr = yser01-posnr
    sernr = yobjk_all-sernr.
    IF sy-subrc NE 0.
    yobjk_all-loknz = 'X'.
    MODIFY yobjk_all TRANSPORTING loknz.
    ENDIF.
    ENDLOOP.
    EQUIPMENT RECORDS
    == get the equipment records
    LOOP AT yobjk_all.
    SELECT SINGLE * INTO CORRESPONDING FIELDS OF yequi
    FROM equi
    WHERE sernr = yobjk_all-sernr
    AND matnr = yobjk_all-matnr.
    IF sy-subrc NE 0.
    CONTINUE.
    ENDIF.
    IF yobjk_all-dbknz = space AND
    yobjk_all-loknz = space.
    yequi-dbknz = 'X'.
    yequi-obknr = yobjk_all-obknr.
    yequi-j_vorgang = 'PMS3'. "add to delivery
    yequi-matnr_old = yequi-matnr.
    APPEND yequi.
    yobjk_all-equnr = yequi-equnr.
    MODIFY yobjk_all TRANSPORTING equnr.
    CONTINUE.
    ENDIF.
    IF yobjk_all-dbknz = 'X' AND
    yobjk_all-loknz = 'X'.
    yequi-dbknz = 'X'.
    yequi-j_vorgang = 'PMSA'. "delete from delivery
    yequi-matnr_old = yequi-matnr.
    APPEND yequi.
    CONTINUE.
    ENDIF.
    ENDLOOP.
    remove any Equipment records that do not need to be processed
    DELETE yequi WHERE j_vorgang IS initial.
    IF NOT _debug IS INITIAL. BREAK-POINT. ENDIF.
    fill the object counter
    LOOP AT del_tab INTO del_wa.
    READ TABLE yser01 WITH KEY lief_nr = del_wa-vbeln
    posnr = del_wa-posnr.
    DO del_wa-lfimg TIMES.
    READ TABLE yobjk_all WITH KEY obknr = yser01-obknr
    obzae = sy-index.
    IF sy-subrc NE 0.
    READ TABLE yobjk_all WITH KEY obknr = yser01-obknr
    obzae = 0.
    IF sy-subrc = 0.
    yobjk_all-obzae = sy-index.
    MODIFY yobjk_all INDEX sy-tabix TRANSPORTING obzae.
    ENDIF.
    ENDIF.
    ENDDO.
    ENDLOOP.
    IF NOT _debug IS INITIAL. BREAK-POINT. ENDIF.
    ===========================================
    update the delivery
    ===========================================
    CALL FUNCTION 'SERIAL_LISTE_POST_LS'
    TABLES
    xser00 = yser00
    xser01 = yser01
    xobjk_all = yobjk_all
    xequi = yequi
    xmase = ymase.
    TAB_CUOBJ =
    XSER03 =
    CALL FUNCTION 'STATUS_BUFFER_EXPORT_TO_MEMORY'
    EXPORTING
    i_memory_id = memid_status.
    COMMIT WORK AND WAIT.
    CALL FUNCTION 'Z_MOB_SERIALNR_REFRESH_LS'
    EXPORTING
    ctu = 'X'
    mode = 'N'
    UPDATE = 'L'
    GROUP =
    USER =
    KEEP =
    HOLDDATE =
    NODATA = '/'
    vbeln_i = vbeln_i.
    IMPORTING
    SUBRC =
    TABLES
    MESSTAB =
    ENDFUNCTION.
    FUNCTION z_mob_serialnr_refresh_ls.
    ""Local interface:
    *" IMPORTING
    *" VALUE(CTU) LIKE APQI-PUTACTIVE DEFAULT 'X'
    *" VALUE(MODE) LIKE APQI-PUTACTIVE DEFAULT 'N'
    *" VALUE(UPDATE) LIKE APQI-PUTACTIVE DEFAULT 'L'
    *" VALUE(GROUP) LIKE APQI-GROUPID OPTIONAL
    *" VALUE(USER) LIKE APQI-USERID OPTIONAL
    *" VALUE(KEEP) LIKE APQI-QERASE OPTIONAL
    *" VALUE(HOLDDATE) LIKE APQI-STARTDATE OPTIONAL
    *" VALUE(NODATA) LIKE APQI-PUTACTIVE DEFAULT '/'
    *" VALUE(VBELN_I) LIKE LIKP-VBELN
    *" EXPORTING
    *" VALUE(SUBRC) LIKE SYST-SUBRC
    *" TABLES
    *" MESSTAB STRUCTURE BDCMSGCOLL OPTIONAL
    DATA: vbeln_001 LIKE bdcdata-fval.
    vbeln_001 = vbeln_i.
    subrc = 0.
    PERFORM bdc_nodata USING nodata.
    PERFORM open_group USING group user keep holddate ctu.
    PERFORM bdc_dynpro USING 'SAPMV50A' '4004'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LIKP-VBELN'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '/00'.
    PERFORM bdc_field USING 'LIKP-VBELN'
    vbeln_001.
    PERFORM bdc_dynpro USING 'SAPMV50A' '1000'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=PSER_T'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LIPS-POSNR(01)'.
    PERFORM bdc_dynpro USING 'SAPLIPW1' '0200'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'RIPW0-SERNR(01)'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=RWS'.
    PERFORM bdc_dynpro USING 'SAPMV50A' '1000'.
    PERFORM bdc_field USING 'BDC_OKCODE'
    '=SICH_T'.
    PERFORM bdc_field USING 'BDC_CURSOR'
    'LIPS-MATNR(02)'.
    PERFORM bdc_transaction TABLES messtab
    USING 'VL02N'
    ctu
    mode
    update.
    IF sy-subrc <> 0.
    subrc = sy-subrc.
    EXIT.
    ENDIF.
    PERFORM close_group USING ctu.
    ENDFUNCTION.
    INCLUDE bdcrecxy.

Maybe you are looking for