Splitting sales ord line items to diff deliveries based on sched ln date

Hi,
   We are trying to split sales order line items to different deliveries based on the schedule line date. I have copied routine FV50C001( vofm -> data transfer -> deliveries -> routine 1)into a custom routine and added the schedule line date xvbep-edatu to the split criteria likp-zukrl. However the split does not work as expected. Does anyone have any ideas ?
Regards.

Hi Aravind,
u said u ve copied the routine into a customised one..but did u chk whether ur customised routine is getting called from the transcation or not?? the routine has to be assigned in config so tbat it is triggered appropriately.. try putting a BP in ur routine n doin the transaction...
Regards

Similar Messages

  • Splitting sales ord line items to diff deliveries based on max line items

    Hi,
    I'm trying to split sales order line items to different deliveries based on the max line items on Sales Organization ( TVKO-MAXBI ) . I activated a new routing (copying standard 001 ) but an error is happening
    Item 000200: delivery split due to conflicting header data (ZUKRL: M106 <-> M1061)
    However the split does not work as expected. Does anyone have any ideas ?
    Pls help me
    The code is:
    data: ITEMNO        LIKE TVKO-MAXBI,
          BILLNO        LIKE TVKO-MAXBI.
    *}   INSERT
    FORM DATEN_KOPIEREN_601.
    *{   INSERT         MTDK905083                                        1
      LIKP-VKORG = CVBAK-VKORG.
      LIKP-AUTLF = CVBAK-AUTLF.
      LIKP-VSBED = CVBAK-VSBED.
      LIKP-FKARV = TVAK-FKARV.
      LIKP-TRAGR = MAAPV-TRAGR.
    Fill field ZUKRL with combination criteria
      LIKP-ZUKRL(2)      = CVBAK-VTWEG.
      LIKP-ZUKRL+2(2)    = CVBAK-SPART.
        IF NOT TVKO-MAXBI IS INITIAL.
          IF ITEMNO < TVKO-MAXBI.
            ITEMNO = ITEMNO + 1.
          else.
            LIKP-ZUKRL+4(2) = BILLNO + 1.
            ITEMNO = 1.
          endif.
        endif.
      LIKP-STAFO = CVBAK-STAFO.
      LIKP-STWAE = CVBAK-STWAE.
      MOVE CVBAK-KKBER TO LIKP-KKBER.
      MOVE CVBAK-KNKLI TO LIKP-KNKLI.
      MOVE CVBAK-KKBER TO LIKP-KKBER.
      MOVE CVBAK-GRUPP TO LIKP-GRUPP.
      MOVE CVBAK-SBGRP TO LIKP-SBGRP.
      MOVE CVBAK-CMWAE TO LIKP-CMWAE.
      MOVE CVBAK-WAERK TO LIKP-WAERK.                      "46C/note 184914
      MOVE CVBAK-CTLPC TO LIKP-CTLPC.
      IF LIKP-LFART = TVAK-KORLI.
        LIKP-KLIEF = CHARX.
      ENDIF.
      MOVE CVBAK-LIFSK TO LIKP-LIFSK.                           "45B
    Pick-up sheet number in delivery order processing is external dlv. no.
      IF CVBAK-VBKLT EQ VBKLT_AUSL_AUFT OR
         CVBAK-VBKLT EQ VBKLT_AUSL_AUFT_KORR.
        MOVE CVBAK-BSTNK TO LIKP-LIFEX.
      ENDIF.
    Consignment issue by service agent is external delivery number
      IF CVBAK-VBKLT EQ VBKLT_EDL_ENTN OR
         CVBAK-VBKLT EQ VBKLT_EDL_ENTN_KORR.
        MOVE CVBAK-BSTNK TO LIKP-LIFEX.
      ENDIF.
    *}   INSERT
    ENDFORM.

    hi friend i solved the problem.. was a mistake on my source... I send u the code to help u in advanced... thanks for your time
    data: ITEMNO        LIKE TVKO-MAXBI,
          BILLNO        LIKE TVKO-MAXBI.
    *}   INSERT
    FORM DATEN_KOPIEREN_601.
    *{   INSERT         MTDK905083                                        1
      LIKP-VKORG = CVBAK-VKORG.
      LIKP-AUTLF = CVBAK-AUTLF.
      LIKP-VSBED = CVBAK-VSBED.
      LIKP-FKARV = TVAK-FKARV.
      LIKP-TRAGR = MAAPV-TRAGR.
    Fill field ZUKRL with combination criteria
      LIKP-ZUKRL(2)      = CVBAK-VTWEG.
      LIKP-ZUKRL+2(2)    = CVBAK-SPART.
        IF NOT TVKO-MAXBI IS INITIAL.
          IF ITEMNO le TVKO-MAXBI.
            ITEMNO = ITEMNO + 1.
          else.
            BILLNO = BILLNO + 1.
            ITEMNO = 1.
          endif.
        endif.
      LIKP-ZUKRL+4(3) = BILLNO.
      LIKP-STAFO = CVBAK-STAFO.
      LIKP-STWAE = CVBAK-STWAE.
      MOVE CVBAK-KKBER TO LIKP-KKBER.
      MOVE CVBAK-KNKLI TO LIKP-KNKLI.
      MOVE CVBAK-KKBER TO LIKP-KKBER.
      MOVE CVBAK-GRUPP TO LIKP-GRUPP.
      MOVE CVBAK-SBGRP TO LIKP-SBGRP.
      MOVE CVBAK-CMWAE TO LIKP-CMWAE.
      MOVE CVBAK-WAERK TO LIKP-WAERK.                      "46C/note 184914
      MOVE CVBAK-CTLPC TO LIKP-CTLPC.
      IF LIKP-LFART = TVAK-KORLI.
        LIKP-KLIEF = CHARX.
      ENDIF.
      MOVE CVBAK-LIFSK TO LIKP-LIFSK.                           "45B
    Pick-up sheet number in delivery order processing is external dlv. no.
      IF CVBAK-VBKLT EQ VBKLT_AUSL_AUFT OR
         CVBAK-VBKLT EQ VBKLT_AUSL_AUFT_KORR.
        MOVE CVBAK-BSTNK TO LIKP-LIFEX.
      ENDIF.
    Consignment issue by service agent is external delivery number
      IF CVBAK-VBKLT EQ VBKLT_EDL_ENTN OR
         CVBAK-VBKLT EQ VBKLT_EDL_ENTN_KORR.
        MOVE CVBAK-BSTNK TO LIKP-LIFEX.
      ENDIF.

  • Need to Split Sales Order Line Item in VA01

    Hi,
      I have a requirement in which i have to split an order line item for KMAT materail number. system popup configurable screen, here all the required characteristic values have to be selected as per the customer requirement.
    After entering all the required customer specific characteristic values, system determines batch automatically. If characteristic values of the Batch matches with the characteristic values of configurable screen selected in the sales order
    Here also we have to check the sales Order Quantity (VBAP u2013 KWMENG) and order Confirmed quantity (VBEP u2013 BMENG), if the both the quantities are not same, consider order has partially confirmed.
    If Order quantity is partially confirmed, check for the batches with the same characteristic values of the quotation configurable screen and if batch found, system has to create a one more line item and new batch has to be assigned to create line item.
    Reduce the order quantity equal to the confirmation quantity in the first line item.
    Create a new line item in the quotation, copy all the remaining unconfirmed quantity from the first line item and also copy all the characteristics and properties (item category, schedule line category, business data, item data, and requirement type) and assign the batch to the new line item. System does the availability check automatically and confirms.
    In another scenario system doesnu2019t find batch, in this case capable to promise has to trigger directly.
    Here we have to check the Order confirmed quantity, if confirmed quantity is equal to zero.
    Change the item category of the line item, due to which system determines different Requirement type and schedule line category.
    Based on the Requirement type system triggers the capable to promise.
    I would lke to know which is the suitable user eixt or BADI to split the line items and what all the tables or structures i need to populate in order to create a new line item successfully.
    I have seen many post in sdn but no body gives the right user exit name where i can add new line item.
    Regards,

    Hi Amit,
      Thanks for your reply. In this scenario configurable material is involved. And first Make to Stock scenario is executed to check any material with customer entered characteristics are avialable. If its so it will determine its batch and assigned the quantity.
    If zero quantity is assigned or no quantity is assigned then I have to trigger the Make to Order scenario for rest of unconfirmed quantities in order.
    I have check it in USEREXIT_MOVE_FIELD_TO_VBAP but it was of no use. I even tried in USEREXIT_CHECK_VBAP but still no result. I am not sure what all the tables and structures i need to populate there.
    Regards,

  • I have a problem regarding sales order line item with confimed quanity

    Hi Experts,
    I have a problem regarding sales order line item with confimed quanity with '0'  with delivery block but confirming the sales order quantity once the order is released from credit check.
    The situation arises as per the below scenarios.
    Scenario - 1 -  When the sales order has two line item - one line item with confirmed qunaity in the schedule line and for the 2nd line item there is no available stock for the Material xxxxxx.
    Initially the sales order is created for the line item 2 with confirmed quantity = 0, and having the delivery block = 01 for the Material xxxxxx  and the order is set with credit check.  Once the order is relased from the credit check.  The quanity for the item 2 where the confirmed quantity will be = 0 ( Where it is not changing the confirmed quantity)
    Scenario -2-  Updating the order qunaity for the line item 2 as (9Pcs) it will goes to credit check and save the order.
    Maintain the stock for the line item 2 ( 5 Pcs).
    Once the order is released from the credit check.  Then  for the line item 2 the confirm quanity will be seting to 5 Pcs with Delivery blcok 01.
    This should not happen, When the credit check is released even though if it has stock based on the delivery blockl it should set the confirmed quanity to Zero.
    Can you please help me how to solve this issue.
    Looking forward for your reply.
    Thanks and Regards,

    Hi,
    I agree with your point.  In the sales order When the complete delivery check box is enabled where the confimed qty is set to zero, it is fine but when we save the orderr it goes to credit check.  Once we release the order using VKM3 where in the sales order the confimed quantity is setting to 5,  But it should set to Zero quantity.  Quatity should not be get confirmed it should be Zero Quantity. 
    Further in SPRO - customizing in the deliveries blocking reasons - It has a tick mark in the confirmation blcok.  But we dont want to remove the - Confirmation Block tick mark
    Please any one can help me if you have any solution to solve this problem.
    Thanks and Regards.

  • Split Sales Order Line - by Delivering Plant ?

    Hi there,
    Does anyone know (config or ABAP) how to split a sales order line for this scenario:
    1 Sales Org - SOrgA
    3 Plants (PlantA, PLantB & PlantC)
    Can fulfill SOrgA sales orders from all 3 plants
    No WM
    User enters MatA Qty 10 on sales order line item 1.
    MatA has qty 5 in plantA and qty5 in PlantB.
    System gives Qty 5 to line item 1, reduces qty requested to 5.
    Stytem creates new sales order line & gives Qty 5 to new line item 2.
    I am essentially trying to fulfill the sales order from multiple plants but so far in R/3 I do not see any way to do this with config. Alternative is to do this manually but business requirement is to automate it.
    Any ideas?
    Has anyone done something similar with ABAP?
    Thanks,
    Niall

    Thanks for your comments Ashutosh,
    My strawman schema is currently:
    Biz Hours:
    Orders created.
    Nightly:
    [No (minimal) orders being entered so allocation should be a non-issue or very minimal].
    Backorder rescheduler job runs
    Bespoke job runs to split lines if can fulfill from multiple plants
    - it may be FIFO based on a combination of dates such as customer delivery date and delivering plant lead time (will be bespoke)
    Delivery Due List runs
    Currently our sales order lines have delivering plant (e.g. from customer master, CMIR or material). Against this plant ATP is run, even though the material may also be in another plant. The business issue is that sometimes, for some customers, we want to fulfill the order from a different plant or combination of different plants.
    This is not for every order thankfully!
    N.

  • Third Party GRN Posting Date to be Copied to Sales Order Line item Billing Date

    Hello Experts
    I have a client requirement where in they want to bill line items in the sales order ( third party process ) to the end customer in sync with the GRN posting dates happened in the PO
    For EG if GRN happened on 1st July 2014 then Billing Date should come in as 31st July 2014 so when they execute VF04 giving from and to dates as 1st july to 31st corresponding sales order can be invoiced
    Actual problem is for suppose if i create a sales order in the month of june say 26th basing on the factory calendar setting and invoicing list maintained in the customer master system defaults the billing date to 30th June 2014 , and the same when user runs VF04 from 1st June to 30th June this sales order shows as due and mistakenly end user invoices the customer ( whereas logical GR would have only received in July 1st )
    My requirement is similar to below threads but i am unable to find answer how to copy GR Posting date to Billing Date of the sales order line item
    use GR Doc date as billing date
    3rd party sales process (w/o ship notif) - Billing

    Hi Lakshmipathi ji,
    As my requirement is to update the billing date at the sales order line item level , As a process user goes in executes VF04
    For Ex
    Sales Order Created Date is 1st June 2014 then System Defaults Billing Date at line item to 30th June 2014
    Now when i do GRN suppose on 1st July 2014 for that line item , system should trigger a code where in check the posting date of the GRN and override the same in the Biiling Date field of the sales order line item
    So when VF04 is run for a month All the GRN which are recieved in the month of July are invoiced in July
    Please share me your thoughts do we need to check any userexits from MM side which reads the posting date of GRN and then copies in to my third party sales order
    Regards
    Hiba

  • Sales order line items delivery cancelled but still appears in MD04.

    Hi PP Gurus,
    In the sales there are 6 line items are there out of which for 1 line item delivery and PGI happened. And for remaining line items delivery got cancelled, but these line items for which delivery cancelled appearing in the MD04, I have rejected the sales order line items but these line items still shows in MD04. Please advise how to remove these line items from MD04.
    Thanks and Regards,
    SHARAN.

    Hi
    Pl refer SAP Note : 1166713 for the Problem which says " You have posted goods issue and therefore the delivery requirements should no longer be existing. These inconsistencies can be seen using report SDRQCR21"
    Regards
    Brahmaji

  • How to upload sales order line items?

    SAPGurus,
    For years my customer service department has been asking for a way to upload sales order line items into the VA01 sales order-entry screen.
    Many of our customers submit PO's with huge amount of line items, up to 1,000 lines. Our CS reps need to key in the data line by line (or copy/paste
    approx 17 lines at once from Excel into the VA01 screen), and we are looking for a way to make this process leaner. One idea we have is that user creates the order header, and then has a way to upload the material numbers and quantities in a separate (newly created Z-transaction) screen in one go.
    Obviously rules then need to be built that deal with the various pop-up messages related to e.g. ATP, material status, etc.
    Does anyone have any experience or thoughts on how we could achieve this? A way to make the sales order-entry process a bit less time-consuming? Any feedback would be greatly appreciated !
    Thank you,
    RVS

    Take the inputs from this Blog created by  SUNIL PILLAI                   
    Sales Documents upload  using Standard Direct Input Program in LSMW
    G. Lakshmipathi

  • How to Find Out The Production Order Number For The Sales Order Line Items

    Hi All,
    I want to know the number of production orders for each sales order line item. I know the sales order number .Can anyone tell me how the tables can be linked to get all the production order numbers for each sales order line item.

    I think it depends on your configuration. But check fields KDAUF and KDPOS in table AUFK.  or in table AFPO.
    Regards,
    Rich HEilman

  • Change the Profit Center in Sales Order line item's Account assignment tab

    Hi Gurus,
    I need to change the Profit Center at Sales order Line item in Account Assignment Tab. Currently  The Profit center is coming from Material Master for the Line Item's Material as default but I have to change / overwrite  that.
    Can any body provide me how can i achive that means
    Any User exits, substitution or any thing ?
    I tried MV45AFZZ but i am not able to find out the right place where I can change COBL-PRCTR.
    Sony

    Hi
    There is perform which moves the values to VBAP field.
    This PRCTR field is stored in VBAP (i.e., SO line item table)
    USEREXIT_MOVE_FIELD_TO_VBAP
    Hope it works.
    VVR

  • Restrict deletion of sales order line items

    Hi,
    I need to restrict deleting of sales order line item, I think we can use the user exit, MV45AFZB, USEREXIT_CHECK_XVBAP_FOR_DELE.
    But when i set the flag to 'X', even though it does not delete at tht instance when the sales order save is clicked again the line item gets deleted.
    ANy idea , to prevent that?
    Thanks
    Keshi

    Hi Keshi,
    That is the correct exit, we are using the same without any problem. Just set US_EXIT  = CHARX.
    Regards,
    John.

  • Add field 'asset' in sales order line item account assignment tab

    Hi,
    I would like to add the following field: 'asset' in sales order line item account assignment tab.
    I can enter order, or wbs, but not Asset.
    How can I make this field visable?
    Anybody?
    thanks,
    klundert
    Edited by: Eric Van Zundert on Oct 30, 2010 8:43 AM

    Hi
    There is perform which moves the values to VBAP field.
    This PRCTR field is stored in VBAP (i.e., SO line item table)
    USEREXIT_MOVE_FIELD_TO_VBAP
    Hope it works.
    VVR

  • I need to add fields in additional fields B the sales order line item

    i  need to add fields in additional fields B beside the field (icon_val_quantity_ structure) in the sales order line item, How to achicve this? please help me..

    Please fined the below solution for achieving your requirement.
    1. Add new filed "B" in table VBAP.
      a) T.code  SE11 --> Enter structure name VBAP --> display
      b) Goto --> Append Structure --> Enter Structure name and new field "B"
    2. request your basis team and take the access key for modification of stabdard program SAPMV45A & Screen: 8459
       a) After receiving access key for standard program then got o SE51 --> enter program name  SAPMV45A & Screen: 8459
       b) click change Button
       c) click layout button
       d) add new field "B" below of the screen (F6 -> enter table name : VBAP --> get from dictionary --> selet new field and past in screen )
    3) write below code in flow logic
    PROCESS BEFORE OUTPUT.
                               Verarbeitung vor der Ausgabe
      MODULE ZZPB_INITIALIZE_8459.
      MODULE ZZPB_OUTPUT_8459.
    PROCESS AFTER INPUT.
      CHAIN.
        FIELD VBAP-New field name "B".
        FIELD ZVC_SALES_EXPORT-ZZAPLHENKO.
      ENDCHAIN.
      MODULE ZZPA_OUTPUT_8459.
    4. functin Module code
    module ZZPB_OUTPUT_8459 output.
      Data: l_v_actve type ale_active,
            l_v_ttyp  type c.
      Data: l_v_tragr type tragr.
    l_v_ttyp = t180-trtyp.
      if l_v_actve is initial.
        l_v_ttyp = 'A'.
      endif.
      LOOP AT SCREEN.
        CASE l_v_ttyp.
          WHEN 'A' OR 'C'.
            SCREEN-INPUT = 0.
        ENDCASE.
      ENDLOOP.

  • Cannot reject/delete sales order line item due to del.date in 2210

    Hi all,
    not sure if anyone else had this issue already....
    Situation :
    Sales order line item entered with delivery date in 2210.    We would like to correct this order but can't....
    every time SAP issues error :
    Error determining posting period (info
    S008, variant GL, RC 3)               
    I believe this is because we haven't maintained our calendars yet for 2210 :-D
    Question : without us having to load/define the calendar...is there a utility/oss program which we can use to delete the line item, or reject it...or even update the delivery date?
    Thanks for your help!

    If the system pop ups the error message M2012, then please refer note 10891 or 37532.  If the error message number is different, please update the forum.
    thanks
    G. Lakshmipathi

  • Revenue Recognition based on User Status of assigned Sales Order line item

    Dear Community members,
    We have requirement to recognize / de-recognize revenue posted to WBS for calculation of RA, based on the 'User status' of the assigned Sales Order line item.
    To elaborate requirement further -
    1) WBS Element - XXX - 10 ( with operative indicator - Plan/Bill/Account Assign)
    2) Sales Order(SO) Line Items assigned to the above WBS -
    - SO No -  123 Line Item 10 - Actual Rev - $ 300 - User Status - EXE (Meaning this work is in progress , partial payment received thus actual revenue for RA at WBS is 'Zero'
    - SO No -  124 Line Item 20 - Actual Rev - $ 400 - User Status - COMPL(Meaning this work is Complete , all payment received thus actual revenue for RA at WBS is $400
    - SO No -  125 Line Item 10 - Actual Rev - $ 800 - User Status - EXE (Meaning this work is in progress , partial payment received thus actual revenue for RA at WBS is 'Zero'
    As per WBS reports Actual Revenue posted to WBS XXX-10 is $ 1500 ( $300$400$800) , however since two SO line items ( SO 123 /line item 10 and SO 125 / line Item 10 ) are NOT having User status 'COMPLETE', the actual revenue posted by those line items $ 1100/- ($300 + 800)  should not be included as Actual Revenue for RA at WBS level.
    Thus Actual Revenue for RA at WBS XXX-10 should be $ 400 /- ( the revenue posted by SO 124/line item 20 which has user status as 'COMPLETE')
    How do above can be achieved?? Is there any standard solution for this?? Is any SAP Note available for this (I too am looking for one but not found any ) ?? do we need any enhancement , Customer exit etc
    Thanks in advance
    with regards

    Hi,
    Thanks. You are right that the 'Completed Contract Method' would defer revenue recognition. However, the status checked would be of the RA object (WBS Element in this case, as RA key is on WBS and RA is being calculated on the WBS).
    However, our requirement is to check the user status of the Sales Order Line items assigned to the WBS element and filter the revenues posted based on the active user status of individual Sales Order Line item.
    Please give you inputs.
    Thanks in advance
    With regards

Maybe you are looking for