Problem adding sales order with freight since 8.8 pl 20 (and 8.81 pl 0)

Dear All,
Since the upgrade to 8.8 patch 20 I have a problem with adding a sales orders with freight (expensecode 1 does exist!) through the XML import of (the same problem with 8.81 pl 0).
This is the XML:
<BOM>
     <BO>
          <Documents>
               <row>
                    <DocType>dDocument_Items</DocType>
                    <DocDate>20110328</DocDate>
                    <DocDueDate>20110328</DocDueDate>
                    <CardCode>INT_C_PenS</CardCode>
               </row>
          </Documents>
          <Document_Lines>
               <row>
                    <ItemCode>10000024</ItemCode>
                    <ItemDescription>Afvalbak CONSTRUCTO 50</ItemDescription>
                    <Quantity>4.00</Quantity>
                    <ShipDate>20110328</ShipDate>
                    <DiscountPercent>20.00</DiscountPercent>
                    <UnitPrice>528.00</UnitPrice>
                    <LineStatus>bost_Open</LineStatus>
                    <LineType>dlt_Regular</LineType>
               </row>
          </Document_Lines>
          <DocumentsAdditionalExpenses>
               <row>
                    <ExpenseCode>1</ExpenseCode>
                    <LineTotal>64.00</LineTotal>
               </row>
          </DocumentsAdditionalExpenses>
     </BO>
</BOM>
When the DocumentsAdditionalExpeses part is deleted then there is no problem.
The error with the DocumentsAdditionalExpeses is 'Internal error accured'.
Can anyone confirm that this not is working through XML import (DTW works) or is there a solution?
Thanks and best regards,
Wim Kleinsman

Hi,
Try this one.
<BOM>
<BO>
<Documents>
<row>
<DocType>dDocument_Items</DocType>
<DocDate>20110328</DocDate>
<DocDueDate>20110328</DocDueDate>
<CardCode>INT_C_PenS</CardCode>
</row>
</Documents>
<Document_Lines>
<row>
<ItemCode>10000024</ItemCode>
<ItemDescription>Afvalbak CONSTRUCTO 50</ItemDescription>
<Quantity>4.00</Quantity>
<ShipDate>20110328</ShipDate>
<DiscountPercent>20.00</DiscountPercent>
<UnitPrice>528.00</UnitPrice>
<LineStatus>bost_Open</LineStatus>
<LineType>dlt_Regular</LineType>
<ExpenseCode>1</ExpenseCode>
<LineTotal>64.00</LineTotal>
</row>
</BO>
</BOM>
Regards,
Siva

