<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem while creating sales order throgh FM SD_SALESDOCUMENT_CREATE in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-creating-sales-order-throgh-fm-sd-salesdocument-create/m-p/6447098#M1413169</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating sales order through BAPI SD_SALESDOCUMENT_CREATE. I have passed header, headerx, business object, item, itemx, schedule, schedulex and partner data. But the sales order is not getting created.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;sales_header_in = wa_order_header_bapi&lt;/P&gt;&lt;P&gt;sales_header_inx = wa_order_headerx_bapi&lt;/P&gt;&lt;P&gt;business_object = l_business_object&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;salesdocument_ex = l_vbeln&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;return = it_return_bapi&lt;/P&gt;&lt;P&gt;sales_items_in = it_order_items_bapi&lt;/P&gt;&lt;P&gt;sales_items_inx = it_order_itemsx_bapi&lt;/P&gt;&lt;P&gt;sales_partners = it_order_partners_bapi&lt;/P&gt;&lt;P&gt;sales_schedules_in = it_order_schedule&lt;/P&gt;&lt;P&gt;sales_schedules_inx = it_order_schedulex.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;wait = 'X'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = g_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the below details for the tables and work areas which are being passed to function module&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-doc_type = l_auart. "order type&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-sales_org = l_vkorg. "sales organisation&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-distr_chan = l_vtweg. "distribution channel&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-division = l_spart. "division&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-req_date_h = sy-datum. "required delivery date&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-purch_no_c = l_bstnk. " purchase order number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-updateflag = 'I'.&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-doc_type = 'X'. "order type&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-sales_org = 'X'. "sales organisation&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-distr_chan = 'X'. "distribution channel&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-division = 'X'. "division&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-req_date_h = 'X'. "required delivery date&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-purch_no_c = 'X'. " purchase order number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_items_bapi-itm_number = '000010'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-itm_number = '000010'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-updateflag = 'I'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_schedule-itm_number = '000010'.&lt;/P&gt;&lt;P&gt;it_order_schedule-sched_line = '0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_schedulex-itm_number = '000010'.&lt;/P&gt;&lt;P&gt;it_order_schedulex-sched_line = '0001'.&lt;/P&gt;&lt;P&gt;it_order_schedulex-updateflag = 'I'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;input = gt_itab-matnr&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;output = gt_itab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_items_bapi-material = gt_itab-matnr.&lt;/P&gt;&lt;P&gt;it_order_items_bapi-target_qty = gt_itab-kwmeng.&lt;/P&gt;&lt;P&gt;it_order_items_bapi-plant = gt_itab-werks.&lt;/P&gt;&lt;P&gt;it_order_items_bapi-batch = gt_itab-charg.&lt;/P&gt;&lt;P&gt;it_order_items_bapi-store_loc = gt_itab-lgort.&lt;/P&gt;&lt;P&gt;it_order_items_bapi-dlv_prio = gt_itab-lprio.&lt;/P&gt;&lt;P&gt;APPEND it_order_items_bapi.&lt;/P&gt;&lt;P&gt;CLEAR it_order_items_bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-material = 'X'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-target_qty = 'X'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-plant = 'X'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-batch = 'X'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-store_loc = 'X'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-dlv_prio = 'X'.&lt;/P&gt;&lt;P&gt;APPEND it_order_itemsx_bapi.&lt;/P&gt;&lt;P&gt;CLEAR it_order_itemsx_bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_schedule-req_date = gt_itab-vdatu.&lt;/P&gt;&lt;P&gt;it_order_schedule-dlv_date = gt_itab-vdatu.&lt;/P&gt;&lt;P&gt;it_order_schedule-req_qty = gt_itab-kwmeng.&lt;/P&gt;&lt;P&gt;APPEND it_order_schedule.&lt;/P&gt;&lt;P&gt;CLEAR it_order_schedule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_schedulex-req_date = 'X'.&lt;/P&gt;&lt;P&gt;it_order_schedulex-dlv_date = 'X'.&lt;/P&gt;&lt;P&gt;it_order_schedulex-req_qty = 'X'.&lt;/P&gt;&lt;P&gt;APPEND it_order_schedulex.&lt;/P&gt;&lt;P&gt;CLEAR it_order_schedulex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;input = gt_itab-sold_to&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;output = gt_itab-sold_to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_partners_bapi-partn_role = 'SP'.&lt;/P&gt;&lt;P&gt;it_order_partners_bapi-partn_numb = gt_itab-sold_to.&lt;/P&gt;&lt;P&gt;APPEND it_order_partners_bapi.&lt;/P&gt;&lt;P&gt;CLEAR it_order_partners_bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;input = gt_itab-ship_to&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;output = gt_itab-ship_to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_partners_bapi-partn_role = 'WE'.&lt;/P&gt;&lt;P&gt;it_order_partners_bapi-partn_numb = gt_itab-ship_to.&lt;/P&gt;&lt;P&gt;APPEND it_order_partners_bapi.&lt;/P&gt;&lt;P&gt;CLEAR it_order_partners_bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;sales_header_in = wa_order_header_bapi&lt;/P&gt;&lt;P&gt;sales_header_inx = wa_order_headerx_bapi&lt;/P&gt;&lt;P&gt;business_object = l_business_object&lt;/P&gt;&lt;P&gt;behave_when_error = 'P'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;salesdocument_ex = l_vbeln&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;return = it_return_bapi&lt;/P&gt;&lt;P&gt;sales_items_in = it_order_items_bapi&lt;/P&gt;&lt;P&gt;sales_items_inx = it_order_itemsx_bapi&lt;/P&gt;&lt;P&gt;sales_partners = it_order_partners_bapi&lt;/P&gt;&lt;P&gt;sales_schedules_in = it_order_schedule&lt;/P&gt;&lt;P&gt;sales_schedules_inx = it_order_schedulex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;wait = 'X'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = g_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the return table I get the below error :-&lt;/P&gt;&lt;P&gt;SALES_HEADER_IN has been processed successfully&lt;/P&gt;&lt;P&gt;SALES_ITEM_IN has been processed successfully&lt;/P&gt;&lt;P&gt;has been saved &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and salesorder document is coming as blank when I execute the function module.&lt;/P&gt;&lt;P&gt;But after commiting BAPi, when I go to VA02, i can see the sales order created.&lt;/P&gt;&lt;P&gt;What is the problem with function module, if the sales order is getting craeted then why it is not returing the sales order number. How to overcome this situation.  &lt;/P&gt;&lt;P&gt;The function module is giving me the sales order number when I try to execute it with some test program with the same data that is being passed in the above code. Do I need to use some SAP note for the same?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ekta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Dec 2009 07:36:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-12-02T07:36:25Z</dc:date>
    <item>
      <title>Problem while creating sales order throgh FM SD_SALESDOCUMENT_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-creating-sales-order-throgh-fm-sd-salesdocument-create/m-p/6447098#M1413169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating sales order through BAPI SD_SALESDOCUMENT_CREATE. I have passed header, headerx, business object, item, itemx, schedule, schedulex and partner data. But the sales order is not getting created.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;sales_header_in = wa_order_header_bapi&lt;/P&gt;&lt;P&gt;sales_header_inx = wa_order_headerx_bapi&lt;/P&gt;&lt;P&gt;business_object = l_business_object&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;salesdocument_ex = l_vbeln&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;return = it_return_bapi&lt;/P&gt;&lt;P&gt;sales_items_in = it_order_items_bapi&lt;/P&gt;&lt;P&gt;sales_items_inx = it_order_itemsx_bapi&lt;/P&gt;&lt;P&gt;sales_partners = it_order_partners_bapi&lt;/P&gt;&lt;P&gt;sales_schedules_in = it_order_schedule&lt;/P&gt;&lt;P&gt;sales_schedules_inx = it_order_schedulex.&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;wait = 'X'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = g_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the below details for the tables and work areas which are being passed to function module&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-doc_type = l_auart. "order type&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-sales_org = l_vkorg. "sales organisation&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-distr_chan = l_vtweg. "distribution channel&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-division = l_spart. "division&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-req_date_h = sy-datum. "required delivery date&lt;/P&gt;&lt;P&gt;wa_order_header_bapi-purch_no_c = l_bstnk. " purchase order number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-updateflag = 'I'.&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-doc_type = 'X'. "order type&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-sales_org = 'X'. "sales organisation&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-distr_chan = 'X'. "distribution channel&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-division = 'X'. "division&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-req_date_h = 'X'. "required delivery date&lt;/P&gt;&lt;P&gt;wa_order_headerx_bapi-purch_no_c = 'X'. " purchase order number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_items_bapi-itm_number = '000010'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-itm_number = '000010'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-updateflag = 'I'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_schedule-itm_number = '000010'.&lt;/P&gt;&lt;P&gt;it_order_schedule-sched_line = '0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_schedulex-itm_number = '000010'.&lt;/P&gt;&lt;P&gt;it_order_schedulex-sched_line = '0001'.&lt;/P&gt;&lt;P&gt;it_order_schedulex-updateflag = 'I'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;input = gt_itab-matnr&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;output = gt_itab-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_items_bapi-material = gt_itab-matnr.&lt;/P&gt;&lt;P&gt;it_order_items_bapi-target_qty = gt_itab-kwmeng.&lt;/P&gt;&lt;P&gt;it_order_items_bapi-plant = gt_itab-werks.&lt;/P&gt;&lt;P&gt;it_order_items_bapi-batch = gt_itab-charg.&lt;/P&gt;&lt;P&gt;it_order_items_bapi-store_loc = gt_itab-lgort.&lt;/P&gt;&lt;P&gt;it_order_items_bapi-dlv_prio = gt_itab-lprio.&lt;/P&gt;&lt;P&gt;APPEND it_order_items_bapi.&lt;/P&gt;&lt;P&gt;CLEAR it_order_items_bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-material = 'X'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-target_qty = 'X'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-plant = 'X'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-batch = 'X'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-store_loc = 'X'.&lt;/P&gt;&lt;P&gt;it_order_itemsx_bapi-dlv_prio = 'X'.&lt;/P&gt;&lt;P&gt;APPEND it_order_itemsx_bapi.&lt;/P&gt;&lt;P&gt;CLEAR it_order_itemsx_bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_schedule-req_date = gt_itab-vdatu.&lt;/P&gt;&lt;P&gt;it_order_schedule-dlv_date = gt_itab-vdatu.&lt;/P&gt;&lt;P&gt;it_order_schedule-req_qty = gt_itab-kwmeng.&lt;/P&gt;&lt;P&gt;APPEND it_order_schedule.&lt;/P&gt;&lt;P&gt;CLEAR it_order_schedule.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_schedulex-req_date = 'X'.&lt;/P&gt;&lt;P&gt;it_order_schedulex-dlv_date = 'X'.&lt;/P&gt;&lt;P&gt;it_order_schedulex-req_qty = 'X'.&lt;/P&gt;&lt;P&gt;APPEND it_order_schedulex.&lt;/P&gt;&lt;P&gt;CLEAR it_order_schedulex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;input = gt_itab-sold_to&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;output = gt_itab-sold_to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_partners_bapi-partn_role = 'SP'.&lt;/P&gt;&lt;P&gt;it_order_partners_bapi-partn_numb = gt_itab-sold_to.&lt;/P&gt;&lt;P&gt;APPEND it_order_partners_bapi.&lt;/P&gt;&lt;P&gt;CLEAR it_order_partners_bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;input = gt_itab-ship_to&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;output = gt_itab-ship_to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_order_partners_bapi-partn_role = 'WE'.&lt;/P&gt;&lt;P&gt;it_order_partners_bapi-partn_numb = gt_itab-ship_to.&lt;/P&gt;&lt;P&gt;APPEND it_order_partners_bapi.&lt;/P&gt;&lt;P&gt;CLEAR it_order_partners_bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;sales_header_in = wa_order_header_bapi&lt;/P&gt;&lt;P&gt;sales_header_inx = wa_order_headerx_bapi&lt;/P&gt;&lt;P&gt;business_object = l_business_object&lt;/P&gt;&lt;P&gt;behave_when_error = 'P'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;salesdocument_ex = l_vbeln&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;return = it_return_bapi&lt;/P&gt;&lt;P&gt;sales_items_in = it_order_items_bapi&lt;/P&gt;&lt;P&gt;sales_items_inx = it_order_itemsx_bapi&lt;/P&gt;&lt;P&gt;sales_partners = it_order_partners_bapi&lt;/P&gt;&lt;P&gt;sales_schedules_in = it_order_schedule&lt;/P&gt;&lt;P&gt;sales_schedules_inx = it_order_schedulex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;wait = 'X'&lt;/P&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;return = g_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the return table I get the below error :-&lt;/P&gt;&lt;P&gt;SALES_HEADER_IN has been processed successfully&lt;/P&gt;&lt;P&gt;SALES_ITEM_IN has been processed successfully&lt;/P&gt;&lt;P&gt;has been saved &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and salesorder document is coming as blank when I execute the function module.&lt;/P&gt;&lt;P&gt;But after commiting BAPi, when I go to VA02, i can see the sales order created.&lt;/P&gt;&lt;P&gt;What is the problem with function module, if the sales order is getting craeted then why it is not returing the sales order number. How to overcome this situation.  &lt;/P&gt;&lt;P&gt;The function module is giving me the sales order number when I try to execute it with some test program with the same data that is being passed in the above code. Do I need to use some SAP note for the same?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ekta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 07:36:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-creating-sales-order-throgh-fm-sd-salesdocument-create/m-p/6447098#M1413169</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-02T07:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem while creating sales order throgh FM SD_SALESDOCUMENT_CREATE</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-creating-sales-order-throgh-fm-sd-salesdocument-create/m-p/6447099#M1413170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Try removing the &lt;/P&gt;&lt;P&gt;wait = 'X' &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Madhan D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2009 08:48:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/problem-while-creating-sales-order-throgh-fm-sd-salesdocument-create/m-p/6447099#M1413170</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-12-02T08:48:40Z</dc:date>
    </item>
  </channel>
</rss>

