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

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 ?

  • 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

  • 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

  • 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

  • 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

  • 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

  • Delivery date and sales order creation date

    Dear all
    Can you please explain the relation between delivery date and sales order date. In my case i can create delivery with delivery date as before the sales order date... how it is possible that i can create delivery before the sales order date.??
    Please explain.........
    Warm Regards
    Inder Pal

    Hi,
    Sales order date: Date on which the customer officially places an order to your company.
    All the commitment and product allocation counting starts with reference to this date.
    e.g. customer says that the goods are required from 20 days of placing order, then from this date the calculation starts.
    Delivery date: Date on which after the system goes through material availability date, replenishment time, calculates the date on which physically the goods can be delivered to the customer.
    e.g. customer orders 100 qty of material X in 15 days, you will hve to check this delivery date through availability check which can be done in sales order and also delivery.
    payment date is based on this delivery date.
    regards,
    Siddharth.

  • User Exit for Requested Delivery Date in Sales Order

    Hi
    Which user exit can be used to change Requested Delivery Date in Sales Order.
    Scenario:  Sales Document Type: OR has Lead Time: 7 days.  System always proposes delivery date after 7 days.  We need to change this Lead Time based on plant.
    Thanks in advance for your support.
    Regards
    Uma

    Hello,
      try with USEREXIT_MOVE_FIELD_TO_VBEP or USEREXIT_SAVE_DOCUMENT_PREPARE, of program MV45AFZZ.
    Hope to be useful.
    Best regards,
    Andrea

  • What setting to mandate that invoice is created based on sales order NOT...

    Hi,everyone
    Could you tell me the detailed configuration  to mandate that invoice is created based on sales order NOT delivery documents.
    Additionaly, I need to define this rule at headquarter and apply it all lower-level companies.  how to do it.
    thanks you very much

    Dear Humility,
    Could you tell me the detailed configuration to mandate that invoice is created based on sales order NOT delivery documents.
    This is quite possible through copy control settings between sales order and billing document
    In standard billing type F1 will billed with reference to the sales order OR,so you can copy those settings then rename to your document types and itemcategory.
    Go to VTFA transaction click n change icon then select billing type F1 and order type OR then click on Copy As icon (F6)and change the document types(maintain your docuemnt types).
    To copy item level settings
    Now you come back to initial screen agin you select billing type F1 and order type OR then click on item here you select standard item category then click on Copy as Icon (F6) here you maintain your itemcategory.
    Note:- Don't change the satndard settings you just copy
    Additionaly, I need to define this rule at headquarter and apply it all lower-level companies. how to do it.
    For this you can take help of your BASIS people they will full fill with the roles and authorisation settings.
    I hope this will help you,
    Regards,
    Murali.

  • Creating Mulitile Billing documents based on Sales order

    Hi All
    My requirement is to create a billing documents based on sales order. Item category is SERVICE.
    For example : In Sales Order the quantity is 100.
    1 st billing doument user can create of 10.Then after 1 month 2nd billing document of 9 and so on.
    when i create billing document related with sales order . the billing document is created with 100 quantity.
    i know it is possible with delivery but my requirement is billing document should be created related to service.
    Appreciate your time.
    Thanks and Regards
    Mahesh

    Hi ,
    You can use mile stone billing concept for this requirement.In mile stone billing ,we enter the billing dates and quanitity to be billed.We can bill the required quantity once the billing date reaches the system date.
    Hope it helps.
    Regards,
    Pasapula.

  • How to display delivery status on sales order line

    Hi,
    We're on R12.1.3
    We have a requirement to display delivery status on sales order lines in quick sales order form. Is there a standard configuration available to achieve this? if not available, what would be the best way of achieving this?
    I mean using, Forms personalization or Event based Alert etc?
    Thanks,
    Ram

    This is already available in the additional line information..though..
    If you still want that at line level to be displayed..maybe you need to customize the form...not sure how u can handle that logic
    Mahendra

Maybe you are looking for

  • Need a printer recommendation for a small office

    hey folks, hoping someone might be able to suggest a recommendation for our business. We've had an OkiData color laser printer that's lasted over 6 years but it's been giving us some trouble over the last year and yesterday it stopped printing with a

  • How to create RunningValue Through Column Groups?

    Hi Everybody i´m trying to do this with a Matrix I want the running value of the product quantity for each month of a year, resetting the running value when a new year is reached I have 2 column groups "Year" and as it´s child group "Month".         

  • Newest Video Podcast Episode Is Not In Store

    Having a few problems here. I have been publishing a video podacast now for a little over a month. It has been working great. I use iWeb and .mac to publish my podcasts. My latest podcast will not show up in the store now. However, if you are subscri

  • QT in html, events fired and movie internals doc

    Hi, The Javascript Scripting Guide says under "Executing JavaScript Functions From QuickTime", page 11: Wired actions can be triggered by user interaction, as a result of a frame in the movie being displayed, or as the result of arbitrary wired calcu

  • 80GB Classic Randomly Restarting & Then Freezing

    I've only had my new 80GB Classic for a day and already things have gone wrong. I got all my content on there, no problems but now when I use my iPod it plays music and works fine but it randomly "dies" and goes to the apple screen then after a minut