Issue in creting sales order

hi all,
i am creating sales order using bapi 'BAPI_SALESORDER_CREATEFROMDAT2' .
i found that the when i create the sales order using bapi the net value, in the conditions tab of the item details, is coming different from the one when come when i create the same item with same quantity and sales unit manually....
can any one tell me why this is happening and sloution for the same.
regards
vijay

see the following example
REPORT  ZSALESORDER.
Parameters
Sales document type
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text FOR FIELD p_auart.
PARAMETERS: p_auart TYPE auart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Sales organization
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text1 FOR FIELD p_vkorg.
PARAMETERS: p_vkorg TYPE vkorg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Distribution channel
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text2 FOR FIELD p_vtweg.
PARAMETERS: p_vtweg TYPE vtweg OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Division.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text3 FOR FIELD p_spart.
PARAMETERS: p_spart TYPE spart OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Sold-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text4 FOR FIELD p_sold.
PARAMETERS: p_sold  TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
Ship-to
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text5 FOR FIELD p_ship.
PARAMETERS: p_ship  TYPE kunnr OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SKIP 1.
Material
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 2(20) v_text6 FOR FIELD p_matnr.
*PARAMETERS: p_matnr TYPE matnr   OBLIGATORY.
*SELECTION-SCREEN END OF LINE.
Quantity.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 2(20) v_text7 FOR FIELD p_menge.
*PARAMETERS: p_menge TYPE kwmeng  OBLIGATORY.
*SELECTION-SCREEN END OF LINE.
Plant
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text9 FOR FIELD p_plant.
PARAMETERS: p_plant TYPE werks_d .
SELECTION-SCREEN END OF LINE.
Complete Deliver
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 2(20) v_text10 FOR FIELD p_autlf.
PARAMETERS: p_autlf TYPE autlf DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
Data declarations.
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: lt_schedules_inx   TYPE STANDARD TABLE OF bapischdlx
                         WITH HEADER LINE.
DATA: lt_schedules_in    TYPE STANDARD TABLE OF bapischdl
                         WITH HEADER LINE.
DATA: lt_schedules_ink    TYPE STANDARD TABLE OF bapisdhead1
                         WITH HEADER LINE.
Initialization.
INITIALIZATION.
v_text   = 'Order type'.
v_text1  = 'Sales Org'.
v_text2  = 'Distribution channel'.
v_text3  = 'Division'.
v_text4  = 'Sold-to'.
v_text5  = 'Ship-to'.
*v_text6  = 'Material'.
*v_text7  = 'Quantity'.
v_text9  = 'Plant'.
v_text10 = 'Complete delivery'.
Start-of-selection.
START-OF-SELECTION.
Header data
Sales document type
  header-doc_type = p_auart.
  headerx-doc_type = 'X'.
Sales organization
  header-sales_org = p_vkorg.
  headerx-sales_org = 'X'.
Distribution channel
  header-distr_chan  = p_vtweg.
  headerx-distr_chan = 'X'.
Division
  header-division = p_spart.
  headerx-division = 'X'.
  headerx-updateflag = 'I'.
*Complete delivery
    header-COMPL_DLV = p_autlf.
    header-COMPL_DLV = 'X'.
Partner data
Sold to
  partner-partn_role = 'AG'.
  partner-partn_numb = p_sold.
  APPEND partner.
Ship to
  partner-partn_role = 'WE'.
  partner-partn_numb = p_ship.
  APPEND partner.
ITEM DATA
  itemx-updateflag = 'I'.
Line item number.
  item-itm_number = '000010'.
  itemx-itm_number = 'X'.
Material
item-material = p_matnr.
itemx-material = 'X'.
Plant
  item-plant    = p_plant.
  itemx-plant   = 'X'.
Quantity
item-target_qty = p_menge.
itemx-target_qty = 'X'.
**Complete delivery
   item-COMPL_DLV = p_autlf.
   itemx-COMPL_DLV = 'X'.
  APPEND item.
  APPEND itemx.
  Fill schedule lines
  lt_schedules_in-itm_number = '000010'.
  lt_schedules_in-sched_line = '0001'.
