USEREXIT_PRICING_PREPARE_TKOMP

Hi,
I have added new field on the screen of va01 and va02. The idea is to display amount with VAT. In va02 everything is ok.I made some modifications in USEREXIT_PRICING_PREPARE_TKOMK and it is OK.
But when I try to calculate the amount with VAT in USEREXIT_PRICING_PREPARE_TKOMP I can't find the net price,which I would like to use for calculation. Which structure should I use ?
Thanks,
Stefan

Hi
Try to check VBAP-NETPR
Max

Similar Messages

  • Enhancment USEREXIT_PRICING_PREPARE_TKOMP

    Hi all,
    I have a surcharge condition type ZS00 on the billing document, the condition type ZS00 has the key combination material(MATNR) and delivery priority(LPRIO), the surcharge will be maintained by material and delivery priority.
    I need deterimin this surcharge ZS00 during creating billing, but the delivery combination can not be transfered to billing from delivery.
    So I activate the enhancment USEREXIT_PRICING_PREPARE_TKOMP in include RV60AFZZ, and put the following code:
    FORM USEREXIT_PRICING_PREPARE_TKOMP.
      SELECT * FROM LIKP WHERE VBELN = Delivery number.
      TKOMP-LPRIO = LIKP-LPRIO.
    ENDFORM.
    but I still can not get the Surcharge on the billing document and I am sure I maintained properly the condition record for this surcharge condition.
    can you give me some advise?
    Thanks!

    means does TKOMP-LPRIO have the correct value what you expect /

  • LV60AFZZ - USEREXIT_PRICING_PREPARE_TKOMP

    Hello!
       I have updated the form USEREXIT_PRICING_PREPARE_TKOMP in program LV60AFZZ, but I have a problem.  LV60AFZZ is an include program, but I can tell by using the where-used functionality that it is not included in a main program.
       I know with other program of this nature that you need to run a program to re-generate the main program.  Does anyone know either a) The main program that should include LV60AFZZ, or b) the program that can do the generation?
    Thanks!
    John

    Here is the docu for pricing releated billing docs
    User Exits For Price Determination
    USEREXIT_PRICING_PREPARE_TKOMK (module pool SAPLV60A, program RV60AFZZ)
    This user exit allows you to copy additional fields for pricing in the TKOMK communication structure (header fields), which have not been provided in the standard SAP system. These fields can also be used for pricing in the billing document.
    This user exit is described in detail in the "New fields in pricing" section.
    USEREXIT_PRICING_PREPARE_TKOMP (module pool SAPLV60A, program RV60AFZZ)
    This user exit allows you to copy additional fields for pricing in the TKOMP communication structure (item fields), which have not been provided in the standard SAP system. These fields can also be used for pricing.
    This user exit is described in detail in the "New fields in pricing" section.
    USEREXIT_FIELD_MODIFICATION (module pool SAPMV61A, program MV61AFZA)
    You can use this user exit to adjust the display of individual lines in the condition screen by changing the display attributes of the screen fields. This does not include the display of subtotals.
    This user exit is also used in order processing.
    USEREXIT_FIELD_MODIFIC_KZWI (module pool SAPMV61A, program MV61AFZB)
    You can change the display of subtotals in the condition screen by changing the display attributes of the screen fields.
    This user exit is also used in order processing.
    USEREXIT_FIELD_MODIFIC_KOPF (module pool SAPMV61A, program MV61AFZB)
    You can adjust the display of subtotals in the condition screen to your requirements by changing the display attributes of the screen fields.
    This user exit is also used in order processing.
    USEREXIT_FIELD_MODIFIC_LEER (module pool SAPMV61A, program MV61AFZB)
    You can adjust the display of blank lines in the condition screen to your requirements by changing the display attributes of the screen fields.
    This user exit is also used in order processing.
    USEREXIT_PRICING_CHECK (module pool SAPMV61, program MV61AFZA)
    You can install additional checks to the standard checks of condition lines (e.g. maximum/minimum value).
    USEREXIT_PRICING_RULE (module pool SAPLV61A, program RV61AFZA)
    In the standard SAP system, it is predefined which condition categories and classes can be copied or recalculated per pricing type. You can change the predefined standard procedure for each pricing type.
    USEREXIT_CHANGE_PRICING_RULE (module pool SAPMV61A, program MV61AFZA)
    You can use this user exit to change the pricing type that has been predefined in the copying control table in billing.
    USEREXIT_XKOMV_BEWERTEN_INIT (module pool SAPLV61A, program RV61AFZB)
    This field is used in the formulas and therefore initialized before the loop for the pricing procedure starts.
    USEREXIT_XKOMV_BEWERTEN_END (module pool SAPLV61A, program RV61AFZB)
    Within a loop for the price components during pricing, specific values can be transferred into the communication structures in pricing to be further processed.
    USEREXIT_XKOMV_ERGAENZEN (module pool SAPLV61A, program RV61AFZB)
    In change mode, you can change the dynamic part of the condition record (KONVD) that is always redetermined (i.e. it is not stored in database table KONV).
    USEREXIT_XKOMV_ERGAENZEN_MANU (module pool SAPLV61A, program RV61AFZB)
    You can use this user exit to change the ready-for-input fields of the manually entered condition record in add mode in the condition screen.
    USEREXIT_XKOMV_FUELLEN (module pool SAPLV61A, program RV61AFZB)
    This user exit is always called up during a redetermination of all or individual price components. You can change the work fields of the condition line. However, this only applies to conditions that have been determined via a condition record.
    USEREXIT_XKOMV_FUELLEN_O_KONP (module pool SAPLV61A, program RV61AFZB)
    This user exit is always called up during a redetermination of all or individual price components. You can change the work fields of the condition line. However, this only applies to conditions that have been determined via a condition record. This may include subtotals, manually entered conditions or conditions that have been calculated with a formula.
    USEREXIT_PRICING_COPY (module pool SAPLV61A, program RV61AFZA)
    You can change the KONV fields for copied price components.

  • FORM USEREXIT_PRICING_PREPARE_TKOMP in RV60AFZZ fails in Background

    Hi all,
    In Include RV60AFZZ , I have added my code in
    FORM USEREXIT_PRICING_PREPARE_TKOMP to Deactivate Condition types for FPD process . I activated the code. Now when I create a delivery doc (via Vf01), it gets created and saved if I do it in the fore ground, but it fails if I schedule it as Back ground job. Is this because the Include doesnt have the SAVE_DOC User exit.Please elaborate if you have any suggetsions as to why it is failing in the Background and what will be the other options to make it work in the Back ground.
    Thanks,
    Raj

    The parent prog of RV60AFZZ. is SAPLV60A.(Pl do check it)
    in the sample given we are basically accesing a variable from another program in memory and getting its value via our local field symbol <fs>
    if we take program SAPLV60A. then it will be:
    field-symbol <fs> type any.
    data myfield_name(40) type c value '(SAPLV60A)VBRPVB'.
    assign (myfield_name) to <fs>.
    now move like this:
    MOVE <fs>-ZZKVGR6 TO TKOMK-ZZKVGR6.
    this way <fs>-ZZKVGR6 will have the value which is in VBRPVB-ZZKVGR6 .
    hope you understood.
    but as happens with field symbols this can onl be checked at run time only.
    regards.

  • USEREXIT_XKOMV_BEWERTEN_END or USEREXIT_PRICING_PREPARE_TKOMP ?

    SD gurus.
    On a sales order Item....
    ...we need to code some abap to find the correct condition value in my A-table.
    The condition value is stored on another customer in my A-table (we use customer hierarchy).
    I guess I have 2 alternatives:
    1) Adjust the condition value in program RV61AFZB and Form USEREXIT_XKOMV_BEWERTEN_END
    2) Adjust the keys in the communication table in program MV45AFZZ and Form USEREXIT_PRICING_PREPARE_TKOMP
    Performance is also an issue here....
    Please advice.
    Edited by: Erik Hoven on Oct 27, 2008 8:38 AM

    Hi,
    I think it will work for deliveries tooo..
    My requirement is to update the delivery through the Inbound IDOC user exit custom segment value....
    after exporting the value in IDOC user exit and importing the value in this user exit to update the value in delivery ...
    so i need parameters to export and import ..what do you say it could be ?
    regards
    Vishnu

  • Creation of New Table for Delivery Output Type.

    Hi Guys,
    I need to replace an existing table by creating a new Table in the existing Access Sequence with the combination of "Ship to Party/Product Hierarchy".
    Logistics>Shipping>basic Shipping functions>Output determination>Maintain Condition Tables-->maintain output condition table for deliveries.
    I am choosing a new table by the name 902, but i am not getting the field " PRODH Product Hierarchy" on the right hand side to choose from.
    I checked the field catelog also. Firstly the field catelog was also not having the field, and then i added the field in it by choosing new entries.
    I guess i am missing some step in between, thats why the new field (PRODH) is not showing on the right hand side while creation of the condition table.
    One more thing, when i am seeing the Field Catelog, i am able to see a very large number of fields, then why only a few are appearing during creation of a new table??????
    Can you guys correct me and let me find a way.????
    Thanks very much indeed.
    Regards,
    Vivek

    Hi If u have already the field in FC u can add with new entries .
    Try with ,enter t- code <b>SE11</b>, enter <b>KOMB</b>- it will ask for access key get from basis and add u r Field catalog
    Field catalog for condition key: output determination
    If at all u want a new field tao add to u r FC u Can try with userexit.
    1)ADDING OF NEW FIELDS IN PRICING  
    In Pricing in SD the fields on the basis of which pricing is done are derived from the FIELD CATALOG which is a structure KOMG .This structure is used to transfer transaction data to the pricing procedure in SD and is also known as communication structure.This structure KOMG consists of two tables KOMK for Header related fields and KOMP for item related fields.
       The fields which are not in either of the two tables KOMK and KOMP
    cannot be used in pricing .Sometimes a need arises when the pricing
    is to be based on some other criteria which is not present in the form of fields in either of the two tables.
      This problem can be solved by using USEREXITS which are provided for pricing in SD.
      Pricing takes place both when the SALES ORDER ( Transaction VA01) is created as well as when INVOICING ( Transaction VF01) is done.Hence SAP provides 2 userexits ,one for sales order processing which is
    USEREXIT_PRICING_PREPARE_TKOMP  or
    USEREXIT_PRICING_PREPARE_TKOMK
    Depending upon which table (KOMK or KOMP) the new fields were inserted we use either of the above two userexits.These userexits are found in include MV45AFZZ of the standard SAP sales order creation program SAPMV45A.
    In the case of userexit which will be called when invoicing is done ,these
    are provided in the include RY60AFZZ which is in the standard SAP
    program SAPMV45A. The name of the userexits are same. i.e
    USEREXIT_PRICING_PREPARE_TKOMP  or
    USEREXIT_PRICING_PREPARE_TKOMK
    These userexits are used for passing the data from the communication structure to the pricing procedure, for this we have to fill the newely
    created field in the communication structure KOMG for this we fill the code in the above userexit using the MOVE statement after the data that
    has to be passed is taken from the database table by using the SELECT statement. The actual structure which is visible in these userexits and which is to be filled for that particular field is TKOMP or TKOMK.
    Before the coding for these userexits is done ,it is necessary to create a new field in either of the two tables KOMK or KOMP .For this purpose
    includes are provided in each of them .
    To create the field in header data(KOMK) the include provided is KOMKAZ
    and to create the field in item data(KOMP) the include provided is KOMPAZ.
    One possible example for the need of creating new fields can be e.g. Frieght to be based upon transportation zone ,for this no field is available in field catalog and hence it can be created in KOMK and then above userexits can be used to fill the transportation data to it.
    2)The other method of finding userexit is to find the word USEREXIT in the
    associated program of the transaction for which we want to determine userexit using SE38.
    3)The other method of finding userexits is to find the include in case of SD/MM applications where the userexits are located ,this can be found in the SAP reference IMG generally in the subfolder under SYSTEM MODIFICATION.
    Some other examples of userexits in SD are:<b></b>
    Message was edited by:
            SHESAGIRI GEDILA

  • Help in defaulting a value in a program

    I have a program called MV45AZZA, and I got the following requirement
    In MV45AFZZ we need to default VBAP-BWTAR = RH while new items are added in transaction VA01 and VA02, if sales org = 5090, order type = ZSBK and MBEW-BWTTY = 1 for the VBAP-MATNR. Once defaulted user should be able to change it to new value in VA01 and VA02, in that case system should not overwrite it with default value.
    Sales order functionality needs to be changed to account for Sbank sales updating to repair profit center.
    any help in coding is highly appreciated. i know little ABAP and I would appreciate if somebody can help in adding the code.Please highlight the code you added
    Please check the Program below.
    Thanks
    SP
    *TABLES: zue003, tvarv.
    *DATA: werks LIKE vbap-werks.
    Start of DEVK923935.
    Global Definition
    INCLUDE  zsdi_mv45afzz_top.
          FORM ZZEXAMPLE                                                *
          text......................................                    *
    *FORM ZZEXAMPLE.
    *ENDFORM.
    *eject
          FORM USEREXIT_DELETE_DOCUMENT                                 *
          This userexit can be used to delete data in additional tables *
          when a sales document is deleted.                             *
         This form is called in dialog at the end of form BELEG_LOESCHEN*
         just before form BELEG_SICHERN is performed to delete the      *
         datas on the database.                                         *
    FORM userexit_delete_document.
    ENDFORM.
    *eject
          FORM USEREXIT_FIELD_MODIFICATION                              *
          This userexit can be used to modify the attributes of         *
          screen fields.                                                *
          This form is processed for each field in the screen.          *
          The use of the fields screen-group1 to screen-group4 is:      *
          Screen-group1: Automatic modification contolles by transaction*
                         MFAW.                                          *
          Screen-group2: Contents 'LOO' for steploop-fields.            *
          Screen-group3: Used for modififaction, which are dependent on *
                         control tables or other fix information.       *
          Screen-group4: Unused                                         *
          For field mofifications, which are dependent on the document  *
          status, you can use the status field in the workareas         *
          XVBAP for item status and XVBUK for header status.            *
          This form is called from module FELDAUSWAHL.                  *
    FORM userexit_field_modification.
      DATA: zvbtyp LIKE vbfa-vbtyp_n,
            zvbeln LIKE vbfa-vbeln.
    CASE SCREEN-GROUP3.
      WHEN '900'.
        IF VBAK-VBTYP NE 'A'.
          SCREEN-ACTIVE = 0.
        ENDIF.
    ENDCASE.
    CASE SCREEN-NAME.
      WHEN 'VBAK-VBELN'.
        SCREEN-ACTIVE = 0.
    ENDCASE.
      IF vbap-pstyv = 'IRLA'.
       CHECK sy-tcode = 'VA01' OR sy-tcode = 'VA02'.
        IF sy-tcode = 'VA01' OR sy-tcode = 'VA02'.
          SELECT SINGLE vbtyp_n INTO zvbtyp FROM vbfa
                 WHERE vbelv = xvbap-vbeln AND posnv = vbap-posnr.
         CHECK sy-subrc <> 0.
          IF sy-subrc <> 0.
            CASE screen-group2.
              WHEN 'LOO'.
                IF screen-name = 'VBAP-WERKS'.
                  screen-input = 1.
                ENDIF.
            ENDCASE.
          ENDIF.
        ENDIF.
      ENDIF.
    Make Reject Reason modifiable when document category is 'RETURNS'
    06/10/02  
    Modified by Ak for check on subsequent credit memo
    This opens up the field - reason for rejection - for change even after
    the material has been received into the system on the returns delivery
    but before the Returns Credit Memo has been issued.
    Changed field to be modified from Reason for Rejection to Item
    Category on the line item for which no credit to be given.
    select single * from vbfa where vbelv = vbak-vbeln and
                                     vbtyp_n = 'O'.
    select a Returns Credit Memo document from VBFA that has NOT been
    cancelled. if the selection is successful, credit has been issued and
    the field should stay locked. however, if selection is unsuccessful
    and since no credit has been issued, the field for item category
    must be available for changing, if need be.
    check: vbak-vbtyp = 'H'.
      IF vbak-vbtyp = 'H'.
        IF sy-tcode = 'VA01' OR sy-tcode = 'VA02'.
          SELECT SINGLE vbrk~vbeln INTO zvbeln
            FROM vbfa INNER JOIN vbrk ON vbfavbeln = vbrkvbeln
              WHERE vbfavbelv = vbak-vbeln AND vbfaposnv = vbap-posnr
                AND vbfavbtyp_n = 'O' AND vbrkfksto NE 'X'.
          CHECK sy-subrc NE 0.
          CASE screen-group2.
            WHEN 'LOO'.
              IF screen-name = 'VBAP-PSTYV'.
                screen-input = 1.
              ENDIF.
          ENDCASE.
        ENDIF.
      ENDIF.
      INCLUDE zue_sd_0029.
    **If no invoice is created then make PSTYV ready for input for item
    **category IRIN.
      INCLUDE zue_sd_0031.
    ENDFORM.
    *eject
          FORM USEREXIT_MOVE_FIELD_TO_VBAK                              *
          This userexit can be used to move some fields into the sales  *
          dokument header workaerea VBAK.                               *
          SVBAK-TABIX = 0:  Create header                               *
          SVBAK-TABIX > 0:  Change header                               *
          This form is called at the end of form VBAK_FUELLEN.          *
    FORM userexit_move_field_to_vbak.
    vbak-zzfield = xxxx-zzfield2.
    **Ernesto EDIT for UE DEMO 10/16/2002
    SELECT single * INTO TABLE i_tvarv FROM tvarv WHERE name =
    *ZKS_KSEASORG'.
    Start of DEVK923935.
    Initialization Section
      INCLUDE zsdi_mv45afzz_initialization.
    End of DEVK923935.
    **{   INSERT         SNDK900075                                        1
    Change user exit according to Online Documentation to
    copy ship-to info to sale doc header (VBAK)
    *CODE BELOW*REPLACED WITH zue_sd_0017***********
    IF vbak-kvgr1 IS INITIAL AND
        vbak-kvgr2 IS INITIAL AND
        vbak-kvgr3 IS INITIAL AND
        vbak-kvgr4 IS INITIAL AND
        vbak-kvgr5 IS INITIAL.
       SELECT SINGLE vkgrp vkbur kvgr1 kvgr2 kvgr3 kvgr4 kvgr5
       FROM knvv  INTO (vbak-vkgrp, vbak-vkbur, vbak-kvgr1, vbak-kvgr2,
                                    vbak-kvgr3, vbak-kvgr4, vbak-kvgr5)
       WHERE kunnr = kuwev-kunnr AND
             vkorg = vbak-vkorg AND
             vtweg = vbak-vtweg AND
             spart = vbak-spart.
    ENDIF.
    *CODE ABOVE*REPLACED WITH zue_sd_0017***********
      INCLUDE zue_sd_0017.
    *CODE BELOW*REPLACED WITH zue_sd_0017***********
    IF svbak-tabix = 0.
       SELECT SINGLE vsbed  FROM knvv INTO vbak-vsbed
    *WHERE kunnr = kuwev-kunnr AND
         vkorg = vbak-vkorg AND
         vtweg = vbak-vtweg AND
         spart = vbak-spart.
    ENDIF.
    *CODE ABOVE*REPLACED WITH zue_sd_0017***********
    Start of DEVK915182
    **Ernesto EDIT for UE DEMO 10/15/2002.
    READ TABLE i_tvarv WITH KEY name = 'ZKS_KSEASORG'.
    IF sy-subrc = 0.
       IF vbak-vkorg =  i_tvarv-low.
      IF vbak-vkorg IN i_zsd01_vkorg.
        IF sy-tcode EQ 'VA01'.
          IF sy-dynnr EQ '4021'.
            IF sy-ucomm NE 'SICH'.
              l_pop_type = 'X'.
              INCLUDE zue_sd_0027.
             PERFORM partner_validation USING 'X'.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    end-of DEVK915182
    Project : KSEA - Sales Force Expansion of 1st Jan 2003
    Include for KSEA  Sales Org 5010 only for PopUp Windows " 12/23/2002
      INCLUDE zsd_salesforce_expnsn_hdr." Include 1 of 4
    */ Description        : KSE Modification to remove the billing block for
    */                      returns/credits/debits if sales Org is 5090.
    *ORIGINAL CODE
    *if vbak-vkorg = '5090' and vbak-vbtyp ca 'HKL'.
    *vbak-faksk = ' '.
    *endif.
      IF sy-tcode = 'VA01'.
        IF vbak-vkorg IN i_zsd09_vkorg.
          IF vbak-vbtyp IN i_zsd09_vbtyp.
            vbak-faksk = ' '.
          ENDIF.
        ENDIF.
      ENDIF.
    BREAK-POINT.
    INCLUDE zue_sd_0039.
    ENDFORM.
    *eject
          FORM USEREXIT_MOVE_FIELD_TO_VBAP                              *
          This userexit can be used to move some fields into the sales  *
          dokument item workaerea VBAP                                  *
          SVBAP-TABIX = 0:  Create item                                 *
          SVBAP-TABIX > 0:  Change item                                 *
          This form is called at the end of form VBAP_FUELLEN.          *
    FORM userexit_move_field_to_vbap.
    VBAP-zzfield = xxxx-zzfield2.
    *{   INSERT         SNDK900164                                        1
    Item Category Determination
      DATA: zzbukrs LIKE tvko-bukrs,
            zzmtpos LIKE mvke-mtpos.
      DATA: BEGIN OF zzwerks OCCURS 0,
              werks LIKE marc-werks,
            END OF zzwerks.
      DATA: zdoccat LIKE tvak-vbklt,
            zvmsta LIKE mvke-vmsta,
            zspvbc LIKE tvms-spvbc,
            zvmstb LIKE tvmst-vmstb.
      DATA: z_xvbap LIKE xvbap,
            yp1 LIKE t001k-bwkey,
            z_uepos_bukrs LIKE t001k-bukrs.
      IF i_zsd01_vkorg[] IS INITIAL.
    If the initialization was not performed in the Fill VBAK,
    reload data
        INCLUDE zsdi_mv45afzz_initialization.
      ENDIF.
      SELECT SINGLE bukrs
        INTO zzbukrs
        FROM tvko
       WHERE vkorg = vbak-vkorg.
      SELECT w~werks
        INTO TABLE zzwerks
        FROM t001w AS w JOIN t001k AS k
          ON wbwkey = kbwkey
       WHERE k~bukrs = zzbukrs.
      SELECT SINGLE mtpos INTO zzmtpos
        FROM mvke
       WHERE matnr = vbap-matnr
         AND vkorg = vbak-vkorg
         AND vtweg = vbak-vtweg.
    Export Plant - inport in ZXQSMU07
      EXPORT zz_plant = vbap-werks TO MEMORY ID  'ZZPLANT'.   " KN05
    check vbap-pstyv = 'TAN' or vbap-pstyv = 'TANN'.
    removed the CHECK statement and replaced by IF-ENDIF.
    inserted by arvind r kulkarni for TAN, TANN switching
      IF vbap-pstyv = 'TAN' OR vbap-pstyv = 'TANN'
      OR vbap-pstyv = 'REN'                                     " KN02
      OR vbap-pstyv = 'RENN' .                                  " KN02
        READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
       check sy-subrc ne 0.
        IF sy-subrc NE 0.
          IF vbap-pstyv = 'TAN'.
            vbap-pstyv = 'ZAN'.
          ELSEIF vbap-pstyv = 'REN'.                            " KN02
            vbap-pstyv = 'YREN'.                                " KN02
          ELSEIF vbap-pstyv = 'RENN'.                           " KN02
            vbap-pstyv = 'YRNN'.                                " KN02
          ELSEIF vbap-pstyv = 'TANN'.
            vbap-pstyv = 'ZANN'.
          ENDIF.
        ENDIF.
      ENDIF.
      INCLUDE zue_sd_0014.
    Begin insert for check for discontinued material in repair orders
    LOGIC: For IRAT item categories, check if the material status field *
           blank or populated.                                          *
           If populated, get the value of the D-Chain specific status   *
           and issue warning/error message with the associated text     *
           from config the D-Chain specific material status.            *
           Included YRAT to this logic (YRAT is free IRAT); 11/22/2002. *
      IF vbap-pstyv = 'IRAT' OR vbap-pstyv = 'YRAT'.
        CLEAR: zvmsta, zvmstb, zspvbc.
        SELECT SINGLE vmsta INTO zvmsta FROM mvke WHERE
                matnr = vbap-matnr AND vkorg = vbak-vkorg
                AND vtweg = vbak-vtweg.
       CHECK: NOT zvmsta IS INITIAL.
        IF NOT zvmsta IS INITIAL.
          SELECT SINGLE spvbc INTO zspvbc FROM tvms WHERE
                  vmsta = zvmsta.
          SELECT SINGLE vmstb INTO zvmstb FROM tvmst WHERE
                  spras = sy-langu AND vmsta = zvmsta.
          CASE zspvbc.
            WHEN 'A'.
              MESSAGE ID 'V1' TYPE 'W' NUMBER '028' WITH zvmsta zvmstb.
            WHEN 'B'.
              MESSAGE ID 'V1' TYPE 'E' NUMBER '028' WITH zvmsta zvmstb.
          ENDCASE.
        ENDIF.
      ENDIF.
    End insert for check for discontinued material in repair orders
      INCLUDE zue_sd_0004.
      INCLUDE zue_sd_0005.
    end of DEVK923935.
    ****************END OF TEST SOURCE CODE******************
    Begin Insert to assign material entered for TRADE material
    Ak; 11/08/2002.
    For trade material, the system will now mandate entry of higher level
    item number and based on this, the system will bring in specialty,
    material number (into material entered) and profit centre from this
    higher level item into the line item for material TRADE.
    Added MVGR2 & 3 to pass onto TRADE material; 11/12/2002 - Arvind.
    Added material a/c assignment grp to trade-in material.
    Added ZTRD item category to this logic.  - Arvind 11/18/2002.
      INCLUDE zzsdprc01.
      INCLUDE zue_sd_0028.
    End Insert to assign material entered for TRADE material
    ********************End of DIP Profile change************************
    Get custom group data from MVKE (Sales Data for Material) by Material
    when order type is 'RAS' (Repairs/Service)
    and populate line item's Additional data A
      INCLUDE zue_sd_0006.
      INCLUDE zue_sd_0001.
    include ZUE_SD_0032.
      INCLUDE zue_sd_0002.
    Get similar data (as above) from Servicable Material
      INCLUDE zue_sd_0003.
    *}   INSERT
    Determine Delivery Priority from SH Partner
    11/02/2001
      SELECT SINGLE lprio
      FROM knvv
      INTO vbap-lprio
      WHERE kunnr = kuwev-kunnr AND
            vkorg = vbak-vkorg AND
            vtweg = vbak-vtweg AND
            spart = vbak-spart.
    Determine Delivery Priority for Order Type RAS
      INCLUDE zsd_check_pstyv_werks.
    To re-determine Matwa if the replacement item is changed afterwards
    Niranjan 05/10/05 and ECLARKE
    INCLUDE zue_sd_0021.
    Mod for all sales organizations
    Determination of Profit Center
    06/24/03
      INCLUDE zue_sd_0007.
    End PRCTR Determination for KSI's document
    KSI modification
    Code to enter the actual part number of the item being repaired,
    rather than "REPAIR"
    09/18/02  GM
      DATA: intercoflag TYPE c.
      PERFORM zz_determine_cross_comp USING vbak-vkorg
                                            vbap-werks
                                            intercoflag.
      IF intercoflag = 'Y'
        AND
        ( vbap-pstyv = 'IRIN' OR vbap-pstyv = 'ZRIN' ).
        SELECT SINGLE matwa INTO vbap-matwa FROM vbap
        WHERE vbeln = vbap-vbeln AND posnr = vbap-uepos.
        IF sy-subrc NE 0.
          MESSAGE e006(z1) WITH vbap-uepos.
        ENDIF.
      ENDIF.
    End material look up modification GM 9/17/02
    KSI modification
    DP90 Only:
    Remove Billing Block from IRIN items and moved them to the header
    10/06/02 CNG
    11/18/2002     Tr-DEVK917363
    Added Sales Orgs 5040 & 5060
    KSI modification
    06/10/2003   CNG  CN01
    If IRIN, clear billing block at item level
      IF sy-tcode = 'DP90'.
      IF vbap-werks = '7000' AND vbak-vkorg = '5010' AND"            SM01-
        vbap-pstyv = 'IRIN'."                                        SM01-
        IF vbap-werks = '7000' AND"                                    SM01+
           ( vbak-vkorg IN i_zsd01_vkorg OR"                    SM01+
             vbak-vkorg = '5040' OR"                                   SM01+
    Removed >>
            vbak-vkorg = '5060' )"              SM01+                CN01-
         AND vbap-pstyv = 'IRIN'."              SM01+                CN01-
        vbak-faksk = '02'.
    Removed <<
    Inserted - check and block for line item IRIN only
             vbak-vkorg = '5060' )."                                   SM01+
          vbak-faksk = '02'.
         IF vbap-pstyv = 'IRIN'."                                      CN01+
            CLEAR vbap-faksp.
    Inserted - check and block for line item IRIN only
          ENDIF.
        ENDIF.
      ENDIF.
    KSI modification
    Routine to populate VBAP-ZZEDATU and VBAP-ZZVDATU on change and
    creation of order
    02/10/03 CNG
      PERFORM check_custom_dates.
    KSE Modification to create return item automatically**
    Copied from Niranjan's routine tested in SND210  Date 04/05/03
      INCLUDE zue_sd_0008.
    User Exit for Service Processing - Clear Results
    Analysis Key in sales order item for non-KSE service
    items.  DEVK927084       W. Miller 05/12/2003
    Changed to validate by plant instead of sales org.
    06/30/03    BEGIN>>>
    if not vbak-vkorg = '5090' and vbap-bedae = 'SE'.
    *Added 5000 for  KSEM Prjct 02-09-2006 EC
      IF NOT ( vbap-werks = '9000' OR vbap-werks = '5000' )
      AND ( vbap-bedae = 'SE' OR VBAP-BEDAE = 'SERA' ).
    06/30/03    END  <<<<
        CLEAR vbap-abgrs.
      ENDIF.
    End of DEVK924084
    */ Author             :  w/ Trimb.
    */ Date               : 10/07/2003   ---> Repair No : DEVK930002
    */ Description        : KSE Modification For plant 9000, to check the
    */                      material is 'Non-R' for RAS order type
    */                      and is 'R' for ZREX and ZWAR order types.
    *Added lines below for -  There is a user exit which exists that does
    *not allow materials that do not begin with an "R" to be posted into
    *plant 9000 if they are attached to a ZWAR order type.  KSE/KSEA would
    *like to modify this exit to allow materials with profit centers
    *5090-03003 and 5090-04003 to be posted.
    *ECLARKE/Niranjan 07-29-2004
    *________________________n 07-29-2004__________________
      DATA: flag_dexe.
      TABLES: zzue027.
      CLEAR: flag_dexe.
      SELECT SINGLE werks auart prctr INTO (zzue027-werks, zzue027-auart,
      zzue027-prctr) FROM zzue027 WHERE werks = vbap-werks AND auart =
      vbak-auart AND prctr = vbap-prctr.
      IF sy-subrc = 0.
        flag_dexe = 'X'.
      ENDIF.
    *________________________ 07-29-2004__________________
      IF flag_dexe IS INITIAL. " 07-29-2004
        IF vbap-werks IN i_zsd09_werks.
       IF ( vbak-auart IN i_zsd02_auart AND vbap-pstyv IN i_zsd04_pstyv AND
                 vbap-matwa(1) = 'R' ) OR ( vbak-auart IN i_zsd02_auart AND
                      vbap-pstyv IN i_zsd03_pstyv AND vbap-matnr(1) = 'R' ).
            IF vbap-matwa(1) = 'R'.
              MESSAGE e001(zkse) WITH vbap-matwa vbap-posnr vbak-auart
                vbap-pstyv.
            ENDIF.
            IF vbap-matnr(1) = 'R'.
              MESSAGE e001(zkse) WITH vbap-matnr vbap-posnr vbak-auart
              vbap-pstyv.
            ENDIF.
          ELSEIF ( vbak-auart IN i_zsd03_auart AND vbap-pstyv IN
      i_zsd04_pstyv AND vbap-matwa(1) <> 'R' ) OR ( vbak-auart IN
    i_zsd03_auart AND vbap-pstyv IN i_zsd03_pstyv AND vbap-matnr(1) <> 'R' )
      OR ( vbak-auart IN i_zsd04_auart AND vbap-pstyv IN i_zsd04_pstyv AND
    vbap-matwa(1) <> 'R' ) OR ( vbak-auart IN i_zsd04_auart AND vbap-pstyv
      IN i_zsd03_pstyv AND vbap-matnr(1) <> 'R' ).
            IF vbap-matwa(1) <> 'R'.
              MESSAGE e001(zkse) WITH vbap-matwa vbap-posnr vbak-auart
              vbap-pstyv.
            ENDIF.
            IF vbap-matnr(1) <> 'R'.
              MESSAGE e001(zkse) WITH vbap-matnr vbap-posnr vbak-auart
              vbap-pstyv.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
      INCLUDE zue_sd_0015.
    include zue_sd_0019
    Enhancement to populate Storage Location for sales order 5090
    and plant 9000. But any companies can use it as long as entries are
    maintained in table zsd_default_sloc
    Niranjan  02/11/04
    DEVK933987 - MV45AFZZ - MPitisci 4/12/2004
       DEVK933989 - ZUE_SD_0019  include
       DEVK933998 - ZSD_DEFAULT_SLOC table
      INCLUDE zue_sd_0019.
    To give hard error for D-CHin status 07 for items catgories other
    than trade.
    04/10/05
      INCLUDE zue_sd_0034.
    Checks if the storage location value is changed and checks to see if
    the storage location correlates to the P3 Partner function rules
    08/05/2005
      INCLUDE zue_sd_0036.
      INCLUDE zue_sd_0013.
    ENDFORM.
    *eject
          FORM USEREXIT_MOVE_FIELD_TO_VBEP                              *
          This userexit can be used to move some fields into the sales  *
          dokument schedule line workaerea VBEP                         *
          SVBEP-TABIX = 0:  Create schedule line                        *
          SVBEP-TABIX > 0:  Change schedule line                        *
          This form is called at the end of form VBEP_FUELLEN.          *
    FORM userexit_move_field_to_vbep.
      DATA: intercoflag TYPE c.
    VBEP-zzfield = xxxx-zzfield2.
    Assign 'ZP' to Schedule line Category for Acct Assignment Grp =
    Chui 10/23/2001
      DATA: zzbukrs LIKE tvko-bukrs,
            zzmtpos LIKE mvke-mtpos.
      DATA: z_vbelv LIKE vbfa-vbelv,"                                KN03
            z_auart LIKE vbak-auart,"                                KN03
            z_vbtyp LIKE vbak-vbtyp,"                                KN03
            z_ettyp LIKE vbep-ettyp,"                                KN03
            z_pstyv LIKE vbap-pstyv,"                                KN04
            z_posnr LIKE vbap-posnr."                                KN04
      DATA: BEGIN OF zzwerks OCCURS 0,
              werks LIKE marc-werks,
            END OF zzwerks.
      IF vbak-vbtyp CN 'AB'. "ECLARKE 01-26-04
        SELECT SINGLE bukrs
          INTO zzbukrs
          FROM tvko
         WHERE vkorg = vbak-vkorg.
        SELECT w~werks
          INTO TABLE zzwerks
          FROM t001w AS w JOIN t001k AS k
            ON wbwkey = kbwkey
         WHERE k~bukrs = zzbukrs.
        SELECT SINGLE mtpos INTO zzmtpos
          FROM mvke
         WHERE matnr = vbap-matnr
           AND vkorg = vbak-vkorg
           AND vtweg = vbak-vtweg.
    *lines added for valuated customer-returns project by msn
    110903. It will set required schedule line category YR on specific
    item categories if the document created is of type RE with reference
    document being an invoice of type F2
    *ECLARKE & MILIND NAND. 11-11-2003.
    *Schedule Line Category - Valuate Customer Returns Stock
    INCLUDE zue_sd_0010.
        CASE vbap-pstyv.
          WHEN  'ZRPN'.
            EXIT.
          WHEN 'TAN' OR 'TANN'.
            IF vbkd-ktgrd = '01'.            " Added 6/5/02
              IF vbep-ettyp = 'CN'.
                vbep-ettyp = 'ZA'.
              ELSE.
                vbep-ettyp = 'ZP'.
              ENDIF.
            ENDIF.
    **Ernesto EDIT for UE DEMO 10/15/2002
    ***************TEST FUNCTION MODULE FOR USER EXIT MAINT.******
    **ADDED  A CASE STATEMENT BELOW.
    CALL FUNCTION 'Z_UE_SD_GET_SCHEDULE_LINE_CAT'
          EXPORTING
               pstyv  = vbap-pstyv
               ktgrd  = vbkd-ktgrd
               ettyp2 = vbep-ettyp
          IMPORTING
               ettyp  = vbep-ettyp.
    ****************END OF TEST SOURCE CODE******************
            READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
         check sy-subrc ne 0.
            IF sy-subrc NE 0.
    Change inserted by Arvind R Kulkarni; 07/22/2002
    TAN -> ZAN; TANN => ZANN
           vbap-pstyv = 'ZAN'.
              IF vbap-pstyv = 'TAN'.
                vbap-pstyv = 'ZAN'.
              ELSEIF vbap-pstyv = 'TANN'.
                vbap-pstyv = 'ZANN'.
              ENDIF.
    end of change
            ENDIF.
    *ADDED CASE HERE FOR TEST FOR SYNTAX CHECK 10/15/2002
    *CASE vbap-pstyv.
          WHEN 'ZAN'.
            READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
            CHECK sy-subrc EQ 0.
            vbap-pstyv = 'TAN'.
          WHEN 'ZANN'.
            READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
            CHECK sy-subrc EQ 0.
            vbap-pstyv = 'TANN'.
          WHEN 'ZTAN'.
            IF vbkd-ktgrd = '01'.            " Added 6/5/02
              IF vbep-ettyp = 'CN'.
                vbep-ettyp = 'ZA'.
              ELSE.
                vbep-ettyp = 'ZP'.
              ENDIF.
            ENDIF.
            READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
         check sy-subrc ne 0.
            IF sy-subrc NE 0.
              IF vbep-ettyp = 'CN'.
                vbep-ettyp = 'ZA'.
              ELSE.
                vbep-ettyp = 'ZP'.
              ENDIF.
            ENDIF.
    03/23/2005 KN03 Set Schedule Line default to ZF order type ZFD,
    item cat ZTAN, sales org 5060, 5070, and 5071
            IF vbak-auart EQ 'ZFD' AND
            ( vbak-vkorg = '5060' OR vbak-vkorg = '5070'
             OR vbak-vkorg = '5071' ).
              vbep-ettyp = 'ZF'.
            ENDIF.
    Begin of insertion for IRAT processing
    Arvind R Kulkarni; Dated: 07/17/2002.
    Changed to include YRAT; ; 11/22/2002
          WHEN 'IRAT' OR 'YRAT'.
            IF vbak-auart NE 'ZWAR'.
    the sales order is NOT a ZWAR
              READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
              IF sy-subrc NE 0.
    the transaction IS intercompany
                IF vbep-ettyp = 'CN'.
                  vbep-ettyp = 'YN'.
                ELSE.
                  vbep-ettyp = 'YL'.
                ENDIF.
              ELSE.
    the transaction IS NOT intercompany
                IF vbep-ettyp = 'CN'.
                  vbep-ettyp = 'ZN'.
                ELSE.
                  vbep-ettyp = 'ZL'.
                ENDIF.
              ENDIF.
              IF vbkd-ktgrd = '01'.
    sale is to an affiliate in local sales org
                IF vbep-ettyp = 'CN'.
                  vbep-ettyp = 'YN'.
                ELSE.
                  vbep-ettyp = 'YL'.
                ENDIF.
              ENDIF.
            ELSE.
    the sales order IS a ZWAR
              READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
              IF sy-subrc NE 0.
    the transaction IS intercompany
                IF vbep-ettyp = 'CN'.
                  vbep-ettyp = 'ZA'.
                ELSE.
                  vbep-ettyp = 'ZP'.
                ENDIF.
         ELSE.
    the transaction IS NOT intercompany
    NOTHING NEEDS TO BE DONE FOR ZWAR DOMESTIC
    STD SCHED LINE CATEGORIES TO BE MAINTAINED.
           IF VBEP-ETTYP = 'CN'.
             VBEP-ETTYP = 'ZN'.
           ELSE.
             VBEP-ETTYP = 'ZL'.
           ENDIF.
         ENDIF.
         IF VBKD-KTGRD = '01'.
    sale is to an affiliate in local sales org
                IF vbep-ettyp = 'CN'.
                  vbep-ettyp = 'ZA'.
                ELSE.
                  vbep-ettyp = 'ZP'.
                ENDIF.
              ENDIF.
            ENDIF.
    End of insertion for IRAT processing
          WHEN 'IRRS' OR 'IRRE' OR 'IRLA' OR 'IRLB' OR 'KBN' OR 'TAQ'
    KSI Modification    04/22/03
    Exclude check for item category 'YKW'
            OR 'YTAN' OR 'ZKLN' OR 'KAN'  OR 'ZTAQ'
            OR 'YKW' OR 'IRRP'  OR 'ZKBC' OR 'ZKBN' OR 'ZKAN' OR 'KLN'.
          or  'ZKEN' OR 'ZKEC' or ZREK OR 'KEN'.
            EXIT.
          WHEN 'ZTR1' OR 'ZRBB' OR 'ZREB' OR 'ZREC' OR 'ZREF' OR 'ZREN'
    Removed ZRTN to validate plant 9000
            OR 'ZRFF' OR 'ZRNB' OR 'ZRNN' OR 'REN' OR 'RENN'
            OR 'ZLN' OR 'IRAL' OR 'ZTR0' OR 'KLN'.
            EXIT.
    03/23/2005 KN03 set default sched line for KE & ZKE
          WHEN 'KEN' OR 'ZKEG' OR 'ZKEN' OR 'ZKEC'.
            IF vbak-vkorg EQ '5070'.
              vbep-ettyp = 'Z0'.
            ENDIF.
          WHEN 'ZREK'.
            INCLUDE zue_sd_0033.
            IF vbap-werks = '9000'.                    " KN04
              IF vbkd-ktgrd = '01'.                    " KN04
                IF  z_auart = 'ZFD ' and z_pstyv = 'KLN '.    " KN04
                  vbep-ettyp = 'YK'.                   " KN04
                ENDIF.
              ENDIF.
            ENDIF.
    KSE Modification    04/10/03
    For Item Cate 'ZRTN'
    Assign 'YQ' to Schedule line cat, if cross-company
    'YU' if not.
          WHEN 'ZRTN'.

    Hi,
    Step 1) Create a include ZSD_DEFAULT_BWTAR and add the following code
    DATA: S_MBEW TYPE MBEW.
    Check for create and change.
    IF T180-TRTYP = 'H' OR T180-TRTYP = 'V'.
    IF VBAK-VKORG = '5090' AND VBAK-AUART = 'ZSBK'.
    SELECT SINGLE * FROM MBEW
    INTO S_MBEW
    WHERE MATNR = VBAP-MATNR
    AND BWKEY = VBAP-WERKS.
    IF SY-SUBRC = 0 AND S_MBEW-BWTTY = '1'.
    Check if it is for line item creation.
    WHen the changes the value this will not trigger.
    IF SVBAP-TABIX = 0.
    VBAP-BWTAR = 'RH'.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    STEP 2)
    Add the include to the subroutine USEREXIT_FIELD_TO_VBAP. The include statement is marked in bold.
    *TABLES: zue003, tvarv.
    *DATA: werks LIKE vbap-werks.
    Start of DEVK923935.
    Global Definition
    INCLUDE zsdi_mv45afzz_top.
    FORM ZZEXAMPLE *
    text...................................... *
    *FORM ZZEXAMPLE.
    *ENDFORM.
    *eject
    FORM USEREXIT_DELETE_DOCUMENT *
    This userexit can be used to delete data in additional tables *
    when a sales document is deleted. *
    This form is called in dialog at the end of form BELEG_LOESCHEN*
    just before form BELEG_SICHERN is performed to delete the *
    datas on the database. *
    FORM userexit_delete_document.
    ENDFORM.
    *eject
    FORM USEREXIT_FIELD_MODIFICATION *
    This userexit can be used to modify the attributes of *
    screen fields. *
    This form is processed for each field in the screen. *
    The use of the fields screen-group1 to screen-group4 is: *
    Screen-group1: Automatic modification contolles by transaction*
    MFAW. *
    Screen-group2: Contents 'LOO' for steploop-fields. *
    Screen-group3: Used for modififaction, which are dependent on *
    control tables or other fix information. *
    Screen-group4: Unused *
    For field mofifications, which are dependent on the document *
    status, you can use the status field in the workareas *
    XVBAP for item status and XVBUK for header status. *
    This form is called from module FELDAUSWAHL. *
    FORM userexit_field_modification.
    DATA: zvbtyp LIKE vbfa-vbtyp_n,
    zvbeln LIKE vbfa-vbeln.
    CASE SCREEN-GROUP3.
    WHEN '900'.
    IF VBAK-VBTYP NE 'A'.
    SCREEN-ACTIVE = 0.
    ENDIF.
    ENDCASE.
    CASE SCREEN-NAME.
    WHEN 'VBAK-VBELN'.
    SCREEN-ACTIVE = 0.
    ENDCASE.
    IF vbap-pstyv = 'IRLA'.
    CHECK sy-tcode = 'VA01' OR sy-tcode = 'VA02'.
    IF sy-tcode = 'VA01' OR sy-tcode = 'VA02'.
    SELECT SINGLE vbtyp_n INTO zvbtyp FROM vbfa
    WHERE vbelv = xvbap-vbeln AND posnv = vbap-posnr.
    CHECK sy-subrc <> 0.
    IF sy-subrc <> 0.
    CASE screen-group2.
    WHEN 'LOO'.
    IF screen-name = 'VBAP-WERKS'.
    screen-input = 1.
    ENDIF.
    ENDCASE.
    ENDIF.
    ENDIF.
    ENDIF.
    Make Reject Reason modifiable when document category is 'RETURNS'
    06/10/02
    Modified by Ak for check on subsequent credit memo
    This opens up the field - reason for rejection - for change even after
    the material has been received into the system on the returns delivery
    but before the Returns Credit Memo has been issued.
    Changed field to be modified from Reason for Rejection to Item
    Category on the line item for which no credit to be given.
    select single * from vbfa where vbelv = vbak-vbeln and
    vbtyp_n = 'O'.
    select a Returns Credit Memo document from VBFA that has NOT been
    cancelled. if the selection is successful, credit has been issued and
    the field should stay locked. however, if selection is unsuccessful
    and since no credit has been issued, the field for item category
    must be available for changing, if need be.
    check: vbak-vbtyp = 'H'.
    IF vbak-vbtyp = 'H'.
    IF sy-tcode = 'VA01' OR sy-tcode = 'VA02'.
    SELECT SINGLE vbrk~vbeln INTO zvbeln
    FROM vbfa INNER JOIN vbrk ON vbfavbeln = vbrkvbeln
    WHERE vbfavbelv = vbak-vbeln AND vbfaposnv = vbap-posnr
    AND vbfavbtyp_n = 'O' AND vbrkfksto NE 'X'.
    CHECK sy-subrc NE 0.
    CASE screen-group2.
    WHEN 'LOO'.
    IF screen-name = 'VBAP-PSTYV'.
    screen-input = 1.
    ENDIF.
    ENDCASE.
    ENDIF.
    ENDIF.
    INCLUDE zue_sd_0029.
    **If no invoice is created then make PSTYV ready for input for item
    **category IRIN.
    INCLUDE zue_sd_0031.
    ENDFORM.
    *eject
    FORM USEREXIT_MOVE_FIELD_TO_VBAK *
    This userexit can be used to move some fields into the sales *
    dokument header workaerea VBAK. *
    SVBAK-TABIX = 0: Create header *
    SVBAK-TABIX > 0: Change header *
    This form is called at the end of form VBAK_FUELLEN. *
    FORM userexit_move_field_to_vbak.
    vbak-zzfield = xxxx-zzfield2.
    **Ernesto EDIT for UE DEMO 10/16/2002
    SELECT single * INTO TABLE i_tvarv FROM tvarv WHERE name =
    *ZKS_KSEASORG'.
    Start of DEVK923935.
    Initialization Section
    INCLUDE zsdi_mv45afzz_initialization.
    End of DEVK923935.
    **{ INSERT SNDK900075 1
    Change user exit according to Online Documentation to
    copy ship-to info to sale doc header (VBAK)
    *CODE BELOW*REPLACED WITH zue_sd_0017***********
    IF vbak-kvgr1 IS INITIAL AND
    vbak-kvgr2 IS INITIAL AND
    vbak-kvgr3 IS INITIAL AND
    vbak-kvgr4 IS INITIAL AND
    vbak-kvgr5 IS INITIAL.
    SELECT SINGLE vkgrp vkbur kvgr1 kvgr2 kvgr3 kvgr4 kvgr5
    FROM knvv INTO (vbak-vkgrp, vbak-vkbur, vbak-kvgr1, vbak-kvgr2,
    vbak-kvgr3, vbak-kvgr4, vbak-kvgr5)
    WHERE kunnr = kuwev-kunnr AND
    vkorg = vbak-vkorg AND
    vtweg = vbak-vtweg AND
    spart = vbak-spart.
    ENDIF.
    *CODE ABOVE*REPLACED WITH zue_sd_0017***********
    INCLUDE zue_sd_0017.
    *CODE BELOW*REPLACED WITH zue_sd_0017***********
    IF svbak-tabix = 0.
    SELECT SINGLE vsbed FROM knvv INTO vbak-vsbed
    *WHERE kunnr = kuwev-kunnr AND
    vkorg = vbak-vkorg AND
    vtweg = vbak-vtweg AND
    spart = vbak-spart.
    ENDIF.
    *CODE ABOVE*REPLACED WITH zue_sd_0017***********
    Start of DEVK915182
    **Ernesto EDIT for UE DEMO 10/15/2002.
    READ TABLE i_tvarv WITH KEY name = 'ZKS_KSEASORG'.
    IF sy-subrc = 0.
    IF vbak-vkorg = i_tvarv-low.
    IF vbak-vkorg IN i_zsd01_vkorg.
    IF sy-tcode EQ 'VA01'.
    IF sy-dynnr EQ '4021'.
    IF sy-ucomm NE 'SICH'.
    l_pop_type = 'X'.
    INCLUDE zue_sd_0027.
    PERFORM partner_validation USING 'X'.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    end-of DEVK915182
    Project : KSEA - Sales Force Expansion of 1st Jan 2003
    Include for KSEA Sales Org 5010 only for PopUp Windows " 12/23/2002
    INCLUDE zsd_salesforce_expnsn_hdr." Include 1 of 4
    */ Description : KSE Modification to remove the billing block for
    */ returns/credits/debits if sales Org is 5090.
    *ORIGINAL CODE
    *if vbak-vkorg = '5090' and vbak-vbtyp ca 'HKL'.
    *vbak-faksk = ' '.
    *endif.
    IF sy-tcode = 'VA01'.
    IF vbak-vkorg IN i_zsd09_vkorg.
    IF vbak-vbtyp IN i_zsd09_vbtyp.
    vbak-faksk = ' '.
    ENDIF.
    ENDIF.
    ENDIF.
    BREAK-POINT.
    INCLUDE zue_sd_0039.
    ENDFORM.
    *eject
    FORM USEREXIT_MOVE_FIELD_TO_VBAP *
    This userexit can be used to move some fields into the sales *
    dokument item workaerea VBAP *
    SVBAP-TABIX = 0: Create item *
    SVBAP-TABIX > 0: Change item *
    This form is called at the end of form VBAP_FUELLEN. *
    FORM userexit_move_field_to_vbap.
    VBAP-zzfield = xxxx-zzfield2.
    *{ INSERT SNDK900164 1
    Item Category Determination
    DATA: zzbukrs LIKE tvko-bukrs,
    zzmtpos LIKE mvke-mtpos.
    DATA: BEGIN OF zzwerks OCCURS 0,
    werks LIKE marc-werks,
    END OF zzwerks.
    DATA: zdoccat LIKE tvak-vbklt,
    zvmsta LIKE mvke-vmsta,
    zspvbc LIKE tvms-spvbc,
    zvmstb LIKE tvmst-vmstb.
    DATA: z_xvbap LIKE xvbap,
    yp1 LIKE t001k-bwkey,
    z_uepos_bukrs LIKE t001k-bukrs.
    IF i_zsd01_vkorg[] IS INITIAL.
    If the initialization was not performed in the Fill VBAK,
    reload data
    INCLUDE zsdi_mv45afzz_initialization.
    ENDIF.
    SELECT SINGLE bukrs
    INTO zzbukrs
    FROM tvko
    WHERE vkorg = vbak-vkorg.
    SELECT w~werks
    INTO TABLE zzwerks
    FROM t001w AS w JOIN t001k AS k
    ON wbwkey = kbwkey
    WHERE k~bukrs = zzbukrs.
    SELECT SINGLE mtpos INTO zzmtpos
    FROM mvke
    WHERE matnr = vbap-matnr
    AND vkorg = vbak-vkorg
    AND vtweg = vbak-vtweg.
    Export Plant - inport in ZXQSMU07
    EXPORT zz_plant = vbap-werks TO MEMORY ID 'ZZPLANT'. " KN05
    check vbap-pstyv = 'TAN' or vbap-pstyv = 'TANN'.
    removed the CHECK statement and replaced by IF-ENDIF.
    inserted by arvind r kulkarni for TAN, TANN switching
    IF vbap-pstyv = 'TAN' OR vbap-pstyv = 'TANN'
    OR vbap-pstyv = 'REN' " KN02
    OR vbap-pstyv = 'RENN' . " KN02
    READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
    check sy-subrc ne 0.
    IF sy-subrc NE 0.
    IF vbap-pstyv = 'TAN'.
    vbap-pstyv = 'ZAN'.
    ELSEIF vbap-pstyv = 'REN'. " KN02
    vbap-pstyv = 'YREN'. " KN02
    ELSEIF vbap-pstyv = 'RENN'. " KN02
    vbap-pstyv = 'YRNN'. " KN02
    ELSEIF vbap-pstyv = 'TANN'.
    vbap-pstyv = 'ZANN'.
    ENDIF.
    ENDIF.
    ENDIF.
    INCLUDE zue_sd_0014.
    Begin insert for check for discontinued material in repair orders
    LOGIC: For IRAT item categories, check if the material status field *
    blank or populated. *
    If populated, get the value of the D-Chain specific status *
    and issue warning/error message with the associated text *
    from config the D-Chain specific material status. *
    Included YRAT to this logic (YRAT is free IRAT); 11/22/2002. *
    IF vbap-pstyv = 'IRAT' OR vbap-pstyv = 'YRAT'.
    CLEAR: zvmsta, zvmstb, zspvbc.
    SELECT SINGLE vmsta INTO zvmsta FROM mvke WHERE
    matnr = vbap-matnr AND vkorg = vbak-vkorg
    AND vtweg = vbak-vtweg.
    CHECK: NOT zvmsta IS INITIAL.
    IF NOT zvmsta IS INITIAL.
    SELECT SINGLE spvbc INTO zspvbc FROM tvms WHERE
    vmsta = zvmsta.
    SELECT SINGLE vmstb INTO zvmstb FROM tvmst WHERE
    spras = sy-langu AND vmsta = zvmsta.
    CASE zspvbc.
    WHEN 'A'.
    MESSAGE ID 'V1' TYPE 'W' NUMBER '028' WITH zvmsta zvmstb.
    WHEN 'B'.
    MESSAGE ID 'V1' TYPE 'E' NUMBER '028' WITH zvmsta zvmstb.
    ENDCASE.
    ENDIF.
    ENDIF.
    End insert for check for discontinued material in repair orders
    INCLUDE zue_sd_0004.
    INCLUDE zue_sd_0005.
    end of DEVK923935.
    ****************END OF TEST SOURCE CODE******************
    Begin Insert to assign material entered for TRADE material
    Ak; 11/08/2002.
    For trade material, the system will now mandate entry of higher level
    item number and based on this, the system will bring in specialty,
    material number (into material entered) and profit centre from this
    higher level item into the line item for material TRADE.
    Added MVGR2 & 3 to pass onto TRADE material; 11/12/2002 - Arvind.
    Added material a/c assignment grp to trade-in material.
    Added ZTRD item category to this logic. - Arvind 11/18/2002.
    INCLUDE zzsdprc01.
    INCLUDE zue_sd_0028.
    End Insert to assign material entered for TRADE material
    ********************End of DIP Profile change************************
    Get custom group data from MVKE (Sales Data for Material) by Material
    when order type is 'RAS' (Repairs/Service)
    and populate line item's Additional data A
    INCLUDE zue_sd_0006.
    INCLUDE zue_sd_0001.
    include ZUE_SD_0032.
    INCLUDE zue_sd_0002.
    Get similar data (as above) from Servicable Material
    INCLUDE zue_sd_0003.
    *} INSERT
    Determine Delivery Priority from SH Partner
    11/02/2001
    SELECT SINGLE lprio
    FROM knvv
    INTO vbap-lprio
    WHERE kunnr = kuwev-kunnr AND
    vkorg = vbak-vkorg AND
    vtweg = vbak-vtweg AND
    spart = vbak-spart.
    Determine Delivery Priority for Order Type RAS
    INCLUDE zsd_check_pstyv_werks.
    To re-determine Matwa if the replacement item is changed afterwards
    Niranjan 05/10/05 and ECLARKE
    INCLUDE zue_sd_0021.
    Mod for all sales organizations
    Determination of Profit Center
    06/24/03
    INCLUDE zue_sd_0007.
    End PRCTR Determination for KSI's document
    KSI modification
    Code to enter the actual part number of the item being repaired,
    rather than "REPAIR"
    09/18/02 GM
    DATA: intercoflag TYPE c.
    PERFORM zz_determine_cross_comp USING vbak-vkorg
    vbap-werks
    intercoflag.
    IF intercoflag = 'Y'
    AND
    ( vbap-pstyv = 'IRIN' OR vbap-pstyv = 'ZRIN' ).
    SELECT SINGLE matwa INTO vbap-matwa FROM vbap
    WHERE vbeln = vbap-vbeln AND posnr = vbap-uepos.
    IF sy-subrc NE 0.
    MESSAGE e006(z1) WITH vbap-uepos.
    ENDIF.
    ENDIF.
    End material look up modification GM 9/17/02
    KSI modification
    DP90 Only:
    Remove Billing Block from IRIN items and moved them to the header
    10/06/02 CNG
    11/18/2002 Tr-DEVK917363
    Added Sales Orgs 5040 & 5060
    KSI modification
    06/10/2003 CNG CN01
    If IRIN, clear billing block at item level
    IF sy-tcode = 'DP90'.
    IF vbap-werks = '7000' AND vbak-vkorg = '5010' AND" SM01-
    vbap-pstyv = 'IRIN'." SM01-
    IF vbap-werks = '7000' AND" SM01+
    ( vbak-vkorg IN i_zsd01_vkorg OR" SM01+
    vbak-vkorg = '5040' OR" SM01+
    Removed >>
    vbak-vkorg = '5060' )" SM01+ CN01-
    AND vbap-pstyv = 'IRIN'." SM01+ CN01-
    vbak-faksk = '02'.
    Removed <<
    Inserted - check and block for line item IRIN only
    vbak-vkorg = '5060' )." SM01+
    vbak-faksk = '02'.
    IF vbap-pstyv = 'IRIN'." CN01+
    CLEAR vbap-faksp.
    Inserted - check and block for line item IRIN only
    ENDIF.
    ENDIF.
    ENDIF.
    KSI modification
    Routine to populate VBAP-ZZEDATU and VBAP-ZZVDATU on change and
    creation of order
    02/10/03 CNG
    PERFORM check_custom_dates.
    KSE Modification to create return item automatically**
    Copied from Niranjan's routine tested in SND210 Date 04/05/03
    INCLUDE zue_sd_0008.
    User Exit for Service Processing - Clear Results
    Analysis Key in sales order item for non-KSE service
    items. DEVK927084 W. Miller 05/12/2003
    Changed to validate by plant instead of sales org.
    06/30/03 BEGIN>>>
    if not vbak-vkorg = '5090' and vbap-bedae = 'SE'.
    *Added 5000 for KSEM Prjct 02-09-2006 EC
    IF NOT ( vbap-werks = '9000' OR vbap-werks = '5000' )
    AND ( vbap-bedae = 'SE' OR VBAP-BEDAE = 'SERA' ).
    06/30/03 END <<<<
    CLEAR vbap-abgrs.
    ENDIF.
    End of DEVK924084
    */ Author : w/ Trimb.
    */ Date : 10/07/2003 ---> Repair No : DEVK930002
    */ Description : KSE Modification For plant 9000, to check the
    */ material is 'Non-R' for RAS order type
    */ and is 'R' for ZREX and ZWAR order types.
    *Added lines below for - There is a user exit which exists that does
    *not allow materials that do not begin with an "R" to be posted into
    *plant 9000 if they are attached to a ZWAR order type. KSE/KSEA would
    *like to modify this exit to allow materials with profit centers
    *5090-03003 and 5090-04003 to be posted.
    *ECLARKE/Niranjan 07-29-2004
    *________________________n 07-29-2004__________________
    DATA: flag_dexe.
    TABLES: zzue027.
    CLEAR: flag_dexe.
    SELECT SINGLE werks auart prctr INTO (zzue027-werks, zzue027-auart,
    zzue027-prctr) FROM zzue027 WHERE werks = vbap-werks AND auart =
    vbak-auart AND prctr = vbap-prctr.
    IF sy-subrc = 0.
    flag_dexe = 'X'.
    ENDIF.
    *________________________ 07-29-2004__________________
    IF flag_dexe IS INITIAL. " 07-29-2004
    IF vbap-werks IN i_zsd09_werks.
    IF ( vbak-auart IN i_zsd02_auart AND vbap-pstyv IN i_zsd04_pstyv AND
    vbap-matwa(1) = 'R' ) OR ( vbak-auart IN i_zsd02_auart AND
    vbap-pstyv IN i_zsd03_pstyv AND vbap-matnr(1) = 'R' ).
    IF vbap-matwa(1) = 'R'.
    MESSAGE e001(zkse) WITH vbap-matwa vbap-posnr vbak-auart
    vbap-pstyv.
    ENDIF.
    IF vbap-matnr(1) = 'R'.
    MESSAGE e001(zkse) WITH vbap-matnr vbap-posnr vbak-auart
    vbap-pstyv.
    ENDIF.
    ELSEIF ( vbak-auart IN i_zsd03_auart AND vbap-pstyv IN
    i_zsd04_pstyv AND vbap-matwa(1) <> 'R' ) OR ( vbak-auart IN
    i_zsd03_auart AND vbap-pstyv IN i_zsd03_pstyv AND vbap-matnr(1) <> 'R' )
    OR ( vbak-auart IN i_zsd04_auart AND vbap-pstyv IN i_zsd04_pstyv AND
    vbap-matwa(1) <> 'R' ) OR ( vbak-auart IN i_zsd04_auart AND vbap-pstyv
    IN i_zsd03_pstyv AND vbap-matnr(1) <> 'R' ).
    IF vbap-matwa(1) <> 'R'.
    MESSAGE e001(zkse) WITH vbap-matwa vbap-posnr vbak-auart
    vbap-pstyv.
    ENDIF.
    IF vbap-matnr(1) <> 'R'.
    MESSAGE e001(zkse) WITH vbap-matnr vbap-posnr vbak-auart
    vbap-pstyv.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDIF.
    INCLUDE zue_sd_0015.
    include zue_sd_0019
    Enhancement to populate Storage Location for sales order 5090
    and plant 9000. But any companies can use it as long as entries are
    maintained in table zsd_default_sloc
    Niranjan 02/11/04
    DEVK933987 - MV45AFZZ - MPitisci 4/12/2004
    DEVK933989 - ZUE_SD_0019 include
    DEVK933998 - ZSD_DEFAULT_SLOC table
    INCLUDE zue_sd_0019.
    To give hard error for D-CHin status 07 for items catgories other
    than trade.
    04/10/05
    INCLUDE zue_sd_0034.
    Checks if the storage location value is changed and checks to see if
    the storage location correlates to the P3 Partner function rules
    08/05/2005
    INCLUDE zue_sd_0036.
    INCLUDE zue_sd_0013.
    <b>**************New code********
    INCLUDE ZSD_DEFAULT_BWTAR.
    ********************************</b>
    ENDFORM.
    *eject
    FORM USEREXIT_MOVE_FIELD_TO_VBEP *
    This userexit can be used to move some fields into the sales *
    dokument schedule line workaerea VBEP *
    SVBEP-TABIX = 0: Create schedule line *
    SVBEP-TABIX > 0: Change schedule line *
    This form is called at the end of form VBEP_FUELLEN. *
    FORM userexit_move_field_to_vbep.
    DATA: intercoflag TYPE c.
    VBEP-zzfield = xxxx-zzfield2.
    Assign 'ZP' to Schedule line Category for Acct Assignment Grp =
    Chui 10/23/2001
    DATA: zzbukrs LIKE tvko-bukrs,
    zzmtpos LIKE mvke-mtpos.
    DATA: z_vbelv LIKE vbfa-vbelv," KN03
    z_auart LIKE vbak-auart," KN03
    z_vbtyp LIKE vbak-vbtyp," KN03
    z_ettyp LIKE vbep-ettyp," KN03
    z_pstyv LIKE vbap-pstyv," KN04
    z_posnr LIKE vbap-posnr." KN04
    DATA: BEGIN OF zzwerks OCCURS 0,
    werks LIKE marc-werks,
    END OF zzwerks.
    IF vbak-vbtyp CN 'AB'. "ECLARKE 01-26-04
    SELECT SINGLE bukrs
    INTO zzbukrs
    FROM tvko
    WHERE vkorg = vbak-vkorg.
    SELECT w~werks
    INTO TABLE zzwerks
    FROM t001w AS w JOIN t001k AS k
    ON wbwkey = kbwkey
    WHERE k~bukrs = zzbukrs.
    SELECT SINGLE mtpos INTO zzmtpos
    FROM mvke
    WHERE matnr = vbap-matnr
    AND vkorg = vbak-vkorg
    AND vtweg = vbak-vtweg.
    *lines added for valuated customer-returns project by msn
    110903. It will set required schedule line category YR on specific
    item categories if the document created is of type RE with reference
    document being an invoice of type F2
    *ECLARKE & MILIND NAND. 11-11-2003.
    *Schedule Line Category - Valuate Customer Returns Stock
    INCLUDE zue_sd_0010.
    CASE vbap-pstyv.
    WHEN 'ZRPN'.
    EXIT.
    WHEN 'TAN' OR 'TANN'.
    IF vbkd-ktgrd = '01'. " Added 6/5/02
    IF vbep-ettyp = 'CN'.
    vbep-ettyp = 'ZA'.
    ELSE.
    vbep-ettyp = 'ZP'.
    ENDIF.
    ENDIF.
    **Ernesto EDIT for UE DEMO 10/15/2002
    ***************TEST FUNCTION MODULE FOR USER EXIT MAINT.******
    **ADDED A CASE STATEMENT BELOW.
    CALL FUNCTION 'Z_UE_SD_GET_SCHEDULE_LINE_CAT'
    EXPORTING
    pstyv = vbap-pstyv
    ktgrd = vbkd-ktgrd
    ettyp2 = vbep-ettyp
    IMPORTING
    ettyp = vbep-ettyp.
    ****************END OF TEST SOURCE CODE******************
    READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
    check sy-subrc ne 0.
    IF sy-subrc NE 0.
    Change inserted by Arvind R Kulkarni; 07/22/2002
    TAN -> ZAN; TANN => ZANN
    vbap-pstyv = 'ZAN'.
    IF vbap-pstyv = 'TAN'.
    vbap-pstyv = 'ZAN'.
    ELSEIF vbap-pstyv = 'TANN'.
    vbap-pstyv = 'ZANN'.
    ENDIF.
    end of change
    ENDIF.
    *ADDED CASE HERE FOR TEST FOR SYNTAX CHECK 10/15/2002
    *CASE vbap-pstyv.
    WHEN 'ZAN'.
    READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
    CHECK sy-subrc EQ 0.
    vbap-pstyv = 'TAN'.
    WHEN 'ZANN'.
    READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
    CHECK sy-subrc EQ 0.
    vbap-pstyv = 'TANN'.
    WHEN 'ZTAN'.
    IF vbkd-ktgrd = '01'. " Added 6/5/02
    IF vbep-ettyp = 'CN'.
    vbep-ettyp = 'ZA'.
    ELSE.
    vbep-ettyp = 'ZP'.
    ENDIF.
    ENDIF.
    READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
    check sy-subrc ne 0.
    IF sy-subrc NE 0.
    IF vbep-ettyp = 'CN'.
    vbep-ettyp = 'ZA'.
    ELSE.
    vbep-ettyp = 'ZP'.
    ENDIF.
    ENDIF.
    03/23/2005 KN03 Set Schedule Line default to ZF order type ZFD,
    item cat ZTAN, sales org 5060, 5070, and 5071
    IF vbak-auart EQ 'ZFD' AND
    ( vbak-vkorg = '5060' OR vbak-vkorg = '5070'
    OR vbak-vkorg = '5071' ).
    vbep-ettyp = 'ZF'.
    ENDIF.
    Begin of insertion for IRAT processing
    Arvind R Kulkarni; Dated: 07/17/2002.
    Changed to include YRAT; ; 11/22/2002
    WHEN 'IRAT' OR 'YRAT'.
    IF vbak-auart NE 'ZWAR'.
    the sales order is NOT a ZWAR
    READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
    IF sy-subrc NE 0.
    the transaction IS intercompany
    IF vbep-ettyp = 'CN'.
    vbep-ettyp = 'YN'.
    ELSE.
    vbep-ettyp = 'YL'.
    ENDIF.
    ELSE.
    the transaction IS NOT intercompany
    IF vbep-ettyp = 'CN'.
    vbep-ettyp = 'ZN'.
    ELSE.
    vbep-ettyp = 'ZL'.
    ENDIF.
    ENDIF.
    IF vbkd-ktgrd = '01'.
    sale is to an affiliate in local sales org
    IF vbep-ettyp = 'CN'.
    vbep-ettyp = 'YN'.
    ELSE.
    vbep-ettyp = 'YL'.
    ENDIF.
    ENDIF.
    ELSE.
    the sales order IS a ZWAR
    READ TABLE zzwerks WITH TABLE KEY werks = vbap-werks.
    IF sy-subrc NE 0.
    the transaction IS intercompany
    IF vbep-ettyp = 'CN'.
    vbep-ettyp = 'ZA'.
    ELSE.
    vbep-ettyp = 'ZP'.
    ENDIF.
    ELSE.
    the transaction IS NOT intercompany
    NOTHING NEEDS TO BE DONE FOR ZWAR DOMESTIC
    STD SCHED LINE CATEGORIES TO BE MAINTAINED.
    IF VBEP-ETTYP = 'CN'.
    VBEP-ETTYP = 'ZN'.
    ELSE.
    VBEP-ETTYP = 'ZL'.
    ENDIF.
    ENDIF.
    IF VBKD-KTGRD = '01'.
    sale is to an affiliate in local sales org
    IF vbep-ettyp = 'CN'.
    vbep-ettyp = 'ZA'.
    ELSE.
    vbep-ettyp = 'ZP'.
    ENDIF.
    ENDIF.
    ENDIF.
    End of insertion for IRAT processing
    WHEN 'IRRS' OR 'IRRE' OR 'IRLA' OR 'IRLB' OR 'KBN' OR 'TAQ'
    KSI Modification 04/22/03
    Exclude check for item category 'YKW'
    OR 'YTAN' OR 'ZKLN' OR 'KAN' OR 'ZTAQ'
    OR 'YKW' OR 'IRRP' OR 'ZKBC' OR 'ZKBN' OR 'ZKAN' OR 'KLN'.
    or 'ZKEN' OR 'ZKEC' or ZREK OR 'KEN'.
    EXIT.
    WHEN 'ZTR1' OR 'ZRBB' OR 'ZREB' OR 'ZREC' OR 'ZREF' OR 'ZREN'
    Removed ZRTN to validate plant 9000
    OR 'ZRFF' OR 'ZRNB' OR 'ZRNN' OR 'REN' OR 'RENN'
    OR 'ZLN' OR 'IRAL' OR 'ZTR0' OR 'KLN'.
    EXIT.
    03/23/2005 KN03 set default sched line for KE & ZKE
    WHEN 'KEN' OR 'ZKEG' OR 'ZKEN' OR 'ZKEC'.
    IF vbak-vkorg EQ '5070'.
    vbep-ettyp = 'Z0'.
    ENDIF.
    WHEN 'ZREK'.
    INCLUDE zue_sd_0033.
    IF vbap-werks = '9000'. " KN04
    IF vbkd-ktgrd = '01'. " KN04
    IF z_auart = 'ZFD ' and z_pstyv = 'KLN '. " KN04
    vbep-ettyp = 'YK'. " KN04
    ENDIF.
    ENDIF.
    ENDIF.
    KSE Modification 04/10/03
    For Item Cate 'ZRTN'
    Assign 'YQ' to Schedule line cat, if cross-company
    'YU' if not.
    WHEN 'ZRTN'.
    KN03 for KSI set default schedule line for order type ZREK
    INCLUDE zue_sd_0033.
    IF svbep-tabix IS INITIAL.
    IF vbap-werks = '9000'.
    IF vbkd-ktgrd = '01'. " KN04
    IF z_auart = 'ZFD' and z_pstyv = 'KLN '. " KN04
    vbep-ettyp = 'YK'. " KN04
    ELSE. " KN04
    vbep-ettyp = 'YQ'.
    ENDIF.
    ELSE.
    vbep-ettyp = 'YU'.
    ENDIF.
    ENDIF.
    ENDIF.
    KN03 for KSI set default schedule line for order type ZREK
    INCLUDE zue_sd_0033.
    WHEN OTHERS.
    IF vbkd-ktgrd = '01'.
    IF vbep-ettyp = 'CN'.
    vbep-ettyp = 'ZA'.
    ELSE.
    vbep-ettyp = 'ZP'.
    ENDIF.
    ENDIF.
    ENDCASE.
    endif.
    Redetermine Movement Type
    PERFORM tvep_select(sapmv45a) USING vbep-ettyp
    charx
    sy-subrc.
    vbep-bwart = tvep-bwart.
    ENDIF.
    KSE Mod
    User Exit for Repair Replacement
    Export VBEP-ETTYP, imported by RV64A950
    04/18/03
    EXPORT i_ettyp = vbep-ettyp TO MEMORY ID 'ZZSCHEDULE'.
    **lines added for valuated customer-returns project by msn
    110903. It will set required schedule line category YR on specific
    item categories if the document created is of type RE with reference
    document being an invoice of type F2
    **. 11-11-2003.
    **Schedule Line Category - Valuate Customer Returns Stock
    BREAK-POINT.
    INCLUDE zue_sd_0010.
    *KSEA Modification to default item creation date for the IRAT
    *line item schedule line. SAP Note 23281
    04/01/04
    INCLUDE zue_sd_0020.
    ENDFORM.
    *eject
    FORM USEREXIT_MOVE_FIELD_TO_VBKD *
    This userexit can be used to move some fields into the sales *
    dokument business data workaerea VBKD *
    SVBKD-TABIX = 0: Create data *
    SVBKD-TABIX > 0: Change data *
    This form is called at the end of form VBKD_FUELLEN. *
    FORM userexit_move_field_to_vbkd.
    VBKD-zzfield = xxxx-zzfield2.
    Get Customer group, Price group and Price list type *
    by Ship-to party
    10/04/2001
    DATA: yp1 LIKE t001k-bwkey,
    z_uepos_bukrs LIKE t001k-bukrs.
    *Request by Customer Service - Marian Favors 11-08-2004
    TABLES: zzue030. "ECLARKE 11-08-2004
    SELECT SINGLE tcode INTO zzue030-tcode FROM zzue030
    WHERE tcode = sy-tcode. "ECLARKE 11-08-2004
    IF sy-subrc = 0. "ECLARKE 11-08-2004
    Removed check for customer group as this was required by Steve Ludewig
    IF " vbkd-kdgrp IS INITIAL AND "Arvind Kulkarni; 08/05/2002.
    vbkd-konda IS INITIAL AND
    vbkd-pltyp IS INITIAL.
    SELECT SINGLE kdgrp konda pltyp bzirk
    INTO (vbkd-kdgrp, vbkd-konda, vbkd-pltyp, vbkd-bzirk)
    FROM knvv
    WHERE kunnr = kuwev-kunnr
    AND vkorg = vbak-vkorg
    AND vtweg = vbak-vtweg
    AND spart = vbak-spart.
    ENDIF.
    ENDIF. "ECLARKE 11-08-2004
    Redetermine Schedule line Category if Acct Assignment Grp is changed
    to
    Chui 10/23/2001
    IF svbkd-tabix > 0 AND sy-dynnr = '4311'.
    IF vbkd-ktgrd = '01' AND vbep-ettyp <> 'ZP'.
    PERFORM userexit_move_field_to_vbep.
    ENDIF.
    ENDIF.
    INCLUDE zzsdprc01.
    To make the value of the field VBAK-ZUONR same as VBKD-BSTKD
    05/04/04
    vbak-zuonr = vbkd-bstkd.
    ENDFORM.
    *eject
    FORM USEREXIT_NUMBER_RANGE *
    This userexit can be used to determine the numberranges for *
    the internal document number. *
    US_RANGE_INTERN - internal number range *
    This form is called from form BELEG_SICHERN *
    FORM userexit_number_range USING us_range_intern.
    Example: Numer range from TVAK like in standard
    US_RANGE_INTERN = TVAK-NUMKI.
    ENDFORM.
    *eject
    FORM USEREXIT_PRICING_PREPARE_TKOMK *
    This userexit can be used to move additional fields into the *
    communication table which is used for pricing: *
    TKOMK for header fields *
    This form is called from form PREISFINDUNG_VORBEREITEN. *
    FORM userexit_pricing_prepare_tkomk.
    TKOMK-zzfield = xxxx-zzfield2.
    *{ INSERT SNDK900075 1
    tkomk-aland = t001-land1.
    *} INSERT
    Fill Zip code with Ship-to party's
    tkomk-post_code1 = kuwev-pstlz.
    ENDFORM.
    *eject
    FORM USEREXIT_PRICING_PREPARE_TKOMP *
    This userexit can be used to move additional fields into the *
    communication table which is used for pricing: *
    TKOMP for item fields *
    This form is called from form PREISFINDUNG_VORBEREITEN. *
    FORM userexit_pricing_prepare_tkomp.
    TKOMP-zzfield = x

  • Key fields are not visible in output condition table

    Hi,
         I have created few conndition tables using V/61. But i can not see Key field. It is not displaying. But when I check thru VK11 i can see that all fields are marked as key fields. example of table B018.
    My problem is that , i want to make few filed non key fields rest of fileds as key fields so that there should not be any duplicate ntry based on key fields. also I do not want to maintain these two fields for each record.
    Is there any exit to modify and view thesefields? or it is a security issue...bold
    Your earliest response is highly appreciated.\
    Thanks,
    AKS

    Hi Raga,
    Please check the documentation under the customizing path:
    IMG -> Sales and Distribution -> System Modifications ->
    Create New Fields (Using Condition Technique) ->
    New Fields For Pricing
    Then click on the paper icon
    Here is explained how to setup additional fields for pricing,
    not present in the standard.
    Notice the following rules:
    1. the new fields must have name beginning with 'ZZ' or 'YY' in order
       to avoid problem after upgrade
    2. add the new field in the table T681F for the application 'V' and the
       usage 'A'
    3. these new fields must be appened to the structures KOMKAZ or KOMPAZ
       (depending they are header or item fields)
    4. you should provide these fields by implementing the userexits
       USEREXIT_PRICING_PREPARE_TKOMK (header fields)
       USEREXIT_PRICING_PREPARE_TKOMP (item fields)
       in program MV45AFZZ for sales order, RV60AFZZ for invoice.
    In that documentation there are some examples too.
    Please check it.
    Regards,
    Alex

  • Deriving/ change the item category from handling unit

    Hi SAP GURUS,
    In vl01n I want to derive the item category based on the handling unit. Hnadling unit is derived from the payment terms.
    Please let me know the required configuration or the development for this.
    Thanks

    i need ur help regarding the Sales order item category redetermination.
             we are having two item categories YNAE and YNAG and it contain schedule  line categories CP and CB ( i.e for item category  YNAE schedule line category is CP and 
             for item category  YNAG schedule line category is CB), for YNAG Purchase Requisition is automatically created becz of functional setting on save and it is working fine.
             For every line item in sales order line item level item category YNAE will be determined by default as per functional settings.
             Now my requirement is that, if sales order line item doesn't contain 100% confirmed quantity, than i needs to change the default line item category YNAE to YNAG
             which i am trying to do it in USEREXIT_PRICING_PREPARE_TKOMP becz in this exit i am getting the values in XVBAP and XVBEP and  it is working fine .
             But schedule line category is not getting redetermined automatically what i mean is, if i change the item category to YNAG from YNAE in user exit corresponding schedule line category CB of YNAG is getting determined automatically at the schedule line level and if ichange the schedule line categories in XVBEP in exit USEREXIT_PRICING_PREPARE_TKOMP, changes are reflecting at the schedule line level but Purchase requisation is not getting created for schedule on SAVE and its delivary dates are also not getting determined properly. If press the option ATP check at the schedule line level than very things will getting corrected in the order.
    i am using UPDKZ = U  in both xvbap and xvbep for changes
    I feel that i am not doing this in proper way, do u have any idea about how to redetermine item category. please let me know if u have any idea .
    Regards,
    Vaddepally Manoj

  • Sale order- Pricing -Access Sequence

    Hi Gurus,
    While creating Sale order, the price is picked from the Pricing procedure and Condition records maintained.
    In PR00- Material price and Customer-Material special price is maintained in VK11.
    So the system picks Customer Material combination price and the same we can see in the Item level conditions-Analysis for pricing and can also see it fetched record from where.
    So for this Client wants in the following way: POPUP MESSAGE
    At Sale order Warning Message that Price is taken from Which List- Normal Price List or Special Price List for Customer and Material combination
    Is there some way to do this?
    Thanks in Advance.
    Best Regards
    Sri

    Hi,
    U have to take ABAPER HELP  No doubt please use this input if tis use full .
    User Exits For Price Determination
    USEREXIT_PRICING_PREPARE_TKOMK (module pool SAPLV60A, program RV60AFZZ)
    This user exit allows you to copy additional fields for pricing in the TKOMK communication structure (header fields), which have not been provided in the standard SAP system. These fields can also be used for pricing in the billing document.
    This user exit is described in detail in the "New fields in pricing" section.
    USEREXIT_PRICING_PREPARE_TKOMP (module pool SAPLV60A, program RV60AFZZ)
    This user exit allows you to copy additional fields for pricing in the TKOMP communication structure (item fields), which have not been provided in the standard SAP system. These fields can also be used for pricing.
    This user exit is described in detail in the "New fields in pricing" section.
    USEREXIT_FIELD_MODIFICATION (module pool SAPMV61A, program MV61AFZA)
    You can use this user exit to adjust the display of individual lines in the condition screen by changing the display attributes of the screen fields. This does not include the display of subtotals.
    This user exit is also used in order processing.
    USEREXIT_FIELD_MODIFIC_KZWI (module pool SAPMV61A, program MV61AFZB)
    You can change the display of subtotals in the condition screen by changing the display attributes of the screen fields.
    This user exit is also used in order processing.
    USEREXIT_FIELD_MODIFIC_KOPF (module pool SAPMV61A, program MV61AFZB)
    You can adjust the display of subtotals in the condition screen to your requirements by changing the display attributes of the screen fields.
    This user exit is also used in order processing.
    USEREXIT_FIELD_MODIFIC_LEER (module pool SAPMV61A, program MV61AFZB)
    You can adjust the display of blank lines in the condition screen to your requirements by changing the display attributes of the screen fields.
    This user exit is also used in order processing.
    USEREXIT_PRICING_CHECK (module pool SAPMV61, program MV61AFZA)
    You can install additional checks to the standard checks of condition lines (e.g. maximum/minimum value).
    USEREXIT_PRICING_RULE (module pool SAPLV61A, program RV61AFZA)
    In the standard SAP system, it is predefined which condition categories and classes can be copied or recalculated per pricing type. You can change the predefined standard procedure for each pricing type.
    USEREXIT_CHANGE_PRICING_RULE (module pool SAPMV61A, program MV61AFZA)
    You can use this user exit to change the pricing type that has been predefined in the copying control table in billing.
    USEREXIT_XKOMV_BEWERTEN_INIT (module pool SAPLV61A, program RV61AFZB)
    This field is used in the formulas and therefore initialized before the loop for the pricing procedure starts.
    USEREXIT_XKOMV_BEWERTEN_END (module pool SAPLV61A, program RV61AFZB)
    Within a loop for the price components during pricing, specific values can be transferred into the communication structures in pricing to be further processed.
    USEREXIT_XKOMV_ERGAENZEN (module pool SAPLV61A, program RV61AFZB)
    In change mode, you can change the dynamic part of the condition record (KONVD) that is always redetermined (i.e. it is not stored in database table KONV).
    USEREXIT_XKOMV_ERGAENZEN_MANU (module pool SAPLV61A, program RV61AFZB)
    You can use this user exit to change the ready-for-input fields of the manually entered condition record in add mode in the condition screen.
    USEREXIT_XKOMV_FUELLEN (module pool SAPLV61A, program RV61AFZB)
    This user exit is always called up during a redetermination of all or individual price components. You can change the work fields of the condition line. However, this only applies to conditions that have been determined via a condition record.
    USEREXIT_XKOMV_FUELLEN_O_KONP (module pool SAPLV61A, program RV61AFZB)
    This user exit is always called up during a redetermination of all or individual price components. You can change the work fields of the condition line. However, this only applies to conditions that have been determined via a condition record. This may include subtotals, manually entered conditions or conditions that have been calculated with a formula.
    USEREXIT_PRICING_COPY (module pool SAPLV61A, program RV61AFZA)
    You can change the KONV fields for copied price components
    With best regards,
    venkataswamy.y

  • User Exit for saving Invoice

    Hi Experts,
    My req, is I have to check billing date with order date/ delivery date while creating the invoice in VF01.
    For that I have done codig in user exit RV60AFZZ, so it gives error ,but the billing date field get disable.
    & this invoice no. alsp get created.
    So can anybody plz tell me in which user exit i have to put my code ???
    I have tried with RV60AFZC.But it is not working.
    My code is
    FORM userexit_pricing_prepare_tkomp.
    *  TKOMP-zzfield = xxxx-zzfield2.
    * structure for vbak
    TYPES:BEGIN OF ty_vbak,
          vbeln TYPE vbak-vbeln,
          audat TYPE vbak-audat,
          END OF ty_vbak.
    *likp structure
    TYPES:BEGIN OF ty_likp,
          vbeln TYPE likp-vbeln,
          lfdat TYPE likp-lfdat,
          END OF ty_likp.
    *vbrp structure
    TYPES:BEGIN OF ty_vbrp,
          vgbel TYPE vbrp-vgbel,
          vgpos TYPE vbrp-vgpos,
          aubel TYPE vbrp-aubel,
          aupos TYPE vbrp-aupos,
          END OF ty_vbrp.
    DATA:it_vbak TYPE STANDARD TABLE OF ty_vbak,
         it_likp TYPE STANDARD TABLE OF ty_likp,
         it_vbrp TYPE STANDARD TABLE OF ty_vbrp.
    DATA:wa_vbak TYPE ty_vbak,
         wa_likp TYPE ty_likp,
         wa_vbrp TYPE ty_vbrp.
    ***** take reference document no & delivery no. *****
    LOOP AT xvbrp.
      wa_vbrp-vgbel = xvbrp-vgbel.
      wa_vbrp-vgpos = xvbrp-vgpos.
      wa_vbrp-aubel = xvbrp-aubel.
      wa_vbrp-aupos = xvbrp-aupos.
      APPEND wa_vbrp TO it_vbrp.
    ENDLOOP.
    IF it_vbrp IS NOT INITIAL.
    SELECT vbeln audat FROM vbak
          INTO TABLE it_vbak
          FOR ALL ENTRIES IN it_vbrp
          WHERE vbeln = it_vbrp-aubel.
    SELECT vbeln lfdat from likp
           INTO TABLE it_likp
           FOR ALL ENTRIES IN it_vbrp
           WHERE vbeln = it_vbrp-vgbel.
    ENDIF.
    **** check for invoice date with order date *****
    LOOP AT it_vbak INTO wa_vbak.
      IF xvbrk-fkdat IS NOT INITIAL AND xvbrk-fkdat < wa_vbak-audat.
        MESSAGE 'Invoice Date is less than Order Date' TYPE 'E'.
      ENDIF.
    ENDLOOP.
    **** check for invoice date with delievery date *****
    LOOP AT it_likp INTO wa_likp.
      IF xvbrk-fkdat IS NOT INITIAL AND xvbrk-fkdat < wa_likp-lfdat.
        MESSAGE 'Invoice Date is less than Delivery Date' TYPE 'E'.
      ENDIF.
    ENDLOOP.
    ENDFORM.                    "USEREXIT_PRICING_PREPARE_TKOMP
    Thanks & Regards,
    Anagha Deshmukh

    Hello,
    These are the user exits for the tcode.
    J_3RSINV            Export sales
    SDVFX007            User exit: Billing plan during transfer to Accounting
    SDVFX008            User exit: Processing of transfer structures SD-FI
    SDVFX009            Billing doc. processing KIDONO (payment reference number)
    SDVFX010            User exit item table for the customer lines
    SDVFX011            Userexit for the komkcv- and kompcv-structures
    V05I0001            User exits for billing index
    V05N0001            User Exits for Printing Billing Docs. using POR Procedure
    V60A0001            Customer functions in the billing document
    V60P0001            Data provision for additional fields for display in lists
    V61A0001            Customer enhancement: Pricing
    Keep the break point and try in the debugging in each and every exit and see which user exit is triggred.

  • Sales Order Pricing User Exit Problem

    Hi,
    I am facing a problem related to coding in Sales Order pricing user exits. Scenario is as mentioned below:
    Based on Material Entered and Sold To in Sales Order, auto determination of a manual pricing condition happens. For doing this, coding has been done in USEREXIT_PRICING_PREPARE_TKOMP by changing XKOMV table. Auto determination of the manual price is happening properly.
    From Sales Overview Screen when user goes to the Conditions tab, Net Value is not getting calculated. When we navigate away to Schedule line tab and then come back to COnditions tab, Net Value is automatically getting calculated.
    AM i missing something in the coding part? As the data is getting populated automatically I guess some piece of code needs to be triggered. Can anyone shed some light into this.
    Thanks in advance,
    thunderans.

    Prabhu: After filling in XKOMV structure, I am calling FM PRICING. On doing this, the Sales Pricing is getting calculated but even then net value of order at header i.e VBAK-NETWR is not getting populated when we are in Sales Overview screen. When, I am getting into Conditions tab and coming back to Sales Overview screen, Net value is getting populated correctly. This portion of everything not getting populated at the same time is bothering me. The pricing conditon that I am  filling is a manual pricing condition.
    I put a breakpoint after FM PRICING which correctly populates XKOMV structure. How do I properly update Order Net Value in Sales Overview screen wihtout having to navigate to any other tab?
    Nicklas: I am looping at Order line within the user exit USEREXIT_PRICING_PREPARE_TKOMP and determining price. Once all line items are processed, I am using the FM PRICING for calculating Sales Prices.
    J@Y: Request to send me a bit more details into your approach.

  • How to find out the Tcodes for the exits

    Hi All,
    how to find out the Tcodes for the exits. i have a list of exits (customer, user, badi ). i need to find out what are the Tcode affected by this exits.
    Customer Exits: EXIT_RFEBBU10_001
                              EXIT_RFEKA400_001
                              EXIT_RFFOEXIT_100
    User-Exits:  USEREXIT_DELETE_DOCUMENT
                       USEREXIT_FIELD_MODIFICATION
                       USEREXIT_MOVE_FIELD_TO_VBAK
                       USEREXIT_PRICING_PREPARE_TKOMP
    BADI: CUSTOMER_ADD_DATA_CS
              HISTORICAL_VALUES
              MD_ADD_ELEMENTS
              MD_CHANGE_MRP_DATA
              MD_PIR_FLEX_CONS
              MD_PLDORD_POST
              ME_REQ_POSTED
              NOTIF_EVENT_SAVE
    Can anyone help on this <urgency factor removed>.
    Regards
    Ksihore
    Edited by: Suhas Saha on Feb 20, 2012 12:58 PM

    i have just started reading about all these-user exits ,customer exits etc.
    i have read somewhere that:call to customer exits are triggered by function modules exits.
    the structure of function modules are like this:
    EXIT_RFEBBU10_001
    MEANS
    Keyword EXIT followed by program name fllowed by three digits.
    and the call is like this:
    call customer function 0001.
    From above we can conclude that this customer exit must be used in program RFEBBU10.
    GOTO SE38 andenter prog name RFEBBU10.check for above function module.
    for the rest i stick to the same method for user exits and BADI that we can findthe corresponding TCODES
    using Where used lists.
    please Tell me if i m wrong!

  • Change the Pricing Type during billing

    We are facing an issue with the rebate conditions which needs to be resolved asap..
    User has created a credit memo request in VA01.
    Credit memo request is created for the change in the Price.
    (Note: Order reason for such specific credit memo requests is ZXX (e.g.))
    Due to price change rebate accruals value is also reduced in proportion to the reduced price.
    The rebate accruals should not be reduced in this case, since there is no material return and rebate condition is quantity based.
    As a solution to this u2013
    We created a new routine AAA and assigned to the rebate condition types in Pricing procedure.
    This routine will function when order reason entered in the Credit memo request is ZXX.
    Therefore all the rebate condition types (assigned with routine AAA in Pricing) will get deactivated in Order Conditions tab.
    This is working correctly in creating credit memo (VA01).
    The issue is u2013
    When the credit memo is created in VF01, these rebate condition types are again activated and accruals are posted.
    This should not happen. Pricing from the CM request (VA01) should get copied in Credit memo (VF01) completely. The same issue
    with VF02..
    Please  suggest a user exit in which the pricing type can be changed during billing..Tried coding in the form
    USEREXIT_PRICING_PREPARE_TKOMP in RV60AFZZ by changing the Pricing Type KNPRS..But didnt work out..
    Is there any way to meet this requirement. I have checked the user exit RV61AFZA having two forms:
    FORM USEREXIT_PRICING_RULE &
    FORM USEREXIT_PRICING_COPY.
    I would be interested to know how this can be  coded to meet the requirement. Coding displayed will be of great help to
    implement.
    Any pointers / solutions to the issue will be highly appreciated..
    Moderator message - Please do not offer points or rewards
    Edited by: Rob Burbank on Jul 29, 2010 12:34 PM

    Hello Sean
    1) Firstly I don't think the Credit Memo for this case or any case in your situation should be relevant to rebate.  That's becasue your rebate is tied to quantity.  So you should deactivate rebate processing for that Billing Doc type. T Code OVB0. That should close the issue.
    2) Pricing type 'D' in copy control from sales to Billing documents should ensure that Pricing from the CM request (VA01) gets copied in Credit memo (VF01) completely. Why do you need user exits for that? T code VTFA.
    3) If you need to change pricing type selectively for some conditions, then you should configure the condition type with condition category X,Y or Z ( Customer Reserve) and then use USEREXIT_PRICING_RULE (module pool SAPLV61A, program RV61AFZA to ensure that those conditions are copied (or otherwise) from source. But I don't think you need this.

  • PR00 Not editable in Credit Memo Request, when copying from Mile stones

    Dear,
    PROO condition type is not editable in Credit memo request(VA01-CR) when iam creating with ref to Mile stone related invoice.
    Requirement:
    Mile stones maintained in Sale order at  line item level -
    >Invoice created with ref to sale order Miles stones-----> Now I would like to create Credit memo with ref to Invoice, the data is copying but the PROO condition type is not changeble.. I would like to change the amount in credit memeo.
    can  i know the reason why it is not changable???
    Thanks  in advance.

    Its a standard functionality.
    Take a help of an ABAPer for following userexit.:
    USEREXIT_PRICING_PREPARE_TKOMP in the include MV45AFZZ.
    The following code will make the condition type PR00 modifiable for user XXXX and non-modifiable for all other users.
    >FORM USEREXIT_PRICING_PREPARE_TKOMP. DATA : i_T685A TYPE STANDARD TABLE OF T685A WITH HEADER LINE. IF SY-UNAME = 'XXXX'. LOOP AT XKOMV. IF XKOMV-KSCHL = 'PR00'. SELECT * FROM T685A INTO TABLE I_T685A WHERE KSCHL = 'PR00'. READ TABLE I_T685A WITH KEY KSCHL = XKOMV-KSCHL. I_T685A-KMANU = 'C'. MODIFY I_T685A INDEX SY-TABIX. MODIFY T685A FROM TABLE I_T685A. REFRESH I_T685A. ENDIF. ENDLOOP. ELSE. LOOP AT XKOMV. IF XKOMV-KSCHL = 'PR00'. SELECT * FROM T685A INTO TABLE I_T685A WHERE KSCHL = 'PR00'. READ TABLE I_T685A WITH KEY KSCHL = XKOMV-KSCHL. I_T685A-KMANU = 'D'. MODIFY I_T685A INDEX SY-TABIX. MODIFY T685A FROM TABLE I_T685A. REFRESH I_T685A. ENDIF. ENDLOOP. ENDIF. ENDFORM.
    Thanks & Regards
    JP

Maybe you are looking for

  • Open DNS Question

    I have a Time Capsule and an AP Express serving 5 Macs. Internet has gotten slow (Cable). Should I put Open DNS on each Mac (Sys Pref>Network>Airport>DNS) or directly on the Time Capsule, using Airport Utility (Manual Setup>Internet>DNS Servers)? If

  • Line Chart in Infoview Dates out of order

    Hi, I have a report that works fine on the desktop but when it is run from within Infoview, the date range in the X axis of the line chart are no longer in order. Any ideas how I can correct this? Thanks, John

  • Pages documents created on iPhone will not sync to Mac

    When I create a document using Pages on either my iPhone or iPad, it will not sync with Pages on my Mac.  However, if I create a document on my Mac and save it to iCloud it will show up on both the iPhone and iPad. Please advise.

  • Automatic print of gr after it is posted

    Hi Experts, when i post gr with movement type 101 the users need printout of the same immediately, so can you please guide me in setting output  for gr and invoice . presently i go to tc code MB90 in there i select processing mode 2(repeat processing

  • Product Comparison Application

    Hi All, I attended an Abobe 'Fully Loaded Tour' today and during the Flash session, the presenter showed an application - in this case on a digital camera site where thumbnails of all cameras were initially shown. The user could then either move slid