Free Subsequent delivery Order

Dear Gurus,
I want to create free subsequent sales order and want the reference mandatory. in the mandatory reference I am making sales order as mandatory reference. But here i dont know which sales order I should suggest to the user? either a Return Sales order or a Normal sales order?
1) In my opinion, Normal sales order should be entered as a reference document. Please correct me wid the reason here.
2) my second query is regarding the same Subsequent Free Sales order.
Suppose I want to create this order for the LUMF BOM how it is possible?
if I give the Sales order number of BOM material system is unable to determine the material in the SD document.
What is the standard procedure here ? Do i need to enter the material manually or any other type of copy control is there.
Please suggest me for above queries. Thanks in advance.
regards,
Sanjay

Hi
"Subsequent Delivery Free-of-charge" is always created with reference to the "Return Order".
Suppose, you have send 50 units of material M1 to the customer for which he has already paid for.
Now, your customer has returned 10 units of M1 due to damage in transit. To process the Return , you need to create a Return order ,either with reference to the Sales order or Billing document.
Normally, we refer to the Billing document.
From this Return order, we create Return Delivery followed by PGR and goods comes into your Warehouse with movement type 651 and goes to Returned stock (a restricted stock).
As customer has returned the goods of 10 units, now you have to compensate the customer. To compensate, you have two ways, either you will issue a Credit memo for the 10 units OR you will send fresh 10 units free of charge to the customer.
This depends on the policy of the organisation.
If you have the policy to send fresh goods for the return, which we normally call as "Replacement", then you need to create an order called "Subsequent Delivery Free-of-charge" with order type "SDF".
"Subsequent Delivery Free-of-charge(SDF)" is always created with reference to the "Return order".
In VOV8, for SDF, you will find "RE" in the "Mandatory reference" field.
As far as your second query is concerned, it is not clear to me.
LUMF is the "Item category group" of the main item of the BOM material ,if you want to charge price for the components (sub-items).

