Block Sales Order creation if the stock is zero

Dear Gurus,
Is there anyway we can block from creation of Delivery Order if the stock qty is zero (eg: in MMBE no stock at all).
Or if there's other suggestions, eg. either to block upon Sales Order creation, pls do inform.
Thanks.

HI Azmawati Abdul Aziz
     This can be control through standard SAP,no need to go for ABAP.go to T.code (Zero) 0VLP select your delivery item category in that Quantity column you can find *Check quantity 0 *check with "B" Situation rejected with an error message**,then system will not allow to save the delivery where the quantity is 0.
Check with this and revert back.
Thanks
Ram

Similar Messages

  • Block sales order creation based on material qty

    Hi,
      In my scenario i want to block the sales order creation based on material qty , how i can do this?
    Example:
    Material qty below 100 = able to create sales order
    Material qty above 100 = not able to create SO
    Thanks,
    Arun

    Hi
    For restricting the order if it is less than a specified qty, you can maintain the 'min order qty' in material master.
    But your requirement is the other way round - Restrict order if it is more than specified qty.
    In this case, you need to use the following sales order exit  in progran MV45AFZZ
    u2022     USEREXIT_SAVE_DOCUMENT_PREPARE
    Use this user exit to make certain changes or checks immediately before saving a document. It is the last possibility for changing or checking a document before posting.
    The user exit is carried out at the beginning of the FORM routine BELEG_SICHERN.
    Hope this helps.
    Regards
    Madhu

  • Delivery Created for material with ref to a sales Order, even if the stock

    Hi Guru,
    Deliveriey is getting created of material having TANN as Item category in the sales Order. We want the system to stop creating a delivery, when there is no stock of the same.
    How can we configure the scenario.
    Please help.
    Regards
    Amit Shrivastava

    Hi amit
    If you feel this answer solve your query please reward with points.
    With out stock also you can create a delivery and picking  you will get delviery doucment number But the thing is when you cannot do the post goods issue
    Deficit of SL Unrestricted-use  you will get this type of messege when you do the p..g.i.  Post goods issue is the thing it will update the inventory.  There is no stock it will not update any stock temparay it will create all those things.
    Thanks & Regards
    rack29

  • Automatically cr. block Sales Order once they reach within the Cr. Horizon

    How to automatically credit block Sales order made outside the Cr. Horizon, once they reach into the Cr. horizon.
    I have tried testing the same through Program RVKRED08, but it works for some orders if the Cr. horizon is maintained for 60days.
    But does not block if the Cr. horizon is maintained for 30days.
    Thanks in Advance

    if you specify horizon date, the system consider al the values
    which falls under this date. the system will not take into account if the values fall after the horizon date.
    EX: if you specify horizon date 2 months. Then system consider the open values which falls with in two months. if
    the value fall after the two months, the system ill not take into account.
    If your horizion date is 30 days and shcedule line date is in 30 days, system will check credit managemnt and blocks or unblocks.

  • About data for blocked sales order

    hi friends,
    i have one requirement . i.e i want to create the BLOCKED SALES ORDER , whate are the fields require for the creation.
    if there is any BAPI for this please tell me.
    help me
    naresh

    Hello Naresh.
    You can Show your blocked Sales order Using table MVKE(Sales Data for Material) and TVMS(Materials: Status in Sales and Distribution).
    Logic is :1. Check Field MVKE-VMSTA.
                 2. find corresponding entries of  MVKE-VMSTA in Table TVMS.
                     by matching  MVKE-VMSTA = TVMS-VMSTA.
                 3. For Above same Entries see the Blocked check in Field TVMS-SPVBC.
                    IF  TVMS-SPVBC = 'B' means this sales order is blocked.
    and check all matnr of MVKE according to this logic.
    In case any Problem,you can let me know so that i can help you in better ways.
    Have a Nice Day,
    Regards,
    Sujeet.

  • Sales order creation -pricing- IDOC processing

    Hi All,
    Issue is related to pricing procedure and condition types while processing the IDOC for sales order creation.
    The condition type ZSTD maintained in the pricing procedure AAAA, has reference condition type as ZZZZ, when we are processing IDOC, system is throwing error as " condition type ZZZZ, is not maintained for A V AAAA.
    This error will not populate when we create the sales order manually.
    Kindly let me know if programs needs to be checked and or any configuration mistakes involved in this.
    Regards,
    SAN

    >
    Vivek Baddula wrote:
    > Hey Teju,
    >
    > Could you pls put me the block of code how you are populating to the idoc edidd. So that we can guide you.
    >
    > And also tell me the message status 51 in IDoc what it is showing , and also see the segment( maybe E2EDP05)  specific  to pricing for the IDoc  you populated.
    >
    > Regards,
    >
    > Vvieks
    >
    > 'Grow and help others to Grow'
    Vivek,
    Thanks for the reply.
    Status 51 reads "condition ZPRL is missing in pricing procedure A V ZPRINT, WE are not passing any value as a part of tsting. The system should pick price values from condtion record.

  • Sales order creation with bapi in webdynpro using table control

    When i use table control to update the line items only first row is getting updated in the sale order creation and the loop is not updating the other row to header only the first row is getting saved, for the same set of data sale order is getting created in va01 for multiple line items. Pls give me some idea to resolve this issue, here is the code i am using for creating sale order using bapi 'BAPI_SALESORDER_CREATEFROMDAT2' method CREATE_SALES_ORDER .
    Declaration for Order Header Node DATA: node_order_header TYPE REF TO if_wd_context_node, elem_order_header TYPE REF TO if_wd_context_element, stru_order_header TYPE if_componentcontroller=>element_order_header . * Declaration for Order Items Node DATA: node_order_items TYPE REF TO if_wd_context_node, elem_order_items TYPE REF TO if_wd_context_element, stru_order_items TYPE if_componentcontroller=>element_order_items . * Declaration for Order Partners Node DATA: node_order_partners TYPE REF TO if_wd_context_node, elem_order_partners TYPE REF TO if_wd_context_element, stru_order_partners TYPE if_componentcontroller=>element_order_partners . node_order_header = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_header ). elem_order_header = node_order_header->get_element( ). elem_order_header->get_static_attributes( IMPORTING static_attributes = stru_order_header ). * via lead selection node_order_items = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_items ). elem_order_items = node_order_items->get_element( ). elem_order_items->get_static_attributes( IMPORTING static_attributes = stru_order_items ). * via lead selection node_order_partners = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_partners ). elem_order_partners = node_order_partners->get_element( ). elem_order_partners->get_static_attributes( IMPORTING static_attributes = stru_order_partners ). DATA: v_sales_doc TYPE bapivbeln-vbeln. DATA: w_order_header_in TYPE bapisdhd1, i_order_header_in TYPE table of 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_conditions_in TYPE TABLE OF bapicond, w_order_conditions_in TYPE bapicond, w_order_SCHDL type BAPISCHDL, i_order_SCHDL type table of BAPISCHDL. * Order Header Details CLEAR: w_order_header_in, i_order_partners, i_return, i_order_items_in, i_order_conditions_in, w_order_SCHDL, i_order_SCHDL. refresh : i_order_partners, i_return, i_order_items_in, i_order_conditions_in, i_order_SCHDL. w_order_header_in-doc_type = stru_order_header-doc_type. w_order_header_in-sales_org = stru_order_header-sales_org. w_order_header_in-distr_chan = stru_order_header-distr_chan. w_order_header_in-division = stru_order_header-division. w_order_header_in-req_date_h = stru_order_header-req_date_h. w_order_header_in-sales_dist = stru_order_header-sales_dist. w_order_header_in-purch_no_c = stru_order_header-purch_no_c. * Order Item Details CLEAR: i_order_items_in,w_order_items_in. * w_order_items_in-itm_num = stru_order_items-itm_num. w_order_items_in-ITM_NUMBER = stru_order_items-ITM_NUMBER. w_order_items_in-material = stru_order_items-material. w_order_items_in-target_qty = stru_order_items-target_qty."'5'. w_order_items_in-target_qu = stru_order_items-target_qu."'5'. w_order_items_in-plant = stru_order_items-plant. w_order_items_in-target_val = stru_order_items-target_val. w_order_items_in-currency = stru_order_items-currency. 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. * Order Partner Details CLEAR: i_order_partners,w_order_partners. w_order_partners-partn_role = stru_order_partners-partn_role. w_order_partners-partn_numb = stru_order_partners-partn_numb. 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. * Order Condition Details w_order_SCHDL-ITM_NUMBER = stru_order_items-itm_number." '000010'. w_order_SCHDL-req_qty = stru_order_items-target_qty." '5'. APPEND w_order_SCHDL to i_order_SCHDL. * Create Sales Order BAPI Call *loop at i_order_header_in into w_order_header_in. CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2' EXPORTING order_header_in = w_order_header_in IMPORTING salesdocument = v_sales_doc TABLES return = i_return order_items_in = i_order_items_in order_partners = i_order_partners order_schedules_in = i_order_SCHDL order_conditions_in = i_order_conditions_in. * Get message manager DATA: l_current_controller TYPE REF TO if_wd_controller, l_message_manager TYPE REF TO if_wd_message_manager. l_current_controller ?= wd_this->wd_get_api( ). CALL METHOD l_current_controller->get_message_manager RECEIVING message_manager = l_message_manager. DATA: v_message_text TYPE string. * When Sales Order is created commit the data IF NOT v_sales_doc IS INITIAL. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X'. CONCATENATE 'Sales Document' v_sales_doc 'has been created.' INTO v_message_text SEPARATED BY space. * Report Success message CALL METHOD l_message_manager->report_success EXPORTING message_text = v_message_text. ELSE. v_message_text = 'Error Creating Sales Order'. * Report Error message CALL METHOD l_message_manager->report_error_message EXPORTING message_text = v_message_text. ENDIF. *endloop. endmethod. and code for table control i am using is method WDDOINIT . Types : Begin of item_tab, itm_number type bapisditm-itm_number, material type bapisditm-material, plant type bapisditm-plant , target_qty type bapisditm-target_qty, target_qu type bapisditm-target_qu, target_val type bapisditm-target_val, currency type bapisditm-currency, end of item_tab. *Creating internal table and Work Area of the same structure *as that of the Node created. Data : it_item type standard table of item_tab, wa_item type item_tab. *Appending Blank Work Area to Internal table. ***********************************************888 *LOOP AT it_item INTO wa_item. **wa_item-itm_number to bapisditm-itm_number. **wa_item-material to bapisditm-material. **wa_item-plant to bapisditm-plant. **wa_item-target_qty to bapisditm-target_qty. **wa_item-target_qu to bapisditm-target_qu. **wa_item-target_val to bapisditm-target_val. **wa_item-currency to bapisditm-currency. ** * APPEND wa_item TO it_item. *ENDLOOP. **********************************************88 ******** Do 10 times. Append wa_item to it_item. enddo. ********* "Binding the table DATA lo_nd_order_items TYPE REF TO if_wd_context_node. * DATA lt_material TYPE wd_this->Elements_material. * navigate from to via lead selection lo_nd_order_items = wd_context->get_child_node( name = wd_this->wdctx_order_items ). * @TODO handle non existant child * IF lo_nd_material IS INITIAL. * ENDIF. ** @TODO compute values ** e.g. call a model function * lo_nd_order_items->bind_table( new_items = it_item set_initial_elements = abap_true ). endmethod.

    DATA: node_order_header TYPE REF TO if_wd_context_node, elem_order_header TYPE REF TO if_wd_context_element, stru_order_header TYPE if_componentcontroller=>element_order_header . * Declaration for Order Items Node DATA: node_order_items TYPE REF TO if_wd_context_node, elem_order_items TYPE REF TO if_wd_context_element, stru_order_items TYPE if_componentcontroller=>element_order_items . * Declaration for Order Partners Node DATA: node_order_partners TYPE REF TO if_wd_context_node, elem_order_partners TYPE REF TO if_wd_context_element, stru_order_partners TYPE if_componentcontroller=>element_order_partners . node_order_header = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_header ). elem_order_header = node_order_header->get_element( ). elem_order_header->get_static_attributes( IMPORTING static_attributes = stru_order_header ). * via lead selection node_order_items = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_items ). elem_order_items = node_order_items->get_element( ). elem_order_items->get_static_attributes( IMPORTING static_attributes = stru_order_items ). * via lead selection node_order_partners = wd_context->get_child_node( name = if_componentcontroller=>wdctx_order_partners ). elem_order_partners = node_order_partners->get_element( ). elem_order_partners->get_static_attributes( IMPORTING static_attributes = stru_order_partners ). DATA: v_sales_doc TYPE bapivbeln-vbeln. DATA: w_order_header_in TYPE bapisdhd1, i_order_header_in TYPE table of 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_conditions_in TYPE TABLE OF bapicond, w_order_conditions_in TYPE bapicond, w_order_SCHDL type BAPISCHDL, i_order_SCHDL type table of BAPISCHDL. * Order Header Details CLEAR: w_order_header_in, i_order_partners, i_return, i_order_items_in, i_order_conditions_in, w_order_SCHDL, i_order_SCHDL. refresh : i_order_partners, i_return, i_order_items_in, i_order_conditions_in, i_order_SCHDL. w_order_header_in-doc_type = stru_order_header-doc_type. w_order_header_in-sales_org = stru_order_header-sales_org. w_order_header_in-distr_chan = stru_order_header-distr_chan. w_order_header_in-division = stru_order_header-division. w_order_header_in-req_date_h = stru_order_header-req_date_h. w_order_header_in-sales_dist = stru_order_header-sales_dist. w_order_header_in-purch_no_c = stru_order_header-purch_no_c. * Order Item Details CLEAR: i_order_items_in,w_order_items_in. * w_order_items_in-itm_num = stru_order_items-itm_num. w_order_items_in-ITM_NUMBER = stru_order_items-ITM_NUMBER. w_order_items_in-material = stru_order_items-material. w_order_items_in-target_qty = stru_order_items-target_qty."'5'. w_order_items_in-target_qu = stru_order_items-target_qu."'5'. w_order_items_in-plant = stru_order_items-plant. w_order_items_in-target_val = stru_order_items-target_val. w_order_items_in-currency = stru_order_items-currency. 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. * Order Partner Details CLEAR: i_order_partners,w_order_partners. w_order_partners-partn_role = stru_order_partners-partn_role. w_order_partners-partn_numb = stru_order_partners-partn_numb. 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. * Order Condition Details w_order_SCHDL-ITM_NUMBER = stru_order_items-itm_number." '000010'. w_order_SCHDL-req_qty = stru_order_items-target_qty." '5'. APPEND w_order_SCHDL to i_order_SCHDL. * Create Sales Order BAPI Call *loop at i_order_header_in into w_order_header_in. CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2' EXPORTING order_header_in = w_order_header_in IMPORTING salesdocument = v_sales_doc TABLES return = i_return order_items_in = i_order_items_in order_partners = i_order_partners order_schedules_in = i_order_SCHDL order_conditions_in = i_order_conditions_in. * Get message manager DATA: l_current_controller TYPE REF TO if_wd_controller, l_message_manager TYPE REF TO if_wd_message_manager. l_current_controller ?= wd_this->wd_get_api( ). CALL METHOD l_current_controller->get_message_manager RECEIVING message_manager = l_message_manager. DATA: v_message_text TYPE string. * When Sales Order is created commit the data IF NOT v_sales_doc IS INITIAL. CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' EXPORTING wait = 'X'. CONCATENATE 'Sales Document' v_sales_doc 'has been created.' INTO v_message_text SEPARATED BY space. * Report Success message CALL METHOD l_message_manager->report_success EXPORTING message_text = v_message_text. ELSE. v_message_text = 'Error Creating Sales Order'. * Report Error message CALL METHOD l_message_manager->report_error_message EXPORTING message_text = v_message_text. ENDIF. *endloop. endmethod. and code for table control i am using is method WDDOINIT . Types : Begin of item_tab, itm_number type bapisditm-itm_number, material type bapisditm-material, plant type bapisditm-plant , target_qty type bapisditm-target_qty, target_qu type bapisditm-target_qu, target_val type bapisditm-target_val, currency type bapisditm-currency, end of item_tab. *Creating internal table and Work Area of the same structure *as that of the Node created. Data : it_item type standard table of item_tab, wa_item type item_tab. *Appending Blank Work Area to Internal table. ***********************************************888 *LOOP AT it_item INTO wa_item. **wa_item-itm_number to bapisditm-itm_number. **wa_item-material to bapisditm-material. **wa_item-plant to bapisditm-plant. **wa_item-target_qty to bapisditm-target_qty. **wa_item-target_qu to bapisditm-target_qu. **wa_item-target_val to bapisditm-target_val. **wa_item-currency to bapisditm-currency. ** * APPEND wa_item TO it_item. *ENDLOOP. **********************************************88 ******** Do 10 times. Append wa_item to it_item. enddo. ********* "Binding the table DATA lo_nd_order_items TYPE REF TO if_wd_context_node. * DATA lt_material TYPE wd_this->Elements_material. * navigate from to via lead selection lo_nd_order_items = wd_context->get_child_node( name = wd_this->wdctx_order_items ). * @TODO handle non existant child * IF lo_nd_material IS INITIAL. * ENDIF. ** @TODO compute values ** e.g. call a model function * lo_nd_order_items->bind_table( new_items = it_item set_initial_elements = abap_true ). endmethod.

  • Sales order creation with bapi in webdynpro

    When i use table control to update the line items only first row is getting updated in the sale order creation and the loop is not updating the other row to header only the first row is getting saved, for the same set of  data sale order is getting created in  va01 for multiple line items.
    Pls give me some idea to resolve this issue,
    here is the code i am using for creating sale order using bapi 'BAPI_SALESORDER_CREATEFROMDAT2'
    method CREATE_SALES_ORDER .
    Declaration for Order Header Node
    DATA: node_order_header TYPE REF TO if_wd_context_node,
           elem_order_header TYPE REF TO if_wd_context_element,
           stru_order_header TYPE if_componentcontroller=>element_order_header .
    Declaration for Order Items Node
    DATA: node_order_items TYPE REF TO if_wd_context_node,
           elem_order_items TYPE REF TO if_wd_context_element,
           stru_order_items TYPE if_componentcontroller=>element_order_items .
    Declaration for Order Partners Node
    DATA: node_order_partners TYPE REF TO if_wd_context_node,
    elem_order_partners TYPE REF TO if_wd_context_element,
    stru_order_partners TYPE if_componentcontroller=>element_order_partners .
    node_order_header = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_header
    elem_order_header = node_order_header->get_element( ).
    elem_order_header->get_static_attributes(
    IMPORTING static_attributes = stru_order_header
    <ORDER_ITEMS> via lead selection
    node_order_items = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_items ).
    elem_order_items = node_order_items->get_element( ).
    elem_order_items->get_static_attributes(
    IMPORTING static_attributes = stru_order_items ).
    <ORDER_PARTNERS> via lead selection
    node_order_partners = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_partners ).
    elem_order_partners = node_order_partners->get_element( ).
    elem_order_partners->get_static_attributes(
    IMPORTING static_attributes = stru_order_partners ).
    DATA: v_sales_doc TYPE bapivbeln-vbeln.
    DATA: w_order_header_in TYPE bapisdhd1,
          i_order_header_in TYPE table of 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_conditions_in TYPE TABLE OF bapicond,
          w_order_conditions_in TYPE bapicond,
          w_order_SCHDL type  BAPISCHDL,
          i_order_SCHDL type table of BAPISCHDL.
    Order Header Details
    CLEAR: w_order_header_in, i_order_partners, i_return, i_order_items_in,
              i_order_conditions_in, w_order_SCHDL, i_order_SCHDL.
    refresh : i_order_partners, i_return, i_order_items_in,
              i_order_conditions_in, i_order_SCHDL.
    w_order_header_in-doc_type = stru_order_header-doc_type.
    w_order_header_in-sales_org = stru_order_header-sales_org.
    w_order_header_in-distr_chan = stru_order_header-distr_chan.
    w_order_header_in-division = stru_order_header-division.
    w_order_header_in-req_date_h = stru_order_header-req_date_h.
    w_order_header_in-sales_dist = stru_order_header-sales_dist.
    w_order_header_in-purch_no_c = stru_order_header-purch_no_c.
    Order Item Details
      CLEAR: i_order_items_in,w_order_items_in.
    w_order_items_in-itm_num = stru_order_items-itm_num.
    w_order_items_in-ITM_NUMBER =  stru_order_items-ITM_NUMBER.
    w_order_items_in-material = stru_order_items-material.
    w_order_items_in-target_qty = stru_order_items-target_qty."'5'.
    w_order_items_in-target_qu = stru_order_items-target_qu."'5'.
    w_order_items_in-plant = stru_order_items-plant.
    w_order_items_in-target_val = stru_order_items-target_val.
    w_order_items_in-currency = stru_order_items-currency.
    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.
    Order Partner Details
    CLEAR: i_order_partners,w_order_partners.
    w_order_partners-partn_role = stru_order_partners-partn_role.
    w_order_partners-partn_numb = stru_order_partners-partn_numb.
    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.
    Order Condition Details
    w_order_SCHDL-ITM_NUMBER  = stru_order_items-itm_number." '000010'.
             w_order_SCHDL-req_qty     = stru_order_items-target_qty." '5'.
              APPEND w_order_SCHDL to i_order_SCHDL.
    Create Sales Order BAPI Call
    *loop at i_order_header_in into  w_order_header_in.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
    EXPORTING
       order_header_in = w_order_header_in
       IMPORTING
         salesdocument = v_sales_doc
         TABLES
           return = i_return
           order_items_in = i_order_items_in
           order_partners = i_order_partners
            order_schedules_in  = i_order_SCHDL
           order_conditions_in = i_order_conditions_in.
    Get message manager
      DATA: l_current_controller TYPE REF TO if_wd_controller,
            l_message_manager    TYPE REF TO if_wd_message_manager.
      l_current_controller ?= wd_this->wd_get_api( ).
      CALL METHOD l_current_controller->get_message_manager
        RECEIVING
          message_manager = l_message_manager.
      DATA: v_message_text TYPE string.
    When Sales Order is created commit the data
    IF NOT v_sales_doc IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
          wait = 'X'.
        CONCATENATE 'Sales Document' v_sales_doc 'has been created.'
        INTO v_message_text SEPARATED BY space.
    Report Success message
        CALL METHOD l_message_manager->report_success
        EXPORTING message_text = v_message_text.
        ELSE.
          v_message_text = 'Error Creating Sales Order'.
    Report Error message
          CALL METHOD l_message_manager->report_error_message
          EXPORTING message_text = v_message_text.
          ENDIF.
    *endloop.
    endmethod.
    and code for table control i am using is
    method WDDOINIT .
      Types : Begin of item_tab,
            itm_number  type bapisditm-itm_number,
            material type bapisditm-material,
            plant type bapisditm-plant ,
            target_qty type bapisditm-target_qty,
            target_qu type bapisditm-target_qu,
            target_val type bapisditm-target_val,
        currency type bapisditm-currency,
            end of item_tab.
    *Creating internal table and Work Area of the same structure
    *as that of the Node created.
    Data : it_item type standard table of item_tab,
            wa_item type item_tab.
    *Appending Blank Work Area to Internal table.
    ***********************************************888
    *LOOP AT it_item INTO wa_item.
    **wa_item-itm_number to  bapisditm-itm_number.
    **wa_item-material to bapisditm-material.
    **wa_item-plant to bapisditm-plant.
    **wa_item-target_qty to bapisditm-target_qty.
    **wa_item-target_qu to bapisditm-target_qu.
    **wa_item-target_val to bapisditm-target_val.
    **wa_item-currency to bapisditm-currency.
       APPEND wa_item TO it_item.
    *ENDLOOP.
    **********************************************88
    Do 10 times.
    Append wa_item to it_item.
    enddo.
    "Binding the table
    DATA lo_nd_order_items TYPE REF TO if_wd_context_node.
    DATA lt_material TYPE wd_this->Elements_material.
    navigate from <CONTEXT> to <MATERIAL> via lead selection
      lo_nd_order_items = wd_context->get_child_node( name = wd_this->wdctx_order_items ).
    @TODO handle non existant child
    IF lo_nd_material IS INITIAL.
    ENDIF.
    @TODO compute values
    e.g. call a model function
      lo_nd_order_items->bind_table( new_items =
      it_item set_initial_elements = abap_true ).
    endmethod.

    When i use table control to update the line items only first row is getting updated in the sale order creation and the loop is not updating the other row to header only the first row is getting saved, for the same set of  data sale order is getting created in  va01 for multiple line items.
    Pls give me some idea to resolve this issue,
    here is the code i am using for creating sale order using bapi 'BAPI_SALESORDER_CREATEFROMDAT2'
    method CREATE_SALES_ORDER .
    Declaration for Order Header Node
    DATA: node_order_header TYPE REF TO if_wd_context_node,
           elem_order_header TYPE REF TO if_wd_context_element,
           stru_order_header TYPE if_componentcontroller=>element_order_header .
    Declaration for Order Items Node
    DATA: node_order_items TYPE REF TO if_wd_context_node,
           elem_order_items TYPE REF TO if_wd_context_element,
           stru_order_items TYPE if_componentcontroller=>element_order_items .
    Declaration for Order Partners Node
    DATA: node_order_partners TYPE REF TO if_wd_context_node,
    elem_order_partners TYPE REF TO if_wd_context_element,
    stru_order_partners TYPE if_componentcontroller=>element_order_partners .
    node_order_header = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_header
    elem_order_header = node_order_header->get_element( ).
    elem_order_header->get_static_attributes(
    IMPORTING static_attributes = stru_order_header
    <ORDER_ITEMS> via lead selection
    node_order_items = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_items ).
    elem_order_items = node_order_items->get_element( ).
    elem_order_items->get_static_attributes(
    IMPORTING static_attributes = stru_order_items ).
    <ORDER_PARTNERS> via lead selection
    node_order_partners = wd_context->get_child_node(
    name = if_componentcontroller=>wdctx_order_partners ).
    elem_order_partners = node_order_partners->get_element( ).
    elem_order_partners->get_static_attributes(
    IMPORTING static_attributes = stru_order_partners ).
    DATA: v_sales_doc TYPE bapivbeln-vbeln.
    DATA: w_order_header_in TYPE bapisdhd1,
          i_order_header_in TYPE table of 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_conditions_in TYPE TABLE OF bapicond,
          w_order_conditions_in TYPE bapicond,
          w_order_SCHDL type  BAPISCHDL,
          i_order_SCHDL type table of BAPISCHDL.
    Order Header Details
    CLEAR: w_order_header_in, i_order_partners, i_return, i_order_items_in,
              i_order_conditions_in, w_order_SCHDL, i_order_SCHDL.
    refresh : i_order_partners, i_return, i_order_items_in,
              i_order_conditions_in, i_order_SCHDL.
    w_order_header_in-doc_type = stru_order_header-doc_type.
    w_order_header_in-sales_org = stru_order_header-sales_org.
    w_order_header_in-distr_chan = stru_order_header-distr_chan.
    w_order_header_in-division = stru_order_header-division.
    w_order_header_in-req_date_h = stru_order_header-req_date_h.
    w_order_header_in-sales_dist = stru_order_header-sales_dist.
    w_order_header_in-purch_no_c = stru_order_header-purch_no_c.
    Order Item Details
      CLEAR: i_order_items_in,w_order_items_in.
    w_order_items_in-itm_num = stru_order_items-itm_num.
    w_order_items_in-ITM_NUMBER =  stru_order_items-ITM_NUMBER.
    w_order_items_in-material = stru_order_items-material.
    w_order_items_in-target_qty = stru_order_items-target_qty."'5'.
    w_order_items_in-target_qu = stru_order_items-target_qu."'5'.
    w_order_items_in-plant = stru_order_items-plant.
    w_order_items_in-target_val = stru_order_items-target_val.
    w_order_items_in-currency = stru_order_items-currency.
    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.
    Order Partner Details
    CLEAR: i_order_partners,w_order_partners.
    w_order_partners-partn_role = stru_order_partners-partn_role.
    w_order_partners-partn_numb = stru_order_partners-partn_numb.
    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.
    Order Condition Details
    w_order_SCHDL-ITM_NUMBER  = stru_order_items-itm_number." '000010'.
             w_order_SCHDL-req_qty     = stru_order_items-target_qty." '5'.
              APPEND w_order_SCHDL to i_order_SCHDL.
    Create Sales Order BAPI Call
    *loop at i_order_header_in into  w_order_header_in.
    CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
    EXPORTING
       order_header_in = w_order_header_in
       IMPORTING
         salesdocument = v_sales_doc
         TABLES
           return = i_return
           order_items_in = i_order_items_in
           order_partners = i_order_partners
            order_schedules_in  = i_order_SCHDL
           order_conditions_in = i_order_conditions_in.
    Get message manager
      DATA: l_current_controller TYPE REF TO if_wd_controller,
            l_message_manager    TYPE REF TO if_wd_message_manager.
      l_current_controller ?= wd_this->wd_get_api( ).
      CALL METHOD l_current_controller->get_message_manager
        RECEIVING
          message_manager = l_message_manager.
      DATA: v_message_text TYPE string.
    When Sales Order is created commit the data
    IF NOT v_sales_doc IS INITIAL.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
          wait = 'X'.
        CONCATENATE 'Sales Document' v_sales_doc 'has been created.'
        INTO v_message_text SEPARATED BY space.
    Report Success message
        CALL METHOD l_message_manager->report_success
        EXPORTING message_text = v_message_text.
        ELSE.
          v_message_text = 'Error Creating Sales Order'.
    Report Error message
          CALL METHOD l_message_manager->report_error_message
          EXPORTING message_text = v_message_text.
          ENDIF.
    *endloop.
    endmethod.
    and code for table control i am using is
    method WDDOINIT .
      Types : Begin of item_tab,
            itm_number  type bapisditm-itm_number,
            material type bapisditm-material,
            plant type bapisditm-plant ,
            target_qty type bapisditm-target_qty,
            target_qu type bapisditm-target_qu,
            target_val type bapisditm-target_val,
        currency type bapisditm-currency,
            end of item_tab.
    *Creating internal table and Work Area of the same structure
    *as that of the Node created.
    Data : it_item type standard table of item_tab,
            wa_item type item_tab.
    *Appending Blank Work Area to Internal table.
    ***********************************************888
    *LOOP AT it_item INTO wa_item.
    **wa_item-itm_number to  bapisditm-itm_number.
    **wa_item-material to bapisditm-material.
    **wa_item-plant to bapisditm-plant.
    **wa_item-target_qty to bapisditm-target_qty.
    **wa_item-target_qu to bapisditm-target_qu.
    **wa_item-target_val to bapisditm-target_val.
    **wa_item-currency to bapisditm-currency.
       APPEND wa_item TO it_item.
    *ENDLOOP.
    **********************************************88
    Do 10 times.
    Append wa_item to it_item.
    enddo.
    "Binding the table
    DATA lo_nd_order_items TYPE REF TO if_wd_context_node.
    DATA lt_material TYPE wd_this->Elements_material.
    navigate from <CONTEXT> to <MATERIAL> via lead selection
      lo_nd_order_items = wd_context->get_child_node( name = wd_this->wdctx_order_items ).
    @TODO handle non existant child
    IF lo_nd_material IS INITIAL.
    ENDIF.
    @TODO compute values
    e.g. call a model function
      lo_nd_order_items->bind_table( new_items =
      it_item set_initial_elements = abap_true ).
    endmethod.

  • Update error in  RV_SALES_DOCUMENT_ADD during Sales order creation

    I get an Update/ ABAP runtime error during Sales order creation. The error occurs during processing of the update module -RV_SALES_DOCUMENT_ADD.
    This error does not occuring always, as I am sometimes able to create a Sales order without getting update error. I am getting the error of all types of Sales orders and even contracts.
    Am I missing any configuration parameters?
    Thanks,
    Chitra

    Yes , I can see the error in ST22.
    While exceuting VA01 (Oder type OR, Entering Sold-to-party, Purchase order NO, Material, Qty, Plant),
    - I get run-time error "Run-time error "GETWA_NOT_ASSIGNED" occurred".
        Analysis of error shows:
         Update terminated in "Update module: RV_SALES_DOCUMENT_ADD"
          Fails in the Read table in one of the form
            Termination occurred in the ABAP program "SAPLV45U" - in "VBAP_BEARBEITEN"
    The main program was "RSM13000 ". In the source code you have the termination point in
    line 147 (READ TABLE FYVBAP WITH KEY VBAP_KEY.)
    of the (Include) program "LV45UF0V".
    The ABAP's say the functional module is trying to do an 'UPDATE' instead of 'INSERT" in the internal table FYVBAP.
    Thanks,
    Csuman

  • LSMW Sales Order creation using Bapi method

    Hi folks ,
    iam doing Lsmw bapimethod ,sales order creation .In the step start idoc processing iam getting error "Has Not been Accepted for Processing ",why iam not getting plz let me know points will be awarded for all answers .

    Hi,
              You need to set the IDOC settings in the initial LSMW screen. It will be there in menu path.
           Award points if helpful
    Regards,
    RamaKrishna C

  • BAPI for Sales Order Creation.

    Hello gurus,
    I want to create a sales order using BAPI.
    I have tried some BAPI's like BAPI_SALESORDER_CREATEFROMDAT1, BAPI_SALESORDER_CREATEFROMDAT2, BAPI_SALESORDER_CREATEFROMDATA, BAPI_SALESDOCU_CREATEWITHDIA.
    But I am not able to update the Miscellaneous Information like Mode of transport(VBAP-OIC_MOT), Forwarding Agent(VBAP-OIC_LIFNR), Base Location(VBAP-OIA_BASELO), Truck Number(VBAP-OIC_TRUCKN), Pipeline trip No.(VBAP-OIC_PTRIP), Pipeline operator´s external batch number(VBAP-OIC_PBATCH).
    Is there any other BAPI thru which i can update these fields while creation of Sales Order.
    The Fields which I can provide to BAPI as import parameter is:
    Order Type(VBAK-AUART),
    Contract(VBAK_VGBEL),
    SALES Org (VBAK-VGORT),
    Dist Channel(VBAK-VTWEG),
    Division (VBAK-SPART),
    Open Quantity (VBAK-KWMENG)
    Plant(VBAP-WERKS)
    Storage Location (VBAP-LGORT)
    Mode of transport(VBAP-OIC_MOT), Forwarding Agent(VBAP-OIC_LIFNR), Base Location(VBAP-OIA_BASELO), Truck Number(VBAP-OIC_TRUCKN), Pipeline trip No.(VBAP-OIC_PTRIP), Pipeline operator´s external batch number(VBAP-OIC_PBATCH).
    Thanks In Advance,
    Points will be rewarded for Best Solution......
    Yogesh Sharma

    hi,
    I can give u a suggestion .. try it ..
    its a quite a long process....
    in BAPI_SALESORDER_CREATEFROMDAT2
    there is a table EXTENSIONIN...
    here u can add append structure and carry on ur sales order creation
    Follow the process
    Customer Enhancement for VBAK, VBAP, VBEP
    Description
    You can use this parameter to transfer user-specific enhancments to a BAPI. The customer has to complete the EXTENSION structure and the system automatically continues processing it. If you have not defined any user-specific fields, then you can transfer a blank EXTENSIONIN structure.
    Technical information about Customer Enhancements
    The following description uses an example to explain how to proceed with customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.
    The customer has added their own fields to table VBAP using the INCLUDE structure CUTEST. This structure contains 2 fields:
    CFIELD1, CHAR 10
    CFIELD2, CHAR 3.
    The customer also requires that these two fields can be maintained with the BAPI.
    1. Maintain structure CUTEST in table VBAP
    2. Because the BAPIs work with checkboxes, you must also define a CUTESTX checkbox for the customer structure. It should be structured like this:
    Field name       Data element
    CFIELD1            CHAR1
    CFIELD2          CHAR1
    3. Define these customer structures in the structures VBAPKOZ und VBAPKOZX using INCLUDE or APPEND.
    4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI structures using the APPEND technique.
    5. Adjust the following structures for customer enhancements to table VBAK:
    a) VBAKKOZ
    b) VBAKKOZX
    c) BAPE_VBAK
    d) BAPE_VBAKX
    6. Adjust the following structures for customer enhancements to table VBEK:
    a) VBEPKOZ
    b) VBEPKOZX
    c) BAPE_VBEP
    d) BAPE_VBEPX
    7. Generally, the data should be added to the BAPI interface in the internal communication structures (VBAKKOM, and so on). There, you can process the data in the SD tables (VBAK, and so on).
    8. If the EXTENSIONIN parameter contains customer data, you must complete at least the key fields in the relevant standard parameters.
    For example:
    You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
    The following entries are expected:
    Import:     BAPIVBELN-VBELN       = '0000004711'  Document number
                BAPISDHD1X-UPDATEFLAG = 'U'           UPDKZ for doc header
    Tables:     BAPISDITM-ITM_NUMBER  = '000020'      Item number
                BAPISDITMX-ITM_NUMBER = '000020'      Item number
              + BAPISDITMX-UPDATEFLAG = 'U'           UPDKZ for item
    You must complete the EXTENSION table as follows:
    STRUCTURE                          VALUEPART1       1234561234567890123
    BAPE_VBAP                       0000004711000020                 XYZ
    BAPE_VBAPX                      0000004711000020       X
    Further Information
    You can find more information in the BAPI programming guide in the chapter for enhancements to BAPIs.
    Notes
    You must complete the STRUCTURE field with the name of the relevant enhancement structure (BAPE_VBAK, BAPE_VBAP, BAPE_VBEP). You can complete the remaining fields with the append structures from the enhancement structures.
    At the moment, you can use the BAPI to store enhancements in the following structures:
    VBAK : An enhancement to header data requires an append structure to BAPE_VBAK and an enhancement to structure VBAKKOZ.
    VBAP : An enhancement to item data requires an append structure to BAPE_VBAP and an enhancment to structure VBAPKOZ.
    VBEP : An enhancement to schedule line data requires an append structure to BAPE_VBEP and an enhancement to structure VBEPKOZ.
    VBKD : If you are using an enhancement for header data, you must add an append structure to BAPE_VBAK. You also need to enhance structure VBAKKOZ. If it is for item data, you need to add an append structure to BAPE_VBAP. You must also enhance structure VBAPKOZ.
    If you also want to work with checkboxes, each X-structure must also contain an append structure.
    For example:
    A customer has created an order and wants to include the material long text (50 digits long).
    The EXTENSIONIN structure must be completed with BAPE_VBAP. Two fields have fixed definitions in this structure. These are in the VBAP host key (VBELN, POSNR). The customer sets up an append structure that contains field ZMAT50.
    Because the VBELN is normally blank when you create an order, the data can look like this:
    STRUCTURE   |BAPE_VBAP
    VALUEPART1  |          000010Customermateriallongtext50
                  VBELN     POSNR ZMAT50

  • Reg:IDOC -sales order creation

    Hi All,
         I am trying  to create sales order through IDOCS.Basic type is SALESORDER_CREATEFROMDAT201.
    My requirement is to know any user-exits where in I need to add to my code to hardstop sales order creation if the storage location which I am passing is marked for deletion.
    Kindly reply as soon as possible.
    Regards,
    Kaveri

    Hi,
    Check this one it will help u how to enhance the idocs.
    If we wnat to extend the idoc use the segments for adding the fields. use the tcode WE30 and we31.
    Please reward points if it is useful.
    Go through the following Steps For ALE/IDOC
    ALE IDOC
    Sending System(Outbound ALE Process)
    Tcode SALE ? for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ? Create Model View
    Tcode BD82 ? Generate partner Profiles & Create Ports
    Tcode BD64 ? Distribute the Model view
    Message Type MATMAS
    Tcode BD10 ? Send Material Data
    Tcode WE05 ? Idoc List for watching any Errors
    Receiving System(Inbound ALE )
    Tcode SALE ? for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 ? Check for Model view whether it has distributed or not
    Tcode BD82 -- Generate partner Profiles & Create Ports
    Tcode BD11 Getting Material Data
    Tcode WE05 ? Idoc List for inbound status codes
    ALE IDOC Steps
    Sending System(Outbound ALE Process)
    Tcode SALE ?3 for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 !V Create Model View
    Tcode BD82 !V Generate partner Profiles & Create Ports
    Tcode BD64 !V Distribute the Model view
    This is Receiving system Settings
    Receiving System(Inbound ALE )
    Tcode SALE ?3 for
    a) Define Logical System
    b) Assign Client to Logical System
    Tcode SM59-RFC Destination
    Tcode BD64 !V Check for Model view whether it has distributed or not
    Tcode BD82 -- Generate partner Profiles & Create Ports
    Tcode BD11 Getting Material Data
    Tcode WE05 !V Idoc List for inbound status codes
    Message Type MATMAS
    Tcode BD10 !V Send Material Data
    Tcode WE05 !V Idoc List for watching any Errors
    1)a Goto Tcode SALE
    Click on Sending & Receiving Systems-->Select Logical Systems
    Here Define Logical Systems---> Click on Execute Button
    go for new entries
    1) System Name : ERP000
    Description : Sending System
    2) System Name : ERP800
    Description : Receiving System
    press Enter & Save
    it will ask Request
    if you want new request create new Request orpress continue for transfering the objects
    B) goto Tcode SALE
    Select Assign Client to Logical Systems-->Execute
    000--> Double click on this
    Give the following Information
    Client : ERP 000
    City :
    Logical System
    Currency
    Client role
    Save this Data
    Step 2) For RFC Creation
    Goto Tcode SM59-->Select R/3 Connects
    Click on Create Button
    RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports automatically while generating the partner profiles
    give the information for required fields
    RFC Destination : ERP800
    Connection type: 3
    Description
    Target Host : ERP000
    System No:000
    lan : EN
    Client : 800
    User : Login User Name
    Password:
    save this & Test it & RemortLogin
    3)
    Goto Tcode BD64 -- click on Change mode button
    click on create moduleview
    short text : xxxxxxxxxxxxxx
    Technical Neme : MODEL_ALV
    save this & Press ok
    select your just created modelview Name :'MODEL_ALV'.
    goto add message type
    Model Name : MODEL_ALV
    sender : ERP000
    Receiver : ERP800
    Message type :MATMAS
    save & Press Enter
    4) Goto Tcode BD82
    Give Model View : MODEL_ALV
    Partner system : ERP800
    execute this by press F8 Button
    it will gives you sending system port No :A000000015(Like)
    5) Goto Tcode BD64
    seelct the modelview
    goto >edit>modelview-->distribute
    press ok & Press enter
    6)goto Tcode : BD10 for Material sending
    Material : mat_001
    Message Type : MATMAS
    Logical System : ERP800
    and Execute
    7)goto Tcode : BD11 for Material Receiving
    Material : mat_001
    Message Type : MATMAS
    and Execute --> 1 request idoc created for message type Matmas
    press enter
    Here Master Idoc set for Messge type MATMAS-->press Enter
    1 Communication Idoc generated for Message Type
    this is your IDOC
    Change Pointers
    I know how to change the description of a material using ALE Change Pointers.
    I will give the following few steps
    1) Tcode BD61---> check the change pointers activated check box
    save and goback.
    2) Tcode BD50---> check the MATMAS check box save and comeback.
    3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.
    4) Tcode BD52---> give message type : matmas press ok button.
    select all what ever you want and delete remaining fields.
    save & come back.
    5) 5) go to Tcode MM02 select one material and try to change the description and save it
    it will effects the target systems material desciption will also changes
    6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute
    give Message type : MATMAS and Executte
    ALE/IDOC Status Codes/Messages
    01 Error --> Idoc Added
    30 Error --> Idoc ready for dispatch(ALE Service)
    then goto SE38 --> Execute the Program RBDMIDOC
    29 Error --> ALE Service Layer
    then goto SE38 --> Execute the Program RSEOUT00
    03 Error --> Data Passed to Port ok
    then goto SE38 --> Execute the Program RBDMOIND
    12 Error --> Dispatch ok
    Inbound Status Codes
    50 Error --> It will go for ALE Service Layer
    56 Error --> Idoc with Errors added
    51 Error --> Application Document not posted
    65 Error --> Error in ALE Service Layer
    for 51 or 56 Errors do the following steps
    goto WE19 > give the IDOC Number and Execute>
    Press on Inbound function Module
    for 65 Error --> goto SE38 --> Execute the Program RBDAPP01 then your getting 51 Error
    regards,
    satish.

  • Sales Order creation in R3 system using APO TLB functionality

    Dear All,
    Is there a way to create / trigger sales order creation in the R3 system using TLB shipments or using TLB functionality ?
    Kindly describe the steps
    Thanks
    Sridhar R

    Hi,
    During the AC for the sales Order, the delivery date for the sales orders depends upon whether you are checking with Replinishment lead time or not.( Defined for the combination of checking group and Checking rule in Checking Scope)
    The RLT is the time necessary to provide a material either by in-house production or by external procurement.
    For external procurement, the replenishment lead time consists of the purchasing department processing time, planned delivery time, and goods receipt processing time and the  ATP check only includes the planned delivery time.
    1.If the replenishment lead time is taken into consideration,the  availability is checked only for requirements within the replenishment lead time. Requirements outside the replenishment lead time are considered to be available as the system assumes that these materials can be provided by planning within the replenishment lead time.
    2. If a requirement cannot be covered by receipts, the end of the replenishment lead time is the earliest date that the material can be confirmed.
    3.If the replenishment lead time is not taken into consideration, the availability is checked for each requirement time without taking the replenishment lead time into consideration.
    Thanks,
    nandha

  • Days since Sales Order creation excluding holidays in factory calender

    Hello,
    Can anyone pls tell me the logic to retrieve the Days since Sales Order creation excluding the holidays in Swedish factory calender.
    Current logic which we have thought of is 
    (The first succesful output - Order creation date)
    But the result should exclude the Swedish Factory calender holidays (our client is from  Sweden)
    Now we need to establish the logic of fitting the factory calender into this whole issue. As we have to provide the logic to our ABAP er .
    Waiting to hear from u all.......
    Regards,
    Anirban
    SD Consultant

    Your message is somewhat unclear to me.
    When creating a sales order, a "Required Delivery Date" is needed.
    This date is checked against the unloading calendar of the customer. If the system finds the requested delivery date = a non-working day of the customer calendar, it issues a warning (No goods accepted on DD.MM.YYYY. The next possible date is: DD.MM.YYYY (Message no. V1019). There does not seem to be any possibility of changing this warning to an error in the standard system; only possibility would be to modify the standard code.
    If I have misterpreted your thread, then apologies, and feel free to elaborate on the issue some more.

  • Link with blocked sales order with advance payment

    Hi Gurus,
    I have a scenerio, where, due to a shortfall of customer credit balance, system blocks the sales order and upon receiving an advance payment from the customer, i would like to know if the system can validate that, an advance has been received and can inform the user that advance received against the blocked sales order. So that, instead of manually releasing the blocked sales order user gets to know whihc are the sales orders to be released first and based on which system can allow the user to release first the blocked sales order and then the subsequent sales orders are processed for credit check.
    Is there any exit or what is the enhancement that can be implemented for having this scenerio mapped.
    Text Removed
    Edited by: Lakshmipathi on Mar 17, 2011 8:57 AM

    If you dont maintain any sale order reference and execute VKM3, system will populate all blocked sale orders.  There users can select the required sale order and release it and I dont think, for this purpose, an user exit is required.  You can also even consider VKM1
    Still if you feel that it is required, you can try with any of the following user exits.
    1)  LVKMPFZ1: USER_CREDIT_CHECK1
    2)  LVKMPFZ2: USER_CREDIT_CHECK2
    3)  LVKMPFZ3: USER_CREDIT_CHECK3
    thanks
    G. Lakshmipathi
    ps:-  Please dont offer anything

Maybe you are looking for