What is the maximum lines in sales order

hello friends,
what is the maximum lines that we can create in a single sales order?
how about in a sales invoice, how many is the maximum lines?
thanks!

There is no limit on the sales order lines, we do have 1800 to 2000 lines sales orders in our system.
But the AR side the defult value for the Profile option AR: Maximum Lines is 100k, if you anticipate more lines than 100k for each invoice run then you have to modify the profile option.
Srini C

Similar Messages

  • What are the User Exits for Sales Order creation process?

    Hi,
    what are the User Exits for Sales Order creation process? how can I find them?
    thanks in advance,
    will reward,
    Mindaugas

    Please check this info:
    User Exits In Sales Document Processing
    This IMG step describes additional installation-specific processing in sales document processing. In particular, the required INCLUDES and user exits are described.
    Involved program components
    System modifications for sales document processing affect different areas. Depending on the modification, you make the changes in the program components provided:
    MV45ATZZ
    For entering metadata for sales document processing. User-specific metadata must start with "ZZ".
    MV45AOZZ
    For entering additional installation-specific modules for sales document processing which are called up by the screen and run under PBO (Process Before Output) prior to output of the screen. The modules must start with "ZZ".
    MV45AIZZ
    For entering additional installation-specific modules for sales document processing. These are called up by the screen and run under PAI (Process After Input) after data input (for example, data validation). The modules must start with "ZZ".
    MV45AFZZ and MV45EFZ1
    For entering installation-specific FORM routines and for using user exits, which may be required and can be used if necessary. These program components are called up by the modules in MV45AOZZ or MV45AIZZ.
    User exits in the program MV45AFZZ
    The user exits which you can use for modifications in sales document processing are listed below.
    USEREXIT_DELETE_DOCUMENT
    This user exit can be used for deleting data which was stored in a separate table during sales document creation, for example, if the sales document is deleted.
    For example, if an additional table is filled with the name of the person in charge (ERNAM) during order entry, this data can also be deleted after the sales order has been deleted.
    The user exit is called up at the end of the FORM routine BELEG_LOESCHEN shortly before the routine BELEG_SICHERN.
    USEREXIT_FIELD_MODIFICATION
    This user exit can be used to modify the attributes of the screen fields.
    To do this, the screen fields are allocated to so-called modification groups 1 - 4 and can be edited together during a modification in ABAP. If a field has no field name, it cannot be allocated to a group.
    The usage of the field groups (modification group 1-4) is as follows:
    Modification group 1: Automatic modification with transaction MFAW
    Modification group 2: It contains 'LOO' for step loop fields
    Modification group 3: For modifications which depend on check tables or on other fixed information
    Modification group 4: is not used
    The FORM routine is called up for every field of a screen. If you require changes to be made, you must make them in this user exit.
    This FORM routine is called up by the module FELDAUSWAHL.
    See the Screen Painter manual for further information on structuring the interface.
    USEREXIT_MOVE_FIELD_TO_VBAK
    Use this user exit to assign values to new fields at sales document header level. It is described in the section "Transfer of the customer master fields into the sales document".
    The user exit is called up at the end of the FORM routine VBAK_FUELLEN.
    USEREXIT_MOVE_FIELD_TO_VBAP
    Use this user exit to assign values to new fields at sales document item level. It is described in the section "Copy customer master fields into the sales document".
    The user exit is called up at the end of the FORM routine VBAP_FUELLEN.
    USEREXIT_MOVE_FIELD_TO_VBEP
    Use this user exit to assign values to new fields at the level of the sales document schedule lines.
    The user exit is called up at the end of the FORM routine VBEP_FUELLEN.
    USEREXIT_MOVE_FIELD_TO_VBKD
    Use this user exit to assign values to new fields for business data of the sales document. It is described in the section "Copy customer master fields into sales document".
    The user exit is called up at the end of the FORM routine VBKD_FUELLEN.
    USEREXIT_NUMBER_RANGE
    Use this user exit to define the number ranges for internal document number assignment depending on the required fields. For example, if you want to define the number range depending on the sales organization (VKORG) or on the selling company (VKBUR), use this user exit.
    The user exit is called up in the FORM routine BELEG_SICHERN.
    USEREXIT_PRICING_PREPARE_TKOMK
    Use this user exit if you want to include and assign a value to an additional header field in the communication structure KOMK taken as a basis for pricing.
    USEREXIT_PRICING_PREPARE_TKOMP
    Use this user exit if you want to include or assign a value to an additional item field in the communication structure KOMP taken as a basis for pricing.
    USEREXIT_READ_DOCUMENT
    You use this user exit if further additional tables are to be read when importing TA01 or TA02.
    The user exit is called up at the end of the FORM routine BELEG_LESEN.
    USEREXIT_SAVE_DOCUMENT
    Use this user exit to fill user-specific statistics update tables.
    The user exit is called up by the FORM routine BELEG-SICHERN before the COMMIT command.
    Note
    If a standard field is changed, the field r185d-dataloss is set to X. The system queries this indicator at the beginning of the safety routine. This is why this indicator must also be set during the maintenance of user-specific tables that are also to be saved.
    USEREXIT_SAVE_DOCUMENT_PREPARE
    Use this user exit to make certain changes or checks immediately before saving a document. It is the last possibility for changing or checking a document before posting.
    The user exit is carried out at the beginning of the FORM routine BELEG_SICHERN.
    User exits in the program MV45AFZA
    USEREXIT_MOVE_FIELD_TO_KOMKD
    Use this user exit to include or assign values to additional header fields in the communication structure KOMKD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination".
    USEREXIT_MOVE_FIELD_TO_KOMPD
    Use this user exit to include or assign values to additional item fields in the communication structure KOMPD taken as a basis for the material determination. This is described in detail in the section "New fields for material determination".
    USEREXIT_MOVE_FIELD_TO_KOMKG
    Use this user exit to include or assign values to additional fields in the communication structure KOMKG taken as a basis for material determination and material listing. This is described in detail in the section "New fields for listing/exclusion".
    USEREXIT_MOVE_FIELD_TO_KOMPG
    Use this user exit to include or assign values to additional fields in the communication structure KOMPG taken as a basis for material determination and material listung. This is described in detail in the section "New fields for listing/exclusion".
    USEREXIT_REFRESH_DOCUMENT
    With this user exit, you can reset certain customer-specific fields as soon as processing of a sales document is finished and before the following document is edited.
    For example, if the credit limit of the sold-to party is read during document processing, in each case it must be reset again before processing the next document so that the credit limit is not used for the sold-to party of the following document.
    The user exit is executed when a document is saved if you leave the processing of a document with F3 or F15.
    The user exit is called up at the end of the FORM routine BELEG_INITIALISIEREN.
    User-Exits in program MV45AFZB
    USEREXIT_CHECK_XVBAP_FOR_DELET
    In this user exit, you can enter additional data for deletion of an item. If the criteria are met, the item is not deleted (unlike in the standard system).
    USEREXIT_CHECK_XVBEP_FOR_DELET
    In this user exit, you can enter additional data for deletion of a schedule line. If the criteria are met, the schedule line is not deleted (unlike in the standard system).
    USEREXIT_CHECK_VBAK
    This user exit can be used to carry out additional checks (e.g. for completion) in the document header. The system could, for example, check whether certain shipping conditions are allowed for a particular customer group.
    USEREXIT_CHECK_VBAP
    This user exit can be used to carry out additional checks (e.g. for completion) at item level.
    USEREXIT_CHECK_VBKD
    The user exit can be used to carry out additional checks (e.g. for completion) on the business data in the order.
    USEREXIT_CHECK_VBEP
    This user exit can be use to carry out additional checks (e.g. for completion) on the schedule line. During BOM explosion, for example, you may want certain fields to be copied from the main item to the sub-items (as for billing block in the standard system).
    USEREXIT_CHECK_VBSN
    You can use this user exit to carry out additional checks (e.g. for completion) on the serial number.
    USEREXIT_CHECK_XVBSN_FOR_DELET In this user exit, you can enter additional criteria for deletion of the serial number. If the criteria are met, the serial number is not deleted (unlike in the standard system).
    USEREXIT_FILL_VBAP_FROM_HVBAP
    You can use this user exit to fill additional fields in the sub-item with data from the main item.
    USEREXIT_MOVE_FIELD_TO_TVCOM_H
    You can use this user exit to influence text determination for header texts. For example, you can include new fields for text determination or fill fields that already exist with a new value.
    USEREXIT_MOVE_FIELD_TO_TVCOM_I
    You can use this user exit to influence text determination for item texts. For example, you can include new fields for text determination or fill fields that already exist with a new value.
    User-Exits for product allocation:
    The following user exits all apply to structure COBL, in which the data for account determination is copied to item level.
    USEREXIT_MOVE_FIELD_TO_COBL
    Option to include new fields in structure COBL.
    USEREXIT_COBL_RECEIVE_VBAK
    Option to assign values from the document header to the new fields.
    USEREXIT_COBL_RECEIVE_VBAP
    Option to supply values from the item to the new fields.
    USEREXIT_COBL_SEND_ITEM
    A changed field can be copied from the structure into the item. You could use the user exit to display a certain field in the account assignment block (see also MV45AFZB).
    USEREXIT_COBL_SEND_HEADER
    A changed field can be copied from the structure to the header (see source text MV45AFZB)
    USEREXIT_SOURCE_DETERMINATION
    You can use this user exit to determine which plant will be used for the delivery. In the standard system, the delivering plant is copied from the customer master or the customer-material info record. If you want to use a different rule, then you must enter it in this user exit.
    USEREXIT_MOVE_FIELD_TO_ME_REQ
    With this user exit you can include additional fields for the following fields:
    EBAN (purchase requisition)
    EBKN (purchase requisition-account assignment)
    USEREXIT_GET_FIELD_FROM_SDCOM
    Option to include new fields for the variant configuration. Fields that are included in structure SDCOM can be processed and then returned to the order.
    USEREXIT_MOVE_WORKAREA_TO_SDWA
    You can use this user exit to format additional work areas for the variant configuration. You will find notes on the user exit in MV45AFZB.
    User-Exits for first data transfer:
    The following user exits can only be used for the first data transfer.
    Note
    Only use the user exits if the names/fields do NOT have the same name.
    USEREXIT_MOVE_FIELD_TO_VBAKKOM
    Option to include additional fields in structure VBAKKOM (communiction fields for maintaining the sales document header)
    USEREXIT_MOVE_FIELD_TO_VBAPKOM
    Option to include additional fields in structure VBAPKOM (communication fields for maintaining a sales item)
    USEREXIT_MOVE_FIELD_TO_VBEPKOM
    Option to include additional fields in structure VBEPKOM (communication fields for maintaining a sales document schedule line)
    USEREXIT_MOVE_FIELD_TO_VBSN
    You can use this user exit to include fields in structure VBSN (scheduling agreement-related change status).
    USEREXIT_MOVE_FIELD_TO_KOMKH
    You can use this user exit to include new fields for batch determination (document header).
    USEREXIT_MOVE_FIELD_TO_KOMPH
    You can use this user exit to include new fields for batch determination (document item).
    USEREXIT_CUST_MATERIAL_READ
    You can use this user exit to set another customer number in the customer material info record (e.g. with a customer hierarchy)
    USEREXIT_NEW_PRICING_VBAP
    Option for entry of preconditions for carrying out pricing again (e.g. changes made to a certain item field could be used as the precondition for pricing to be carried out again). Further information in MV45AFZB.
    USEREXIT_NEW_PRICING_VBKD
    Option for entry of preconditions for carrying out pricing again (e.g. changes to the customer group or price group could be set as the preconditions for the system to carry out pricing again). Further information in MV45AFZB.
    User-Exits in Program MV45AFZD
    USEREXIT_CONFIG_DATE_EXPLOSION
    The BOM is exploded in the order with the entry date. You can use this user exit to determine which data should be used to explode the BOM (explosion with required delivery date, for example).
    User exits in the program FV45EFZ1
    USEREXIT_CHANGE_SALES_ORDER
    In the standard SAP R/3 System, the quantity and confirmed date of the sales document schedule line is changed automatically if a purchase requisition is allocated, and it or the sales document is changed (for example, quantity, date).
    If you want to change this configuration in the standard system, you can define certain requirements in order to protect your sales orders from being changed automatically. Use this user exit for this purpose. Decide at this point whether the schedule lines are to be changed.
    User-Exits in Program RV45PFZA
    USEREXIT_SET_STATUS_VBUK
    In this user exit you can you can store a specification for the reserve fields in VBUK (header status). Reserve field UVK01 could, for example, be used for an additional order status (as for rejections status, etc.).
    The following workareas are available for this user exit:
    VBUK (header status)
    FXVBUP (item status)
    FXVBUV (Incompletion)
    USEREXIT_SET_STATUS_VBUP
    In this user exit you can you can store a specification for the reserve fields for VBUP (item status).
    The following workareas are available for this user exit:
    FXVBAP (Item data)
    FXVBAPF (Dynamic part of order item flow)
    FXVBUV (Incompletion)
    USEREXIT_STATUS_VBUK_INVOICE
    You can use this user exit to influence billing status at header level.
    User exits in the screens
    Additional header data is on screen SAPMV45A 0309, additional item data on screen SAPMV45A 0459. These screens contain the Include screens SAPMV45A 8309 or SAPMV45A 8459 as user exits.
    Fields which are also to be included in the sales document for a specific installation should be included on the Include screens for maintaining. If an application-specific check module is needed for the fields, this can be included in the Include MV45AIZZ. The module is called up in the processing logic of the Include screens.
    For field transports, you do not have to make changes or adjustments.
    Example
    A new field, VBAK-ZZKUN, should be included in table VBAK.
    If the check is defined via the Dictionary (fixed values or check table) the field must be included with the fullscreen editor in the Include screen SAPMV45A 8309. In this case, no change has to be made to the processing logic.
    User Exits in Program MV45AFZ4
    USEREXIT_MOVE_FIELD_TO_KOMK
    You can use this user exit to add or edit additional header fields in the communication structure - KOMK- for free goods determination. For more information, see the New Fields for Free Goods Determination IMG activity.
    USEREXIT_MOVE_FIELD_TO_KOMP
    You can use this user exit to add or edit additional item fields in the communication structure KOMP for free goods determination. For more information see the New Fields for Free Goods Determination IMG activity.
    User Exits in the SAPFV45PF0E and SAPFV45PF0C Programs
    EXIT_SAPFV45P_001
    You can use this user exit to decide whether intercompany billing data is used in the profitability segment for cross-company code sales, or whether the data comes from external billing (external customer, sales data from the selling company code.
    Regards
    Eswar

  • What is the Purpose of Internal Sales Order in OM

    Hello All,
    Compared to normal Inter-Organization Transfer (Direct&In transit) in which business scenario, Internal Sales Order(ISO) Cycle would fit ? (In Manufacturing , Distribution etc.,)
    what is the (main) purpose of going for Internal Requisition (IR) - ISO ? & usage of Transfer Credit account in Inter-Org Transfer?
    Please share your implementation experience ?
    (if any)
    Thanks, Jay

    The most important 1st thought is ::
    Ques 1. Why ISO over Direct-Org transfer ?
    Ans ---- Direct-Org transfer is immediate 2-way txns where ... there is no concept of In-transit Inventory & its tracking(s).
    Source-Org Sub-inventory ~ issues out
    Dest'n-Org Sub-inventory ~ receives in
    which is very much like Sub-inventory transfers with the difference that its Inter-Org
    Ques 2. What is this concept of In-transit Inventory ~ Inter-Org transfer v/s ISO ?
    Ans ---- Yes both ( Inter-Org transfer or ISO ) have this concept of In-transit inventory & its tracking(s).
    Ques 3. Now the question is -- Why then ISO over Inter-Org transfer ? How ISO rules above Inter-Org transfer ?
    Ans ---- ISO is requisition based. Now using which we can have booked Sales-Order.
    Using their desirable shipping dates Planning, Replenishment & Reservations can be done. You just cannot do this Inter-Org transfer.
    Also the cost-price of Source-Org goes into the Dest'n-Org. Whereas in ISO you have both provision same cost price our using price-lists / modifiers ?
    No doubt !! ISO is very scalable route.
    Other technical reasons :: feel free to communicate ::
    Ajay Kuma
    c510-456-5322

  • What are the tables corresponding to sales order - parners

    Hi Folks,
    Can u pls let me know what are the corresponding tables n fileds for the va02->parners i.e sold to party, ship to party etc, buyer , bill to party and contact details , adress of these parners wil store.
    Thanks in advance.
    Regards
    Rajesh

    hii i am sending u the full code thta i had designed for my sales order confirmation using sap script
    TABLES: VBAK,
            ADRC,
            VBPA,
            VBAP,
            SPELL.
    DATA: BEGIN OF  TVBAK OCCURS 0,
          VBELN LIKE VBAK-VBELN,
          AUDAT LIKE VBAK-AUDAT,
          KUNNR LIKE VBAK-KUNNR,
          VKORG like VBAK-VKORG,
          END OF TVBAK.
    DATA: BEGIN OF TADRC OCCURS 0,
          ADDRNUMBER LIKE ADRC-ADDRNUMBER,
          NAME1 LIKE ADRC-NAME1,
          NAME2 LIKE ADRC-NAME2,
          CITY1 LIKE ADRC-CITY1,
          POST_CODE1 LIKE ADRC-POST_CODE1,
          COUNTRY LIKE ADRC-COUNTRY,
          KUNNR LIKE VBPA-KUNNR,
          VBELN LIKE VBPA-VBELN,
          END OF TADRC.
    DATA:BEGIN OF TVBPA OCCURS 0,
         ADRNR LIKE VBPA-ADRNR,
         KUNNR LIKE VBPA-KUNNR,
         VBELN LIKE VBPA-VBELN,
         END OF TVBPA.
    DATA: BEGIN OF TVBAP OCCURS 0,
          POSNR LIKE VBAP-POSNR,
          VBELN LIKE VBAP-VBELN,
          MATNR LIKE VBAP-MATNR,
          ARKTX LIKE VBAP-ARKTX,
          KWMENG LIKE VBAP-KWMENG,
          VRKME LIKE VBAP-VRKME,
          NETWR LIKE VBAP-NETWR,
          WAERK LIKE VBAP-WAERK,
          END OF TVBAP.
    DATA :W_VBELN LIKE VBAK-VBELN,
          s_amount like vbap-netwr ,
          amount_word LIKE SPELL.
    selection-screen: begin of block b1.
    select-options: s_vbeln for vbpa-vbeln no intervals no-extension.
    selection-screen: end of block b1.
    *AT SELECTION-SCREEN.
      SELECT VBELN INTO W_VBELN FROM VBAK
          WHERE VBELN IN S_VBELN.
    *ENDSELECT.
    START-OF-SELECTION.
    SELECT VBELN AUDAT KUNNR VKORG FROM VBAK INTO CORRESPONDING
    FIELDS OF
    TABLE TVBAK WHERE VBELN IN
    S_VBELN.
       IF SY-SUBRC <> 0.
         MESSAGE I398(00) WITH 'NO DATA'.
       ENDIF.
    SELECT NAME1 NAME2 CITY1 POST_CODE1 COUNTRY FROM ADRC INTO
    CORRESPONDING
    FIELDS OF
    TABLE TADRC.
       IF SY-SUBRC <> 0.
         MESSAGE I398(00) WITH 'NO DATA1'.
       ENDIF.
    SELECT ADRNR KUNNR VBELN  FROM VBPA INTO CORRESPONDING
    FIELDS OF
    TABLE TVBPA WHERE PARVW = 'WE'.
       IF SY-SUBRC <> 0.
         MESSAGE I398(00) WITH 'NO DATA2'.
       ENDIF.
    SELECT VBELN POSNR MATNR ARKTX KWMENG VRKME NETWR WAERK FROM VBAP INTO
    CORRESPONDING
    FIELDS OF TABLE TVBAP WHERE VBELN IN
    S_VBELN.
      IF SY-SUBRC <> 0.
       MESSAGE I398(00) WITH 'NO DATA3'.
       ENDIF.
    LOOP AT TADRC.
       READ TABLE TVBPA WITH KEY ADRNR = TADRC-ADDRNUMBER.
          IF SY-SUBRC = 0.
           MOVE TVBPA-KUNNR TO TADRC-KUNNR.
           MOVE TVBPA-VBELN TO TADRC-VBELN.
           MODIFY TADRC.
          ENDIF.
    ENDLOOP.
    ****reward if helpfull ******

  • What are the steps to send sales order custom field from CRM to ECC

    Hi Xperts,
      We have created a custom field in sales order [ VBAK] and successfully replicate its value from ECC to CRM. But while doing the enhancement to replicate the field value from CRM to ECC [ When the SO is created in CRM ] we are not able to do so.
    We used a FM in CRM0_300, but while replicating the SO from CRM to R/3 it is not getting called.
    Please help us by providing the steps to do the full enhancement to replicate the custom field of SO from CRM to ECC.
    Thanks in Advance.

    Hi Anjaneyulu,
    We are faced with a similar situation as you.
    Here is our scenario with the steps that we performed so far:
    1.  We have added a few custom fields in CRM 7.0 (Ehp1) using AET.
         The BDoc BUS_TRANS_MSG has been automatically extended with these custom fields.
    2.  On ECC side also, same custom fields have been added to VBAK and VBAP, using APPEND STRUCTURE. Fields were added to ADDITIONAL DATA TAB B in VA01 / VA02 transactions.
    3. Extended BAPI structures BAPISDITM and BAPISDITMX in both CRM and R/3 Side.
    4. As mentioned in the note 1053817, we have implemented BADI CRM_DATAEXCHG_BADI -> Method CRM_DATAEXCH_AFTER_BAPI_FILL in CRM (mapped fields from BDOC to BAPI structures)
    5. In the above note, for R/3 BAPI to R/3 API they have given to implement user exit USEREXIT_MOVE_FIELD_TO_VBAP which we found in MV45AFZZ. But in this we are unable to find BAPI Structure to map.
    Our issue is, when a sales order is created in CRM, it is getting replicated on ECC. But, only standard fields are getting replicated. The custom fields that we have added are remaining empty on ECC side.
    In CRM --> txn SMW01, we can see that the BDOC is populated with custom fields also.
    Could you let us know if your issue is solved completely. Are you able to see the value of custom field, in ECC? Did you use AET to add fields in CRM.
    Could you please give us the steps that you have done.

  • How to deactivate schedule line in sales order

    hi friends,
    how can i deactivate the schedule line in sales order so that we can deliver the sales order after the schedule date. i can uderstand that system is not allowing before schedule date. but what if i want to deliver after that.
    Thanks in advance.
    Regards,
    Solomon

    hi,
    this is to inform you that,
    here you need to switch off:
    schedule lines allowed
    in schedule lines control data - remove or un check - availability/TOR
    In SPRO - Availability Check settings.
    but i have a question here:
    what is the business logic.
    do you want to do the same with all the sales orders or not.
    please update the forum
    then answer will be different
    balajia

  • How to delete header condtion line of sales order by BAPI

    Hi,
    I want to delete the condtion line of sales order header using BAPI "BAPI_SALESORDER_CHANGE",
    it is work well in item level condition type, but it is not work for header condition type. show error message "missing item number" since of pass item number "000000" for header condition line.
    Below is reference source code, thanks in advance.
    *& Report  ZTEST_BAPI_SO_DELETECONDLINE
    *& Sample program to call BAPI_SALESODRER_CHANGE to
    *& delete condition line of so line item
    REPORT  ZTEST_BAPI_SO_DELETECONDLINE.
    ***--- Structures for create BAPI
    DATA: SALESDOCUMENT LIKE BAPIVBELN-VBELN.
    DATA: ORDER_HEADER_INX LIKE BAPISDH1X,
          BEHAVE_WHEN_ERROR LIKE BAPIFLAG-BAPIFLAG,
          SIMULATION LIKE BAPIFLAG-BAPIFLAG.
    DATA: BEGIN OF ORDER_ITEM_IN OCCURS 2.
            INCLUDE STRUCTURE BAPISDITM.
    DATA: END OF ORDER_ITEM_IN.
    DATA: BEGIN OF ORDER_ITEM_INX OCCURS 2.
            INCLUDE STRUCTURE BAPISDITMX.
    DATA: END OF ORDER_ITEM_INX.
    DATA: BEGIN OF SCHEDULE_LINES OCCURS 2.
            INCLUDE STRUCTURE BAPISCHDL.
    DATA: END OF SCHEDULE_LINES.
    DATA: BEGIN OF SCHEDULE_LINESX OCCURS 2.
            INCLUDE STRUCTURE BAPISCHDLX.
    DATA: END OF SCHEDULE_LINESX.
    DATA: BEGIN OF ORDER_CFGS_REF OCCURS 2.
            INCLUDE STRUCTURE BAPICUCFG.
    DATA: END OF ORDER_CFGS_REF.
    DATA: BEGIN OF ORDER_CFGS_INST OCCURS 2.
            INCLUDE STRUCTURE BAPICUINS.
    DATA: END OF ORDER_CFGS_INST.
    DATA: BEGIN OF ORDER_CFGS_VALUE OCCURS 2.
            INCLUDE STRUCTURE BAPICUVAL.
    DATA: END OF ORDER_CFGS_VALUE.
    DATA: BEGIN OF CONDITIONS_IN OCCURS 2.
            INCLUDE STRUCTURE BAPICOND.
    DATA: END OF CONDITIONS_IN.
    DATA: BEGIN OF CONDITIONS_INX OCCURS 2.
            INCLUDE STRUCTURE BAPICONDX.
    DATA: END OF CONDITIONS_INX.
    DATA: BEGIN OF EXTENSIONIN OCCURS 2.
            INCLUDE STRUCTURE BAPIPAREX.
    DATA: END OF EXTENSIONIN.
    DATA: BEGIN OF RETURN OCCURS 2.
            INCLUDE STRUCTURE BAPIRET2.
    DATA: END OF RETURN.
    DATA: TMP_POSNR  LIKE VBAP-POSNR,
          L_KNUMV    LIKE VBAK-KNUMV,
          L_KSCHL    LIKE KONV-KSCHL,
          L_STUNR    LIKE KONV-STUNR,
          L_ZAEHK    LIKE KONV-ZAEHK.
    ***--- Selection
    PARAMETERS: P_VBELN LIKE VBAK-VBELN OBLIGATORY MEMORY ID AUN DEFAULT '7000510', "'0001007443', " SO
                P_POSNR LIKE VBAP-POSNR OBLIGATORY DEFAULT '000000' , " so item
                P_CONDN LIKE  KONV-KSCHL  DEFAULT 'ZOSP',    " condition type
                P_CONDI LIKE  KONV-ZAEHK  DEFAULT '01',      " Condition item number
                P_TEST  AS CHECKBOX DEFAULT 'X'.             " test mode
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT         = P_VBELN
        IMPORTING
          OUTPUT        = P_VBELN.
      CLEAR: L_KNUMV.
      SELECT SINGLE KNUMV INTO L_KNUMV
      FROM VBAK
      WHERE VBELN  = P_VBELN.
      IF SY-SUBRC = 0.
        CLEAR: L_KSCHL,L_ZAEHK,L_STUNR.
        SELECT SINGLE KSCHL ZAEHK STUNR INTO (L_KSCHL, L_ZAEHK, L_STUNR)
        FROM KONV
        WHERE KNUMV = L_KNUMV
          AND KPOSN = P_POSNR
          AND ZAEHK = P_CONDI
          AND KSCHL = P_CONDN.
        IF SY-SUBRC <> 0.
          WRITE:/ 'Condition type or condition item is not exist.'.
          EXIT.
        ENDIF.
      ELSE.
        WRITE:/ 'Sales order number is not exist'.
        EXIT.
      ENDIF.
    IF L_ZAEHK IS INITIAL.
          WRITE:/ 'Condition type or condition item is not exist.'.
          EXIT.
    ENDIF.
    SALESDOCUMENT = P_VBELN.     " Sales order number
    ORDER_HEADER_INX-UPDATEFLAG = 'U'.   "U = change sales order
    ***Item Data
    ORDER_ITEM_IN-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_IN.
    ORDER_ITEM_INX-UPDATEFLAG = 'U'.   "I = add, U= update, D=delete
    ORDER_ITEM_INX-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_INX.
    ***--- Begin delete a condition line
    ***--- Make sure to use update flag 'D'. Here I = add, U= update, D=delete
    CLEAR: CONDITIONS_IN,CONDITIONS_INX.
    REFRESH: CONDITIONS_IN,CONDITIONS_INX.
    CONDITIONS_IN-ITM_NUMBER = P_POSNR.
    CONDITIONS_IN-COND_ST_NO = L_STUNR.
    CONDITIONS_IN-COND_COUNT = L_ZAEHK.
    CONDITIONS_IN-COND_TYPE  = L_KSCHL.
    APPEND CONDITIONS_IN.
    CONDITIONS_INX-UPDATEFLAG = 'D'.
    CONDITIONS_INX-ITM_NUMBER  = P_POSNR.
    CONDITIONS_INX-COND_ST_NO  = L_STUNR.
    CONDITIONS_INX-COND_COUNT  = L_ZAEHK.
    CONDITIONS_INX-COND_TYPE   = L_KSCHL.
    APPEND CONDITIONS_INX.
    ***--- End delete a condition line
    BEHAVE_WHEN_ERROR = 'P'.
    SIMULATION = P_TEST.   " Test mode or not
    "=== call BAPI
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        SALESDOCUMENT               = SALESDOCUMENT
        ORDER_HEADER_INX            = ORDER_HEADER_INX
        LOGIC_SWITCH                = '    U'
      TABLES
        RETURN                      = RETURN
        ORDER_ITEM_IN               = ORDER_ITEM_IN
        ORDER_ITEM_INX              = ORDER_ITEM_INX
        CONDITIONS_IN               = CONDITIONS_IN
        CONDITIONS_INX              = CONDITIONS_INX .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    WRITE: / 'Return code =', SY-SUBRC.
    SKIP 1.
    LOOP AT RETURN.
      WRITE: / RETURN-MESSAGE.
    ENDLOOP.
    Edited by: hank jiang on May 21, 2010 5:07 AM
    Edited by: hank jiang on May 21, 2010 5:25 AM
    Edited by: hank jiang on May 21, 2010 5:27 AM

    SALESDOCUMENT = P_VBELN.     "Sales order number
    ORDER_HEADER_INX-UPDATEFLAG = 'U'.   "U = change sales order
    ORDER_ITEM_IN-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_IN.
    ORDER_ITEM_INX-UPDATEFLAG = 'U'.   "I = add, U= update, D=delete
    ORDER_ITEM_INX-ITM_NUMBER = P_POSNR.
    APPEND ORDER_ITEM_INX.
    "Begin delete a condition line
    "Make sure to use update flag 'D'. Here I = add, U= update, D=delete
    CLEAR: CONDITIONS_IN,CONDITIONS_INX.
    REFRESH: CONDITIONS_IN,CONDITIONS_INX.
    CONDITIONS_IN-ITM_NUMBER = P_POSNR.
    CONDITIONS_IN-COND_ST_NO = L_STUNR.
    CONDITIONS_IN-COND_COUNT = L_ZAEHK.
    CONDITIONS_IN-COND_TYPE  = L_KSCHL.
    APPEND CONDITIONS_IN.
    CONDITIONS_INX-UPDATEFLAG = 'D'.
    CONDITIONS_INX-ITM_NUMBER  = P_POSNR.
    CONDITIONS_INX-COND_ST_NO  = L_STUNR.
    CONDITIONS_INX-COND_COUNT  = L_ZAEHK.
    CONDITIONS_INX-COND_TYPE   = L_KSCHL.
    APPEND CONDITIONS_INX.
    "End delete a condition line
    BEHAVE_WHEN_ERROR = 'P'.
    SIMULATION = P_TEST.   " Test mode or not
    "=== call BAPI
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
      EXPORTING
        SALESDOCUMENT               = SALESDOCUMENT
        ORDER_HEADER_INX            = ORDER_HEADER_INX
        LOGIC_SWITCH                = '    U'
      TABLES
        RETURN                      = RETURN
        ORDER_ITEM_IN               = ORDER_ITEM_IN
        ORDER_ITEM_INX              = ORDER_ITEM_INX
        CONDITIONS_IN               = CONDITIONS_IN
        CONDITIONS_INX              = CONDITIONS_INX .
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    WRITE: / 'Return code =', SY-SUBRC.
    SKIP 1.
    LOOP AT RETURN.
      WRITE: / RETURN-MESSAGE.
    ENDLOOP.

  • Tcode for displaying the changes made to sales order

    hi,
    i want to know is dere any tcode which displays how many times and by whom and what are the changes made to sales order.

    hiii
    use VA03 for display..
    also refer to following link
    Regarding 'display of changes in the sales order'.
    regards
    twinkal

  • Ignore the number of schedule lines in sale order item when run MRP

    Dear All,
    I have a problem when I create production order (discrete manufacturing)
    When I create a sale order with one sale order item and 3 schedule lines for this sale order item.
    After that, I run MRP for this sale order, what I get is 3 planned orders for 3 schedule lines. It means that I will have 3 production orders for 1 sale order item.
    I want  create one production order for one sale order item whatever the number of schedule lines in sale order item.
    I think I have to config in MRP. Please help me.
    Thanks in advance

    Dear
    Check in OPPQ then look in Master data Availability Check & strategy for material also check whether u have maintained strategy for same material and see did u extended sales views for other material
    As u said 3 schedule lines for this sale order item check whether u have extended sales views for next material
    With Regards
    Pushpalas

  • Change the Profit Center in Sales Order line item's Account assignment tab

    Hi Gurus,
    I need to change the Profit Center at Sales order Line item in Account Assignment Tab. Currently  The Profit center is coming from Material Master for the Line Item's Material as default but I have to change / overwrite  that.
    Can any body provide me how can i achive that means
    Any User exits, substitution or any thing ?
    I tried MV45AFZZ but i am not able to find out the right place where I can change COBL-PRCTR.
    Sony

    Hi
    There is perform which moves the values to VBAP field.
    This PRCTR field is stored in VBAP (i.e., SO line item table)
    USEREXIT_MOVE_FIELD_TO_VBAP
    Hope it works.
    VVR

  • How to make the connection between a sale order and an invoice in SDK

    Hi,
    Im trying to make the connection between a sales order and an invoice using the SDK.
    Here is how i create each of them:
    Invoice:
    public int SalesInvoiceInternalSave(string buisnesspartnerCardCode, DateTime dueDate, double discountPercent, string id, IList<InternalItem> items, ref int invoiceId)
          int res = 0;
          SAPbobsCOM.Documents invoice_entry = (SAPbobsCOM.Documents)Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);     
          invoice_entry.CardCode = buisnesspartnerCardCode;
          invoice_entry.DocDueDate = dueDate;
          invoice_entry.DiscountPercent = discountPercent;
          invoice_entry.Reference2 = id;
          foreach (InternalItem item in items)
            invoice_entry.Lines.WarehouseCode = item.Shopid;
            invoice_entry.Lines.ItemCode = item.Code;
            invoice_entry.Lines.ItemDescription = item.Name;
            invoice_entry.Lines.Quantity = item.Quantity;
            invoice_entry.Lines.UnitPrice = item.Price;
            invoice_entry.Lines.Add();
          res = invoice_entry.Add();
          return res;
    Sales order:
        public Boolean SalesOrderInternalSave(string orderId, string buisnesspartnerCardCode, DateTime dueDate, IList<InternalItem> items)
          SAPbobsCOM.Documents order_entry = (SAPbobsCOM.Documents)Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders);
          order_entry.CardCode = buisnesspartnerCardCode;
          order_entry.DocDueDate = dueDate;
          foreach (InternalItem item in items)
            order_entry.Lines.WarehouseCode = item.Shopid;
            order_entry.Lines.ItemCode = item.Code;
            order_entry.Lines.ItemDescription = item.Name;
            order_entry.Lines.Quantity = item.Quantity;
            order_entry.Lines.UnitPrice = item.Price;
            order_entry.Lines.Add();      
          int res = order_entry.Add();
          return res == 0;
    What do i need to change to get the connection between the two of them?
    And how do you insert a amount (not percent) discount into an invoice?
    Regards,
    Torben

    Hi,
    Add the sale order, then add the invoice. and while adding the invoice please add the following details to the invoce documen
    invoice_entry.Lines.BaseEntry = 'Doc entry of the newly created SO
    invoice_entry.Lines.BaseLine = 'Line No of the SO
    invoice_entry.Lines.BaseType = 17 'For sales order document type.
    Hope it helps,
    Vasu Natari.

  • Convert multiple lines for same material into a single line in Sales Order

    Our company has a requirement, they want if there are multiple lines exist for the same material in sales order and purchase order then it should become like one single line.
    10    35712  5pcs
    20   100885  10 pcs
    30   35712   10pcs
    Now our requirement is that should  become a single line like this
    10  35712  15pcs.
    I will   Text Removed.
    Regards,
    Khawar
    Message was edited by: G Lakshmipathi
    Please dont add such text in your post

    Now our requirement is that should  become a single line like this
    Where?  Meanwhile, I hope, you would have searched in SCN / Google before posting as it is a basic question and needs to be locked.  If searched, specify clearly what efforts you took to find out solution to your requirement.
    G. Lakshmipathi

  • The pricing procedure in Sales order is not getting copied into invoice

    The pricing procedure in Sales order is not getting copied into invoice.
    I have created a document type (pricing procedure),based on the document type ,pricing procedure determination is done.
    So while creating sales order the pricing procedure is determined but when invoice is created the pricing doesnt refelect in the invoice.How to over come this problem

    Hi
    Please check the in OVKK, weather you have maintained correctly or not.Also check in the Billing document type details what is the Document pricing procedure that has been maintained.
    Regards
    Srinath

  • Question about the rescheduling of a Sales Order and its Production Order

    Hello Everybody,
    I experience something strange with the rescheduling of a Sales Order and its corresponding Production Order.
    It will be easier to explain with an example...
    For a material, I have created a Sales Order.
    And from this Sales Order, I have now a Production Order converted from a Planned Order generated by the MRP Run.
    This is what I have in transaction MD04:
    SALES ORDER
    AV DATE: 20/02/2008
    GR DATE: 20/02/2008
    PRODUCTION ORDER
    AV DATE: 20/02/2008
    GR DATE: 18/02/2008    (GR process time is 2 days).
    ==> OK !
    Now, I have to reschedule the Sales Order one week sooner.
    SALES ORDER
    AV DATE: 13/02/2008
    GR DATE: 13/02/2008
    After transaction COHV to reschedule the Production Order, I have:
    PRODUCTION ORDER
    AV DATE: 15/02/2008
    GR DATE: 13/02/2008
    But I expected to have:
    PRODUCTION ORDER
    AV DATE: 13/02/2008
    GR DATE: 11/02/2008
    Do you have an idea about what is wrong?
    Thanks in advance for your help on this subject.
    Regards,
    Rudy

    Hello.
    Thank you for your reply.
    But in fact, I am doing some tests on a test platform, which is using an "old" copy of production database.
    So, there can't be data already scheduled for the dates I am using.
    Moreover, I just tried now to do the same with dates in November 2008, exactly with the same results.
    In production platform, they experience this problem too.
    Summary of my new test:
    Before rescheduling:
    SALES ORDER:
    AV. DATE = 20/11/2008
    GR. DATE = 20/11/2008
    PROD. ORDER:
    AV. DATE = 20/11/2008
    GR. DATE = 18/11/2008
    After rescheduling of one week sooner:
    SALES ORDER:
    AV. DATE = 13/11/2008
    GR. DATE = 13/11/2008
    PROD. ORDER:
    AV. DATE = 15/11/2008  (ipo  13/11/2008)
    GR. DATE = 13/11/2008  (ipo  11/11/2008)
    I really don't understand why I don't have the same kind of dates as the ones I get before the rescheduling...
    In my mind, I expect to have all these dates set back of one week...
    Regards
    Rudy
    Rudy

  • What's the maximum speed that AirPort Extreme can share with Wifi?

    The thing is that I am going to buy a new Wifi Router, but I was considering an AirPort Extreme from Apple but is not specify what's the maximum speed of Internet connection for the Wifi to share, I know that the limit might depend on my service provider, but I don't know what is the theoretical maximum of the AirPort Extreme, does anybody knows?

    1,000 Mbps on an Ethernet connection
    450 Mbps on a wireless connection, assuming you have a new computer and it has line of sight with the AirPort Extreme. Otherwise, the speed will be lower due to obstructions absorbing the signal.

Maybe you are looking for

  • Adding Transitions freezes and stutters playback in Preview.

    I'm posting this as a new issue. Since I've narrowed down my "stuttering/freezing on playback" problem while in Preview/Edit mode. This begins to happen as SOON as I add a transition. Whether I add it automatically, or manually. The clips play fine w

  • Crystal asking for credentials

    I have a new SQL 2005 instance on the same server as the previous instance and have changed the data source of Crystal reports to use the new instance. Now the reports ask for login credentials though I pass them with the request. If I point the repo

  • Sales Order Approval

    Hi All, 1. I have set the approval for the SO. Once the SO is approved from the manager, In some cases there might be changes in Terms & Conditions and I want to make the changes of Terms & Conditions. These changes will be done after the approval on

  • App updates not running on ipad2 after upgrade to iOS 5 - anybody know or a solution or have same problem?

    App updates not running on ipad2 after upgrade to iOS 5 - anybody know or a solution or have same problem?

  • BAPI : BAPI_ROUTING_CREATE

    Hi, I want to upload data operation and Inspection Char using BAPI : BAPI_ROUTING_CREATE. Can anybody explain me with coding. thanks naresh