lt_schedules_in-req_qty    = p_menge.
  APPEND lt_schedules_in.
  Fill schedule line flags
  lt_schedules_inx-itm_number  = '000010'.
  lt_schedules_inx-sched_line  = '0001'.
  lt_schedules_inx-updateflag  = 'X'.
lt_schedules_inx-req_qty     = 'X'.
  APPEND lt_schedules_inx.
  Fill  *p_autlf line flags
lt_schedules_ink-DOC_TYPE = p_auart.
lt_schedules_ink-SALES_ORG = p_vkorg.
lt_schedules_ink-DISTR_CHAN = p_vtweg.
lt_schedules_ink-DIVISION = p_spart.
lt_schedules_ink-COMPL_DLV   = 'X'.
  APPEND lt_schedules_ink.
Call the BAPI to create the sales order.
  CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA1'
       EXPORTING
            sales_header_in     = header
            sales_header_inx    = headerx
       IMPORTING
            salesdocument_ex    = v_vbeln
       TABLES
            return              = return
            sales_items_in      = item
            sales_items_inx     = itemx
            sales_schedules_in  = lt_schedules_in
            sales_schedules_inx = lt_schedules_inx
            sales_partners      = partner.
Check the return table.
  LOOP AT return WHERE type = 'E' OR type = 'A'.
    EXIT.
  ENDLOOP.
  IF sy-subrc = 0.
    WRITE: / 'Error in creating document'.
  ELSE.
Commit the work.
    COMMIT WORK AND WAIT.
    WRITE: / 'Document ', v_vbeln, ' created'.
  ENDIF.

