Error: Delivery based on Sales Order

-5002: The complete Sales BOM, not just some of the components, must be copied to an A/R Invoice or a Delivery   DLN1.TreeType    line: 1
the Sales Order has 3 lines
Line 0 treeType  = I
Line 1 TreeType = I
Line 2 TreeType = S
                    FoDelivery.Lines.Add;
                    FoDelivery.Lines.SetCurrentLine(j);
                    FoOrder.Lines.SetCurrentLine(k);//aseline from Order
                    FoDelivery.Lines.BaseEntry:= 'DocEntry';
                    FoDelivery.Lines.BaseLine:= Baseline from Order;
                    FoDelivery.Lines.BaseType := 17;
                    FoDelivery.Lines.Quantity:= FoOrder.Lines.Quantity;
                    FoDelivery.Lines.WarehouseCode:= FoOrder.Lines.WarehouseCode;
                    inc(j);
Thanks

view sap note
Note 1179405 - Error -5002 when trying to copy a document with Sales BOM

Similar Messages

  • Stored Procedure for Delivery based on Sales Order Title UDF

    Dear All,
    I have made a  UDF in the Sales Order Title as U_SOApproved which has been set with valid Values for the field as 1 - Yes and 2 - No and set default value for field set as 2.
    Now I want to have Stored Procedure by which whenever a delivery is made based on a Sales Order for Document Series Named Retail if in the above udf which is there in Sales Order is not set as 1 - Yes the system should not allow the add the delivery in the system.
    I know there is a option in Sales Order itself having a approved tick box but if I implement it then it would be applicable for all document series which I don't want. I want to have a check on a particular document series e.g Retail only.
    Please help in this regard.
    Regards,
    Kamlesh

    I'm actually looking for a complete block , I want to force the user to type a value in the GrossBuyPr.
    I have the following SP that I tried to modified to work for invoices but is not working
    DECLARE @numlinii int
    IF @transaction_type IN (N'A', N'U') AND (@Object_type IN (15)) AND (@num_of_cols_in_key = 1)
    BEGIN
    IF (@Object_type = 15)
    BEGIN
    SELECT TOP 1 @numlinii = (LineNum +1) FROM DLN1 INNER JOIN OITM ON DLN1.ItemCode = OITM.ItemCode AND (OITM.InvntItem N'N')
    WHERE DLN1.DocEntry = @list_of_cols_val_tab_del AND (ISNULL(GrossBuyPr, 0) = 0)
    ORDER BY Linenum ASC
    IF (ISNULL(@numlinii, 0) 0)
    BEGIN
    SET @error = 10
    SET @error_message = N'Value of field NNNNN in line No. ' + CONVERT(nvarchar(4), @numlinii) + N' is = 0 !'
    GOTO error_mesg
    END
    END -- ODLN (15)
    END
    Any ideas ?

  • Delivery based on sales orders

    Hi guys,
    I have faced a problem with this BAPI BAPI_OUTB_DELIVERY_CREATE_SLS. I am passing the values in importing paramenters and the BAPI returns the delivery number although when i go to VL02N to check if the delivery was created, says that delivery doesnt exist in data base. I don't know what happens, after the BAPI im using the bapi commit work.
    Sameone have faced this problem and kown how to solve this?

    Hi
    Probably after calling the BAPI BAPI_OUTB_DELIVERY_CREATE_SLS you need to force the commit, so you can call the BAPI for the commit BAPI_TRANSACTION_COMMIT, or use the statament COMMIT WORK
    Max

  • Restrict Delivery Entry based on Sales Order Delivery Date

    Dear All,
                  I create a Sales Order with a Specific Delivery Date say 15 Dec 2010. The System must prompt me if I try to Create a Delivery Document Based on the Sales Order before 15 Dec 2010.
                  Does it happen in standard system / Can it be achieved by SDK.
    Please Advice
    Thanks

    Hi Aslam,
                   If you want to Block the delivery document to post before the define delivery date in sales order than you can use the below Procedure...
    If @object_type = '15' and @transaction_type in ( 'A')
    BEGIN
    if exists (select * from odln a inner join dln1 b ON a.DocEntry=b.Docentry
    inner join ordr c on b.basetype=c.objtype
    where a.DocEntry=@list_of_cols_val_tab_del
    and b.basetype='17' and a.docdate<c.docduedate )
    begin     
    SET @error = 00001
    SET @error_message = N'Delivery can not be enter before delivery date '
    end
    end
    Hope it will work
    Regards,
    Atif

  • Migo based on sales order error -Require CO object

    Dear Experts,
    We have one process,
    Where we are creating sales order and based on sales order, we are doing migo and miro. final entry will be consumption a/c dr to vendor then we are doing billing for the same.
    We got error in migo based on sales order stated that 'please enter co account assignment object.
    where i will cpature this cost on sales order or cost center.
    I think must be part of sales order becoz we are doing consumption based on sales order and revenue and csot must be flow to copa in billing. M i correct?
    If cost object is sales order or PSG in migo? what setting need to be done for the same.
    What will be the ideal process for the same.
    regards
    RR

    hi ajay,
    I have used AAC -X with item category 's' for third party that was suggested by sap
    and the gl i have defined in okb9 with PSG tick.So consumption account linked to my PSG. becoz i m doing migo/miro based on sales order and final entry will be consumption a/c to vendor in my case.
    System will determine PSG in migo and then billing will happened for the same.So my cost and revenue will flow to COPA.
    We have one programme SDVPRSUPDATE that need to execute every monthend.In order to flow cost to COPA for some cases where Billing happened but no GR happened for the same.then this prograame will flow VPRS cost to COPA.
    regards
    RR

  • I want to pick up Schedule line Delivery date based on Sales Order of Mater

    Hi Experts,
    I have one scenario like,
    I want to pick up Schedule line Delivery date based on Sales Order of Material.
    For example :
    Go to va03
    Give the order no
    Press the enter
    Double click on material.
    Go to Schedule line Tab
    Then we can find out the Delivery date .
    I want to pick up the that Delivery date. Could you please help on that.
    Thanks,
    Amjad.

    Hi,
    schedule line dates are available in VBEP.
    VBEP-VBELN = sales order number.
    VBEP-EDATU = schedule line date.
    REgards,
    Raghavendra

  • Error while creating a delivery from a sales order

    Hi Folks,
    when i try to create delivery of a sales order, i am getting following error:
    " Item 000030: delivery split due to conflicting header data (FKARV: ZF2C <-> F8) "
    please help me in correcting this error.
    thanks in advance.

    Hi,
    The field FKARV is for Proposed billing type for a delivery-related billing doc.
    Now here in your case billing document if ZF2C and another is F8 so it is splitting, check this
    Kapil

  • Warning/Error Message delivery unit in sales order

    Hello,
    how is it possible to throw a warning or error message in the sales order, when the entered quantity is not a multiple of the delivery unit specified in material master sales tab 1?
    Thanks
    Anne

    Hi,
    Please take the help of your abaper and modify the user exit for sales order . Put a validation check at the time of entering the order quantity w . r .t delivery unit mentioned in the material master for that sales area and through a warning or error message as per your requirement.
    For user exit please go through the below link:
    http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm
    Hope this will help you to resolve your issue.
    Regards,
    Krishna O

  • Error while creating Delivery Note from Sales Order

    Hi,
    I am trying to create Delivery Note from Sales Order. But, I am getting one error sayin "An Item with no delivery quantity is not permitted.Item will be deleted". Hence, the delivery note was not created.
    Can you please let me know, why this error comes. And how to rectify this error.
    Please let me know, what are all checks, I need to do, to know this error.
    Thanks,
    Sandeep

    Hi
    There may be following reason :-
    Either the relevant Item Category is not relevant for Delivery, Check the Item Category in Sales Order and then check the settings of this Item Category in VOV7.
    Also check the relevant Schedule Line in VOV6, it should be relevant for Delivery.
    The Other reason may be that your schedule line in Sales Order is Not confirmed for Available Quantity so check the Sales Order> Line Item> Schedule Line.
    Regards
    Amitesh Anand

  • How to get the pricing hierarchy based on the delivery date for sales order

    Hi,
    How to get the pricing hierarchy based on the delivery date for sales order other than system date.
    My requirement is to get the Pricing hierarchy based on the delivery date other than system date.
    Waiting for kind response.
    Best Regards,
    BDP

    HI Sai,
    please refer teh document already how to write FM based extration on generic extractors.
    and here  the logic to find the latest records values:-
    -> get the data in an internal table
    ->Sort the internal table data based from date descending
    -> Using READ statement , we can read the first record of the table which is nothign but your latest record.
    Regards.
    Sakthi

  • How to Add Delivery Note based on sales Order

    How to add a delivery note based on sales order.
    say i have a order no. 10 and linenumber 0 to 3.
    each time i book with order no 10 and line no.3,i need to add to delivery note.
    i also in need of adding just one Header and Multiple lines(Header for order Number - 10 and multiple lines for each Booking ).
    How can i achieve this.

    Hi
    You can search the samples....C:\-->Program files->SAP----->SDK->Samples->DiAPI----->OrderandInvoice...
    Here invoice is added for a particular sales order.....the same can be done for delivery.....
    Hope it helps

  • Function module for Delivery and billing based on sales order

    Hi Friends
    I am developing an object which has to create the sales order, delivery for that sales order and billing for it at the same time.
    I have tried for few function modules to create the delivery and billing but I am not able to achieve.
    Would you please help me by providing the correct function modules for these 2 activities?
    Thanks
    Praveen

    Hi Nikhil
    Thanks for reply,
    i am creating the sales order using the BAPI "BAPI_SALESORDER_CREATEFROMDAT1" only, but the billing document bapi
    "BAPI_BILLINGDOC_CREATE" is for online creation, it will call the t-code 'VF01'.
    I need to create the billing document with out calling the t-code like using bapi for sales order. Please suggest me if there are function modules to achieve this.
    Thanks
    Praveen

  • Error while saving the Sales Order

    Hi experts,
        i am getting a runtime error while saving a sales order stating: SAPSQL_EMPTY_TABNAME. It says the field T681-KOTAB could be empty. I would give in more inputs. Someone plz help.
    Thanks.

    I would expect that KOTN521 would be a Database table defined in the ABAP Dictionary that relates to the condition implemented in 521 for the usage specified in that record.
    You should be able to go into the info system, SE84, and search under ABAP Dictionary / Database Tables to see what KOTN521 is.
    Also, since the only Keys to T681 are KVEWE and KOTABNR, and there are two KOTABNR entries with a value of 521, then there must be two different usages (KVEWE) associated with that table.
    If you see what they are, you can check to see what the usages represent.   Based on a lookup, it appears that a usage of N is for Free Goods, A is for Pricing etc.   In our system, we only have A entries.
    What are the usages for the 521 entries?  Do they relate to Free Goods/Pricing???
    Does the table KOTN521 exist in the ABAP Dictionary?
    Answering these questions may get you closer to the answer.
    Can you compare the values in these entries to what you have in different SIDs?
    Is this problem happening in Production, or is it still in a development or Quality Assurance client?
    If it is still in development or Q, then it may be that a recent customization change was made.
    Compare the entries across your systems, if possible.
    Good luck
    Brian

  • Restriction for items from Purchase Order based on Sale Order

    Hi !
           We create PO directly from Sale Order ( by ticking Option under Logistic tab, 'Purchase Order') for customer C01 (for eg).
    From the PO created, we post GRPO.
    Now our need is,
    Assume if 10 Qty is been ordered in such a way and been received (GRPO posted). it 'll add on to the stock account i.e will increase stock qty at our whse.
    is it possible to restrict these 10 qty of item from being sold to any other Customer other than whom hav ordered i.e if we create sale order for C02 the SBO should not take the items received from PO created based on Sales Order created for C01?
    Meera.

    Meera,
    Which version of SBO are you using 2005 or 2007?
    I don't think Serial numbers can help in this scenario.  There is no hard allocation or blocking possible using Serial numbers.
    This is the Work around I am thinking about.
    Set the items to be Batch Managed - On Every Transaction
    When performing Goods Receipt, enter the Sales Order Number as the Batch Number
    When creating the delivery, using SBO_SP_TransactionNotification we can easily check the Batch of the Item being selected and verify it with the BaseRef of Delivery lines to match with Sales Order number.
    If the numbers don't match we can warn user with message, "The items batch reserved for Sales Order xyz"
    Even if you make a mistake when entering the batch number same as Sales Order number when doing a goods receipt. It can still be traced and blocked during delivery.
    Hint: The Batch table records the Goods Receipt transaction along with the BaseDocument number, Base Ref, etc
    If you decide to go this route, I could help you further.
    Let me know
    Suda

  • How system determine delivery date in sales order

    Hi, sap gurus
    I am new to sdn forum please help me regarding my question
    1) how the system will determine delivery date in sales order
    2) what are factors effects to conform sales order stock
    3) what is different between static check and damanic check in credit mgt
    Thanks and regards
    nishad

    hi,
    Reg question:1 - System determines the Requested Delivery Date based on the Scheduline assigned to the item category of the item in sales order.the schedule line in the order transfers the requirements trhu MRP (can be individual or collective) . If its ruch order , you configure the order type "Deliver Immediately".
    In Detail:
    The TOR depends on the Requirement Type (MMR), Requirement Class(MMR), Checking group(MMR) and the Sc line category (Line Item). For the TOR to happen u need Plant at line item, scheduline category markd for TOR, Requirement Class marked for TOR and Checking group in MMR (Availability check)
    What all stocks need to be checked during Availability check is controlled by using the checking rule.. for example for AV -02 Ind Requirements a checking rule will be assigned and this checking rule- and then what all stocks need to be considered to determine the delivery can be maintained here.
    Rgds
    Sai

