Route schedule not updated in some line item of a sales order

Hi Gurus,
All order are processed through the EDI interface automatically. Order
XXXXXXXXX for USA customer 40000XXXX is maintained in route reschedule
setup T-code VL52 on specific departure day thursday.
above are line item of same sales order, with same shipping point and route .
Why only some salesorder lines missing the route schedule ?? 
Please Help
Regards
Abhilash

When you post a query here, you need to have patience until some members go through your post.  Please dont expect somebody should respond to you immediately as everybody has their own priorities.
Coming to your query, it could be due to many reasons as per the following note:-
Note 1750978 - Route Schedule does not populate on sales order
Go through the Resolutions given in the above note and check with your system
G. Lakshmipathi

Similar Messages

  • Unconfirmed line items of a sales order into account in credit management

    Hi Gurus
    Updated the customer orders via prog. RVKRED09.
    There is only one open order for this customer = 720662. My question is: in the credit master the sales value/credit exposure is USD 77.100,00. The order is for USD 105,900.00 .
    Found out that line item 20 is not confirmed in the schedule lines. So the value in the sales value/credit exposure  equals item 10 and 30. So my 1question is: Where is the setting that  does not take unconfirmed line items of a sales order into account in credit management?
    Thanks in advance
    Regards
    Nalini Iyer

    Hi nalini
    Even though , you create a sales order for that line item , but if that item is not confirmed then the value  wont be considered.  into credit exposure. .
    But once it gets confirmed then the value will be taken into credit exposure..
    Regards
    Srinath

  • Send all line items of a sales order to IPC along with condition lines data

    We wrote some pricing routines in R/3, where while doing he calculations for condition line item, we needed to pull in the material information for previous line items. So we exported vbap and imported it inside the routine to be able to have access to all the line items in the sales order. Now, we need to put in the same kind of logic in CRM/IPC. My question is what would be the equivalent of SAP's(import/export) commands for internal tables in case of IPC. I looked at the BADI CRM_COND_COM_BADI but still do not see how I can send all the line items  data to IPC. So I guess, the question comes down to, how do I send all the line items of the sales order (whole VBAP in R/3 terms) to IPC along with the condition line data? Can someone please help?
    Thanks

    Hi Vaibhav,
    If you can get the list of Sales orders which has deleted line items and force completion status. You can manage them in BI via lookup  or navigation attribute.
    Just my views I am sharing .
    Thanks,
    KDJ

  • Line item creation in sales order

    Hi
    I am working on User Exit USER_EXIT_SAVE_DOCUMENT_PREPARE. On saving a sales order i need to do some validations and based on the validations i need to add a line item to the sales order in the user exit.
    What are the ways that i can create the line items through the user exit

    Hi,
    It is not a straight forward thing. Adding data to table XVBAP won't work. It will create inconsistency. There are so many other tables involve here too, like, VBPA, VBUP, VBKD, KONV. There can be other tables too based on how your sales order is configured.
    Also, modifying these tables (XTAB, YTAB ) in this user-exit may cause database inconsistency.
    Regards,
    RS

  • Delivery doc creation for a selected line item of the Sales order

    Hi folks,
        Can any one help me in how to create a delivery order for a selected line item of the Sales order.My requirement is the request comes from the web browser where a sales document and details of the items are shown the user select one line item and request for delivery create of that particular SO doc.I have used couple of FM to create delivery but the delivery create is depend on the schedule line dates so iam unable to figure out where exactly i can distinguish between the line items.
    Example:
    SO:- 11193645
    Line item -1 has 2 schedule line 06/11
                                     06/13
    Line iteam-2 has 1 schedule line 06/12
    so if i try to create Delivery doc for date 06/12
    it creates partially for line 1 and line 2.
    but my requirement is i wanted to create SO for only line item 1 as i wanted to process Del Doc for only line item 1.
    If you have any idea please help me.

    hi ,
    You can develop a customised FM to process the Idoc data .
    1. Read the Idoc data into internal table for the line items which need to be delivered .
    2. Run BDC for transaction 'VL01N' ( delivery creation ) through which  eliminate the line items which are not in internal table and save the delivery document
    Note : Because in VL01N , you specify the sales document with respect to which you want to perform delivery hence automatically all items are copied to the delivery document .
    During BDC recording , select items by " MOVING TO TOP"
    and then deleting the selected item
    If you face problem in BDC recording , i can help u that too .

  • Keep Quote line item numbers in Sales order

    While creating a Sales order from Quote, SAP always creates line items with 100,200,300...and so on.
    If quote has 3 line items say 100,110, & 120 and we create a sales order with reference to this quote in VA01. The sales order line items become 100,200 & 300.
    The requirement is for Sales order to also have same line item numbers i.e. 100,110 & 120.
    To retain quote line item numbers in Sales order the ABAP change will be in VOFM or user exit?

    Hi,
    It is not a straight forward thing. Adding data to table XVBAP won't work. It will create inconsistency. There are so many other tables involve here too, like, VBPA, VBUP, VBKD, KONV. There can be other tables too based on how your sales order is configured.
    Also, modifying these tables (XTAB, YTAB ) in this user-exit may cause database inconsistency.
    Regards,
    RS

  • How to delete a line item from the sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    Hi
    U can do this in two ways one u can short close the order by entering Reason for rejection in VA02 at header level and if yr order is multiple line item order u can enter the reason for rejection in any of the line item which u don't want to deliver.
    This is called short close ( as the qty is not delivered fully).
    Thx.

  • Sample Material in the 3rd Line item of the Sales Order

    Hi,
    We have configured the system in the sales order as follows.
    1. Commercial Material
    2. Bonus Material.(ie Free Material)
    Now, i want to add the 3rd line item in the sales order as Sample with different Material number. How go about this. kindly let me.
    Regards
    Ravi

    Hi there,
    Enter the material in the sales order & change the item catg manually in VA02.
    But free goods & sample materials are dealt differently..
    Freegoods is entered as TANN item catg along with nornam TAN item in standard order OR.
    But sample materials or free of charge items are processed through different order type FD for eg.
    Even thought the item catg proposed in FD is TANN,, the whole process will not have pricing as TANN items arenot relevant for pricing.
    Regards,
    Sivanand

  • Limitation of line items in a sales order

    Dear Guys,
    Kindly confirm me whether I can make a single sales order with 500 line items or not ? Again if it no then how many line items can be taken in single sales order.
    Thanks and regards,
    Atul

    dear atul
    I think the correct reply would be 999,999 because data type of item number POSNR is NUM 6, which means that it can hold upto value 999,999.
    However, at the same time keep the following into consideration:
    1. FI document has a restriction of 999 line items per document. So, depending on the account settings, there will be a lower limit. E.g. if each Sales order line item results in 2 line items in the accounting document, then the max. no. of SO line items is limited to 499.
    2. If FI summarization is active, then the system summarizes the account postings, thus reducing the no. of FI line items. Hence, a SO can accomodate more than 999 line items. However, this means that certain line item level details will not be available to the Finance guys (which they may not like).
    3. As the number of line items in a Sales order increases, the system performance suffers greatly. There are performance fixes available, but in general, it is painful to load a SO with large no. of line times through BDC's. 10 Sales orders with 100 lines each consume less system resources than 1 Sales order with 1000 lines.
    rewards if it helps
    siva

  • How to delete the line item from a sales order

    Hi all,
    how to delete a line item from the sales order for which the production is already happened and it has been delivered. the production order status is DLV.
    Regards
    Kumar

    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

  • How to combine the line items of 2 Sales orders into 1 delivry

    how to combine the line items of 2 Sales orders into 1 delivry
    and their process, pre-requisites and tcode

    The prerequisites are:
    1) In the customer master sales area data, shipping tab, there is a field called Order combination. u must tick that.
    2) for the two orders, the sold to party & ship to party must be same
    3) both orders must have created from same plant & shipping points
    4) the line items must have same loading grp.
    5) the both orders sheduline line date must be same.
    transaction code for the same is VL04.
    enter the required data and select the order nos to be processed.
    Do reward points if it is useful

  • Can we limit the no of line items in a Sales Order

    Can we limit the no of line items in a Sales Order.

    Hi Atul,
    You can use user exit USEREXIT_MOVE_FIELD_TO_VBAP in MV45AFZZ
    Reward points pls.
    Regards,
    Govind.

  • I want a push button for line items in my sales order entry screen.

    Hi,
    I want a push button for line items in my sales order entry screen.
    How can I do so?
    Thanks.

    Hi Kumar ,
    To have a push buttons you need to first assign a pf-status .
    here a sample code for a push button and its handling :
      set pf-status 'SELECT' .
    at user-command .
      describe table t_lpr lines w_lines .
      case sy-ucomm .
        when 'SELECTALL' .
          set pf-status 'SELECT' excluding 'SELECTALL' immediately.
          do w_lines times .
            read line w_line field value w_check . " INTO W_CHECK .
            if w_check = space .
              w_check = 'X' .
              modify line w_line field value w_check.    "INTO W_CHECK .
              add 1 to w_line .
            endif .                        " IF W_CHECK = ' '
          enddo .
    Thus when you say pf-status say 'select' , Double click on that and you find a screen eher you can select icons and assign a function code to it!
    Hope it helps!
    Much Regards,
    Amuktha .

  • Surcharge on Net not update in PO line item

    Hi,
      we had a problem in Surcharge on Net calculated as per condition value.  Some PO,s Surcharge+ Net value update in PO line item, some PO's not updating.
    I have checked all the configuration part. Validity periods maintained upto 9999.
    Info records valid, Vendor valid.
    Please help me.
    Regards,
    Sridhar

    Hi,
    I have checked EKPO table and I found  If Surcharge on net calculated then Item effects commitment filed (XOBLR) Updated. Otherwise surchage on net failure to calculate XOBLR not update in Table level.
    Is there any way to update XOBLR field?
    Regards,
    Sridhar

  • Problem in uploading multiple line items while Creating sales order by BAPI

    Hi experts ,  Im able to create sales order  with one item while using this program, but the problem is  when iam having multiple  items or multiple sales order  , iam not able to createthe line items , though its creating  sales order header , Iam copy pasting my code , please add the additional code to my code to take more than 1 line items ,This is urgent requirement . Points will be rewarded for answers , Thanks in advance
    *& Report  Z_SO_CREATE_BAPI
    REPORT  Z_SO_CREATE_BAPI.
    DATA: i_header TYPE bapisdhd1 occurs 0 with header line.
    DATA: i_details TYPE bapisditm OCCURS 0 WITH HEADER LINE.
    DATA: i_partner TYPE bapiparnr OCCURS 0 WITH HEADER LINE.
    DATA: i_return1 TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: i_return2 TYPE bapiret2.
    data : ORDER_HEADER_IN like BAPISDHD1.
    data : ORDER_ITEMS_IN like BAPISDITM occurs 0 with HEADER LINE .
    data : ORDER_ITEMS_INX Like BAPISDITMX occurs 0 with HEADER LINE .
    data : RETURN like BAPIRET2 occurs 0 with header line.
    data : ORDER_PARTNERS like BAPIPARNR occurs 0 with
    header line.
    DATA : ORDER_KEYS LIKE BAPISDKEY OCCURS 0 WITH HEADER
    LiNE.
    data : ORDER_SCHEDULES_IN like BAPISCHDL occurs 0 with
    header line.
    data : ORDER_SCHEDULES_INX like BAPISCHDLX occurs 0 with
    header line.
    data : BEGIN OF TAB OCCURS 0,
           SRNO(4),
            DOC_TYPE like ORDER_HEADER_IN-dOC_TYPE,
            SALES_ORG LIKE ORDER_HEADER_IN-SALES_ORG,
            DISTR_CHAN LIKE ORDER_HEADER_IN-DISTR_CHAN,
            DIVISION like ORDER_HEADER_IN-DIVISION,
           REQ_DATE_H(10),
           PURCH_DATE(10),
           PMNTTRMS LIKE ORDER_HEADER_IN-PMNTTRMS,
           PURCH_NO_C LIKE ORDER_HEADER_IN-PURCH_NO_C,
           ITM_NUMBER like BAPISDITM-ITM_NUMBER,
            MATERIAL   LIKE  ORDER_ITEMS_IN-MATERIAL ,
            PLANT LIKE ORDER_ITEMS_IN-PLANT,
           TARGET_QTY LIKE ORDER_ITEMS_IN-TARGET_QTY,
           ITM_NUMBERX like  ORDER_ITEMS_INX-ITM_NUMBER ,
           MATERIALX   LIKE  ORDER_ITEMS_INX-MATERIAL ,
           CUST_MAT22 LIKE ORDER_ITEMS_IN-CUST_MAT22,
           PLANTX LIKE ORDER_ITEMS_INX-PLANT,
           TARGET_QTYX LIKE ORDER_ITEMS_INX-TARGET_QTY,
           ITM_NUMBER LIKE ORDER_ITEMS_IN-ITM_NUMBER,
           MATERIAL   LIKE  ORDER_ITEMS_IN-MATERIAL ,
            PARTN_ROLE LIKE ORDER_PARTNERS-PARTN_ROLE,
            PARTN_NUMB LIKE ORDER_PARTNERS-PARTN_NUMB,
          END OF TAB.
    DATA: v_vbeln TYPE bapivbeln-vbeln.
    selection-screen begin of block b1 with frame.
    skip 3.
    parameter:p_infile like rlgrap-filename obligatory.
    skip 3.
    selection-screen end  of block b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
      PERFORM value_help.
    start-of-selection.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        filename                     = p_infile
       FILETYPE                      = 'DAT'
      HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      = tab.
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    **Validation for the Create SO screen
    *AT SELECTION-SCREEN ON BLOCK na_create.
    Loop at Tab.
    i_header-doc_type =  TAB-DOC_TYPE .
    i_header-sales_org = TAB-SALES_ORG.
    i_header-distr_chan = TAB-DISTR_CHAN .
    i_header-division = TAB-DIVISION .
    append i_header.
    *endloop.
    i_partner-partn_role = TAB-PARTN_ROLE .
    i_partner-partn_numb =  TAB-PARTN_NUMB.
    APPEND i_partner.
    i_details-material =  TAB-MATERIAL .
    APPEND i_details.
    endloop.
    *Bapi for Creating SO
                   CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
                     EXPORTING
                     SALESDOCUMENTIN               = v_vbeln
                       order_header_in               = i_header
                     ORDER_HEADER_INX              =
                     SENDER                        =
                     BINARY_RELATIONSHIPTYPE       =
                     INT_NUMBER_ASSIGNMENT         =
                     BEHAVE_WHEN_ERROR             =
                     LOGIC_SWITCH                  =
                     TESTRUN                       =
                     CONVERT                       = ' '
                    IMPORTING
                      SALESDOCUMENT                 = v_vbeln
                     tables
                      RETURN                        = i_return1
                      ORDER_ITEMS_IN                = i_details
                      ORDER_ITEMS_INX               = ORDER_ITEMS_INX
                       order_partners                = i_partner .
                     ORDER_SCHEDULES_IN            =
                     ORDER_SCHEDULES_INX           =
                     ORDER_CONDITIONS_IN           =
                     ORDER_CONDITIONS_INX          =
                     ORDER_CFGS_REF                =
                     ORDER_CFGS_INST               =
                     ORDER_CFGS_PART_OF            =
                     ORDER_CFGS_VALUE              =
                     ORDER_CFGS_BLOB               =
                     ORDER_CFGS_VK                 =
                     ORDER_CFGS_REFINST            =
                     ORDER_CCARD                   =
                     ORDER_TEXT                    =
                     ORDER_KEYS                    =
                     EXTENSIONIN                   =
                     PARTNERADDRESSES              =
    IF NOT v_vbeln IS INITIAL.
    *Bapi Commit Work
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    WAIT =
    IMPORTING
    return = i_return2
    ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
    IMPORTING
    RETURN =
    ENDIF.
    LOOP AT i_return1 .  "INTO wa_return1.
    WRITE:/ i_return1-message.
    ENDLOOP.
    FORM value_help .
      CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
        EXPORTING
          DEF_FILENAME     = ' '
          DEF_PATH         = ' '
          MASK             = ',.,..'
          MODE             = 'O'
          TITLE            = ' '
        IMPORTING
          FILENAME         = p_infile
        EXCEPTIONS
          INV_WINSYS       = 1
          NO_BATCH         = 2
          SELECTION_CANCEL = 3
          SELECTION_ERROR  = 4
          OTHERS           = 5.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.
    txt file data
    order type  salesorg   distch      divison       materialno                  parter role
    TA     PB01     01     00     000000000000000852     WE
    Partner no
    8101000000

    Hi Neerja,
    you can reffer this sample code. It may not be complet soluation for your poblem,
    but you will get some idea.
    *& Report  ZBAPI_SALESORDER_CREATE
    *& Author : Karthik
    REPORT  ZBAPI_SALESORDER_CREATE.
    data : ORDER_HEADER_IN like BAPISDHD1.
    data : ORDER_ITEMS_IN like BAPISDITM occurs 0 with
    header line.
    data : RETURN like BAPIRET2 occurs 0 with header line.
    data : ORDER_PARTNERS like BAPIPARNR occurs 0 with
    header line.
    DATA : ORDER_KEYS LIKE BAPISDKEY OCCURS 0 WITH HEADER
    LINE.
    data : ORDER_SCHEDULES_IN like BAPISCHDL occurs 0 with
    header line.
    data : BEGIN OF TAB OCCURS 0,
            SRNO(4),
            DOC_TYPE like ORDER_HEADER_IN-dOC_TYPE,
            SALES_ORG LIKE ORDER_HEADER_IN-SALES_ORG,
            DISTR_CHAN LIKE ORDER_HEADER_IN-DISTR_CHAN,
            DIVISION like ORDER_HEADER_IN-DIVISION,
           REQ_DATE_H(10),
            PURCH_DATE(10),
            PMNTTRMS LIKE ORDER_HEADER_IN-PMNTTRMS,
            PURCH_NO_C LIKE ORDER_HEADER_IN-PURCH_NO_C,
            ITM_NUMBER like BAPISDITM-ITM_NUMBER,
            CUST_MAT22 LIKE ORDER_ITEMS_IN-CUST_MAT22,
            PLANT LIKE ORDER_ITEMS_IN-PLANT,
            TARGET_QTY LIKE ORDER_ITEMS_IN-TARGET_QTY,
            PARTN_ROLE LIKE ORDER_PARTNERS-PARTN_ROLE,
            PARTN_NUMB LIKE ORDER_PARTNERS-PARTN_NUMB,
          END OF TAB.
    data: itab1 like alsmex_tabline occurs 0 with header
    line.
    DATA: gd_currentrow type i.
    data : PURCHASEORDER like ekko-ebeln.
    Data: tot_rec type i,     "Total Records
         gd_update type i,   "Main Table Increement Counter
         gd_lines type i,    "Success Table increement Counter
         w_textout like t100-text. "VARIABLE TO GET ERRORLOG
    data : begin of it_success occurs 0,
            SALESDOCUMENT LIKE BAPIVBELN-VBELN,  "PROJECT
          end of it_success.
    data : begin of it_error occurs 0,
            srno(4),
            err_msg(73) TYPE c,    "TO RETREIVE ERROR MESSAGES
         end of it_error.
    data : srno(4).
    DATA : SALESDOCUMENT LIKE  BAPIVBELN-VBELN.
    selection-screen begin of block b1 with frame.
    skip 3.
    parameter:p_infile like rlgrap-filename obligatory.
    skip 3.
    selection-screen end  of block b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_infile.
      PERFORM value_help.
    start-of-selection.
      call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        EXPORTING
          filename                = p_infile
          i_begin_col             = '1'
          i_begin_row             = '2' "Do not require
    headings
          i_end_col               = '22'
          i_end_row               = '10000'
        TABLES
          intern                  = itab1
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          others                  = 3.
      if sy-subrc <> 0.
        message e010(zz) with text-001. "Problem uploading
    Excel Spreadsheet
      endif.
    *perform open_group.
      sort itab1 by row col.
    Get first row retrieved
      read table itab1 index 1.
    Set first row retrieved to current row
      gd_currentrow = itab1-row.
      loop at itab1.
    Reset values for next row
        if itab1-row ne gd_currentrow.
          append tab .
          clear tab.
          gd_currentrow = itab1-row.
        endif.
        SHIFT ITAB1-VALUE LEFT DELETING LEADING SPACE.
        case itab1-col.
          when '0001'.
            TAB-SRNO = itab1-value.
          when '0002'.
            TAB-DOC_TYPE = itab1-value.
          when '0003'.
            TAB-SALES_ORG = itab1-value.
          when '0004'.
            TAB-DISTR_CHAN = itab1-value.
          when '0005'.
            TAB-DIVISION = itab1-value.
         when '0006'.
           TAB-REQ_DATE_H =  itab1-value.
          when '0006'.
            TAB-PURCH_DATE = itab1-value.
          when '0007'.
            TAB-PMNTTRMS = itab1-value.
          when '0008'.
            TAB-PURCH_NO_C = itab1-value.
            when '0009'.
            TAB-ITM_NUMBER = itab1-value.
           when '0010'.
            TAB-CUST_MAT22 = itab1-value.
          when '0011'.
            TAB-PLANT  = itab1-value.
          when '0012'.
            TAB-TARGET_QTY = itab1-value.
          when '0013'.
            TAB-PARTN_ROLE = itab1-value.
          when '0014'.
            TAB-PARTN_NUMB = itab1-value.
        endcase.
      endloop.
      append tab.
      clear tab.
      sort tab by SRNO.
      LOOP AT TAB.
       concatenate tab-REQ_DATE_H+4(4)
    tab-REQ_DATE_H2(2) tab-REQ_DATE_H0(2) into
    tab-REQ_DATE_H.
        concatenate tab-PURCH_DATE+4(4)
    tab-PURCH_DATE2(2) tab-PURCH_DATE0(2) into
    tab-PURCH_DATE.
        SRNO = TAB-SRNO.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            INPUT  = tab-PARTN_NUMB
          IMPORTING
            OUTPUT = tab-PARTN_NUMB.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            INPUT  = tab-CUST_MAT22
          IMPORTING
            OUTPUT = tab-CUST_MAT22.
        IF TAB-SRNO = SRNO.
          ORDER_HEADER_IN-DOC_TYPE = TAB-DOC_TYPE.
          ORDER_HEADER_IN-SALES_ORG = TAB-SALES_ORG.
          ORDER_HEADER_IN-DISTR_CHAN = TAB-DISTR_CHAN.
         ORDER_HEADER_IN-REQ_DATE_H = TAB-REQ_DATE_H.
          ORDER_HEADER_IN-PURCH_DATE = TAB-PURCH_DATE.
          ORDER_HEADER_IN-PMNTTRMS = TAB-PMNTTRMS.
          ORDER_HEADER_IN-PURCH_NO_C = TAB-PURCH_NO_C.
          ORDER_HEADER_IN-DIVISION  = tab-DIVISION.
          ORDER_ITEMS_IN-ITM_NUMBER = tab-ITM_NUMBER.
          ORDER_ITEMS_IN-material = TAB-CUST_MAT22.
          ORDER_ITEMS_IN-PLANT      = TAB-PLANT.
          APPEND ORDER_ITEMS_IN.
          ORDER_PARTNERS-PARTN_ROLE = TAB-PARTN_ROLE.
          ORDER_PARTNERS-PARTN_NUMB = TAB-PARTN_NUMB.
          APPEND ORDER_PARTNERS.
          ORDER_SCHEDULES_IN-ITM_NUMBER = tab-ITM_NUMBER.
          ORDER_SCHEDULES_IN-REQ_QTY = tab-TARGET_QTY.
          append ORDER_SCHEDULES_IN.
        ENDIF.
        AT END OF SRNO.
          CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
            EXPORTING
               SALESDOCUMENTIN               =
                 ORDER_HEADER_IN               = ORDER_HEADER_IN
               ORDER_HEADER_INX              =
               SENDER                        =
               BINARY_RELATIONSHIPTYPE       =
               INT_NUMBER_ASSIGNMENT         =
               BEHAVE_WHEN_ERROR             =
               LOGIC_SWITCH                  =
               TESTRUN                       =
               CONVERT                       = ' '
           IMPORTING
             SALESDOCUMENT                 = SALESDOCUMENT
            TABLES
             RETURN                        = RETURN
                 ORDER_ITEMS_IN                = ORDER_ITEMS_IN
               ORDER_ITEMS_INX               =
                 ORDER_PARTNERS                = ORDER_PARTNERS
                 ORDER_SCHEDULES_IN            = ORDER_SCHEDULES_IN
               ORDER_SCHEDULES_INX           =
               ORDER_CONDITIONS_IN           =
               ORDER_CONDITIONS_INX          =
               ORDER_CFGS_REF                =
               ORDER_CFGS_INST               =
               ORDER_CFGS_PART_OF            =
               ORDER_CFGS_VALUE              =
               ORDER_CFGS_BLOB               =
               ORDER_CFGS_VK                 =
               ORDER_CFGS_REFINST            =
               ORDER_CCARD                   =
               ORDER_TEXT                    =
             ORDER_KEYS                    = ORDER_KEYS
               EXTENSIONIN                   =
               PARTNERADDRESSES              =
          IF SALESDOCUMENT <> SPACE.
            commit work.
            ADD 1 TO gd_update.
            it_success-SALESDOCUMENT = SALESDOCUMENT.
            append it_success.
            CLEAR :SALESDOCUMENT,ORDER_HEADER_IN.
            REFRESH : RETURN,ORDER_ITEMS_IN,ORDER_PARTNERS.
          ELSE.
            loop at return.
              it_error-SRNO = tab-SRNO.
              it_error-err_msg = return-MESSAGE .
              Append it_error.
            ENDLOOP.
            CLEAR :SALESDOCUMENT,ORDER_HEADER_IN.
            REFRESH : RETURN,ORDER_ITEMS_IN,ORDER_PARTNERS.
          ENDIF.
        endat.
      endloop.
      DESCRIBE TABLE it_success LINES gd_lines.
      IF gd_lines GT 0.
        Display result report column headings
        PERFORM display_column_headings.
        Display result report
        PERFORM DISPLAY_SUCESS.
      ENDIF.
    IF SUCESS FAILS Display Error Report
      DESCRIBE TABLE it_error LINES gd_lines.
      IF gd_lines GT 0.
        PERFORM errorheadings.
        PERFORM errorreport.
      ENDIF.
    *&      Form  display_column_headings
          text
    FORM display_column_headings.
      WRITE:2 ' Success Report '(014) COLOR COL_POSITIVE.
      SKIP.
      WRITE:2 'The following records inserted
    successfully:'(013).
      WRITE:/ sy-uline(15).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
               (10) 'Sales order'(004), sy-vline.
      WRITE:/ sy-uline(15).
    ENDFORM.                    "display_column_headings
    *Subroutine to display SUCESS REPORT
    FORM DISPLAY_SUCESS.
      FORMAT COLOR COL_NORMAL.
      LOOP AT it_success.
        WRITE:/      sy-vline,
            (10)  it_success-SALESDOCUMENT, sy-vline.
        CLEAR it_success.
      ENDLOOP.
      WRITE:/ sy-uline(15).
      REFRESH: it_success.
      FORMAT COLOR COL_BACKGROUND.
    ENDFORM.                               "
    DISPLAY_REPORT
    *&      Form  errorreport
          text
    FORM errorreport.
      LOOP AT it_error.
        WRITE:/      sy-vline,
                (10) it_error-SRNO, sy-vline,
                 (40) it_error-err_msg, sy-vline.
      ENDLOOP.
      WRITE:/ sy-uline(104).
      REFRESH: it_error.
    endform.                    "errorreport
    *&      Form  ERRORHEADINGS
          text
    FORM ERRORHEADINGS.
      SKIP.
      WRITE:2 ' Error Report '(007) COLOR COL_NEGATIVE.
      SKIP.
      WRITE:2 'The following records failed during
    update:'(008).
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_HEADING.
      WRITE:/      sy-vline,
              (10) 'ERROR.'(009), sy-vline.
      WRITE:/ sy-uline(104).
      FORMAT COLOR COL_NORMAL.
    ENDFORM.                    "ERRORHEADINGS
    **&      Form  value_help
          text
    -->  p1        text
    <--  p2        text
    FORM value_help .
      CALL FUNCTION 'DSVAS_DOC_WS_FILENAME_GET_50'
        EXPORTING
          DEF_FILENAME     = ' '
          DEF_PATH         = ' '
          MASK             = ',.,..'
          MODE             = 'O'
          TITLE            = ' '
        IMPORTING
          FILENAME         = p_infile
        EXCEPTIONS
          INV_WINSYS       = 1
          NO_BATCH         = 2
          SELECTION_CANCEL = 3
          SELECTION_ERROR  = 4
          OTHERS           = 5.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.                    "value_help
    Regards,
    Amit.

Maybe you are looking for

  • Vista and XP no Longer Recognize Iphone as a removable drive for Pictures

    I was trying to download my photos from my iphone, and none of my computers recognize it. I did some searching, and it was recommended to remove any pictures that were not taken with the camera. I did this, and the computer recognizes it now. Why did

  • Field to make uneditable only for the current/selected row

    I have a web dynpro application and I  wanted to make some fields uneditable and for this I have done the following: I bound a context attribute to the readOnly property of all the fields you want to control. Then in the onEnter event of the main fie

  • Hp driver for labview for hp8156a attenuator

    I am looking for a hp8156a driver for labview. There is not one posted in the driver section of this site. Thanks

  • Project management software advice

    Hello - I work for a small company - half Mac users and half PC - and we need to get project management software which is compatible with MS Project - any advice please? Cheers Simon

  • Payables account defined as B/S account

    Hi , We have an account named " Payables to employees ".. However, in the account definition, i find that , it it defined as a Balance sheet account. Is it not supposed to be a PandL account ? Please suggest. Thanks, Srikanth.