Help on transferring goods from blocked to sales order stock

Hi Gurus
i need your help in this urgent production issue here is the details
our scenario is make to stock, when delivering and shipping against sales order, the user had some issues in t-code VL10H,
so user only physically finished the delivery and shipped it, but did not execute it in SAP,
so the user has put the stock in blocked status against these sales orders.
can you help me in moving this stock from blocked status and issue against the sales orders in SAP so that we can perform delivery in SAP. and close the sales orders
appreciate if you can explain the details steps and movement types and t-codes
thanks a lot in advance for your help and replies

Chakri,
You need to read the book on R/3 System SAP Strategies guide to MRP Planning and also Product Costing let me know if you need any help on this.
Saleem
Edited by: SYED SALEEM on Mar 9, 2008 6:05 PM

Similar Messages

  • Free goods from quotation to sale order

    Hi
    We need to supply free service with item in a quote, that can be used for the parts
    copy control of the free goods between the quote and a sales order.
    Can someone through any config for this issue

    hi,
    as per SAP standards free goods are supported to the document category C. it won't support for rest of the document categories. And also to BOM, variant configuration like any other special functions also, it will not work out.
    regards
    rp s

  • How to do Goods Issue from Sales Order Stock?

    Dear All,
    we are doing a trading Scenario & based on customer requirement we procure the goods from our vendor & we receive it to Sales Order(special) Stock. Now what are the settings to be done in the Sales/Shipping so that when we do a delivery for our customer the Stock is Issued from our Un-res Sales Order Stock & not from un-res stock ?
    Hope its clear.
    Regards,

    Hi Sam,
    Thanks a lot for the reply.
    Sorry for not explaining the scenario in the begining.
    See I have to configure a trading Scenario with some changes from the std.
    As in trading Process there are 3 entities.
    1. Customer - X
    2. Company - Y (Who performs trading)
    3. Vendor - Z
    Following is the breif requirment.
    Company Y generated an inquiry in system for an item with respect to customers RFQ. Now since Y doesnt manufacture the product(item) it creates a PR in background with respect to inquiry.
    Based on this PR, Y procures & receives the good into Un-restricted Sales Order Stock (with ref Inquiry doc no:).
    Now based on price Quoted by Z, Y will create a Quotation with ref to inquiry & finally a SO for Customer - X with ref to the Quotation.
    Now at the time of delivery (creatd with ref SO) system is not able to issue the goods from the sales order stock since the stock is stored with ref to inquiry no: & delivery is with ref to SO.
    So I am planning to simulate a cycle by creating a delivery & PGI with ref to Inquiry.
    If you can suggest a way out, it will be highly appreciable.
    Hope its clear.
    Regards,

  • Revaluation in stock transfer to Sales Order stock from unrestricted

    User is trying to do a stock transfer posting from unrestricted to Sales order stock.  Now the system is throwing an error saying that account setting has not been done for UMB (OBYC setting).  I have given the GL for this UMB transaction type in OBYC>  UMB is for posting Gain/Loss from revaluation.
    I dont understand how a revauation happens when we transfer stock from unrestricted to Sales Order Stock ?  What is the purpose of that in our scenario, could you please explain.

    Hi:
            Normally it should not happen in case of stock transfer posting. Please check the movement type settings for valuation class of your material and see if the transaction type UMB has been set against valuation class in OMJJ...Account grouping.
    Hope it will help you.
    Regards

  • Sales order stock on delivery document and transfer order

    Hi all,
    At my current client I have a requirement where we need to put stock against sales order (sales order stock E). So, being a MTO process we create production order and perform goods reciept to unrestricted stock. To avoid getting picked up by a different sales order, we move the stock to sales order stock using 412 E (tcode: MB1B). Here are the issues I am facing currently:
    1. Is there a direct way of receiving production order directly to sales order stock?
    2. I couldn't find a way to do the first, so I am currently receiving production order against unrestricted inventory and then move it using MB1B. So, the stock can be seen to assigned to sales order.
       2a. When I create delivery it is not consuming same stock, it is consuming inventory out of unrestricted stock (if any, in case no inventory is available it throws error of 0 available quantity). Once I have assigned sales order stock why is it still looking into unrestricted? Is it due to the requirement type which is assigned. Do I need to change the item category so availability will check sales order stock (similar to item category TAB)?
      2b. This probably will be resolved if I get the delivery fixed but we have SAP WM and during TO creation I don't see the special stock reference filled in? I tested this process with item category ZTAB (copy of TAB) which creates purchase requisition and it seems to be working but I don't need the purchase req for my case.
    3. This is more of an accounting issue: when I attempt to move stock from unrestricted to sales order stock using 412 E, I was getting "Account XXXXX is not assigned to cost center". So, I went in an assigned a cost center to this cost element. IS THIS REQUIRED & WHAT IS THE RELEVANCE as it takes stock out of inventory.
    I understand it crosses other functional areas but even if you can clarify 1 part of it, will be very helpful.
    Thanks.
    Naren

    Dear Friend
    You are telling that it is MTO scenario and you are posting stocks into unrestricted stocks
    This is entirely wrong
    This is happening because of a simple thing missing in your sales order item category configuration in VOV7 that is special stock indicator E is missing which should be there
    This is the cause of whole problem
    MTO item categories will have special stock indicator E in standards
    In MTO based on the sales order production order is triggered and stocks are receipted against sales order and not into unrestricted use by defaut in standard
    You will receive MTO stocks as sales order stocks in your plant  only in standard
    But it is not happening for you because of  stock indicator E in VOV7 of your sales order item category is missing
    Posting MTO stock in to unrestricted use is meaningless  and the same is happening because of a slight miss out in setting in VOV7
    This is the solution for issue no 1
    For issue no 2
    You have created the sales order( MTO order) without special stock indicator E and now you are doing a transfer posting in MB1B with 412 E  referencing the order no sales order stocks  that is Fine
    You are getting an error that only zero qty is available either at delivery or at pgi eventhough in MMBE you will find sales order stocks in your order name
    This is happening because
    Reservation in MB1B is done with special stock indicator E for sales order
    But the  same sales order is not created with special stock indicator E in VA01 during creation
    There is a mismatch
    Hence the system is not able to sense while the order comes for delivery there are already stocks are reserved
    By inputting  special stock indicator E for sales order item category the whole issues will get solved
    By doing that there is no need to do MB1B itself
    The first step itself will get corrected  as the stocks will be posted to sales order stocks no need for MB1B
    No need to touch TAB make it ZTAB as it is meant for a different purpose it is for individual purchase order not to be used for MTO
    *By marking the special stock indicator as E in your sales order item category your entire issue will be resolved*
    Issue no 3
    MTO is based on costing for which you have take the help of FI person
    Note Very important
    If U make the settings now in item category it will not work for the existing or already created order
    With existing orders it will have the same error as the order is created without special stock indicator E
    Only for new orders it will work and from Now on it will work
    Test it with new order cycle starting from VA01
    Please let me know this issue has got solved or not?
    I am 200 % sure it will get solved
    Regards
    Raja

  • Account Determination with Sales Order Stock

    Hi, Guys
    Does anybody know how (and WHY) SAP makes (or doesn't make) account determination of material movements from or to Sales Order Stock???
    I have found that, for example, an Accounting Document is generated when transferring to or from Customer Stock (411E and 413 mvt) and that no Accounting Document is generated when processing GI from Customer Stock (601E mvt) or GR against Production Order (101E to Customer Stock)....
    There are also NO Accounting Documents when inventory differences occur (701E or 702E)...
    It's pretty strange I think....Sure there is some logic  put into the process of managing Sales Order Stock but I don't get it...
    Of course, reward points are guaranteed for helpful answers!

    Automatic Accounet determination is done in MM. In this for some of the movement types there is no need to enter the G/L account every time.
    All are customized in  Automatic Account determination.(AAA)
    Go to SE16 enter the Table name T156 and press F4 you can see the movement types where G/L account are customized in  (AAA)
    you can check the movement types
    G.Ganesh Kumar

  • External Procurement with a Valuated Sales Order Stock

    Hi Experts,
    I read the following in SAP Help,
    For external procurement with a Valuated Sales Order Stock, system generates a purchase requisition from the sales order.
    If you are using a valuated sales order stock, the externally procured material is assigned to inventory at the time of the goods receipt. If the sales order item is flagged as carrying costs and revenues, then when the goods issue for delivery to the customer takes place, the sales order item is debited with the costs of the externally procured material.
    My question is - it says costs of external procurement is debited to sales order item when " goods issue for delivery to the customer takes place"
           - but in my case, when I made the GR for purchase order (created automatically by sales order), system directly posted the procurement cost as actual costs to the sales order item. There is no delivery for sales order done still.
    So actually, when should the external procurement cost be debited to sales order item -- when GR for purchase order is done (or) when  goods issue for delivery to the customer takes place?
    Thanks,
    GAN

    Hi Rafi,
    Thanks for your reply. I understand the problem now.
    Material which comes from prod order is posted statistically (value type 11) to sales order when GR for prod order is done.
    Here, the issue is about a GR for purchase order (assigned to sales order). This material purchased is not used in any production process. Its a material which is supplied to customer along with main material produced in house.
    In purchase order, I have given the consumption account (which is cost element 1). Entry was Consumption Dr and GR/IR Cr. So, this posted as actual cost to sales order.
    I should have given inventory account in purchase order (with cost element 90).
    Its a mistake of using consumption account in purchase order.
    Thanks.
    GAN.

  • Sales order stock to normal stock, Billing in each stage of production

    Dear experts,
    Business process:
    In our client will process the goods in 3 stages. Finished good of on process is raw material of another process and sales order based production is going on in my client. Each stage of production required to bill to the customer. But we cannot deliver the goods to the customer and used internally in another stage of process.
    Problem:
    1.     At the time of good receipt in MB31 the finished good going to the sales order stock(Because of sales order production).  How to convert the sales order stock in to normal stock or How to stop it?
    2.     Process 1 stage SFG (7903-valution class) is issued to the 2 stage raw material. At that time all GBB-VBR setting had did it for consumption. In cost sheets and product costing I mentioned in those account. But error is visible in CO02 (production release) goto-cost-itemization. How to solve this problem?
    3.     How to generate the bill in each stage to the customer?
    4.     In last stage how to give the delivery?
    Thanks in advance for helping me.
    Regards,
    Venkat
    Edited by: Venkat.Fico on Aug 9, 2011 5:46 AM

    Hi
    If I understand you, you want to create SD invoices to your customer en each step. You can control each step by MM movements. So, you can populate customer tables (z-tables), for instance, with badi MB_DOCUMENT_BADI for instance and after, in the steps where the materials go on being raw materials (without delivery) you can try to create credit notes with a BAPI using the information in this z-tables and after invoice them. When you are in the last step, use the standard procedure (SO, delivery and invoice).
    I hope this helps you
    Regards
    Eduardo

  • Stock ans sale order stock

    Dear All,
    What is difference b/w stock and sale order stock.and what is its impact if i use strategy 40.and what is the movement type to transfer stock to sale order stock

    What is B/W stock?
    Strategy 40: Planning with Final assembly.
    When you plan the sales order, MRP create receipts and when you do the GR, the stock will posted to to Unrestricted stock. PGI for the Sales order deliveruy is done from the Unrestricted stock. which can be used by any sales order.
    The Movement type to transfer the Stock from Unrestricted to sales order stock is 411E.
    if you use 20 or 50 startegy depedning on your requirement, the stock directly is posted to the Sales order stock, which cannot be consumed by any other sales order.
    Regards
    Ratan

  • Sales Order stock upload issue

    Hello all,
    during cutvoer we have uploaded sales order stock with 561E and then performed a revaluation with MR21 in order for the stock to have value. In 80% of the items that worked fine except some cases that when MR21 is performed the value doesnt change. When attempt to perform MR21 the current proposed value is correct but the total stock value is shown as zero.
    Any ideas why this occured and any way to resolve the issue.
    Any help is greatly appreciated

    HI
    Do you have sales order stock for the 20 percent items that failed....MR21 changes the price of a material and Sales order stock is generally updated with the values influenced by the sales order prices
    Regards
    Virender Singh

  • How to block a sales order when there is a free good item .

    Hello Gurus ,
    How to block a sales order when there is a  free good item  , only the authorised person should have authorisation to release those blocked Sales orders.
    Reason - They want to have a track of free goods given to customer & to avoid the misusing things
    Looking  for your inputs
    Thanks in advance
    Regards
    Venkat

    Hi
    I think you can try with Status Profile in BS02 define and assign for item category TANN.
    In status profile you can block the delivery and also billing unless some changes the object status as released.
    Just try and explore
    regards
    Prashanth

  • Free Goods - Not showing in sales order as subsequent item

    Dear Gurus,
    I have created a Free Goods procedure determination and maintained it at Customer/ Material level in VBN01.
    The procedure is inclusive as follow:
    For every 100 units purchased, the customer gets 10 units free
    However at sales order level there is no indication at all that the Free Goods are being triggered.
    When I check the pricing procedure, the condition record NA00 that I have used doesn't show-up.
    There is no subsequent item in the sales order under the main item showing the Free-Goods discount.
    Could you please help me go through the customizing process to correct the error?
    Many thanks for your help
    Chris

    Hi,
    FYI
    Free goods can be configured in SAP by following two methods.
    (1) Manually
    (2) Automatically
    Manually: By specifying higher level item category for a line item we can determine free goods as a free of charge
    items during sales order processing.
    Automatically: System proposes free of goods automatically in the sales order. In automatic free goods
    configuration system follows two methods.
    (1) Exclusive
    (2) Inclusive
    Exclusive: System configures free goods in exclusive option like free goods quantity is going to be excluded in
    order quantity. Ex: For 10 items 1 item is free. Then system configures free goods as 10 + 1.
    Inclusive: System configures free goods in inclusive option like free goods quantity is going to be included in order
    quantity. Ex: For 10 items 1 item is free. Then system configures free goods as 9 + 1.
    NOTE: In exclusive method other items also can be given as a free of charge items for order item.
    Configuration steps: INCLUSIVE
    SAP follows condition technique to configure free goods automatically.
    Maintain pricing procedure
    Path:
    IMG
    Sales and distribution
    Basic functions
    Free goods
    Condition technique for free goods
    Maintain pricing procedures
    Choose free goods procedure NA0001 and select it
    Click on copy icon on application tool bar and rename it Ex: SRI001
    Condition type is NA00 and Access sequence also NA00
    Save it and Exit
    Activate free goods determination
    Path:
    IMG
    Sales and distribution
    Basic functions
    Free goods
    Condition technique for free goods
    Activate free goods determination
    Go to new entries
    Specify our sales area, document pricing procedure, customer pricing procedure and specify our free goods
    procedure Ex: SRI001
    Save and Exit
    Control free goods pricing
    Path:
    IMG
    Sales and distribution
    Basic functions
    Free goods
    Control free goods pricing
    Control pricing for free goods item category
    Choose item category TAN from position button
    Specify the pricing as X = Pricing standard
    Choose item category TANN from position button
    Specify pricing as B = Pricing for free goods (100% discount)
    Save and Exit
    Maintain condition type for 100% discount
    Path:
    IMG
    Sales and distribution
    Basic functions
    Free goods
    Control free goods pricing
    Maintain condition type for 100% discount
    Check whether condition type R100 is available or not (R100 = is 100% discount)
    Exit
    Maintain pricing procedure for pricing
    Path:
    IMG
    Sales and distribution
    Basic functions
    Free goods
    Control free goods pricing
    Maintain pricing procedure for pricing
    Choose our pricing procedure form position button and select it
    Click on control data icon under dialog structure
    Include condition type R100 between the steps of discounts.
    Specify requirement = 55 and Routine No: 28 (100% discount) in Alt. CBV.
    Save and Exit
    Requirement 55: The Routine No. 55 is assigned to condition type R100. If the user wants to look both revenues
    and sales deductions for the free items since the product that we are going to give as a free of charge item can be
    sold separately in the same sales order. Then the item category of free goods TANN has the pricing value as B.
    Then the system calculates value of the free goods as 100% discount as we discussed above the same material [that
    is going to be given as a free of charge item]. Some times the same item is going to be given as a normal item.
    Then system calculates price for normal item and system should not calculate price for same item [free of charge
    item]. So as to perform this calculation we have to assign Requirement/Routine 55 is to assign condition type
    R100.
    Alt CBV = 28: [100% Discount] Condition type R100 should be taken as a ZERO value. The formula 28
    calculates condition type R100 value as a ZERO.
    Set Transfer of cost to Main item: [Copy control]: Transaction code: VTFL
    Copy control is a concept by which the system copies the data from source document to target document.
    Path:
    IMG
    Sales and Distribution
    Basic functions
    Pricing
    Free goods
    Control free goods pricing
    Set transfer of cost to main item [copy control]
    Choose Billing type F2 Delivery document type LF from position button
    Select it and click on itemicon under dialog structure
    Choose item category Ex: TAN
    Click on details icon
    Click on display or change icon
    Choose item category as TAN again
    Select it and click on details icon
    Check cumulative cost
    Save and Exit
    Cumulative cost controls whether the cost value (VPRS) is to be copied from relevant sub items into main items.
    Sub items cost are not relevant for billing.
    Maintain copying control: Transaction code: VTAA
    Path:
    IMG
    Sales and Distribution
    Basic functions
    Free goods
    Control free goods pricing
    Maintain copying control
    We maintain copy control at item level category for free goods. In this field we can control whether the
    free goods should also be transferred when we copy from one document to another document.
    Choose source document type as QT and target document type as OR from position button
    Select it and click on item control button under dialog structure
    Choose AGN item category from position button
    Click on display or change button
    Again click on AGN
    Click on details icon
    Check Re u2013 explode structure/Free goods
    Save and Exit
    This indicator controls whether the free goods are copied from source document to target document or redetermined
    again.
    Maintain condition records for Free goods [INCLUSIVE]: Transaction code: VBN1
    Path:
    Logistics
    Sales and Distribution
    Master data
    Conditions
    Free goods
    VBN1 u2013 Create
    Specify condition type NA00
    Click on key combination
    Specify all the data
    Choose inclusive by clicking the INCLUSIVE/EXCLUSIVE push button
    Specify the Material No., Minimum order quantity (Ex: 10), Specify [from] the free goods quantity (Ex:
    10), Unit of measure u201CEAu201D (Each), Free goods (are free goods) as u201C1u201D.
    Calculation procedure: We can specify the Routines for calculation procedure as 1 or 2 or 3
    1 = Pro u2013 Rata (Proportionate): Ex: If the customer places order for 100 cases of material u201CXu201D, then customer
    receives 20 cases of same material as free. That means, the business can say that buy 100 and get 20. If the
    customer orders for 162 cases, then system automatically grants 32 cases as a free of cost (162x20/100 = 32 Cases).
    2 = Unit of reference: When customer orders for 100 cases of material u201CXu201D, then the customer receives an
    additional 20 cases as a free of goods. That means business can say that buy 100 get 20 free by granting 200 free
    for every full of 100 cases. The customer places order for 162, then system automatically grants only 20 cases
    (100x20/100=20).
    3 = Whole unit: When a customer places order for 100 cases of material u201CXu201D, then the customer receives additional
    20 cases of material u201CXu201D as a free of goods item. The business can say that buy 100 and get 20 free of charge items.
    If the customer orders for increment of 100 that means 200 (100 + 100) items, then he gets 40. If he placed the
    order for 101 u2013 199 items he gets only ZERO.
    Save and Exit
    Condition record for EXCLUSIVE: Transaction code: VBN1
    Path:
    Logistics
    Sales and Distribution
    Master data
    Conditions free goods
    Specify the discount type u201CNA00u201D
    Click on key combination
    Click on Choose inclusive by clicking the INCLUSIVE/EXCLUSIVE push button
    Specify the sales organization, distribution channel
    Specify customer number and validity periods, material, minimum quantity, order quantity, unit of
    measure, calculation procedure, free goods (3)
    Specify additional material free goods (if other goods is going to be given as a free of charge item.
    Save and Exit
    Go to VA01 and raise the sales order for INCLUSIVE and EXCLUSIVE.
    See the Free Goods effect.
    Condition type NRAB = Free goods: Requirement = 59, Alt CBV = 29: [only for INCLUSIVE purpose]
    Requirement 59: We have to assign requirement 59 to the condition type NRAB. If the customer buys 100 cases
    of product u201CXu201D, then he receives 10 cases of the product free. If the user would not like the additional line item in
    the sales order for free goods rather than the discount of the 10 cases is represent in the same line item as other 90
    cases. If the free goods discount should not apply on credit for returns that do not make reference in the previous
    document.
    Alt CBV 29: The condition type NRAB is to be assigned with 29 formula to support inclusive free goods
    agreement where the user would have to apply the discount to the order item rather than having a sub item
    generated for the free quantity.
    Ex: The customer orders for 100 cases of product u201CXu201D, 10 cases are free instead of having a free sub item generated
    b the system to represent the free 10 cases, the user would like to have a discount applied to the 100 cases line item
    equal to the value of the 10 cases.
    NOTE: Free goods can only be configured on document category type u201CCu201D (OR). That means we cannot configure
    free goods on Inquiry and Quotation.
    Header Conditions
    SAP has delivered two kinds of condition types: (1) Header conditions
    (2) Item conditions
    Header conditions: The value of the header condition applies to the whole items in the sales document.
    Header conditions do not have any access sequence.
    So that, value of the header conditions should be maintained manually.
    Ex: HA00, HB00
    Configuration settings:
    Include condition types HA00, HB00 in V/08 in between the discount condition types.
    Go to VA01 and raise the sales order
    Select line item and go to Go to button
    Header Conditions
    Include condition type HA00 HB00 with values [HA00 is percentage discount and HB00 is absolute
    discount]
    If HA00 = 1%, then system applies 1% on base value on all items in the sales order.
    If HB00 = 100/- Rupees, then system applies 100/- Rupees proportionately to all items in the sales order. If sales
    order has two items, then system applies 50/- Rupees to each item.
    Click on activate button
    Go to item condition screen
    Check how system applied header conditions for line items
    NOTE: Make sure that sales order contains more than one item.
    Condition Scales
    We can maintain scales for each and every condition type. So that we can determine pricing conditions values
    depending upon the range of the order quantity.
    Ex: If you maintain condition record for PR00 for material one as a 100/- Rs. For 1 material, then we can maintain
    scales for this material like below:
    From Quantity Price
    1 u2013 10 1000
    11 u2013 20 999
    21 u2013 30 998
    31 u2013 40 997
    Configuration settings:
    Go to VK11
    Maintain condition record for PR00
    Select line item and click on scales icon on the application tool bar
    Maintain scales and scale rates accordingly
    Save and Exit
    Go to VA01 and raise the sales order
    Enter the order quantity according to the scale and see the scale effect
    Regards,
    Siva

  • Prevent Third Party / Sales order stock for blocked vendors

    Hi Experts.
    We have scenarios for Third party processing and Sales order stock. We have a scenario of a fixed vendor for a material. The purchasing function frequently does block vendors for purchasing.
    However, we find that this does not prevent creation of a third party / sales order stock item in the sales order and a PR is generated. It is only found during the PR --> PO conversion that the vendor is blocked at which time someone has to manually reject the line items.
    Is there a way to prevent the system from being able to generate a PR for a blocked vendor ? I guess one possibility is to enhance the requirement routine for PR creation. Is there any other approach ?
    Appreciate your help
    Regards
    Rohit Zalani

    Hi
    In MK05, block vendor for all Purchasing org and Select Block Function = 03     Block quot. req., order, goods receipt
    If you do this setting then user will get error message that "Vendor is blocked" and "Purchase requisition could not be generated for component".

  • Credit Block released Sales order report

    Hi Experts,
    My client is given few sales orders (around 4)no and requesting us, to prepare the credit block released sales orders report (include released person user ID).
    *.No change logs is existing for all sales order and deliveries.
    For above requirement I am using CDHDR table data but I am not getting credit block released sales order report.
    Below fields I am using in CDHDR Table.
    Change doc.Object (objectclas) : VERKBELEG
    Document No (CHANGENR): Sales order no XXXXXXX
    Transaction no (TCODE) : VKM1,VKM2,VKM3
    Date(UDATE) : 25.09.2011 to 09.11.2011
    Experts, Can you please help me out for this.
    Thanking you!!!!
    Regards,
    Vijaykumar Kola
    *.I'm already aware of this is a new development.

    Try this, simple report... Here we check the new value of credit  status field VBUK-CMGST and if it is 'D' we know that someone used VKM* transaction to release the document. Also you need to format the sales order number with leading zeros so it occupies all 10 digits and pass it to CDHDR-OBJECTID field (and not CHANGENR field). In the below code I am using select option for sales order number, so I know it will be formatted with leading zeros and so select on CDHDR will be successful.
    *& Report  ZTV_TEST
    REPORT  ztv_test.
    TABLES: vbak, cdhdr.
    SELECT-OPTIONS: s_saldoc FOR vbak-vbeln OBLIGATORY,
                    s_udate FOR cdhdr-udate.
    RANGES: r_objid FOR cdhdr-objectclas.
    DATA: ls_cdhdr TYPE cdhdr,
          ls_cdpos TYPE cdpos.
    IF NOT s_saldoc IS INITIAL.
      LOOP AT s_saldoc.
        MOVE-CORRESPONDING s_saldoc TO r_objid.
        CONDENSE: r_objid-high, r_objid-low.
        APPEND r_objid.
      ENDLOOP.
    ENDIF.
    CHECK NOT r_objid[] IS INITIAL.
    SELECT *
      INTO ls_cdhdr
      FROM cdhdr
            WHERE objectclas = 'VERKBELEG' AND
                  objectid IN r_objid AND
                  udate IN s_udate AND
                  tcode LIKE 'VKM%'.
      SELECT SINGLE *
        INTO ls_cdpos
        FROM cdpos
          WHERE objectclas = ls_cdhdr-objectclas AND
                objectid = ls_cdhdr-objectid AND
                changenr = ls_cdhdr-changenr AND
                tabname = 'VBUK' AND
                fname = 'CMGST' AND
                value_new = 'D'.
      IF sy-subrc = 0.
        WRITE:/ ls_cdhdr-objectid(10), ls_cdhdr-username,
                ls_cdhdr-udate, ls_cdhdr-utime.
      ENDIF.
    ENDSELECT.

  • Automating delivery blocks in sales orders

    Hi,
    We have a delivery made with ref to a sales order. The goods are third party warehouse managed.When the goods are no longer needed, a third party warehouse sends an idoc in our system. This idoc deletes the delivery in our sap system and as soon as the delivery is deleted, the system also puts a delivery block(VBAK-LIFSK) in sales order at header level so that no further deliveries are made with ref to sales order.
    There is an issue at present that this delivery block is not set in sales order when the delivery is deleted.
    could anybody pls help where the code might have been written to automatically put the delivery block in sales order when the delivery is deleted.
    regards

    Hi,
    Just code the delivery block logic in DO user exit MV50AFZ1 routine "userexit_delete_document".
    Thus, when DO deleted then system will auto set delivery block to SO.
    Hope this help.
    Cheers,

Maybe you are looking for