Similar Messages

  • Issue when creating sales order with Sold-to/Ship-to Party's state

    Hi All,
    we have issue while creating Sales Order with picking up of State tax
    for Ship-to-party & Sold-to-party.
    <b>When we create a sales order, for the sold to party 140052732 and
    ship to party 140052733 it is picking state tax. Which should not
    suppose to pick? Because the partner is marked as tax exemption</b>.
    Can any body tell me how can we solve this issue!
    Why this is happening!
    How to make not to pick tax when it is marked for tax exemtion.
    As i am not Functional guy i am not aware what is happening here!
    Can anybody solve this issue!
    Thanks in advance.
    Thanks,
    Deep.

    Hi Deep
    What do you mean by "It is picking up state tax"? Does it mean that in the pricing procedure it is picking up a condition type which is meant for state tax?
    If so go and check the condition record meant for it. Follow the following steps
    1) Go to Sales order
    2) Select the line item for which the state tax is being picked.
    3) In the condition tab select analysis.
    4) In Analysis you shall find the condition type meant for state tax.
    5) See which condition record has been found.
    6) Go to VK12, enter the state tax condition type and check the condition record for that state tax.
    7) If wrong correct it.
    8) If anything else come back to the post and inform the details
    Thanks
    Regards
    Sunil

  • Issue when creating sales order with Sold-to/Ship-to Party's state tax

    Hi All,
    we have issue while creating Sales Order with picking up of State tax
    for Ship-to-party & Sold-to-party.
    <b>When we create a sales order, for the sold to party 140052732 and
    ship to party 140052733 it is picking state tax. Which should not
    suppose to pick? Because the partner is marked as tax exemption</b>.
    Can any body tell me how can we solve this issue!
    Why this is happening!
    How to make not to pick tax when it is marked for tax exemtion.
    As i am not Functional guy i am not aware what is happening here!
    Can anybody solve this issue!
    Thanks in advance.
    Thanks,
    Deep.

    Hi Deep
    What do you mean by "It is picking up state tax"? Does it mean that in the pricing procedure it is picking up a condition type which is meant for state tax?
    If so go and check the condition record meant for it. Follow the following steps
    1) Go to Sales order
    2) Select the line item for which the state tax is being picked.
    3) In the condition tab select analysis.
    4) In Analysis you shall find the condition type meant for state tax.
    5) See which condition record has been found.
    6) Go to VK12, enter the state tax condition type and check the condition record for that state tax.
    7) If wrong correct it.
    8) If anything else come back to the post and inform the details
    Thanks
    Regards
    Sunil

  • COGS issue in the sales order

    Need your help to resolve below issue.
    A sales order is created with multiple line items. The user created delivery and invoice document for one of the line item in the sales order. The line item cost was active in the sales order and invoice document. The value was determined from the material master record.  The user then created delivery document for other line items in the sales order, but invice document creation ends with an error message that "Sales order is incomplete so billing can not be carried out" VF 069
    The first invoiced item has become inactive in the sales order now and the sales order goes into incomplete status. The system is blocking the invoice document creation for rest of line items. Could you tell me why the line item cost became inactive. Also tell me how to resolve this issue.

    I dont think,
                   There is any problem with Cost in Sales order line item.
    Cost copied from MMR is statiscial & always in display mode.
    Goto VA02- key in order no n press entere.
    now from menu bar- Goto- Edit - Incompletion log ( Cntrl + F8).
    if any field is missing , then maintain the field  to complete the sale sorder.
    incompletion log will be maintaiend @ order n item level. check in Item category for the incompletion procedure & check the fields maintained in incompletion procedure in Tx: OVA2.
    Regards,
    Reazuddin MD

  • Dates fields issue in the sales orders through IDOC

    Hi all,
    I'm trying to create a sales order through Inbound IDOC using IDOC_INPUT_ORDERS.
    I have 2 custom fields in the sales order which are date fields.
    I'm populating them from the IDOC segments(using E1EDKT1-tdid, E1EDKT2-tdline) in the user-exit just before the call trasacation statement. These dates are not coming for a few orders... but are getting populated normally for few of them.
    But the tricky part is that... if I process the same IDOC for the second time.. the order created is having the dates.
    My issue is that.. i need all the orders to be populated with the dates which IDOC have.
    Could anyone please help me with this issue.
    All the answers/replies are highly appreciated!!
    Thanks for you help!

    hi,
    the following may be of help
    There are 2 major exceptions to the batch input internal table. All text data from the segments E1EDKT1/2 and E1EDPT1/2 are not part of the batch input session. Text elements from these segments are posted directly to the data base AFTER the sales order has been created (please note: in order that item texts are posted correctly to the sales order the field POSEX from segment E1EDP01 MUST be transmitted). Also, configurable material information from the IDOC is exported to a global memory and therefore will not be part of the batch input session. Configurable material data is performed in Form CHECK_CONFIGURATION and the data is exported to global memory in the following code:
    Exportiert IDOC Daten ins globale Memory     
    export IDOC data to global memory            
      call function 'CUXC_IDOC_TO_MEMORY'          
           tables                                  
                cfg_instref = xe1curef             
                cfg_ref     = xe1cucfg             
                inst        = xe1cuins             
                part_of     = xe1cuprt             
                value       = xe1cuval             
           exceptions                              
                error       = 1                    
                others      = 2.                   
    One extra piece of useful infomartion if you wish to debug the process is to set your breakpoints at the following points
    for Function module IDOC_INPUT_ORDERS
    include LVEDAF0F..
      CALL TRANSACTION 'VA01' USING bdcdata
                                MODE  input_method
                                UPDATE 'S'
                                MESSAGES INTO xbdcmsgcoll.
    Now input_method is A foreground process and N for background processing but try changing it to P (pass through mode)
    If you have breakpoints in va01, e.g. MV45AF0B_BELEG_SICHERN,(the part where the sales document is saved)
    they will be hit, e.g
    perform userexit_save_document_prepare.
    perform userexit_save_document.
    Lastly, don't forget using program SDJEDI , see note 380603 for more information on this
    Hope this is useful
    Paul Quinn

  • Calculation of goods issue date in sales order with routes

    Hello Gurus,
    This is my first post on SCN, I'm excited to share a new little problem I have.
    I have configured my routes determination as per our requirements.  For example, I have one route configured in 0VTC such that the transit duration is 1 hour.
    When I create a sales order, I enter that route (1 hour transit.dur) under shipping on the line item.  Then I set a delivery date sometime in the future to test out my config.  Looking at the shipping "Goods Issue Date", I see that the date is 2 hours earlier than my delivery date.  It's supposed to be 1 hour.
    I looked through many forums and found no help on this.  My factory calendar is configured such that all days, including weekends and holidays are production days.
    Please advise at your earliest.
    Thanks,
    Mido

    Hi TW Typewriter,
    Yes, I am changing the date in the "schedule lines" tab for the sales order to a date next week, say May 23, 2014.  When I click on the display "Shipping" info, I see:
    1) Delivery date: 05/23/2014 - 00:00
    2) GI Date: 05/22/2014 - 22:00:00
    The expectation is to have the GI date 23:00:00 since my config for the route on the sales order is for 1 hr of transit time only.
    See attached

  • How to fetch post goods issue date and sales order creation date

    Hi All,
    How to find out the difference between SD Sales Order Item Creation Date and final Post goods issue Date. I would like to know how to fetch those dates and what is the relationship between the tables from which i will get the dates.
    Please let me know the solution .
    Thanks in advance.

    Hi,
    Sales order creation date is when u raise a sales order in favor of the customer using VA01.......using ATP logic system purposes the material availability date....
    after saving ur sales order...when u raise the Delivery using VL01n  w.r.t to OR...than u have to perform picking ....In the picking Tab...specify the amount to be picked than press Post Good Issue....means the goods left the company premises ..
    You can the fetch the values using tables-  Use T code   SE12  or SE16
    Vbak-----order header
    Vbap-----order item
    Vbek-----order schedule line
    Likp-----Delivery header
    Lips----Delivery item

  • Issues in changing Sales Order - ECC6.0

    Hi All,
    We are facing an issue when we try to change a Sales Order for which Delivery has been created.
    When a Sales Order is opened for change, we see that the Net Value and Tax fields in the Item Conditions is blanked out. This does not happen when the Sales Order is opened for Display.
    Again, there is no issue when we try to change a Sales Order which does not have any subsequent documents created for it.
    Has anyone come across such an issue?
    Any pointers in resolving this issue will be highly helpful.
    Thank you.
    Regards,
    Keerthi

    Hi,
    Sorry, my earlier evaluation turned out to be wrong and the reason for the issue was that we had activated a Userexit which was triggering the redetermination of Pricing, which sort of became the reason for the issue .
    I managed to handle this scenario in the Userexit and resolve the problem.
    But I am still facing the same issue at a different place now - whenever I try to change anything at the line item level (for instance, PLATFORM in the Additional Data 'B' tab of Sales Order Item), I see that the Function Module 'PRICING' is getting called inside the program SAPFV45P. This function module, again, somehow screws up my already determined prices and tax values for that particular item.
    Any suggestions/recommendations on how we can control whether this function module gets called or not in SAP?
    Thanks in advance.
    Regards,
    Keerthi

  • Issue in creating Sales Order in CRM 7.0 IC WEB

    Hello Experts,
    I am working on CRM7 and ECC 6 integration. I have configured Sales Order ( transaction type ZOR) in CRM. Using GUI the sales order is properly created in CRM and getting replicated to ECC without any issues.
    I started configuring IC web UI, systematically followed C04 and C78 and completed all the steps including IC_BT transaction profile customization but inspite of this I am unable to create sales order in IC web.
    I am geting error "No transaction type available for creating transactions" and if I go into details of this error it shows a page as follows
    Diagnosis
    No transaction type is available when creating a transaction. This can be due to the following reasons:
    u2022     No transaction type is available according to Customizing
    u2022     The user has no authorization for the transaction type
    System Response
    It is not possible to create the transaction.
    Procedure
    Make sure that:
    u2022     The transaction type is set up in Customizing
    u2022     The user has authorization for the transaction type
    I have checked everything , nothing seems to be wrong. Can anyone advice how to resolve this issue
    Thanks and Regards
    Ambar

    goto IMG where you defined the ZOR.  Select the ZOR and choose Channel on the left, is ICW Interaction Center Webclient a choice? or add it.
    We noticed that once any transaction was set to an option, we had to set these for all transactions in the ICWC, ISA, Gui, etc.

  • Issue in Updating Sales Order Document flow

    Hi Experts,
    We have developed a Z Program for posting Material document for the deliveries of Sales Order. This program runs in Batch job everyday.
    Here we are getting an issue like in some of the cases it's not updating the Document flow of the Sales order though its Posting Material Document for the Delivery of Sales Order. If there will be a bulk amount of data then its creating issue in updating the Document flow ( Either the 1st set of record or last set of records).
    We are using BAPI 'BAPI_GOODSMVT_CREATE' for posting Material Document for the delivery and FM 'RV_DOCUMENT_FLOW_UPDATE_U' for updating the document flow.
    It seems it giving issue with bulk amount of data. Will it a time issue?
    If any one have faced such issue, please throw some pointers.
    Thanks in advance!
    Regards,
    Priyabrata.

    It could be a timing issue. After you create the material document, try to enque the material document and move to the next step  only if the enque is successful.  Keep trying to enque the material document until u are successful. But make sure you exit the loop after certain number of tries to avoid endless loops.  Here is a sample code:
      DO 20TIMES.
        CALL FUNCTION ;'ENQUEUE_EMMKPF'
          EXPORTING
            MODE_MKPF      = co_e
           MBLNR          = xxxxx
          MJAHR           = xxxx
          EXCEPTIONS
            foreign_lock   = 1
            system_failure = 2
            OTHERS         = 3.
        IF sy-subrc EQ 0.
    dequeue/unlock the notification again
          CALL FUNCTION DEQUEUE_EMMKPF
            EXPORTING
              MODE_MKPF= co_e
           MBLNR          = xxxxx
          MJAHR           = xxxx
         EXIT.
        ELSE.
    in case of no success, wait 1 seconds, before try again
          CALL FUNCTION 'RZL_SLEEP'
            EXPORTING
              seconds        = 1
            EXCEPTIONS
              argument_error = 1
              OTHERS         = 2.                               "#EC *
        ENDIF.
      ENDDO.
    Regards,
    Jitendar

  • ISSUE ON CREATE SALES ORDER USING BAPI

    Hi,
       I am creating a sales order using bapi BAPI_SALESORDER_CREATEFROMDAT2.But it it fails to create a sales order abd below is my code pls check and correct me to create a sales order.
    LOOP AT DATA_TAB.
    clear: l_order_header_in,
           l_salesdocument,
           l_order_partners,
           l_order_items_IN,
           l_order_schedules_IN.
    refresh: l_order_items_in,
             l_order_partners,
             l_order_schedules_IN,
             l_return.
    Order header
    l_order_header_in-DOC_TYPE    = DATA_TAB-AUART.
    l_order_header_IN-SALES_ORG   = DATA_TAB-VKORG.
    l_order_header_IN-DISTR_CHAN  = data_tab-vtweg.
    l_order_header_in-division    = DATA_TAB-SPART.
    l_order_header_in-REF_1_S     = DATA_TAB-IHREZ_E.
    l_order_header_in-PURCH_NO_S  = DATA_TAB-BSTKD_E.
    l_order_header_in-PO_DAT_S    = data_tab-bstdk_e.
    l_order_header_in-PO_METH_S   = DATA_TAB-BSARK_E.
    l_order_header_in-DOC_DATE    = DATA_TAB-AUDAT.
    l_order_header_in-REC_POINT   = DATA_TAB-EMPST.
    l_order_header_inX-DOC_TYPE    = 'X'.
    l_order_header_INX-SALES_ORG   = 'X'.
    l_order_header_INX-DISTR_CHAN  = 'X'.
    l_order_header_inX-division    = 'X'.
    l_order_header_inX-REF_1_S     = 'X'.
    l_order_header_inX-PURCH_NO_S  = 'X'.
    l_order_header_inX-PO_DAT_S    = 'X'.
    l_order_header_inX-PO_METH_S   = 'X'.
    l_order_header_inX-DOC_DATE    = 'X'.
    l_order_header_inX-REC_POINT   = 'X'.
    Partner data SOLD TO PARTY
    l_order_partners-ITM_NUMBER = DATA_TAB-POSNR.
    l_order_partners-partn_role = 'SP'.
    l_order_partners-partn_numb = DATA_TAB-kunnr1.
    append l_ordeR_partners.
    Partner data SHOP TO PARTY
    l_order_partners-ITM_NUMBER = DATA_TAB-POSNR.
    l_order_partners-partn_role = 'SH'.
    l_order_partners-partn_numb = DATA_TAB-kunnr2.
    append l_ordeR_partners.
    Order items
    l_order_items_IN-ITM_NUMBER = DATA_TAB-POSNR.
    l_order_items_IN-material   = DATA_TAB-MABNR.
    l_order_items_IN-BATCH      = DATA_TAB-CHARG.
    l_order_items_IN-REASON_REJ = DATA_TAB-ABGRU.
    append l_order_items_IN.
    l_order_items_INX-ITM_NUMBER = DATA_TAB-POSNR.
    l_order_items_INX-material   = 'X'.
    l_order_items_INX-BATCH      = 'X'.
    l_order_items_INX-REASON_REJ = 'X'.
    append l_order_items_INX.
    Schedules for quantity
    l_order_schedules_IN-itm_number = DATA_TAB-POSNR.
    l_order_schedules_IN-req_qty    = DATA_TAB-KWMENG.
    append l_order_schedules_IN.
    Schedules for quantity
    l_order_schedules_INX-itm_number = data_tab-posnr.
    l_order_schedules_INX-req_qty    =  'X'.
    append l_order_schedules_INX.
    Conditions for value
    l_order_conditions_IN-itm_number = DATA_TAB-POSNR.
    l_order_conditions_IN-cond_type  = DATA_TAB-KSCHL.
    l_order_conditions_IN-cond_value = DATA_TAB-KBETR.
    l_order_conditions_IN-currency   = DATA_TAB-KOEIN.
    append l_order_conditions_IN.
    Conditions for value
    l_order_conditions_INX-itm_number = DATA_TAB-POSNR.
    l_order_conditions_INX-cond_type  = 'X'.
    l_order_conditions_INX-cond_value = 'X'.
    l_order_conditions_INX-currency   = 'X'.
    append l_order_conditions_INX .
    endloop.
    BAPI to create sales order
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
    EXPORTING
    SALESDOCUMENTIN =
      ORDER_HEADER_IN =      l_order_header_IN
      ORDER_HEADER_INX =     l_order_header_INX
    IMPORTING
      SALESDOCUMENT =        l_salesdocument
    TABLES
      RETURN =               l_return
      ORDER_ITEMS_IN =       l_order_items_IN
      ORDER_ITEMS_INX =      l_order_items_INX
      ORDER_PARTNERS =       l_order_partners
      ORDER_SCHEDULES_IN =   l_order_schedules_in
      ORDER_SCHEDULES_INX =  l_order_schedules_inX
      ORDER_CONDITIONS_IN =  l_order_conditions_in
      ORDER_CONDITIONS_INX = l_order_conditions_inX
    IF SY-SUBRC = 0.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
       WAIT           = C_X
    IMPORTING
      RETURN        =
    ENDIF.
      Pls help me to solve the issue.
    Thanks,
    Rajendra.

    Hi Raj
    This is the sameple code which works fine for me,
    REPORT  zkb_sales_order.
    DATA: w_order_header_in TYPE bapisdhd1,
          i_order_partners TYPE TABLE OF bapiparnr,
          w_order_partners TYPE bapiparnr,
          i_return TYPE TABLE OF bapiret2,
          w_return TYPE bapiret2,
         i_order_items_in TYPE TABLE OF bapisditm,
         w_order_items_in TYPE  bapisditm,
         i_order_items_inx TYPE TABLE OF  bapisditmx,
         w_order_items_inx TYPE  bapisditmx,
        i_order_conditions_in TYPE TABLE OF bapicond,
        w_order_conditions_in TYPE bapicond,
        i_order_conditions_inx TYPE TABLE OF bapicondx,
        w_order_conditions_inx TYPE TABLE OF bapicondx.
    CLEAR w_order_header_in.
    w_order_header_in-doc_type  = 'ZSO'.
    w_order_header_in-sales_org =  '1000'.
    w_order_header_in-distr_chan = '01'.
    w_order_header_in-division =  '01'.
    w_order_header_in-req_date_h  = sy-datum.
    w_order_header_in-sales_dist =   '000001'.
    CLEAR: i_order_items_in,w_order_items_in.
    w_order_items_in-material = 77.
    w_order_items_in-salqtynum = 1.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = w_order_items_in-material
      IMPORTING
        output = w_order_items_in-material.
    APPEND w_order_items_in TO i_order_items_in.
    * SP
    CLEAR: i_order_partners,w_order_partners.
    w_order_partners-partn_role = 'AG'.
    w_order_partners-partn_numb = '2000016'.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input  = w_order_partners-partn_numb
      IMPORTING
        output = w_order_partners-partn_numb.
    APPEND w_order_partners TO i_order_partners.
    CLEAR: i_order_conditions_in,w_order_conditions_in.
    w_order_conditions_in-itm_number =  '000010'.
    w_order_conditions_in-cond_type  =   'PR00'.
    w_order_conditions_in-cond_value =  100.
    APPEND w_order_conditions_in TO i_order_conditions_in.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
      EXPORTING
    *   SALESDOCUMENTIN               =
        order_header_in               = w_order_header_in
    *   ORDER_HEADER_INX              =
    *   SENDER                        =
    *   BINARY_RELATIONSHIPTYPE       =
    *   INT_NUMBER_ASSIGNMENT         =
    *   BEHAVE_WHEN_ERROR             =
    *   LOGIC_SWITCH                  =
    *   TESTRUN                       =
    *   CONVERT                       = ' '
    * IMPORTING
    *   SALESDOCUMENT                 =
      TABLES
       return                        = i_return
       order_items_in                = i_order_items_in
    *   ORDER_ITEMS_INX               =
        order_partners                = i_order_partners
    *   ORDER_SCHEDULES_IN            =
    *   ORDER_SCHEDULES_INX           =
       order_conditions_in           = i_order_conditions_in
    *   ORDER_CONDITIONS_INX          =
    *   ORDER_CFGS_REF                =
    *   ORDER_CFGS_INST               =
    *   ORDER_CFGS_PART_OF            =
    *   ORDER_CFGS_VALUE              =
    *   ORDER_CFGS_BLOB               =
    *   ORDER_CFGS_VK                 =
    *   ORDER_CFGS_REFINST            =
    *   ORDER_CCARD                   =
    *   ORDER_TEXT                    =
    *   ORDER_KEYS                    =
    *   EXTENSIONIN                   =
    *   PARTNERADDRESSES              =
    READ TABLE i_return INTO w_return WITH KEY type = 'E'.
    IF sy-subrc NE 0.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    ENDIF.
    LOOP AT i_return INTO w_return .
      WRITE: / w_return-type,
      w_return-id,
      w_return-number,
      w_return-message.
    ENDLOOP.
    Regards
    Kathirvel

  • Issue in creating sales order with ref contract(quantity)

    hi friends,
           I am creating sales order with reference contract using
    "BAPI_SALESORDER_CREATEFROMDAT1"
    my issue is with quantity field when i am entering quantity as  1 then it is taking as 0.001
    i am also declaring its unit field too but there is no change.
    in my program i am taking quantity as parameter.
    field description is like this Order qty in sales units - 00009001 corresponds to 9.001
    is there any chance of changing the quantity .
    please help.

    There is another similar post...look at those comments.  Consider the data types in use...in true numeric fields with decimals, the decimal is implied, so look at how you're sending and/or converting any value....  For instance, if I were sending data to a quantity field described as curr 15, decimals 3, I would expect that I needed to send 1.000 (or perhaps 1000, depending on my testing) in the input to get a quantity of 1.

  • Confirmation Quantity issue while creating Sales order using BAPI

    Hi SDN,
    Can anyone of you help mein the below issue:
    I have a program to create a sales order using upload file. for this i use "BAPI_SALESORDER_CREATEFROMDAT2" & for changing existing "BAPI_SALESORDER_CHANGE".
    Now If the upload file contains the Same Material, Based on other conditions, it needs to create Multiple sales order.
    When the first Salesorder is created, the Quantity is getting confirmed (Confirmed quantity VBEP-BMENG). But during actual run, since the confirmation is getting done for the same material in the above Sales order, the confirmation is not being done in the subsequent Sales order".
    This poses a problem for business, user need to manual refresh the u201Cconfirmed quantity for each line item in the particular SO where it failed during program upload.
    Also while uploading using the BAPI, if we wait forsometime after creating the first sales order in Debug, then the above material is unlocked & the confirmation quantity is done for the subsequent sales order also.
    But in the actual run, this is creating a problem. Some Refresh or Unlocking problem.
    Can you please suggest a suitable solution for this issue.
    Thanks & regrads,
    Chaitanya LBK

    Have you tried backorder processing?
    V_V1
    V_V2
    V_RA
    V_R1
    V_R2

  • Issue in creating sales order using process_header API (web service)

    Hi All,
    I am trying to create sales order header using web service call to OE_ORDER_PUB.Process_header API.
    When I pass the inputs and test the service,I get output with return_status='S'. But no record falls at the OE_ORDER_HEADER_ALL table.
    I cant identify where the problem is.Is there any commit missing? Pls help me resolve this issue.
    Thanks,
    Vinoth

    Hi All,
    I am trying to create sales order header using web service call to OE_ORDER_PUB.Process_header API.
    When I pass the inputs and test the service,I get output with return_status='S'. But no record falls at the OE_ORDER_HEADER_ALL table.
    I cant identify where the problem is.Is there any commit missing? Pls help me resolve this issue.
    Thanks,
    Vinoth

  • Issue in creating sales order using process_header API

    Hi all,
    We have a requirement to create sales order using apps adapter in ebiz from SOA suite composite.I used OE_ORDER_PUB.Process_header API to create order header.
    When I pass the inputs and test the service,I get output with return_status='S'. But no record falls at the OE_ORDER_HEADER_ALL table.
    I cant identify where the problem is.Pls suggest me with the things to resolve this issue.
    Thanks,
    goutham

    Hi all,
    We have a requirement to create sales order using apps adapter in ebiz from SOA suite composite.I used OE_ORDER_PUB.Process_header API to create order header.
    When I pass the inputs and test the service,I get output with return_status='S'. But no record falls at the OE_ORDER_HEADER_ALL table.
    I cant identify where the problem is.Pls suggest me with the things to resolve this issue.
    Thanks,
    goutham