Similar Messages

  • Free-of-charge subsequent delivery

    Hi experts,
    "If the customer is to receive replacement goods, do not create a credit memo. You can enter a reason for rejection for the appropriate items in the return. You then create a free of charge subsequent delivery with reference to the return in order to send the replacement goods to the customer. "
    (It comes from SAP help
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/70/a7853478616434e10000009b38f83b/frameset.htm).
    Got some questions about the above. Pls help to solve. Thx.
    Q1: Does the process match SAP statement above, sales order -> outbound delivery -> invoice -> return order (to be rejected after PGR for return delivery) - return delivery (PGR) - free of charge subsequent delivery (to be created with reference to return order) - delivery (no invoce to be created)?
    Q2: If the process is correct, how can the financial balance the value of returned goods, sales cost? Is it through the replacement goods? In my previous understanding, it's the must to create credit memo because return delivery has PGR.
    Q3: What order type is used for free of charge subsequent delivery? It seems SAP help mentions FD while some one mentions SD.

    Hi Cathy,
    >Q1: Does the process match SAP statement above, sales order -> outbound delivery -> invoice -> return order (to be rejected after PGR for return delivery) - return delivery (PGR) - free of charge subsequent delivery (to be created with reference to return order) - delivery (no invoce to be created)?
    > (to be rejected after PGR for return delivery) -
    What does this mean???
    Std Process is
    Sales Order - Delivery - Invoice - Return Sales Order (wrt sales order / billing document) - Return Del. (wrt Return Sales order ) - PGR - Credit Memo wrt Return Sales Order
    OR  (If not to create credit memo)
    Free Of Charge Sub. Deli. Doc. (which is sales doc.) wrt Return Sales Order / Original Sales Order - Standard Deli.(LF) - Proforma Invoice
    >Q2: If the process is correct, how can the financial balance the value of returned goods, sales cost? Is it through the replacement goods? In my previous understanding, it's the must to create credit memo because return delivery has PGR.
    It is not must to create credit memo unless the customer has asked for.
    Eg. if you have sold material worth Rs. 100/-, invoice is created. Here customer a/c is debited. Now, you do return sales order - return delivey. Till return delivery, no accounting posting take place as far as customer is concerned. (Material doc is created after PGR and then a/c doc is created where cost of goods is posted) So after PGR, if the cust wants, either you can create Credit Memo where you return the money (in this case Rs.100) to customer that he has already paid or you deliver the material free of charge.
    Only in case of Credit Memo, accounting takes place where customer a/c is credited. So there is reverse posting
    For free of charge del. there is no accounting posting taken place
    >Q3: What order type is used for free of charge subsequent delivery? It seems SAP help mentions FD while some one mentions SD.
    Both these Sales Doc. types are available in Std SAP system
    SD - is used for Subsequent Delivery Free of Charge that is created wrt Return Sales Order / Billing Document
    FD - is used when you want to give any free sample to the customer. Therefore it does not have any reference
    Hope you get some inputs
    regards,
    Sagar

  • Subsequent delivery free of charge

    Dear Friends,
    I had processed subsequent delivery free of charge,with reference to a sale order.
    in the sale order the material  has the basic price.
    when i processed the subsequent delivery free of charge document,both item and header condition is blank.
    according to the scenerio the delivery is free of charge for the material.
    but the material has pr00( basic price).
    Kindly clarify on this.

    Hi,
    If it is the client requirement then you can give the Invoice type in VOV8 of the order and check whether he requires order related billing or delivery related billing and based on that give Billing relevance in the item category.
    And check the copy controls for the same.
    Thanks,
    Sree.Manam

  • Subsequent Delivery Free ......Why Freight calculated Twice

    While doing Order SDF taking refrence of previous order I have come across this unique problem It makes sence that price is not determined but what is the logic of calculating Freight Twice using KF00 . I see that in pricing procedure RVCA01 (procedure  for subsequent delivery free of charge with Freight ) . Gurus throw some light here. Why freight is being calculated Twice
    Thanks

    Good thinking but Freight condition is not maintained in supplement
    I have already told that the condition type for freight is maintained TWICE  .in pricing procedure for Subsequent Delivery Free RVCA01 ...Any special reason ?
    Can any gurus know why freight condition is maintained twice  ie Freight Twice using KF00 ?
    What should be the reason?
    or is it by mistake KF00 condition was maintained twice?
    Edited by: arnoldsw sw on Mar 23, 2008 1:29 PM

  • Subsequent Delivery Free of Charge and Free of Charge

    hi all,
    What is Subsequent Delivery Free of Charge  and Free of Charge?
    and Can i get some material on this topics........
    regards
    Arun

    Hi there,
    Free of charge is when you send the free samples to customers. FD is the order type.
    Some times customer may return goods coz of damge or of poor quality. In that case, he returns the goods & requests substitution. In that case we create subsequent free of charge order type SD.
    Pls refer below for further information:
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/70/a7853478616434e10000009b38f83b/frameset.htm
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/70/a7853478616434e10000009b38f83b/frameset.htm
    Regards,
    Sivanand

  • Free of charge Order Process/ Release Delivery block

    hi all,
    i am new to Workflow.
    i have a issue to be done in wrokflow.
    The work flow has to be incorporated with Free of Charge order process.  The work flow process will allow a delivery block / credit block to be released only based on  authorized user.
    Can any one guide me in doing this.
    Waiting for your response.
    thanks in advance.
    Suki

    Hii Suki...
    As I am still not clear with ur requirement, so provide these details...
    1)  When should ur workflow trigger..?
    2) Do u want the credit/delivery block to be released by a particular person??
    For (1), U should look for an appropiate Business Object related to ur scenario, which u can find in SWO2 (BOR) and thus by using a particular event of ur BO, u can trigger ur WF.
    For (2), U should assign that particular user as the Agent for the step so that  he only receives the work-item in his Inbox and thus process it.
    Hope this might help you.......
    Plz rewards points.......
    Regards,
    Ashish

  • Reversa of subsequent delivery free of charge invoice

    Dear All,
    Normally when we create any subsequent delivery free of charge , as soon as we create it , the accounting document is cleared automatically.
    Now when i want to reverese this invoice i am getting error message " The document is already cleared "
    How can i reverse it.
    Thanks in advance,
    Jigensh

    Hi
    First reverse the document through T code  FBRA and then cance l the document
    Regards
    Damu

  • SUBSEQUENT DELIVERY

    Hi,
    I have created a PO for MATERIAL1,  and then I have registered the GR and finally I have registered the incoming invoice.
    Now I have discovered MATERIAL1 is not working properly so I need my vendor to send me another unit of MATERIAL1 (at price 0). I should received the new MATERIAL1 unit and then (and only then) I should return the old one.
    So I was thinking in using transaction MBNL to create a subsequent delivery for the new unit, but when trying it, it tells me "PU Ordered quantity exceeded by 1 ST ".   How can I solve this problem?
    Thanks in advance,
    Luis.

    HI,
    Please follow the below steps.
    1. Cancel the invice document via MR8M
    2. Do return delivery with refernce of GR document
    3. Add another line item in the same purchase order and select the free of cost check box
    4. set the lock  indcator forthe first line item in the purchase order
    5. Perform GR for the secod line item
    Thanks & Regards,
    Renuga.A

  • Scheduling agreement to delivery order

    Hi All
    Please suggest me on the below issue
    I am creating in t code VA01 a delivery order(order type TAM) with reference to a Scheduling Agrement (LZM).I have put reason for rejection for a line item in scheduling agrement order.But still it is copied to subsequent order ie TAM.
    Please suggest me briefly the possible configuration for copy control so that the rejected item should not be copied to subsequent order.
    And mail me the exact configuration of all the above sales document,item category and schedule line category  setting.
    Otherwise if any other reason is there please suggest.
    Thanking You
    Goutam

    Dear Pattanaik,
    check data transfer from copy controls.for this T-code is VTLA
    here select your doc type and select details and check also item.check inside both types data trasfer wich is assigned change from this item to header.your problem may ve coming from here.
    hope this will helps you
    Prem

  • Free goods and order types

    Hello,
    1) If company is providing free goods, then will it be associated for order type or with pricing condition.
         for e.g. On purchase of 100 qty. if 10% foods are free, then how is this associated.
    2) Also if i want to provide free goods only for a particular customer group, lets say wholesale, then how will it be associated
        with pricing conditions and order type.
    Regards

    Hi,
    There are two cases:-
    1.Ur company is providing free goods as a sample.
    2.If some customer buys some quantity of product u provide some free goods with it.
    1st Case:-
    if u want goods to b send as a free sample then u can directly use TANN item category with doc type or .
    2nd Case :
    Free goods is something that the customer is given after he buys certain quantity of the product/material.
    Free goods is a strategy to increase sales volume by luring the customer that if he buys 10 products one will be absolutely free.
    Free Goods:Goods that are given as additional goods as part of the ordered goods are called as free goods.Here the unit of measure of free goods should be the same as standard goods.
    Example:If you are are ordering 10 maggi sauce bottle you will be paying for only 8 bottles 2 is given as freegoods.
    price will not be reflected in pricing or billing.this is inclusive freegoods
    Exclusive freegoods.
    wherein the freegoods are given as additional good to that of the ordered goods
    Example:For 4 coffee vending machine 1 kg coffee powder isgive as free goods
    Sample goods:these are the goods which are given as pert of the promotional activity to increase the sales.
    here the customer is not paying money.
    Free goods - In SAP there are two types Exclusive and Inclusive.
    Exclusive - Buy 2 and get 1 free. This means you have to buy minimum 2 pieces then on that you will get 1 piece absolutely free.
    Inclusive - Buy 2 get 1 free. In this case it means you are paying for only 1 item and the other item is absolutely free.
    Configuration:
    IMG - Sales & Distribution - Basic Functions - Free Goods - condition technique for free goods -
    1. create the condition table(Take one field as customer group also if u want to provide free goods only for a particular customer group).
    2. maintain access sequence and assign the condition table to the access sequence.
    3. maintain condition type and assign the access sequence to the condition type.
    4. maintain the procedure for free goods and assign the condition type to the free goods procedure.
    5. Activate free goods determination. In this enter sales org., dis channel, division , docu pri pro, cust pri pro and the free goods procedure.
    6. now go to VBN1 - create free goods determination. Select your condition type, key combination and enter. Here you enter sales org, dis channel, customer no., Valid from and Valid to dates. Then you first select whether it is exclusive or inclusive free goods determination. By default it will be inclusive if you click on exclusive it will become exclusive and on top it will display inclusive. Here you enter minimum quantity for free goods and from what order quantity the number of free goods. You can control the delivery also in the second last column(free goods delivery control).
    Save the record. Go to VA01 create the sales order , enter the item and the minimum quantity for free goods .
    Thanks & Regards,
    Deepaks

  • Sales scheduling agreements and subsequent sales orders in MD04

    We would like to use sales scheduling agreements. For planification purposes, we need that forecast delivery schedule quantities in the agreement, appear in MD04 transaction, so corresponding schedule line type has flag "Transfer of requirements" active. In customizing for the agreement type, subsequent documents are sales orders, not deliveries, as we need always to have a sales order. We need that when creating subsequent sales order by reference to the scheduling agreement, quantity required related to the agreement is reduced. Or, at least, when this subsequent sales order is delivered.
    Example: In the agreement we can have 1000 KG and 2000 KG as forecast, for different dates. If a sales order of  800 KG is created, then we will get a new line of 800 KG in MD04. Required quantity related to the agreement, should be changed from 1000 to 200.
    Another option would be that subsequent sales order and delivery don't appear in MD04 (so requested quantity is not increased) and then, when the goods issue is posted, the available quantity is reduced and also the quantity required related to the agreement. I know how to make that sales order item is not relevant for MD04 using  flag "Transfer of requirements" for the sales order schedule item type, but I don't know how to make that delivery doesn't appear.
    Edited by: CH Spain on Dec 28, 2007 1:08 PM

    Hi
    In the given logic include another comment 
    If zfield value = 01, then allow creation of subsequent document.
    If zfield value # 01, then subsequent document creation should not be allowed.
    If AUART = Z sales document types then allow creation of subsequent document
    If VKORG  (Sales organisation) =1000 then allow creation of subsequent document
    If VTWEG  (Distribution channel) = 01then allow creation of subsequent document
    If SPART (Division) = 01then allow creation of subsequent document
    It wont affect if you change the copy control requirement routine,but instead of changing the copy control requirement routine
    use the user exit at sales order level only.
    Regards
    Srinath

  • Problem in Partial delivery BOM - items not copied in subsequent delivery

    Hi,
    We are using BOM in Sales order and we have activated delivery group for the BOM header item category.
    When we create first delivery we change the BOM header item quantity in delivey ( all the components quantity change accordingly) and save the delivery.
    Now when we try to create second delivery with reference to the same delivery for the left out qunatity in sales order, system is not copying the components of BOM items ( it is only copying BOM header) from sales order to delivery.
    Please let us know how can we create subsequent delivery with reference to the same sales order and delivery should get all the BOM items from SO to delivery.
    Please let me know if you need further information.
    Thanks
    Venkata Rama Reddy,K

    Hi,
    We already set the delivery group to A, and still having the same result.  We change the BOM header quantity only and automatically the component quantity is updated.
    This happens only if there are two header BOM in the Sales Order.  See example below:
    Bom Header 1 = 100
    Bom Component 1a - 80 (partial delivered)
    Bom Component 1b - 20 (partial delivered)
    Bom Header 2 = 200
    Bom Component 2a - 150
    Bom Component 2b - 50
    When creating outbound delivery, initially all the materials are copied to the outbound document.  If we want to delivery only Bom Header 2, then we will delete the Bom Header 1 line item.
    Upon deletion, the status of the component becomes fully delivered in the SO, but the Bom header is still partial delivered.
    Please confirm how to correct this.
    **If there is only one BOM Item in the order, then partial delivery is ok..
    Thank you,

  • Free Goods Delivery Control

    I set up the master data to "E" , and for every 5pcs , they get 1 pc free (exculsive)
    When I created Sales Order and Delivery of 10pcs, i get 2pcs additional item free.
    In the delivery, if i change the delivery quantity to 9pcs, the free goods is still 2pcs.  If i change the quantity to 5pcs, that's the time it is changed to 1pc.
    How can we set-up such that if it is changed to 9pcs (less than 10pcs), then free goods should be reduced to 1pc.

    HI Gemma
    Its  free goods   delivery control,
    in free  goods  there  are two types , inclusive , exclusive free goods
    inclusive free goods:=
    system  configure free goods in inclusive option like free goods quantity  is going to be  included in order quantity
    EX- For 10 item is free ,the system configures free  goods as  9+1
    hope this will solve your problem
    regards
    venkat

  • COPA document for free of charge orders

    Friends,
    We are using free of charge orders (ZFD) with Item category ZKLN. I understand COGS will be updated during delivery and no accounting is posted during billing. Also I thought no COPA document is generated but in our case it is generating a COPA document posting COGS. Client doesn't want this.  Can you guide me where this setting is to make sure no COPA document is generated for  free of charge orders.
    Thanks in advance

    I agree with Ajay that this is not really a wise thing to do but, as it happens, my current client asked me to do the same thing recently. 
    I suggested to them that we keep the postings to CO-PA, but exclude them from reports by using the Item category as a report selection criteria (could even be hard-coded into the selection criteria so the user is unaware of it). That way you don't lose the data and it can still be reported if anyone ever requires it.
    Unfortunately, they didn't accept my suggestion so I had to exclude the CoGS postings from CO-PA. I did this by using the valuation enhancement  COPA0002 (EXIT_SAPLKEAB_001). The code in the exit just says that where the Item category is for a free sale (ZTANN in our case), set all value fields to zero.
    An alternative, if you can have a unique billing type for these "sales", would be to use the "Reset Value Fields" settings in config (KE4W). In that case, you wouldn't need to use the exit.
    Hope that helps.
    Regards,
    Marc

  • 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

  • Recurring events in iCal

    I just had a ton of recurring events on my iCal calendar thorugh iCloud disappear. Any ideas why this happened?

  • I have matched my music library but iTunes still takes up a major portion of my hard drive

    i have matched my itunes library but itunes still is taking up a big chunk of my hard drive.  i want to get rid of it but want access to my cloud library of course. am afraid to just delete the library as it exists now.  simply put i just want to cle

  • Problems with the internal clock

    Hello, I need to read samples with approximately constante time difference. I found the example ContAcq-IntClk.c and changed it a little bit and it seems that it work. But when I use a DAQmx_Val_FiniteSamps with a given count of reads than the last t

  • How do I obtain IOS.5 or later?

    I need help on how to obtain IOS.5. Later for my iPad 2

  • Assign implementation project to solution

    Hi, I would like to know if there is a way to assign an implementation project structure to a solution. I can see that in transaction solman_directory i can import the scenarios of a project into the solution, but i would like to know if there is ano