One time Discount Coupon to be used during the Sales Order Creation

I need help to configure a one time coupon to be used during a Sales Order creation. During 2009 our customers that have purchased more than certain amount we are going to give them a discount Coupon with a code that they can use just one time during his next purchase. I need help to configure this request.
Thanks

Hi Gilberto
Go VK11.
After maintaining the material & price, please go to -->Additional data.
You will be displayed with Validity, Assignments, Assignments for retail promotion, Limits for Pricing, Payments.
In the 'Limits for Pricing' you have three options - Max. condition value, Max number of orders & Max condition base value.
In the Max number of Orders - enter 1 to avail this special price only for first order.
Importent Note: to activate the ' Limit of Pricing' -- you need to tick 'Condition update' for the particular contion type, in condition type customising.
FOr eg. condition type - ZR00 - you need to have special price for this condition type & want to limit only for first order order.
In the customising for ZR00 - 'condition update' need to be ticked, then only you can get the above option.
i hope it is clear to you
thank you
Anirudh

Similar Messages

  • How the availiblity check is carried out during the sales order creation

    Hi All,
    I have maintained planned delivery time, GRProcesing time and replenishment lead time in days in material master. I am not understand ing how the system is calculating the availability date of the material during sales order creation.
    Please do needful regarding this.
    Regards
    Phani

    Hi,
    Using the Scheduling data from Delivery & Transportation Scheduling, the system does the backward calculation from the Requested Delivery Date. This is used to arrive at Material Availability Date.
    On the Material Availability Date, system checks the Available Qty, as seen in CO09 in column ***. ATP Qty. If the Available Qty is > than Required Qty, Requested Delivery Date is confirmed. Otherwise,
    System moves into the future till it finds the required Available Qty. The new date is then the new Material Availability Date.
    On getting the confirmed Material Availability Date, system does the Forward Scheduling to arrive at a Confirmed Delivery date.
    Regards

  • How to change the line item storage location during the sales order creatio

    How to change the line item storage location during the sales order creatio

    Hi Kumar,
    I think you can just delete it in the sales order directly, if you are using make-to-order scenario, then there will be special stock left for the sales order as the production has been goods receipt, you need to use MM transaction move the stock to unrestricted use stock. If you are using make-to-stock scenario, there should be no further problem. If you are using assembly order, please try to reject the sales order item to see if it could fullfill your requirement.
    Regards,
    Rachel

  • Update terminate during return sales order creation (Delivery processing)

    Hi,
    I have having issues with a scenario while creating delivery in a 4.7 system. When creating a return order (using FM SD_SALESDOCUMENT_CREATE) our system is configured to automatically generate deliveries for the return SO.
    The scenario we are facing an issue in is, during data processing, a delivery is created using FM W_FRM_DELIVERY_CREATE_GENERAL, delivery is then processed for picking and PGI using FM WS_DELIVERY_UPDATE.
    For the next record, a return order is created using FM SD_SALESDOCUMENT_CREATE, which also automatically tries to create the delivery. At this point we get an update terminate upon COMMIT and dump says SAPSQL_ARRAY_INSERT_DUPREC pointing towards form VBFA_BEARBEITEN.
    Based on my analysis, while updating table VBFA the internal table DA_XVBFAI also has document flow for the previously processed regular sales order for which the system tries to insert a record in VBFA. This is a duplicate record and the update is terminated. The buffer nees to be refreshed and I tried using FM SHP_DELIVERY_BUFFER_REFRESH and LE_DELIVERY_REFRESH_BUFFER. None of these seem to refresh the VBFA buffer.
    I would appreciate if anyone can share their experience with this issue. Thanks for your help!
    -Roger

    Hi,
    Try using one of these function modules BUTX_FRG0010_CLEAR_BUFFER or CK_F_SHARED_BUFFER_DELETE or COM_IL_DB_RESET_BUFFER or SNC_USER_FLUSH_BUFFER .
    KR Jaideep,

  • Modification BOM Quantity during the Production order creation

    Hi ,
    I am using the next BAPI: BAPI_PRODORD_CREATE however I would like to modify the Quantity of the components during the creation.
    Does anyone know how I can do that? Because this BAPI has not the parameters to modify the quantity components.
    Regards,
    Isaias

    Dear ,
    You need to use BDC tool for modification of BOM qty .BDC ( Batch Data Communication )  is basically a tool to upload or modify  mass data from Legacy  to SAP in batch programming   ( for any Master Data like Material Master , BOM , Work centre ) .
    To know more about BDC , please refer the step by stepo procedure :
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://wiki.sdn.sap.com/wiki/display/ABAP/DataTransfers-BAPI%2CBDC%2CALE%2CLSMW%2C+DX-WB
    http://wiki.sdn.sap.com/wiki/display/ABAP/BDCSession-AutomaticExecution
    Regards
    JH

  • One time discount - how to find out if customer has aleady been given discount before?

    Client has requirement - they give first-time customers a certain discount, occasionally they give old customers the same discount (they want to be able to decide during the sales order entry).  They will enter manually with no condition records.
    They could use HA00 header discount type.. but how can they know whether that customer has received the same discount before?  Is there a standard sales report that can be run based on header conditions type?  We don't have time for custom development and would like find a standard solution.
    Is there a standard report based on order reason? Perhaps they can enter order reason for orders that have that one-time customer and can quickly run that report.
    Thanks!!

    Have you tried entering 'one time discount site:sap.com' in Google? This post is on the first result page, there are many others.
    Kindly refer to ROE and search before posting.
    @Siva - CDHDR table? Sorry, I'm confused... How exactly would it be helpful to OP?

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

  • Creating the Sales Order using the bapi BAPI_SALESORDER_CREATEFROMDAT2

    Hi,
    My problem is , i have created one module pool program for accelerating the Sales Order creation.
    I am using the bapi BAPI_SALESORDER_CREATEFROMDAT2 for sales order creation. After executing the program
    bapi is given an errot that, incomplete sales order document is saved.
    Can any body tell me plz what are the necessary fields i need to take in the header and item level , so that the complete
    document will be saved through BAPI.
    <removed_by_moderator>
    Thanks
    Edited by: Julius Bussche on Jan 11, 2010 12:09 PM

    TABLES: VBAK,                             "Sales Document: Header Data
            VBAP.                             "Sales Document: Item Data
    *************************************WORK AREA DECELERATION************************
    DATA: BEGIN OF WA_HEADER,
            LI    TYPE I,                      "LINE TYPE
            AUART TYPE VBAK-AUART,             "Sales Document Type
            VKORG TYPE VBAK-VKORG,             "Sales Organization
            VTWEG TYPE VBAK-VTWEG,             "Distribution Channel
            SPART TYPE VBAK-SPART,             "Division
            KUNNR TYPE BAPIPARNR-PARTN_NUMB,   "Customer number
          END OF WA_HEADER.
    DATA: BEGIN OF WA_ITEM,
            LI     TYPE I,
            MATNR  TYPE VBAP-MATNR,            "MATERIAL NUMBER
            ZMENG  TYPE VBAP-ZMENG,           "QUANTITY
          END OF WA_ITEM.
    ***********************************INTERNAL TABLE DECELERATION***************************************
    DATA: IT_HEADER      LIKE TABLE OF WA_HEADER WITH HEADER LINE.                   "IT FOR HEADER
    DATA: IT_ITEM        LIKE TABLE OF WA_ITEM WITH HEADER LINE.                     "IT FOR ITEM
    DATA: IT             LIKE VBAK OCCURS 0 WITH HEADER LINE.
    ***************************SALES ORDER INTERNAL TABLE DECELERATION********************************
    DATA:
          HEADER  TYPE TABLE OF BAPISDHEAD WITH HEADER LINE,        "SALES HEADER DATA
          ITEMS   TYPE TABLE OF BAPIITEMIN WITH HEADER LINE,         "SALES ITEM DATA
          PARTNERS TYPE TABLE OF BAPIPARTNR WITH HEADER LINE.      "SALLES PARTNERS
    ***********************************DYNAMIC FIEL PATH GETTING DECELERATION************************
    DATA : HL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_SPATH',              "SCREEN FIELD NAME
           HL_FILE_NAME  TYPE IBIPPARMS-PATH VALUE 'G_P_SPATH',                  "Local file for upload/download
           IL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_EPATH',              "SCREEN FIELD NAME
           IL_FILE_NAME  TYPE IBIPPARMS-PATH VALUE 'G_P_EPATH',                  "Local file for upload/download
           FL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_EPATH',              "SCREEN FIELD NAME
           FL_FILE_NAME  TYPE IBIPPARMS-PATH VALUE 'G_P_EPATH'.                  "Local file for upload/download
    DATA : CTR TYPE I .
    DATA : CTR2 TYPE STRING.
    DATA : CTR1 TYPE STRING.
    Sales document number
    DATA : L_VBELN LIKE BAPIVBELN-VBELN.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE T1.
    SELECTION-SCREEN : SKIP.
    PARAMETER        : P_HPATH TYPE STRING.
    PARAMETER        : P_IPATH TYPE STRING.
    SELECTION-SCREEN : SKIP.
    SELECTION-SCREEN : END OF BLOCK B1.
    SELECTION-SCREEN : BEGIN OF BLOCK B2 WITH FRAME TITLE T2.
    SELECTION-SCREEN : SKIP.
    SELECTION-SCREEN : BEGIN OF LINE.
    SELECTION-SCREEN : PUSHBUTTON 10(14) UPLOAD USER-COMMAND CLICK1.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN   END OF BLOCK B2.
    ******************************************INITIALIZATION.***************************************************
    INITIALIZATION.
      T1       = 'Putchase Order Source File Path'.
      T2       = 'Push Button'.
      UPLOAD   = 'Upload'.
    *******************************************AT SELECTION SCREE EVENT********************************************
    AT SELECTION-SCREEN.
      CASE SY-UCOMM.
        WHEN 'CLICK1'.
          IF P_HPATH IS INITIAL AND P_IPATH IS INITIAL.      "CHECKING BTHE THE TEXT BOX
            MESSAGE I009.
          ELSE.
            PERFORM SELECT.                                  "CALLING THE SELECT SUBROUTINE
          ENDIF.
        WHEN OTHERS.
          MESSAGE 'PRESS FORM BUTTON' TYPE 'I'.      "WHEN EXECUTE BUTTON IS PRESSED
      ENDCASE.
    ***********************************GETTING HEADER FIEL PATH*******************************************
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_HPATH.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = HL_FIELD_NAME
        IMPORTING
          FILE_NAME     = HL_FILE_NAME.
      P_HPATH = HL_FILE_NAME.
    ***********************************GETTING ITEM FIEL PATH*******************************************
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_IPATH.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = IL_FIELD_NAME
        IMPORTING
          FILE_NAME     = IL_FILE_NAME.
      P_IPATH = IL_FILE_NAME.
    START-OF-SELECTION.
    *&      Form  SELECT
          text
    -->  p1        text
    <--  p2        text
    FORM SELECT .
      CALL FUNCTION 'GUI_UPLOAD'             " function resposible to get the local flat
          EXPORTING                          " and upload it in a internal table
            FILENAME            = P_HPATH
            FILETYPE            = 'ASC'
            HAS_FIELD_SEPARATOR = '#'
          TABLES
            DATA_TAB            = IT_HEADER.
      CALL FUNCTION 'GUI_UPLOAD'             " function resposible to get the local flat
          EXPORTING                          " and upload it in a internal table
            FILENAME            = P_IPATH
            FILETYPE            = 'ASC'
            HAS_FIELD_SEPARATOR = '#'
          TABLES
            DATA_TAB            = IT_ITEM.
      LOOP AT IT_HEADER.
        Initialize Header values
        HEADER-DOC_TYPE     =  IT_HEADER-AUART.
        HEADER-SALES_ORG    =  IT_HEADER-VKORG.
        HEADER-DISTR_CHAN   =  IT_HEADER-VTWEG.
        HEADER-DIVISION     =  IT_HEADER-SPART.
        APPEND HEADER.
        PARTNERS-PARTN_ROLE = 'WE'.
        PARTNERS-PARTN_NUMB = IT_HEADER-KUNNR.
        APPEND PARTNERS.
        CTR = 10.
        LOOP AT IT_ITEM WHERE LI = IT_HEADER-LI.
          CTR2 = CTR.
          CONCATENATE '0000' CTR2 INTO CTR1.
    ***Initialize Item values
         ITEMS-ITM_NUMBER   = IT_ITEM-ITEM.
          ITEMS-ITM_NUMBER   = CTR1.
          ITEMS-MATERIAL     = IT_ITEM-MATNR.
          ITEMS-REQ_QTY   = IT_ITEM-ZMENG.
          APPEND ITEMS.
          CTR = CTR + 10.
        ENDLOOP.
        CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
          EXPORTING
            ORDER_HEADER_IN = HEADER                      "SALES HEADER DATA
          IMPORTING
            SALESDOCUMENT   = L_VBELN                        "RETRIEVED SALES DOCUMENT NUMBER
          TABLES
            ORDER_ITEMS_IN  = ITEMS                       "SALES ITEM LEVEL DATA
            ORDER_PARTNERS  = PARTNERS.                    "SAKES PARTNERS
        APPEND L_VBELN TO IT.
        COMMIT WORK AND WAIT.
        CLEAR : HEADER , ITEMS[] ,PARTNERS,CTR,CTR1,CTR2.
        REFRESH : ITEMS.
      ENDLOOP.
      IF IT[] IS NOT INITIAL.
        LOOP AT IT.
          WRITE: / 'SALES ORDER', IT-VBELN , 'CREATED'.
        ENDLOOP.
        LEAVE TO LIST-PROCESSING.
        SET PF-STATUS SPACE.
      ELSE.
        MESSAGE I044.
      ENDIF .
    ENDFORM.                    " SELECT

  • Multiple Input nodes to Sales Order creation using VC

    hi experts,
    i'm using BAPI_SALESORDER_CREATEFROMDAT1 for sales order creation in VC. i would like to get header details in a form and also like to get the multiple items details in a table and partner details in atable.i've to take both contents to create a sales order. when i click the submit button in the form " sold-to party is not defined" error message displayed and when i click the submit in table "DOC TYPE is not mentioned" message is shown. but i've given both details.
    can you help me to solve my problem and i've confused which field is used to mention the sold-to party in the header_in.
    thanks and regards
    basheer

    Hi,
    I was facing the same problem while creating the sales order. Try giving following values:
    If you are creating standard order, then enter 'TA' instead of 'OR' to the Doc_Type and enter 'AG' as a partner role instead of 'SP'.
    It works for me. I don't know how??? Lets try.
    Also try following links.
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/problems-working-with-bapi_salesorder_createfromdat2-527937#
    http://www.saptechies.com/bapi_salesorder_createfromdat2/
    Thanks,
    Prashant
    (PS. Do Rewards Points for useful answers)

  • One Time Customer Mandatory field during Sales Order Creation

    Hi
    My client has lots of one time customer and they need to capture the phone number  and name of the individual customer at the time of sales order creation using one time customer code.
    They want only "NAME & PHONE NO" as mandatory field so that the Person who creates a Salesorder should enter the NAME & PHONE NO" . Please let us know where the configuration for teh above is?
    We have tried in Account Group One time customer settings which is working at the time of creation of order and not at the time of creation of Sales Order, please help us on the above..
    Regards
    Anis

    Hi Anis,
    In the Account group , if you check the one-time customer then while creating the sales order itself it will appear to change the address for that customer.
    By the time you can enter your required fields.
    I think you mentioned as
    We have tried in Account Group One time customer settings which is working at the time of creation of order and not at the time of creation of Sales Order, please help us on the above..
    Order creation and creation of sales order are both same.
    May be you would have confused.
    regards,
    santosh

  • I was not warned that audiobooks are a one time download only for those using iCloud to backup. As a result I've lost my audiobook when switching to a new iPhone after the previous phone was damaged. Will Apple refund me for the audio book?

    I was not warned that audiobooks are a one time download only for those using iCloud to backup. As a result I've lost my audiobook when switching to a new iPhone after the previous phone was damaged.
    Will Apple refund me for the audio book?
    the irony of this is that the lost audio books is Steve Jobs biography!
    Starting to wonder about the benefits of Android :-/

    If you haven't been keeping a backup of your downloads (none of your iTunes downloads are included in an iCloud backup, apps, music etc are only redownloadable whilst they remain in your country's store) then you can try contacting iTunes support and see if they will grant you a redownload : http://www.apple.com/support/itunes/contact/- click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Coupon specific discounts are not coming in the sales order

    Hello Experts,
    I have created a internal coupon campaign and assigned discounts to the campaign. We used condition type 1202 to assign the discount values in the campaign.
    In the sales order when i enter the coupon id system fetching the corresponding campaign ID. But , sales order is not fetching the discount condition types mentioned in the campaign.
    Below are the configurations i made.
    1) Copied the condition type 1202 to ZCUI.
    2) Assign this condition type to the condition maintenance group (1200) and keep the condition table as SAP12000
    3) Maintain this condition type to the pricing procedure and assign pricing procedure to the Sales order transaction type.
    4) In the campaign i have maintained the values for the condition type . -- Sales org, distri channel. divison, Product , discount value
    5) I even verified that CNDCRMPRSAP12000 has the records for this campaign.
    Now the question is do i need to do any customization in Campaign determination. I am not using TPM and it is a simple coupon campaign.
    Please suggest me , your help is highly appreciated.
    Regards,
    Deeps.

    Not sure if it works, may be you can check this
    - is your condition type 1202's calculation type field has been defined as "percentage"?
    - the pricing procedure that you are using, does it contain the corresponding condition type 1202 for discount amount?
    - Has the pricing procedure been maintained for your org data in "Determine Pricing Procedure" in spro-> CRM-> Basic Functions -> Pricing -> Determing Pricing Procedure
    Please check this.
    Edited by: Harsh Singal on May 4, 2011 5:53 AM

  • Best approach to report on ports in use during the month

    I have been asked to come up with a report once a month outlining the network devices ports that are in use per cust
    omer location.
    I see the report device manager but it doesnt appear to give the simple number of ports in use by the device during the past 24 hours.
    Any thoughts or ideas would be great. It appears our customer doesnt want to pay for installed ports, just ports that are used during the month.
    Thanks,

    Hi Peter,
    You don't say what type of reporting that you want to do? I'm assuming that it is probably something like displaying the last 1000 most recently approved forms or similar?
    If that's the case then you may be able to achieve what you need using the Search Core Results Web Part with some clever querying and is likely to be the most performant method.
    Once you have a result set back, you can then look at styling this using XSLT in the SCRWP or alternatively look at using the Search Query Model from code in a farm solution/webpart.
    Alternatively you could look at using SSIS to extract the data using the SharePoint List into a SQL table on a nightly basis. (This article covers how to get data out of SharePoint and into SSIS..
    http://msdn.microsoft.com/en-us/library/hh368261.aspx)
    Regards
    Paul.
    Please ensure that you mark a question as Answered once you receive a satisfactory response. This helps people in future when searching and helps prevent the same questions being asked multiple times.

  • In IPhoto '08, Photos under Library, I'm no longer able to view a screen of thumbnails.   I'm only able to view a single photo at one time.  This was not true in the past.

    In IPhoto '08, in Library/Photos, I'm no longer able to view a screen of thumbnails.   I'm only able to view a single photo at one time.  This was not true in the past.

    Note the slider lower right of the iPhoto Window. Drag it left.
    Regards
    TD

  • Taking ref. more than one billing documents during creating sales order

    Hi everybody,
    During creating sales order with reference, how can i take reference more than one billing documents?
    Thanks.
    Best regards.
    Kaan Özdöker
    Astron

    Hi all,
    Thanks for the helpful answers. I realized after your answers, my question was misunderstood.
    Ok, i can refer to billing documents one by one in the sales order creating screen i know, but i want to refer to many billing documents at once.
    In this mean, Srinath'a answer was very helpful. As i thought there is no other way except user-exit modification or new routine.
    Thank you all.
    Best regards.
    Kaan Ozdoker
    Astron

Maybe you are looking for

  • How do i set up my daughter on imessage?

    My 10-year old has a 4th generation iTouch.  All of her friends are text messaging with their devices.  How do I set her up for iMessage on her iTouch?  Do I use my email address or do I create a new account?  Currently, she does not have her own ema

  • 10.6.8 Server with 10.8 Client Issue

    We have some mac OS 10.8 laptops which connect to our 10.6.8 server. All the policies that are applied using workgroup manager work fine apart from the drive mapping ones. When logging in 70% of the time no drives are mapped whereas the remaining 30%

  • Var lastSelected: can this 'timeout'?

    a bunch of buttons contain code like this: on(release) { if (lastSelected == grid_housing) { _root.grid.grid_housing.gotoAndPlay("fade"); if (lastSelected == grid_homes) { _root.grid.grid_homes.gotoAndPlay("fade"); if (lastSelected == grid_hotels) {

  • 60 GB Video Ipod ..

    So basically, My warrenty just ran up a few days ago. My ipod hard drive crashed, I went to the Apple Store and they said their was nothing they could do for my 400 dollar ipod. How unfair is that? I contacted Apple and they told me theirs a year war

  • What migration path from 10.g AS tiers to Fusion Middleware 11g AS tiers ?

    Hi all, We have purchased Oracle AS Enterprise Edition 10g a couple of months ago and we are currently running the following tiers :- - one Forms & Reports 10.1.2 AS instance, - one infrastructure 10.1.4 instance for OID/SSO, - one OC4J 10.1.3 instan