Maybe you are looking for

  • MacBook Pro smell and need help deciding on which MacBook Pro to buy

    So I bought a 17-inch MacBook Pro from my brother in August of 2009. He bought it in March of 2008. A couple days ago I noticed that my MacBook Pro has been releasing a really bad smell almost as if burning plastic. But the smell isn't that bad. What

  • How to get ringtones

    Ok, I'm trying to get a ringtone for my phonne and don't know how. I went online to Verizon and it told me i couldn't do it that way. How do I get a ringtone then? I tried looking on Itunes and didn't ee anything

  • Working with SecuGen SDK in C#

      private voidbtnRegister_Click(objectsender, EventArgse) inta; Int32err=0;           m_FPM.SetTemplateFormat( SGFPMTemplateFormat.ANSI378); Byte[] fp_image = newByte[m_ImageWidth * m_ImageHeight]; Int32iError = m_FPM.GetImage(fp_image);        iErro

  • Ipod freezing when ever i watch 2 videos in a row

    i have used a software program to add a couple videos onto my ipod. when i watch one the videos it works fine, but when i go to watch the 2nd video, the ipod freezes and i basically have to wait for the the ipod to run out of battery then recharge it

  • Implement a UNION clause

    Hi All, My requirement is simple. I want a Z table which combines the distinct Cost Center and Employee Pernr combination from two tables into one ztable. e.g. table 1.................................. Cost Center         Pernr A