Similar Messages

  • Problem in Sales Order with specific condition type.

    Hello Experts,
    I'm facing a problem in sales order creation for a specific condition type.
    the actual scenario is as below,
    We have created a new condition type for special discount.This condtion type is applicable only for specific sales channels.Also the discount percentage has to fetched from a custom table.
    To achieve this I've written a user exit "RV64A999"
    In the FM, i've calculated the subtotal and fetched the discount percentage and calculated the discount amount. After implementing this, the SO were been created properly. for all the line items the discount amount was getting calculated properly.
    But then I added a condition at the top of code in exit that the calculation for the new condition type should happen only for selected sales channels.
    But after adding this condition in code, i'm facing problem. Now when I create/ change any SO, the discount amounts are getting calculated incorrectly. I'm getting discount amount even if the line item subtotal amount is zero (0).
    Any help or pointers reagrding this issue will be very helpful and highly appreciated.

    Hi ..
    Check your config. again or debug the routine code with your ABAPer and find the problem area.
    -Maharshi

  • Restrict Adding Sales Order with ProjectCode

    Hi Experts,
    i try restrict Sales ORder from Adding without ProjectCode (from itemlevel - RDR1.Project). Below is my script on TransactionNotification, but still it doesnt work..please help my with my script...
    IF @transaction_type IN ('A', 'U') AND @object_type = '17'
    BEGIN
    IF EXISTS (SELECT t0.DocNum FROM ORDR t0 inner join RDR1 t1 on t0.docentry
    = t1.docentry WHERE t1.Project ='' AND t0.Docentry = @list_of_cols_val_tab_del)
    BEGIN
    SELECT @Error = 1, @error_message = 'Please enter the field "Project Code" first ! by: IT Dept.'
    END
    END
    Thanks,
    jonathan

    Try with this modification:
    IF @transaction_type IN ('A', 'U') AND @object_type = '17'
    BEGIN
    IF EXISTS (SELECT t0.DocNum FROM ORDR t0 inner join RDR1 t1 on t0.docentry
    = t1.docentry WHERE isnull( t1.Project,'') ='' AND t0.Docentry = @list_of_cols_val_tab_del)
    BEGIN
    SELECT @Error = 1, @error_message = 'Please enter the field "Project Code" first ! by: IT Dept.'
    END
    END

  • Adding Sales Order with multiple lines

    Hi all,
    I have a C# program whereby I am trying to get Sales Orders from one database (source) and create them in another database (destination). I can't get the code to work properly as lRetCode is never equal to 0 but is -5002.
    How can I fix it so that it adds the sales orders properly?
    Here is the code snippet:
                unaddedSOs = sList.Except(dList).ToList(); // contains the header information
                // Add the Sales Orders that are missing to destination database
                SAPbobsCOM.Documents sboSO =   (SAPbobsCOM.Documents)oCompanyDestination.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders);  // Destination
                // Loop through unadded Sales Orders
                foreach (var item in unaddedSOs)
                    // Set properties of the Sales Order object
                    sboSO.CardCode = item.cardCode;
                    sboSO.CardName = item.cardName;
                    sboSO.DocDate = item.docDate;
                    sboSO.DocDueDate = item.docDueDate;
                    // Add Sales Order Document Lines
                    SAPbobsCOM.Recordset rsLines = oCompanySource.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset); // Source of lines
                    // Get Sales Orders from source database
                    rsLines.DoQuery("SELECT ItemCode, Quantity, Price FROM RDR1 WHERE DocEntry = '" + item.docNum + "'");
                    rsLines.MoveFirst();
                    if (rsLines.RecordCount > 0)
                        while (!rsLines.EoF)
                            sboSO.Lines.ItemCode = rsLines.Fields.Item("ItemCode").Value;
                            sboSO.Lines.Quantity = rsLines.Fields.Item("Quantity").Value;
                            sboSO.Lines.Price = rsLines.Fields.Item("Price").Value;
                            sboSO.Lines.Add();
                            rsLines.MoveNext();
                    // Try to add the Sales Order to the database
                    int lErrCode = 0;
                    string sErrMsg = "";
                    int lRetCode = sboSO.Add();
                    if (lRetCode != 0)
                        int temp_int = lErrCode;
                        string temp_string = sErrMsg;
                        oCompanyDestination.GetLastError(out temp_int, out temp_string);
                        // Incase adding a Sales Order failed
                        if (lErrCode != -4006)
                            // Display error message
                            MessageBox.Show(lErrCode + " " + sErrMsg);
                MessageBox.Show("Done!!!");
    Kind Regards,
    Kinyanjui.

    Hi Kinyanjui,
    I think you're always writing to the same line:
    int row = 0;
    while (!rsLines.EoF)
        sboSO.Lines.SetCurrentLine(row);
        sboSO.Lines.ItemCode = rsLines.Fields.Item("ItemCode").Value;
        sboSO.Lines.Quantity = rsLines.Fields.Item("Quantity").Value;
        sboSO.Lines.Price = rsLines.Fields.Item("Price").Value;
        sboSO.Lines.Add();
        rsLines.MoveNext();
        row++;
    Best regards,
    Pedro Magueija

  • Problem adding Sales Invoices with batches

    Hi,
    I am trying to create an invoice with a batch component which is returning "Cannot add row without complete  selection of batch/serial numbers".
    I can add these lines manually using teh UI but not via the DI Server.  The relevant <BOM> section is shown below.  The only mandatory element seems to be <BatchNumber> and I have tried it with just that element and with combintaions of them all.  I have also tried adding a <LineNum> to the main <Document_Lines> section in case it needed this to tie up with teh <BaseLineNumber> (which I have als tried leaving out).
    I have extarcted a GetByKey for a manually entered one and I cannot see the problem.  Any help would be appreciated.
    Nick
    <BOM>
    <BO>
    <AdmInfo>
       <Object>oInvoices</Object>
    </AdmInfo>
    <Documents>
       <row>
          <CardCode>C000002</CardCode>
          <NumAtCard>Order #12979</NumAtCard>
          <Confirmed>tYES</Confirmed>
          <DiscountPercent>0.000000</DiscountPercent>
          <PayToCode>Aidann Bowley</PayToCode>
          <ShipToCode>Aidann Bowley</ShipToCode>
          <ContactPersonCode>34</ContactPersonCode>
       </row>
    </Documents>
    <Document_Lines>
       <row>
          <ItemCode>BM25-15</ItemCode>
          <Quantity>1.000000</Quantity>
          <PriceAfterVAT>6.000000</PriceAfterVAT>
       </row>
    </Document_Lines>
    <BatchNumbers>
       <row>
          <BatchNumber>WEBTEST</BatchNumber>
          <ManufacturerSerialNumber/>
          <InternalSerialNumber/>
          <ExpiryDate nil="true"/>
          <ManufacturingDate nil="true"/>
          <AddmisionDate>20140428</AddmisionDate>
          <Location/>
          <Notes/>
          <Quantity>1.000000</Quantity>
          <BaseLineNumber>0</BaseLineNumber>
       </row>
    </BatchNumbers>
    </BO>
    </BOM>

    Hi
    Please enter your thread in SDK Forum
    SAP Business One SDK
    Thanks
    Mohammad Imran

  • Issues in creating the sales order with oe_order_pub.process_order api

    Hi All,
    I am trying to create a sales order with BOOKED status using oe_order_pub.process_order api, and I am getting response as
    <X_RETURN_STATUS>E</X_RETURN_STATUS>
              <X_MSG_COUNT>1</X_MSG_COUNT>
              <X_MSG_DATA>ONTOE_LOCK_ROW_DELETED</X_MSG_DATA>
    Can any one help me in fixing this issue ..!
    Thanks,
    Vamsi…
    Edited by: user11147471 on Jul 9, 2009 2:02 AM

    When using the API, are you trying to create the order as booked using the booked flag or the book action?  I would recommend using the action if you are not. To troubleshoot, I would try the API without booking and then use the following article to determine the issue:
    Unable To Setup A Credit Card Bank Account For The Customer. CC Information On The Order Is Not Valid (Doc ID 1450936.1)

  • How to create Sales orders with external id ?

    Hi Experts,
       I wanna write a program to create Sales Order with external id via function muodule 'CRM_ORDER_MAINTAIN' and 'CRM_ORDER_SAVE'.But i don't know how to do and do any body tried it.The key issue is that how to use external id which is supplied by ourself rather than internal id supplied by system.
    Thanks for all.

    Hi,
    If you have already set the number range as an external range.
    Then just passing the transaction type to field 'process_type' and external id to field 'object_id' of table ct_orderadm_h. Sales order will created with the assigned external id.
    Hope this help.
    cheers,

  • Automatic Freight price on Sales Order with minimum total freight for order

    Hi,
    I am stuck trying to solve a freight pricing scenario on sales orders and I was hoping that someone might have seen this problem before. There are a number of basic requirements:
    1. The freight should be calculated automatically.
    2. The freight should be based on weight and shipping condition.
    3. The total freight of the order should be minimum X Euro.
    The problem we have is to try combining these three requirements since access sequences and condition records are not used on header conditions. The first 2 should be possibe to solve using a copy of standard item freight condition KF00 and creating a new access sequence including shipping condition. However, when including the last requirement we must see to the freight price of the complete Sales order and the system must automatically if the total reaches the minimum level.
    For example, say that we have a sales order with 2 items and the minimum freight for a total order should be 10 Euro. Based on weight and shipping condition the system automatically finds condition records giving item 1 a freight price of 2 Euro and item 2, 3 Euro -> giving us a total freight of 5 Euro.
    The system should see that the total freight of the 2 items does not reach the minimum freight price and automatically use the minimum price instead.
    I have been looking at the possibility to use 2 separate condition types (since the minimum should be a fixed price), or maybe it is possible to solve this through a user exit somehow? Has anyone seen this type of problem before?
    Any input and thoughts would be highly appreciated.
    Regards,
    /Dan

    Hi Dan
    For the 1st  query , maintain access sequence and assign it to the condition type and maintain condition record for that freight condition type
    For your 2nd query , in V/06 change the calculation type of the freight condition type to gross weight /Net weight
    But as  issue is concerned   in VK12 maintain minimum & maximum values. So if the Minimum value reaches then only the condition type triggers
    So in your pricing procedure say you have a 2 freight condition types of  ZXXX & YXXX . So assign minimum & maximum order values in VK12 for ZXXX condition type . And if its maximum value exceeds then YXXX condition type should trigger.
    Regards
    Srinath

  • 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.

  • Problem with creation of Sales Order with reference to Contract

    Hi,
    I have a problem when creating Sales order with reference to Contract , shipping condition was not copied. Is there any existing copy routines suitable to accomodate this?
    Thanks!

    your functional team can help you in finding one.

  • Problem in importing Sales Order with udf in the rows

    Dear All,
    I am having problem in importing Sales Order with udf in the rows. I mean it is getting imported but the udf values in the rows is not getting updated. But the udf values in the header is getting updated. I am using SAP 8.8 Pl 10.
    Can anyone guide me what to do in this scenario?
    Regards,
    Gary

    So , Login to DTW .
    with the Desired Database and Login Credentials.
    Goto - > Templates - > Customized Templates
    Select The Object .
    Right Click on the object needed and choose Create Template for the Structure .
    Then use this template for import .
    Hope it helps
    Thanks
    Ashish Ranjan

  • Problem with BOM Quant while creating Sales order with reference using BAPI

    Dear All,
    I am facing problem with creating a slaes order with reference to other sales order by using BAPI_SALESORDER_CREATEFROMDAT2 .
    Sales order is getting created but
    1. It exploding the BOM means the line items which are not there in the reference SO also coming in the new SO ( all BOM items are coming )
    2. Schedule line for BOM header item is getting copied to all sub items of BOM.
    Can any one help me out to prevent the above deviations in creating Sales order with reference by using BAPI_SALESORDER_CREATEFROMDAT2.
    Note: while passing the parameters to BAPI_SALESORDER_CREATEFROMDAT2
    all the data related to items is exactly the same as in the original Sales Order.
    Thanks in advnace.
    Regards,
    John

    Hi All,
    Can any one help me !!!!!!!!!!
    please

  • Sales order with more than 9 items causing problem

    Hi,
    I have a situation here.
    A sales order is created in the system and since it is order related billing so its billing document is also generated. The billing document is not relevant for accounting. So, the only 2 documents are a sales order and its billing document.
    Due to some technical restrictions,if the number of lines is more than 9 the printout wont come.Henceforth,the user is unable to take a printout so I need to give him a solution.
    What shall I suggest him?

    Hi,
    >So, my question is that,should I ask the user to create a credit memo wrt the billing document and then split the sales order with 2 invoices(one with say 5 and the other invoice with the rest of the quantities)?
    So, if my undestanding is right then you want to create a credit memo after invoice ? If yes, then why are you splitting the sales order ? Also, this is something strange kind of ABAP logic which would not allow to print an invoice with more than 9 line items... Now, as you said if your sales order is having more than 9 line items then only print doesn't come.. right ? then in your case at this moment there are only 9 line items so ideally you'd be able to get a print.. right ?
    I think there is some confusion out here with your two posts.. kindly clarify...
    Hrishi

  • Problem in creating sales order with BAPI_SALESDOCU_CREATEFROMDATA1.

    Hi everybody
    I am not able create a sales order with BAPI_SALESDOCU_CREATEFROMDATA1.i also did debugging.its not throwing  up any errors in return table. return table is empty. but when i check the  BAPI in se37 with same data its creating the sales order.
    Here i am attaching my program.please kindly can anyone have a look and tell me whether i did anything wrong in  the program.
    thx in advance.
    *& Report  YORDERCREATE
    REPORT  YORDERCREATE.
    data: v_vbeln like vbak-vbeln.
    data: header like bapisdhead1.
    data: headerx like bapisdhead1x.
    data: item like bapisditem occurs 0 with header line.
    data: itemx like bapisditemx occurs 0 with header line.
    data: partner like bapipartnr occurs 0 with header line.
    data: return like bapiret2 occurs 0 with header line.
    data: it_schedules_inx like bapischdlx occurs 0 with header line.
    data: it_schedules_in like bapischdl occurs 0 with header line.
    types: begin of itab,
    auart like vbak-auart,
    vkorg like vbak-vkorg,
    vtweg like vbak-vtweg,
    spart like vbak-spart,
    kunnr like kuagv-kunnr,
    kunnr1 like kuwev-kunnr,
    posnr like  vbup-posnr,
    matnr like mara-matnr,
    Tquan type string,
    end of itab.
    data: it-out type table of itab with header line.
    data: menge(10) type c.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\VA01.TXT'
      FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      TABLES
        DATA_TAB                      = it-out.
    loop at it-out.
    header-doc_type = it-out-auart.
    headerx-doc_type = 'X'.
    header-sales_org = it-out-vkorg.
    headerx-sales_org = 'X'.
    header-distr_chan = it-out-vtweg.
    headerx-distr_chan = 'X'.
    header-division = it-out-spart.
    headerx-division = 'x'.
    headerx-updateflag = 'I'.
    *partner data
    partner-partn_role = 'SP'.
    partner-partn_numb = it-out-kunnr.
    append partner.
    partner-partn_role = 'SH'.
    partner-partn_numb = it-out-kunnr1.
    append partner.
    *item data
    itemx-updateflag = 'I'.
    item-itm_number = it-out-posnr.
    itemx-itm_number = 'X'.
    item-material = it-out-matnr.
    itemx-material = 'X'.
    item-target_qty = it-out-tquan..
    itemx-target_qty = 'X'.
    APPEND item.
    APPEND itemx.
    *loop at it-out.
    *write:/ it-out-auart,it-out-vkorg.
    *endloop.
    CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
      EXPORTING
       SALESDOCUMENT                 = v_vbeln
        SALES_HEADER_IN               = header
        SALES_HEADER_INX              = headerx
      SENDER                        = SENDER
      BINARY_RELATIONSHIPTYPE       = 'VORL'
      INT_NUMBER_ASSIGNMENT         = ' '
    IMPORTING
       SALESDOCUMENT_EX              = v_vbeln
    TABLES
       RETURN                        = return
       SALES_ITEMS_IN                = item
       SALES_ITEMS_INX               = itemx
       SALES_PARTNERS                = partner.
      SALES_SCHEDULES_IN            = SALES_SCHEDULES_IN
      SALES_SCHEDULES_INX           = SALES_SCHEDULES_INX
      SALES_CONDITIONS_IN           = SALES_CONDITIONS_IN
      SALES_CFGS_REF                = SALES_CFGS_REF
      SALES_CFGS_INST               = SALES_CFGS_INST
      SALES_CFGS_PART_OF            = SALES_CFGS_PART_OF
      SALES_CFGS_VALUE              = SALES_CFGS_VALUE
      SALES_CFGS_BLOB               = SALES_CFGS_BLOB
      SALES_CCARD                   = SALES_CCARD
      KEY_TABLE                     = KEY_TABLE
    endloop.
    loop at return where type  = 'E' or type = 'A'.
    exit.
    endloop.
    if sy-subrc = 0.
    write:/ 'error in creating document'.
    else.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT          = 'X'
    IMPORTING
      RETURN        = RETURN
    commit work and wait.
    write:/ 'document',v_vbeln,'created'.
    endif.

    Hi Patrick,
    Here are a couple of issues/recommendations:
    1) Checkboxes must be populated by capital X (your headerx-division = 'x' is wrong)
    2) Why you are using the COMMIT WORK AND WAIT statement? The CALL BAPI_TRANSACTION_COMMIT does exactly the same! Comment it out or better delete one of them!
    3) Does one of your sales order tables (VBAK, VBAP, ....) have any customer appended fields? In this case you have to populate an additional value table and the related index table as well.
    Check it out,
    Heinz

  • Problem while creating Sale Order with Reference

    Hi Friends,
    While creating a Sale Order with Reference, I am unable to copy few fields from Profit Segement(CO - PA Data) in Account assignment Tab.
    Any solution how to copy all field values which are in Reference Sale Order Number.
    Regards,
    sg.

    Hi,
    Go to VOFM you will find out data transfer routine.
    Over here go for the order data transfer routine and select your data transfer routine which you use.
    Now check you field name and table name for that particular field which was not copying.
    It will be better if you ask your abaper for this.
    You have to make changes over here only for data transfer routine.
    Hope so this will help you out.
    Regards
    Raj.

Maybe you are looking for

  • Internal Excise Invoice is created for year 2009

    Hi Masters          I ahve created a excise invoice for the GR document in the T code J1IEX. The posting date what we have given is in the fiscal year 2008.The excise invoice (concerned with excise dept.) is created fro the fiscal year 2008. But the

  • Running PIQGRAD in background

    Hi, My client need to run PIQGRAD application in background. The real requirements is that this application shall trigger automatically whenever PIQSMFU is run. Program shall select all the students according to academic year and sessions provided in

  • How can I get rid of the playlist bar in the music player?

    Hello everyone! I want to know if I can get rid of the transparent playlist bar which shows over the cover artwork in the music player (ios 6) or Lagu. When I play one song alone, the artwork shows fully and that's how I would like it to be when play

  • Import MIF Geo File Format

    Hi Does any one knows how to load an mapinfo file (mif) file using java. Thanks Madhan

  • Printing reduced size in Preview

    I have had to reformat my hard drive. I have updated the system and aps. However when I print from preview I no longer have a print dialogue box. I especially miss the ability to reduce the image size in the percentage box. Look forward to any help,