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.

Similar Messages

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

  • 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

  • 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

  • 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

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

  • Can we copy the same quotation to more than one sales order?

    Can we copy the same quotation to more than one sales order?is it posibble.......pls reply

    Hi vepa venkat suhas.,
                                       If the quotation quantity is 100,with reference to quotaion if you raise a sales order for 100 materials then you cannot raise other sales order with reference to the quotation.untill your quatity of 100 in quotation is finished you can raise a sales order
    REWARD if helpfull
    Thanks & Regards
    Narayana

  • How to avoide entry of same material in  line item in same sales order?

    Dear SD Experts,
      In my project client has requirement related to Material in sales order. Client wants " while creating sales order (VA01) that time particular Material  should use one time in the sales order". If  same material used more than one time in item line in the existing sales order  that time system must  give the Error  Massage.
    Kindly suggest me how can I fulfill above requirement. 
    Regards,
    Manzoor Ahmad

    Hi Manzoor Ahmad,
    This is an interesting requirement  and this cannot be achieved through Standard SAP functionality. We can achive this through custom development in Userexit MV45AFZZ with the help of Developer . The logic has to be while creating sales order , you have created line no 10 with "matl no 1234 " and again trying to use the same material  in line no 30 , then the system has to check all the line items that are created before the line no 30 . This same logic need to be applied for Tcode VA02  also.
    Please post the  the solution once implemented.
    Thanks and regards
    Veera

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

  • System status of line item for a sales order.

    Hi,
    Is there any way to find the system status(line item) directly by providing sales order number?
    Iam following the below procedure,but it takes lot of time:
    VBAP-object number
    JEST-system status
    TJ02T- status text.
    Please provide some suggestions or work arounds to find the system status.
    I have gone through entire sdn, but couldnt find an answer.
    Regards,
    Vinod Boga

    Hi
    Use t-code V.26
    And select processing level as DOCUMENT ITEM
    Kapil

  • 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

  • Defaulting the Sotrage location for all the line items in my sales order

    Hi,
    I have a scenario to default the storage location automatically in my sales order for all the line items. It is not going to change for a particular sales org. Dist. channel & Division combination. Can you pls. suggest me a solution for this.
    Thanks
    Ghanesh.

    Hi,
       You can default the storage location by using the below user exit
    Storage location
    Auto determination of storage location as u2018XXXXu2019 for sales order
    Include - MV45AFZB
    Form - USEREXIT_SOURCE_DETERMINATION
    IF (VBAK-AUART = 'XXXX' and VBAK-VKORG = 'XXXX' and VBAK-VTWEG = 'XX').
    VBAP-LGORT   = 'ABCD'.
    Regards,
    Gopal.
    Edited by: Gopalakrishnan S on Feb 25, 2010 7:35 AM

  • 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

  • Creating line item for a sales order in user exit

    Hi
    I have to create a line item through user exit "userexit_save_document_prepare" when saving the sales order.I am doing this by appending a row to the internal table XVBAP in the user exit.
    The row is getting appended to the internal table but the line item is not getting created in the sales order .I dont getting any error also.
    Can anyone tell me what could be the reason for this and is there any other means by which i can create a line item through the user exit.

    You have to set the creation flag UPDKZ to 'I'.
    to correctly use the user exit refer to OSS note 0381348 Using user exit, customer exit, VOFM in SD.
    pls reward if helpful
    Roberto

Maybe you are looking for

  • Xsl-fo template and pdf attachments

    I'm using BI-Publisher and xsl-fo template to create my pdf reports. I need to attach a static pdf file to that report. Is that possible? I see it can be done using apache fop, how it can be done here? Thanks

  • 101 Spec Stock Indicat O Parts prov. Vendor in Quality inspect reporting

    Dear all, . We are creating a PO (ME21N) indicating in the view u201CDelivery addressu201D the same vendor than the PO and the flag u201CSubcontracting vendoru201D . The material has in MM02 the inspection type 0130 Receiving Insp. from External Proc

  • Tigger event when user change iphone time

    It is possible, we can trigger event if user change date and time of iphone.

  • Protective strip in MacBook Pro disc drive?

    While installing some software on my MacBook Pro, I noticed that a thin strip made of some type of plastic or protective coating came loose when my DVD drive kicked out the disc. The gray strand is about as long as the disc drive opening. Is this som

  • Stop running LaBVIEW at the specific time

    Hello....I am newbie in LabVIEW...I want to use the LabVIEW software to analysis the data get from the real time experiment...Besides that, i want to save the data in the notepad file with the file termination at the specified interval time using Wri