Problems creating an order document

Hi,
I'm creating an order document via DIAPI. My problem is with document lines, the data I want to introduce is ItemCode, Discount, Quantity and Price. The thing is that my price is the price before discount, but in DIAPI there is no way to add data to the field pricebefdi and the only price you can add is price after discount, so my total and the one shown in SBO is not the same.
What I do at the moment is calculate the price after discount and assign it to the field price, but with this operation I loose decimals.
Any idea of how to do it?
Thanks in advance,
vane

Hi,
This is a major flaw in DI API currently. I don't think there's much you can do about it in addition to what you've already done. In 2005 SP1, there will be available some new ways of calculating price/discounts. You might want to check it out.
Henry

Similar Messages

  • I need output type NEU automaticaly for create purchase order document type

    Dear Experts,
    I need output type NEU automaticaly for create purchase order document type NB
    when transaction code MN04, I am doing the following:
    (1) I selected the third option Purchasing Output determination: Document type
    (2) I selected the output type NEU.
    (3) In condition records in document type , i have chosen NB.
    (4) In name its automatically coming as Purchase requisition
    Please suggest how Purchase Order NB will come

    Hi,
    Check & press F4, NB Purchase Order (for catagory F) will be there after entering PO output type NEU & then maintaion the condition record in MN04.
    Output type NEU automaticaly defaulted during purchase order creation with document type ,then just fine tune the output (message) type in following path:
    SPRO--->MM->Purchasing>Message>Output control->Message types> Define message type for Purchase Order----->Fine-Tuned Control: Purchase Order
    Now here select the check box corresponding to your output(message) type NEU to have print output automatically displayed & save.
    Now try to creating Purchase Order & you will have default message type NEU.
    Regards,
    Biju K

  • Creating sales order document with reference to billing document

    I have to create sales order with reference to existing billing document. I have tried to following bapis.
    1. BAPI_SALESORDER_CREATEed
    I have successfully created document with following details.
    -->ORDER_HEADER_IN:
    DOC_TYPE = ZRK
    SALES_ORG = 3000
    DISTR_CHAN = 00
    DIVISION = 00
    ORD_REASON = 100
    SD_DOC_CAT = L
    CURRENCY = EUR
    REF_DOC = 100000028
    REF_DOC_CA = M
    -->ORDER_ITEMS_IN:
    ITM_NUMBER = 000010
    MATERIAL = 701791
    TARGET_QTY = 0000000001000
    CURRENCY = EUR
    REF_DOC = 100000028
    REF_DOC_CA = M
    -->ORDER_PARTNERS:
    PARTN_ROLE = SP
    PARTN_NUMB = W12001
    COUNTRY = NL
    by providing this input i am able to create the document but it is not picking up the net value. so i have passed some extra paramters in ORDER_ITEMS_IN
    COND_TYPE = PNET
    COND_VALUE = 14,56
    COND_D_UNT = PC.
    folowing error is occured: Condition PNET is missing in pricing procedure A V Z0000.
    is it something related to configuration problem?
    2.BAPI_SALESORDER_CREATEFROMDAT1 or BAPI_SALESORDER_CREATEFROMDAT2
    I have used same test data that is used for BAPI_SALESORDER_CREATEFROMDATA (where in i coudl succefully create doc). but here i encounterd following error.
    Unpermitted combination of business object BUS2032 and sales doc. category L.
    When i created manually using transaction : VA01
    I could do the same by passing following inputs:
    DOC_TYPE = ZRK
    SALES_ORG = 3000
    DISTR_CHAN = 00
    DIVISION = 00
    Reference document number.
    Please suggest me right way of approach.

    Hi,
    In SAP, when the sub-sequent document is existing , we can not cancel the preceeding document. Therefore if you want to cancel the billing document you need to calcel the documents which are created with reference to that.
    Check and confirm.
    Regards,
    Ravi Duggirala

  • Error on creating Purchase order document using DI API

    Dear all,
    I am getting an error "<b>Server threw an exception</b>"  at the time of initializing object of Purchse order document. code is
    vDrafts = GOD_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts)
    I am using SBO 2005B SP 0 PL-20.
    Reply as soon as possible.
    Regards,
    Manish Jha

    Hi Manish,
    I am not sure if I am right, but I remember something about a bug in SBO SDK that gave an error when trying create draft object. Not sure on which patch this was though and am not sure if this is your problem too. Maybe someone else can remember what patch it was on?
    Hope it helps,
    Adele

  • Problem creating process order with ref of sale order

    Dear all,
    Kindly give solution for this scenerio..............................
    I am creating Process Order with ref of sale order manually in cor1. In the COR1 screen copy from field i gave my ref sale order, so that particualr order and batch is assigned to that order only.
    My problem was suppose if sale order is created for 10 tonns, but my batch size and resource capacity is 2 tonns only. so first time i change my batch quantity 2 tonns instead of 10 tonns and created my order and confirmed.
    if i go to second time the same process i am doing creating process order with ref of same sale order but it comes again 10 tonns instead of 8 tonns. why it comes like this already i confirmed 2 tonns in this sale order?
    my requirement is if any process order is created with ref of any sale order and again if i am creating any process order with ref of same sale order left quantity only system should show.
    for this what i have to do kindly help to this
    regards,
    s.sakthivel

    Dear KK,
    Pls check whether ZKIN, ZKQT, ZKOR have all the properties similar to IN, QT, OR respectively. If they are different, please ensure that you know the reason why they are different. This check has to be done at tcode VOV8
    Some fields like sales document category, Transaction group, screen seq group, Doc pricing procedure need to be similar to the parent document unless you know why you have changed them.
    Once this check is done, check the copy controls in VTAA. Before that try creating these documents separately without reference. This shoudl work fine only after which you need to check copy control. If this is not working fine, then there is some problem with the document type settings in VOV8. Testing this is possible only if Reference mandatory field is left empty. Make sure that is properly configured.
    Once this is done, check copy controls in VTAA. You can just copy the copycontrol between IN and QT and QT and OR and create for ZKIN to ZKQT and ZKQT to ZKOR.
    Once this is done, check whether your item category settings are properly done , also the schedule line settings. The tcodes are VOV7, VOV6, VOV4, VOV5 etc.
    Now check whether your material master and customer master are consistent with the item category settings(Item category group).
    Now create the transaction. It shoudl work fine.
    Reward if this helps.

  • Problem creating sales order using IDoc ORDERS05 (Inbound)

    Hello Experts,
    We are trying to create a sales order using the IDoc ORDERS05 with process code ORDE for creating sales order. I am getting the following error "VKORG, VTWEG, SPART cannot be determined for customer 0000006000 , vendor
    Diagnosis
    No sales organization, distribution channel or division were sent to the IDOC. This data is necessary if a sales order is to be added automatically. If this data is unavailable, you cannot create a sales order document.
    I was not able to find the fields to fill the distribution channel and divison in the Idoc structure. I have filled in Sales organization in E1EDK14 segment as 3000.
    I am not able to figure out the cause for the error.
    Same data works fine from BAPI_SALESORDER_CREATEFROMDAT2.
    Please help.
    Thanks,
    Suma
    Edited by: Suma B on Jun 17, 2008 11:12 AM

    Hello Suma
    In this case I would recommend to debug the IDoc processing.
    Call transaction WE19 and start the inbound processing of your IDoc in debugging mode. The error message will most likely occur in function module IDOC_INPUT_ORDERS.
      LOOP AT idoc_contrl.
    * SET/GET Parameter und interne Tabellen neu initialisieren
    * initialize SET/GET Parameter and internal tables
        PERFORM initialize_organizational_data.
    * IDOC-Segmente in die entsprechenden Anwendungsdaten übernehmen
    * Move IDOC to internal tables
        PERFORM interpret_idoc_orders.                    "<= check here
    * Prüfen ob gewisse Segmente gefüllt sind
    * check IDOC-Segments
        PERFORM check_idoc_segments.                 "<= check here
    * Prüfen und Ermitteln von Organisationsdaten
    * check internal tables and determine organization data
    Regards
      Uwe

  • Problem in creating purchase order document

    Hi,
    I created a new business document : Purchase request that once it is validated we can copy it to Puchase order.
    when i save the purchase order doc and then launch the creation of the purchase order the operation succed.
    But when i try to copy an already created purchase request i get the error :
    Object reference not set to an instance of an object
    Does any have a clue?
    Thanks a lot.

    This is my code
    Form = _SboApplication.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);
                                                            Documents _Documents =
                                                                (Documents)
                                                            _SboCompany.GetBusinessObject(BoObjectTypes.oPurchaseOrders);
                                                            // Add PO Header
                                                            _Documents.CardCode =
                                                                ((EditText) _Form.Items.Item("3").Specific).Value.ToString();
                                                            _Documents.CardName =
                                                                ((EditText)_Form.Items.Item("4").Specific).Value.ToString();
                                                            // Add PO Lines
                                                            Matrix matrix = (Matrix)Form.Items.Item("37").Specific;
                                                            if (_matrix.RowCount > 0)
                                                                _Documents.Lines.ItemCode =
                                                                    ((EditText)
                                                                     _matrix.Columns.Item("35").Cells.Item(1).Specific).
                                                                        Value;
                                                                string value =
                                                                    ((EditText)
                                                                     _matrix.Columns.Item("38").Cells.Item(1).Specific).
                                                                        Value.Replace(".", ",");
                                                                double val = Convert.ToDouble(value);
                                                                _Documents.Lines.Quantity =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("38").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.Price =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("39").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.DiscountPercent =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("40").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.VatGroup =
                                                                    ((ComboBox)
                                                                     _matrix.Columns.Item("41").Cells.Item(1).Specific).
                                                                        Selected.Value;
                                                                _Documents.Lines.Price =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("39").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                _Documents.Lines.DiscountPercent =
                                                                    double.Parse(
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("40").Cells.Item(1).Specific).
                                                                            Value.Replace(".", ","));
                                                                                    _Documents.Lines.VatGroup =
                                                                    ((ComboBox)
                                                                     _matrix.Columns.Item("41").Cells.Item(1).Specific).
                                                                        Selected.Value;
                                                                                    for (int i = 2; i < _matrix.RowCount + 1; i++)
                                                                    _Documents.Lines.Add();
                                                                    _Documents.Lines.ItemCode =
                                                                        ((EditText)
                                                                         _matrix.Columns.Item("35").Cells.Item(i).
                                                                             Specific).
                                                                            Value;
                                                                    _Documents.Lines.Quantity =
                                                                        double.Parse(
                                                                            ((EditText)
                                                                             _matrix.Columns.Item("38").Cells.Item(i).
                                                                                 Specific).Value.Replace(".", ","));
                                                                    _Documents.Lines.Price =
                                                                        double.Parse(
                                                                            ((EditText)
                                                                             _matrix.Columns.Item("39").Cells.Item(i).
                                                                                 Specific).Value.Replace(".", ","));
                                                                    _Documents.Lines.DiscountPercent =
                                                                        double.Parse(
                                                                            ((EditText)
                                                                             _matrix.Columns.Item("40").Cells.Item(i).
                                                                                 Specific).Value.Replace(".", ","));
                                                                    string val1 = ((ComboBox)
                                                                                    _matrix.Columns.Item("41").Cells.Item
                                                                                    i).Specific).
                                                                        Selected.Value;
                                                                    _Documents.Lines.VatGroup =
                                                                        ((ComboBox)
                                                                         _matrix.Columns.Item("41").Cells.Item(i).
                                                                             Specific).
                                                                            Selected.Value;
                                                                int err = _Documents.Add();
                                                                GC.Collect();
    thanks for your attention

  • Problem creating Purchase Order with Bapi_po_create  Return Message is ""

    Hello everybody
    When I get to create PO with bapi_po_create . I get this message in the return parameter :"Enter the PURCH_ORG".
    I think that I have implemented it very well but I don´t get the results that I was expected : No PO was created.
    Please see the following codes and let me know if something is wrong. Thanks .
    =====================================
    *& Report  Z_PED_TRAS                                                  *
    REPORT  z_ped_tras  .
    Definición de la tabla asociada la tabla interna bdcdata
    *DATA :in_data LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    Definición de la estructura que contendrá los pedidos
    DATA : s_cabeceras_pedidos LIKE bapiekkoc,
           s_pos_pedidos LIKE bapiekpoc.
    DATA : t_cabeceras_pedidos LIKE  bapiekkoc OCCURS 0 WITH HEADER LINE,
           t_pos_pedidos LIKE  bapiekpoc OCCURS 0 WITH HEADER LINE,
           t_final_cabeceras_pedidos LIKE  bapiekkoc OCCURS 0 WITH HEADER
    LINE,
           t_final_pos_pedidos LIKE  bapiekpoc OCCURS 0 WITH HEADER LINE.
    Data : item_schedule like BAPIEKET occurs 0 with header line.
    *DATA : BEGIN OF pedidos,
          ematn TYPE mepo1211-ematn, "Número de material
          menge TYPE mepo1211-menge, "Cantidad de pedido
          name1 TYPE mepo1211-name1," Centro destino
          lgobe TYPE mepo1211-lgobe, "Almacén
         END OF pedidos.
    *DATA: s_pedidos  LIKE pedidos,
         wa_pedidos LIKE pedidos,
         t_pedidos LIKE pedidos OCCURS 0 .
    Variables  auxiliaires
    Variables para la ejecución del explorador de archivos
    DATA: l_temp_dir TYPE string.
    DATA: l_filter TYPE string.
    DATA: l_files TYPE filetable.
    DATA: l_rc TYPE i.
    DATA: l_file TYPE filename.
    DATA: l_filename TYPE string.
    DATA: excel TYPE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    DATA: s_excel TYPE alsmex_tabline.
    DATA: qid LIKE apqi-qid.
    Declaración de parametros de selección
    PARAMETERS :
       p_center LIKE bapiekkoc-suppl_plnt OBLIGATORY,"" Proveedor/Centro
       p_ekorg LIKE bapiekkoc-purch_org OBLIGATORY , " Organización compras
       p_ekgrp LIKE bapiekkoc-pur_group OBLIGATORY, " Grupo de compras
       p_bukrs LIKE bapiekkoc-co_code OBLIGATORY,"Sociedad"
       p_date LIKE sy-datum DEFAULT sy-datum OBLIGATORY,  "fecha
       test AS CHECKBOX DEFAULT 'X'.
      p_center LIKE mepo_topline-superfield, " Proveedor/Centro
      p_ekorg LIKE mepo1222-ekorg, " Organización de compras
      p_ekgrp LIKE mepo1222-ekgrp, " Grupo de compras
      p_bukrs LIKE mepo1222-bukrs,"Sociedad"
      p_date LIKE sy-datum," Fecha
      test AS CHECKBOX DEFAULT 'X'.
    PARAMETERS: p_file LIKE rlgrap-filename DEFAULT 'C:PEDIDOS.XLS'. " Ruta
    Carga del explorador de ficheros **
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      l_temp_dir = 'C:A'.
      l_filter = '.'.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          default_extension       = '*.xls'
          file_filter             = l_filter
          initial_directory       = l_temp_dir
        CHANGING
          file_table              = l_files
          rc                      = l_rc
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5.
      IF NOT l_files[] IS INITIAL.
        READ TABLE l_files INTO l_file INDEX 1.
        p_file = l_file.
        TRANSLATE p_file TO UPPER CASE.
      ENDIF.
    START-OF-SELECTION.
      IF p_file NE space.
        PERFORM upload_data.
        PERFORM fill_data.
        PERFORM llamar_bapi.
      ENDIF.
    END-OF-SELECTION.
    *&      Form  Upload_data
          text
    -->  p1        text
    <--  p2        text
    FORM upload_data .
      IF excel IS INITIAL .
        CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
          EXPORTING
            filename                = p_file
            i_begin_col             = 1
            i_begin_row             = 2
            i_end_col               = 4
            i_end_row               = 50000
          TABLES
            intern                  = excel
          EXCEPTIONS
            inconsistent_parameters = 1
            upload_ole              = 2
            OTHERS                  = 3.
        IF sy-subrc <> 0.
          WRITE :/'Hay un problema al cargar los datos delfichero excell'.
        ENDIF.
        SORT excel DESCENDING BY row col.
      ENDIF.
    ENDFORM.                    " Upload_data
    *&      Form  fill_excell
          text
    -->  p1        text
    <--  p2        text
    FORM fill_data .
      DATA :  cant TYPE i ,
              value_row TYPE i VALUE 1,
              data_aux TYPE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    Leer las filas del fichero excell.
      IF test NE 'X'.
        s_cabeceras_pedidos-suppl_plnt = p_center.
        s_cabeceras_pedidos-purch_org = p_ekorg.
        s_cabeceras_pedidos-pur_group = p_ekgrp .
        s_cabeceras_pedidos-co_code = p_bukrs .
        s_cabeceras_pedidos-doc_date = p_date.
        APPEND  s_cabeceras_pedidos TO t_cabeceras_pedidos.
        cant = excel-row.
        DO cant TIMES.
          LOOP AT excel WHERE row EQ value_row.
            APPEND excel TO data_aux.
          ENDLOOP.
          SORT data_aux BY col.
          LOOP AT data_aux.
            CASE data_aux-col.
              WHEN '1'.
                s_pos_pedidos-pur_mat = data_aux-value.
              WHEN '2'.
                s_pos_pedidos-DISP_QUAN = data_aux-value.
              WHEN '3'.
                s_pos_pedidos-plant = data_aux-value.
              WHEN '4'.
                s_pos_pedidos-store_loc = data_aux-value.
            ENDCASE.
          ENDLOOP.
          APPEND s_pos_pedidos TO t_pos_pedidos.
        ENDDO.
      ENDIF.
    ENDFORM.                    " fill_data
    *&      Form  llamar_Bapi
          text
    -->  p1        text
    <--  p2        text
    FORM llamar_bapi .
    data : T_RETURN LIKE BAPIRETURN OCCURS 0 WITH HEADER LINE,
           PORDER LIKE BAPIEKKOC-PO_NUMBER.
    t_final_cabeceras_pedidos[] = t_cabeceras_pedidos[].
    t_final_pos_pedidos[] = t_pos_pedidos[].
      CALL FUNCTION 'BAPI_PO_CREATE'
        EXPORTING
          po_header                        = t_final_cabeceras_pedidos
    IMPORTING
       PURCHASEORDER                     = PORDER
        TABLES
          po_items                       = t_final_pos_pedidos
          po_item_schedules                = item_schedule
          RETURN                           = T_RETURN
      IF sy-subrc EQ 0 .
        WRITE :/ 'P O created well'.
      ELSE .
        WRITE :/ 'P .O was not created  well'.
        endif.
      ENDFORM.                    " llamar_Bapi

    Hi,
    When we use BAPI_PO_CREATE1 to create service PO, following tables are populated at item level:
    a) POITEM
    b) POITEMX
    c) POACCOUNT
    d) POACCOUNTX
    e) POSERVICES
    f) POSRVACCESSVALUES
    For service items: POITEM-PCKG_NO = u20180000000001u2019. (assign package no as a dummy number)
    Set PCKG_NO flag in POITEMX table as u2018Xu2019.
    Package No is the link that connect POITEM table to POACCOUNT table through tables POSERVICES and POSRVACCESSVALUES.
    Set POACCOUNT-SERIAL_NO to u201801u2019.
    Set same PCKG_NO to u20180000000001u2019 in POSERVICES table. Maintain two entries in POSERVICES table like this:
    WA_POSERVICES-PCKG_NO = u20180000000001u2019.
    WA_POSERVICES-LINE_NO = u20180000000001u2019.
    WA_POSERVICES-OUTL_IND = u2018Xu2019.
    WA_POSERVICES-SUBPCKG_NO = u20180000000003u2019. (Dummy No.)
    WA_POSERVICES-QUANTITY = u2018100.000u2019.
    WA_POSERVICES-BASE_UOM = u2018EAu2019.
    WA_POSERVICES-PRICE_UNIT = u20181u2019.
    WA_POSERVICES-GR_PRICE = u2018100.000u2019.
    WA_POSERVICES-SHORT_TEXT = u2018SERVICE TESTu2019.
    APPEND WA_POSERVICES TO IT_POSERVICES.
    WA_POSERVICES- PCKG_NO = u20180000000003u2019.
    WA_POSERVICES- LINE_NO = u20180000000002u2019.
    WA_POSERVICES-QUANTITY = u201810.000u2019.
    WA_POSERVICES- BASE_UOM = u2018EAu2019.
    WA_POSERVICES--PRICE_UNIT = u20181u2019.
    WA_POSERVICES-GR_PRICE = u2018100.000u2019.
    WA_POSERVICES-SHORT_TEXT = u2018SERVICE 1u2019.
    WA_POSERVICES-MATL_GROUP = u20180012u2019.
    APPEND WA_POSERVICES TO IT_POSERVICES.
    Set PCKG_NO as SUB_PCKG_NO in table POSRVACCESSVALUES this:
    WA_POSRVACCESSVALUES-PCKG_NO = u20180000000003u2019.
    WA_POSRVACCESSVALUES-LINE_NO = u20180000000002u2019.
    WA_POSRVACCESSVALUES-SERNO_LINE = u201801u2019.
    WA_POSRVACCESSVALUES-SERIAL_NO = u201801u2019.
    WA_POSRVACCESSVALUES-QUANTITY = u201910.000u2019.
    APPEND WA_POSRVACCESSVALUES TO IT_ POSRVACCESSVALUES.
    This logic will work definitely and PO Service Items will be created.
    Thanks & Regards.
    Dhina..

  • Problem Creating Service Order SM03 from Repair order RAS type

    Hi All,
    While performing "Repair" action in repair order, we are triggering service order type-SM03
    If the return material (serviceable material) is having Individual requirement settings in MRP4 screen, system proposing POP up screen for PO creation-
    This POP up we need to restrict (even though as per present setting it is not effecting our business process)
    This is because the serviceable material is copying as item "0000" in component tab.
    Any inputs?
    Thanks
    Chidambaram

    .

  • Pricing problem while creating sales order doc

    Hi friends,
    My requirement is to create sales order with ref to contract i am using 'BAPI_SALESORDER_CREATEFROMDAT2' , and I am extracting data from konv table to get price through condition record , but i am getting 4 messages
    (S) SALES_HEADER_IN has been processed successfully
    (E) Condition PR00 is not allowed as header condition
    (W) The sales document is not yet complete: Edit data
    (E) Sales document was not changed
    and i am not getting pricing for created sales order document.
    please help.
    regards,
    Sravani.

    solved

  • Pricing problem in sales order creation

    Hi friends,
             My requirement is to create sales order with ref to contract i am using 'BAPI_SALESORDER_CREATEFROMDAT2' , and I am extracting data from konv table to get price through condition record , but i am getting 4  messages
    (S)    SALES_HEADER_IN has been processed successfully
    (E)   Condition PR00 is not allowed as header condition
    (W)  The sales document is not yet complete: Edit data
    (E)   Sales document  was not changed
    and i am not getting pricing for created sales order document.
    please help.
    regards,
    Sravani.

    hi
    ZK01 Company Selling Price - 21.86 INR 1 BT - 2360.41 INR for 108 BT( your statement)
    This is wrong 21.86 x 108 = 2360.88 and not 2360.41 as written by you
    so the calculation of the system is correct
    21.86 x 108 =2360.88
    1.41 x 108 =153.28
    So total  23.27 x 108 = 2513.16 (also 2360.88 +152.28 also is equal to 2513.16 )
    you can check in calculator
    If ZK01 is showing a wrong vaule 2360.41 instead of correct 2360.88 in your case then you need to check the configuration of that condition type
    The subtoatal valuew hich you have written is also wrong because of ZK01 
    Problem lies in ZK01 check the  other controls and rounding profile etc of ZK01 in V/06
    Regards
    Raja

  • Get OTF data for a sales order document

    I have a problem in getting the information of the created sales order document number  as OTF data. I need this OTF data so to convert into PDF format using function module 'CONVERT_OTF_2_PDF'. My situation is i am keeping a parameter for sales order document number . when i execute the report after giving a sales order document number, i should get the OTF data .

    Hi!
    Firstly you have to define what technique is used for creation of sales order as printed document - smartform or sapscript. Then proceed as follows.
    In case of smartform:
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'ZFORMNAME'
    IMPORTING
    fm_name = v_form_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    CALL FUNCTION v_form_name
    EXPORTING
    control_parameters = w_ctrlop
    output_options = w_compop
    user_settings = 'X'
    IMPORTING
    job_output_info = w_return
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    i_otf[] = w_return-otfdata[].
    In case of sapscript:
      options-tdgetotf = 'X'.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
    options = options
      CALL FUNCTION 'CLOSE_FORM'
    IMPORTING
      RESULT                         =
      RDI_RESULT                     =
       TABLES
         otfdata                        = i_otf
       EXCEPTIONS
         unopened                       = 1
         bad_pageformat_for_print       = 2
         send_error                     = 3
         spool_error                    = 4
         OTHERS                         = 5.
    i_otf -
    Regards,
    Maxim.

  • Creating Transfer Order for a Material document

    Hi,
    I am transferring the Unrestricted stock from one material to another material through Movement type 309.
    I am creating a material document through BAPI_GOODSMVT_CREATE. Once the Material document is created and if the stock is in multiple storage types or storage bins, then I need to perform LT06. Instead of doing BDC recording I am using L_TO_CREATE_MULTIPLE function module for creating the TO. I am passing all the necessary values to this FM. TO is getting created but the Material document is not reflecting in that TO.
    As per the configuration, movement type 309 will create the posting change only not the Transfer Requirement.
    Does anybody have encountered the same problem?. If so please let me know how you have resolved the issue.
    Regards,
    Kishore.

    Hello Kirankumar,
    It is possible to assign external number ranges for Storage unit, so maintain storage unit number range to assign SU number externally.
    Now when you create Transfer order for material document at that time you can assign SU number externally.
    Hope this helps.
    regards,
    Arif Mansuri

  • Create Sales Order With Reference to Billing Document Using BAPI_SALESORDER

    Hi,
    How can i create a sales order With Reference to Billing Document Using BAPI_SALESORDER_CREATEFROMDAT2?
    Thanks in advance,
    Alejandro.

    I have to create sales order with reference to existing billing document. I have tried to following bapis.
    1. BAPI_SALESORDER_CREATEed
    I have successfully created document with following details.
    -->ORDER_HEADER_IN:
    DOC_TYPE =                  ZRK
    SALES_ORG =              3000
    DISTR_CHAN   =            00
    DIVISION =                    00
    ORD_REASON =            100
    SD_DOC_CAT   =          L
    CURRENCY       =         EUR
    REF_DOC          =         100000028
    REF_DOC_CA    =         M
    -->ORDER_ITEMS_IN:
    ITM_NUMBER    =           000010
    MATERIAL          =          701791
    TARGET_QTY     =          0000000001000
    CURRENCY        =          EUR
    REF_DOC           =          100000028
    REF_DOC_CA     =          M
    -->ORDER_PARTNERS:
    PARTN_ROLE      =          SP
    PARTN_NUMB      =         W12001
    COUNTRY             =         NL
    by providing this input i am able to create the document but it is not picking up the net value. so i have passed some extra paramters in  ORDER_ITEMS_IN
    COND_TYPE          =        PNET
    COND_VALUE        =        14,56
    COND_D_UNT        =         PC.
    folowing error is occured: Condition PNET is missing in pricing procedure A V Z0000.
    is it something related to configuration problem?
    2.BAPI_SALESORDER_CREATEFROMDAT1 or BAPI_SALESORDER_CREATEFROMDAT2
    I have used same test data that is used for BAPI_SALESORDER_CREATEFROMDATA (where in i coudl succefully create doc). but here i encounterd following error.
    Unpermitted combination of business object BUS2032 and sales doc. category L.

  • Creating a sales order document

    Hi,
    When I create a sales order document in one company I want to automatically create a purchase order document (in the same company), and when this one is created I want to create a sales order document (in another company) with the same data as the purchase order. The purchase order is created via DIAPI and it works fine, but the problem is when creating the sales order in the second company. When I add the itemcode to the line , it doesn't write automatically any data of that itemcode, the vatgroup neither. So I have to introduce this field. The thing is that althought introducing the vatgroup manually, it doesn't calculate the vatsum, so in the doctotal isn't added. I've tried writing it manually but the problem is that the vatsum field is readonly.
    Why can this be? How can I solve it?
    The code is the next (in vb.net):
    Dim oPedidoCompra As Documents
    Dim oPedidoCompraLineas As Document_Lines
    oPedidoCompra = oCompany.GetBusinessObject(BoObjectTypes.oPurchaseOrders)
    If Not oPedidoCompra.GetByKey(DocEntry) Then
        oApplication.MessageBox(oCompany.GetLastErrorDescription)
    End If
    oPedidoCompraLineas = oPedidoCompra.Lines
    oPedidoVentaB = oCompanyB.GetBusinessObject(BoObjectTypes.oOrders)
    oPedidoVentaLineasB = oPedidoVentaB.Lines
    oPedidoVentaB.CardCode = ValorSql(s, oCompanyB)
    oPedidoVentaB.DocDate = Date.Now.Day.ToString + "/" + Date.Now.Month.ToString + "/" + Date.Now.Year.ToString
    oPedidoVentaB.DocDueDate = Date.Now.Day.ToString + "/" + Date.Now.Month.ToString + "/" + Date.Now.Year.ToString
    oPedidoVentaB.DocType = BoDocumentTypes.dDocument_Items
    oPedidoVentaB.UserFields.Fields.Item("U_NR").Value = oPedidoCompra.DocNum
    For i As Integer = 0 To oPedidoCompraLineas.Count - 1
      oPedidoCompraLineas.SetCurrentLine(i)
      oPedidoLineas.ItemCode = Codigoarticulo
      oPedidoLineas.Quantity = Cantidad
      oPedidoLineas.Price = Precio
      s = "select WhsCode from OWHS where WhsName like '%" & oCompanyB.CompanyDB & "%'"
      oPedidoVentaLineasB.WarehouseCode = ValorSql(s, oCompanyB)
      oPedidoVentaLineasB.ItemDescription = oPedidoCompraLineas.ItemDescription
      oPedidoVentaLineasB.Price = oPedidoCompraLineas.Price
      oPedidoVentaLineasB.Currency = oPedidoCompraLineas.Currency
      s = "select vatgourpsa from oitm where itemcode = '" & oPedidoVentaLineasB.ItemCode & "'"
      oPedidoVentaLineasB.VatGroup = ValorSql(s, oCompanyB)
      oPedidoVentaLineasB.LineTotal = oPedidoCompraLineas.LineTotal
      s = "select rate from ovtg where code = (select VatGourpSa from OITM where ItemCode = '" & oPedidoVentaLineasB.ItemCode & "')"
      oPedidoVentaLineasB.TaxPercentagePerRow = ValorSql(s, oCompanyB)
      s = "select suppCatNum from oitm where itemcode = '" & oPedidoVentaLineasB.ItemCode & "'"
      oPedidoVentaLineasB.VendorNum = ValorSql(s, oCompanyB)
      oPedidoVentaLineasB.PriceAfterVAT = oPedidoCompraLineas.PriceAfterVAT
      If i < oPedidoCompraLineas.Count - 1 Then
        oPedidoVentaLineasB.Add()
      End If
    Next
    n = oPedidoVentaB.Add
    If n <> 0 Then
    oApplication.MessageBox(oCompanyB.GetLastErrorDescription)
    End If
    Thanks in advance,
    vanesa

    Hi Vanesa
    When makin the sales order you must just select a vat group.It will then calculate it using the settings for that vat group. So, is the vatgroups set up in your other company?? Don't calcualte everyhting like line total. Just do itemcode, price,itemcode, vatgroup, warehouse and then the system will calculate the rest. Dont do PriceAfterVAT and all the extra's.
    If you did it through the front end would you enter all that? No, you would just select item,qty,price and wh. The system calculates the rest for you.....same goes for di api. Do this to minimize errors.
    Hope this helps

