Sales Order : New Line Item

Dear ALL
Is there any fuction Module to post New Line Item in Existing Sales Order .
Moderator message: please do your own research before asking.
Edited by: Thomas Zloch on Dec 25, 2010 4:17 PM

Thanks
But I need to Post New Line Item in Existing Sales Order for Scrapped Quantity .
I checked Function Module BAPI_SALESORDER_CHANGE but I was not able to finfd file din any parameter where Quantity Could be inserted.
Can anyone help

Similar Messages

  • Sales order some line items are showing not relavant

    Hi SD Guys,
    In sales order some line items are showing not relavant.
    Why are they showing a status of not complete or "not relevant"?
    Thanks
    Sunny

    Hi sunny,
                     plz check the each line item in the sales order controls by the item category, so check the item category , depends on the item category, pricing,delivery and billing takes place.
    regards,
    ram.

  • Locking Sales order and line item from reading

    Hi,
    I am writing an interface program to create an offer list inspection report. If two users are running the program at the same time, and if the first user read and processing a sales order line item, it should not read the same sales order line item twice for the second user.
    Please let me know if anybody has used locking sales order at line item level (VBAP).
    The enqueue function for VBAP is not working.
    Any suggestions will be helpful.
    Regards
    Ravikanth

    hi Ravi ,
    u Can lock the Sales Order for processing ,  u cannt restrict users @ tables level.
    u hhave to enqueue the VBELN
    Regards
    Prabhu

  • Price is not changing in sales order in line item

    dear all.,
    price is not changing in sales order on line item,error comes "CHECK ORDER STRUCTURE.
    Regards,
    Praveen

    Dear
    You can go into VA03 --> Menu --> Environment --> Partner --> display credit account (if the data is maintained, than the system springs into FD33). Another way is to check if the sales order type is assigned to credit management in the transaction OVAK (should be D for aut. credit management).
    Did you enter the pricing date , prcing condition and press enter , so  that it should pick the correct price?
    Check this and come back
    Regards
    JH

  • Bdc sales order multiple line items

    hi friends,
    i prepare multiple sales orders multiple line items through  single flat file
    in bdc program.
    i know information about ...
    H
    I
    I
    I
    BUT my problem is
    H
    I
    I
    H1
    I
    I
    H2
    I
    I
    how will develop this code?

    George Bush,
    Answer fir this question is, you need to do basic ABAP Training.
    Search for SAP ABAP Training Courses.
    You need to build logic in you program by defining appropriate internal table and use loop events to build BDC.   BDC is old style of programming. I would advice you to use BAPI with immediate order processing.
    If you want BDC, you can also try to use LSMW by defining appropriate inbound data structures.
    If you need help let me know.
    Thanks & Regards,
    Mahesh Apte

  • Sales order with line items having multiple values in multiple currency

    Please suggest solution for creating sales order having line items with multiple values in multiple currencies.
    e.g. Line Item A Qty/1 No,  value 100INR100$100EUR. Customer wants all three values to display at sales order line item level and create billing in 3 currencies.

    Hi,
    As far as my understanding it may be possible round the solution,
    For 1 company code we can able to maintain 3 currancies,
    1 currancy is hard currance & other two are dual currancies.
    Create sales order with 3 line items having 3 diffrant currancies
    Spilt invoice on the basis of currancy
    Last pass to this invoices to accounting.
    Whole process is
    Sales order >>> Delivery >>> Invoice 1, Invoice 2, Invoice 3(Split invoice on basis of Currancy).
    Consult with FI Team they will tell you about dual currancy & hard currancy
    Kapil

  • How to know the excess stock with in a sales order and line item

    Hi,
          i am running an MRP against a sales order and sales order line item. the materials are getting planned based on the requirement. but due to some reasons the production orders are confirmed with out consumption of the actual required quantity of the  components. so the stock  is kept  ideal in the sales order  though it is not required further.
       do to some othere reasons also the excess stock of componenets exist. the PR or POs may also exist for the materials though they are not required further.
    i am in need of a report for the excess stock or excess PR or Purchase order for a sales order.
      please give me logic to find the excess things in that sales order and sales order line item. the Expensional message 26 is there in stock requirement list . but it does not give the excess quantity existing.
    regards
    madan

    hi rajesh,
      thanks for your reply. please tell me the logic to see when only partial quantity of sale sorder are delivered  and also when no delivery is made also.
    but manufactured and placed in stock.
    please tell me the tables to follow and logic of going ahead with them.
    regards
    madan

  • Get the Ship-to-Party from Sales Order and Line item

    Hi all,
    I am developing one report in which I want to get the Ship-to-Party for a particular Sales Order and Sales Order Line item number.
    I can see table VBPA from I can get value of KUNNAR and so on. But my concern is that can the Ship-to-Party differ for different line items for sales Order, if yes how to get that one, any table or any function module?
    In my scenario i found out that ship-to-party only depend upon sales order and partner function not line item.
    please help me..
    regards,
    vikas.

    Hi,
    First step: Customer Creation (T. Code: XD01)
    i) Create Sold to Party (Ordering Party) with Account Group: Sold-to-Party
    ii) Create as many Ship-to-Party and Bill-to Party, if reqd, with Account appropriate Account Groups.
    iii) Match all the Ship-to-party/ Bill-to-Party/ Payer for the respective Sold-to-Party under Tab: Sales Area data, Sub-tab: Partners.
    Second Step: Sales Order Creation (T.Code: VA01)
    i) Enter Sold-to-Party at Header Level.
    ii) Enter Materials (at Line-item level).
    iii) Now, System will pop-up all the Ship-to-Party/ Bill-to Party/ Payer, Matched for the particular Sold-to-Party. Click on appropriate selection.
    OR
    Now, (if option doesn't pops-up) select the line and Double Click on to the same line. it will lead to the next page. Here, Click Tab: Partners
    Now, in Column: Partner Function, search for appropriate Partner: Ship-to-Party or Bill-to-Party or Payer.
    Remember: Sold-to-Party will be non-editable as entered at Header level.
    Repeat the same for Each Line-item.
    Regs,
    Amit K. Yadav

  • Sales order creation, Line item error

    Hi....
    Iam created one sales order with BAPI techniue.i.e type stand alone order.
    After creation VBELN generated successfully.
    Now, if i save the order from VA02 it was displaying following message in popup window...
    LINE ITEMS HAVING NO QUOTA OR TERM ATT
      Item   Material           Description
        10   1111-0             ABCD FR
    And.,
    In the conditions tab of the line items I want to insert a row i.e contract type and amount..,
    But..,
    for this Iam paaing entries as input to BAPI but not mapping on screen..,
    Also if i try to add them mannually showing following error..
    Requirements are not fulfilled for condition <given type>.
    As an abaper Iam not able to solve this problem, also functional people not availble here..,
    Any updates.......
    Thanks,
    Naveen.I

    Hi,
    This is due to the requirement routine assigned to the condition type in pricing procedure.
    Goto Tcode V/08.
    Here enter you pricing procedure. You can find it in sales order header : Tab - Sales (Pric. procedure)
    Enter this pricing proc in V/08
    When you select the procedurew & double click on control the procedure will be displyed
    Now look for you condition type & look in the colium "Reqt".
    Some number must be assigned, look for the logic inside the routine. If the requireemnt in logic is noit met the condition will not be populated
    Hope this helps you
    Regards
    Dhananjay

  • In a Sales order for  line item (SL) the Confirmed Qty & Committed Qty is 0

    In a Sales order for a line item (Schedule line) the Confirmed Qty & Committed Qty is 0 and there is no second scedule line
    with the Confirmed Qty & Committed Qty (This is a MTO).What could be the reason?  Pls suggest.
    Thank You
    Manoj

    Mr.Gupta
    Check the Schedule line determination category settings.
    It is determined by Item Category + MRP Type.
    Pls maintain the relavant entries in that settings.  Pls try out the path  in the system. Do NOT ask for Tcode.
    Regards
    Sumanth.Gururaj
    Consultant/Systems Analyst - SAP SD/MM

  • 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

  • User exit - VA01 - Adding new line items while Sales Order Creation

    Hi All ,
    I have a requirement where : in VA01 , i have to add new line items using USER EXIT or BADI.
    The scenario is : we maintain Characteristics for Material. When we select a particular characteristics, Factor and length will be displayed in a Popup. we can specify the Factor and lenght.
    Here , if i specify Factor as 10 and lenght as 1000. the Material has to be cut / split into 10 items of 1000 mts each. and the ITEMs table control should get 10 ITEMS .
    How to add new items using User exit or Badi in VA01 while creating a sales order.
    i have identified the user exit . What code should be used to add new line items.
    kindly help me in solvng this.
    Waiting for your replies.
    Thanks in advance.
    Suki.

    hi
    wich user exit do you take for that ???

  • XVBAP has the new line item but does not update Sales Order

    Hi
    I need to update the sales order with a new line item when the line item has a base unit of measure as the sales unit. I need to then convert the base unit to sales unit with a whole figure and the rest can be in the base unit.
    I am able to see the update in the xvbap but the line item doesn't get updated.
    I am puting this code in a perform within
    MV45AFZB  within   Form  USEREXIT_CHECK_VBAP
    But I guess I am doing something wrong can someone please take a look at it and tell me what is wrong with the coding.
    *&  Include       ZSD_CREATE_NEW_LINE_ITEM              *
    *&      Form  create_new_line_item
          text
    -->  p1        text
    <--  p2        text
    FORM CREATE_NEW_LINE_ITEM .
      CONSTANTS: C_MEINH LIKE MARM-MEINH VALUE 'CSE'.
    Variables Used
      DATA: WS_WMENG LIKE VBEP-WMENG.
      DATA: INPUT  LIKE VBAP-KWMENG,
            WS_EA  LIKE VBAP-KWMENG,
            WS_CSE LIKE VBAP-KWMENG.
      DATA: WS_MVKE_VRKME LIKE MVKE-VRKME.
    Internal Tables and Structures
      DATA: WS_XVBAP LIKE XVBAP.
    DATA:
    it_vbap  LIKE vbap OCCURS 0 WITH HEADER LINE,
    it_vbep  LIKE vbep OCCURS 0 WITH HEADER LINE,
    it_xvbap LIKE vbapvb OCCURS 0 WITH HEADER LINE.
      DATA: BEGIN OF WS_MARM,
              MEINH LIKE MARM-MEINH,
              UMREZ LIKE MARM-UMREZ,
              UMREN LIKE MARM-UMREN,
            END OF WS_MARM.
      CLEAR WS_MVKE_VRKME.
      SELECT SINGLE VRKME INTO WS_MVKE_VRKME
        FROM MVKE
        WHERE MATNR EQ XVBAP-MATNR
        AND   VKORG EQ XVBAK-VKORG
        AND   VTWEG EQ XVBAK-VTWEG.
      IF VBAP-VRKME <> WS_MVKE_VRKME.
       LOOP AT XVBAP.
          SELECT SINGLE MEINH UMREZ UMREN
            FROM MARM
            INTO WS_MARM
            WHERE MATNR = VBAP-MATNR
            AND   MEINH = WS_MVKE_VRKME.
          IF XVBAP-MEINS <> WS_MVKE_VRKME.
            IF NOT XVBAP-KWMENG = 0.
              WS_WMENG = XVBAP-KWMENG / WS_MARM-UMREZ.
              IF WS_WMENG > 1.
    This means that the line item needs to be split into CSE & EA
                  INPUT  = XVBAP-KWMENG.
                  WS_EA  = INPUT / WS_MARM-UMREZ.
                  WS_CSE = WS_EA.
                  WS_EA  = WS_CSE * WS_MARM-UMREZ.
                  WS_EA  = INPUT - WS_EA.
    Now we have the qty. split into EA & CSE. Now to
    assign it to xvbap
                  XVBAP-KWMENG = WS_EA.
                  XVBAP-VRKME  = WS_MVKE_VRKME.
              READ TABLE XVBAP WITH KEY POSNR = XVBAP-POSNR.
                MODIFY XVBAP INDEX SY-TABIX.
                  WS_XVBAP = XVBAP.
                  WS_XVBAP-KWMENG = WS_CSE.
                MOVE-CORRESPONDING WS_XVBAP TO XVBAP.
                INSERT XVBAP INDEX SY-TABIX.
              ENDIF.
            ENDIF.
          ENDIF.
      ENDIF.     " IF xvbap-vrkme 'EA'.
    ENDFORM.    " create_new_line_item

    Hi Clark,
    Pls check the Include MV45AFZZ instead of the one which you are using . Here in this include MV45AFZZ you can have access to the Header and Line items data .
    Here in this include
          FORM USEREXIT_SAVE_DOCUMENT                                   *
          This userexit can be used to save data in additional tables   *
          when a document is saved.                                     *
          If field T180-TRTYP contents 'H', the document will be        *
          created, else it will be changed.                             *
          This form is called at from form BELEG_SICHERN, before COMMIT *
    form userexit_save_document.
    Endform.
    Either you can write the code you want to update the XVABP table here or you can use the form .
          FORM USEREXIT_MOVE_FIELD_TO_VBAP                              *
          This userexit can be used to move some fields into the sales  *
          dokument item workaerea VBAP                                  *
          SVBAP-TABIX = 0:  Create item                                 *
          SVBAP-TABIX > 0:  Change item                                 *
          This form is called at the end of form VBAP_FUELLEN.          *
    form userexit_move_field_to_vbap.
    endform.
    This are the 2 performs in this include where you can do you code and it will defnitely solve your problem.
    Good Luck to you . Let me know if your problem get solved.
    Thanks & Regards,
    Naidu.

  • B2CBasket- Sales Order  How to add Vendor partner and new line item of SO

    Hi,
    I want to add the following BEFORE the sales order creation process starts:
    Add a VENDOR partner
    Add a new line item to ORDERADM_I
    I suspect in BADI CRM_ISA_BASKET_ITEMS and CRM_ISA_BASKET_HEAD. I have user 'HEAD' to add extension fields but cant figure the creation of NEW partners and NEW line item.
    regards,
    Dave

    Thank you for feedback Shantoor,
    The CRM_ORDER_MAINTAIN need not be called as this FM is called immediately following almost all of the CRM_ISA_* BADI's.
    For clarification I just want to expand on the solution..
    In all of these BADI's SAP uses the CT_INPUT_FIELDS parameter. This is where you should enter WHICH fields you have made changes to in the exit. CRM_ORDER_MAINTAIN uses the same parameter.
    However the challenge is .. WHAT do you enter in the CT_INPUT_FIELDS. This is where you have to follow a strategy. I yused the following:
    1. Looked where the structure was used in programs/class to see how SAP used it
    2. Set breakpoints at the call of the BADI. Check what CT_INPUT_FIELDS content is (SAP uses same technique)and try and replicate for your new entries.
    I hope this helps those that, like me, battled a bit with the use of these BADI's.

  • User Exit during Sales Order Creation - New Line Item needed

    I have a situation during the process of sales order creation. If a Material in a line item has say 27 EA and the Base Unit is EA. But the Sales Unit is CSE. Then whenever the user enters 27 EA and presses enter he should get two line items.
    The first line item needs to convert to maximum number of CSE posible and the rest will be the second line item with the remaining EA. The order isn't important but that is what is needed. Question is how do I approach this problem and code my user exit accordingly and where do I code it.
    I was looking at SAPMV45A and saw the program MV45AIZZ which is meant as a user exit for any PAI event handling. If anybody has encountered this kind of requirement can you please share your view on this.
    I will definitely reward points for useful answers.
    Clark

    Hello Mahendra
    The requirement is as follows :
    PART 1:
    Sales Order Enter: 
    1.     When a line item is entered on a sales order (VA01 or VA02), at enter, check the sales unit of measure (VBAP-VRKME).
    •     Do not check line items where item category (VBAP-PSTYV) = TANN, TAPS or ZTAP.  TANN are free goods that should not be considered for consolidation.  TAPS & ZTAP are lower level materials as a result of product selection.  They will be attached to a higher-level material with an item category of TAX, which is relevant for consolidation.
    •     Do not check items where VRKME <> EA
    2.     If VRKME = EA, go to MARM for MATNR.
    3.     Go to record where alternate unit of measure (MEINH) = CSE, get the value from the numerator field (UMREZ).
    4.     Divide the order quantity (VBEP-WMENG) by UMREZ.
    5.     If the result is greater than 1.0, the customer has ordered more than one case and a new line item needs to be added to the sales order for the case quantity.
    6.     Add a new line to VBAP for the same material with the case quantity.  If not a whole value, the remainder of eaches (bottles) should update the qty on the first item on VBAP.
    •     Part 1 is relevant for order types ZCA, ZOR, ZSO, RE, ZSM
    PART 2:
    Batch Job to run prior to the Delivery Due List:
    1.     Read VBUK for Delivery Status (LFSTK) = A (delivery not processed).  Get all of the document numbers (VBELN).
    2.     Go to VBEP for those document numbers to get the goods issue date for the order.  There will be many records in VBEP for the same sales order.  Look at all orders with a goods issue date (WADAT) of next day.
    3.     Go to VBAK for those document numbers to see if there are multiple sales orders for the same Sold To party (KUNNR).
    4.     For customers who have more than one order in VBAK, search all line items (for all orders).  If there are no duplicate materials across sales orders, do nothing.
    •     Do not check line items where item category (VBAP-PSTYV) = TANN, TAPS or ZTAP.  TANN are free goods that should not be considered for consolidation.  TAPS & ZTAP are lower level materials as a result of product selection.  They will be attached to a higher-level material with an item category of TAX, which is relevant for consolidation.
    •     Do not check line items where reason for rejection (VBAP-ABGRU) is not blank
    5.     If there are duplicate materials, go through the same logic as in part 1.  If the quantity across the sales orders adds up to greater than one case, add the appropriate quantity to a new line item on the first sales order.   If there is a remainder qty, update the line item on the first sales order with this qty. In this case, the quantities on the second sales order needs to be closed out with a reason for rejection code of 50, ‘Line Item Consolidation’. If there is no remainder,  update the qty on this item directly.
    •     Part 2 is relevant for order types ZOR, ZCA, ZSM
    •     This batch job will have to be run manually for Day Pick orders.  The end of this program should automatically kick off the delivery due list for Day Pick orders, shipping condition 02.
    Business Justification:
    The business requires that like order line items be consolidated to one line item prior to the order going to the warehouse for picking.  This will aid in picking at the warehouse as well as result in the customer invoice not reflecting more than one line item for the same material.  In the case where the customer has truly ordered more than a case, i.e;, 1 case, 2 bottles, the documents in SAP will still reflect 2 lines.

Maybe you are looking for