Maybe you are looking for

  • 2nd display connected to iMac stays black (Thunderbolt - HDMI)

    Hi everyone, with my new iMac (purchased 2 weeks ago) I have the problem that my 2nd display will stay black after I connected it to the Thunderbolt port. The display shows the blue background for a split second, then i goes black (and stays that way

  • How to Email POWL Reports / Apply Web Dynpro ALV Table Layout Settings

    Hi all, we want to be able to automatically extract POWL reports and email them to users in a batch job. We can refresh a POWL report using FM POWL_QUERY_REFRESH, and access the raw report data using method CL_POWL_QUERY_ACCESSOR=>GET_CACHED_RESULTS.

  • How to fetch MCH1-CHARG using MATNR, PLANT, MVT_type?

    Hi all,   Is there any way to get CHARG from MCH1 by passing any one of the following fields?      DT_PSTG     type mkpf-budat,   "Posting date        DT_DOC      type mkpf-bldat,   "Document date        MVT_TYPE    type BWART,   "Movement type      

  • Deadlocking in java.io.UnixFileSystem?

    We're using Java 1.4.0 on Solaris 8. We're seeing our JVM hang after periods of intense file system activity. We can get a thread stack just before the hang where 243 of 338 threads appear to be busy with the file system. For instance: "tcpConnection

  • Unlock iphone4 by officialiphoneunlock.uk ?.

    Quelqu un connais ce site etsavoir si cserieux car j attent depuis le11/12/13 et toujours rien