Maybe you are looking for

  • Which DVDs burn at 8x in a Dual 1.8 G5?

    I have a G5 Dual 1.8 with the Pioneer 107D drive. I've had trouble finding DVD-Rs that burn at full 8x speed. In the past I have tried: Memorex 8x DVD-R - burned at 4x TDK 8x DVD-R - burned at 8x I've been using a spindle of the TDK 8x discs for the

  • Using image data read out from a file

    Hi, Having used the GetBitmapFromFileEx(), GetBitmapInfoEx() to acquire the necessary image data (most of them is the .png format), then using the FileToArray() to put the image data in my own binary file, e.g., "mypicture.dat". My idea is that whene

  • Import error from Sony DCR-SR57

    I just bought a Sony DCR-SR57, which is a HDD camcorder. Everytime I want to import a movie into iMovie it has an error, without saying what exactly the error is. Another way to put the movies on my computer is by using the Sony as an external HDD, b

  • HT4946 when you change your country of orgin. why cant you buy in app purchases from apps that you downloaded in the previous country?

    when you chane your country of orgin. why cant you buy in-apps purchases from apps which you bought in the previous country?

  • XI pointing to ECC change

    Hi , currently my XI in dev system in pointing to Dev ECC client 210. Now I have to point the XI to Sandbox client 210. Please let me know if I have to just change the channel parameters (RFC adapters) or do I nede t create new Business systems and c