VF01- modification

Hi Experts,
In T-code VF01 ( Creating Billing Document) I am giving the document number ( outbound delivery no) only and execute and after executing and SAVE. It will generate one invoice number.
The Document number which is generated through VL01 for a particular material ->SSCCHR003 ( which is a scrap material) .
So my doubt is when i am creating the invoice number for a scrap material it is generating one invoice number as 111000664. But it is wrong. For a Scrap materail the invoice number should start with 112XXXXXX but i am getting 111XXXXXX.
For same Scrap material ( SSCCHR003) we are creating the invoice number for differnt customers.
kunnr->500111,500112,500026.
For only customer 500026 it is generation the invoice number starting with 112XXXXXX. for other customers it is gving invoice number starting with 111xxxxx But it should not happen because for differnt customers the material is same so the invoice number should start with 112 only....
So for a Scrap material it is generation wrong invoice number so i need the place where it will generate the invoice number for T-code VF01. The standard program is SAPMV60A. So where i need to modify and how ? please anybody can give me their suggestions where to find that error and how?
Is there any user exit to do so? or how to modify this? Its urgent.
<b>points will be rewarded</b>
Regards,
sunil kairam.

You can try this one but I am not sure whether this will work as right now I dont have access to SAP.
In V/06 for that condition type, you maintain "D" for manual entries and in pricing procedure tick the box for "Manual" so that in sale order, you can key in manually the condition type but not in billing the value can be manipulated.
Of course,  the other option is go for user exit.
thanks
G. Lakshmipathi

Similar Messages

  • Regarding Modification In Standard Tcode VF01

    Hi Friends,
              In Transaction VF01 i need to add some check condition on MRP of Article before saving Billing Document...............
    if that condition satisfied than and than billing document should be saved.....otherwise give some error message that condition not satisfied.....................
    how to achieve this...............

    thnks for the reply friends.................
    i hv tried USEREXIT_FILL_VBRK_VBRP
    but my requirement is that i need to check MRP of article and
    MRP in the batch if is different than generate error message........
    i can see Batch but for MRP of Article i need Condition reocrd number which is VBRK-KNUMV but i m not able to see this fields in this exist....................

  • Exit of VF01 for field modification

    Dear All,
    I need to enable field for "Billed Quantity" in line item while doing VF01 so that user can change Quantity. what exit/enhancement will be used?. please help.
    Radsamm

    Hi Sasidhar,
    First of all I wrote my code in the user exit you told me but when I go to VF01 and try to cancel a document, this user exit doesn't work. I'm using the same code, i put a break point and it doesn't stop there...
    data l_kunnr like vbpa-kunnr.
    clear l_kunnr.
    select single kunnr
      from vbpa
        into l_kunnr
          where VBELN = vbak-vbeln
            and POSNR = '000000'
            and PARVW = 'RG'.
      SELECT SINGLE KLIMK
        INTO VBRK-ZKLIMK
          FROM KNKK
            WHERE KUNNR = l_kunnr.
      vbrk-zcarga = 'X'.
    Thanks,
    Maria

  • Pricing Modification in VF01

    Dear Experts, does someone could lend us a hand with the following issue.
    We are working with manual price condition because we need it in some cases. So, the user enters the price in the VA01. Then, another user creates the billing document with reference. Here the price can be modified. This is what we want to avoid. The price should not be modified in VF01.
    We canu2019t select the "D Not possible to process manually" in the condition type because in the VA01 the price has to be set, but then, in VF01 it shouldnu2019t.
    ¿Can be this handle by user security?. ¿Does some knows if there is a user exit to control this?
    Thanks in advance,

    You can try this one but I am not sure whether this will work as right now I dont have access to SAP.
    In V/06 for that condition type, you maintain "D" for manual entries and in pricing procedure tick the box for "Manual" so that in sale order, you can key in manually the condition type but not in billing the value can be manipulated.
    Of course,  the other option is go for user exit.
    thanks
    G. Lakshmipathi

  • Customization of tcode 'Create Billing Document - *VF01*'

    Hi,
    I have a requirement where I need to enable the disabled field Item in TCode VF01 (to make the field similar to Document Number which is enabled). Please suggest me how to proceed as Functional guys said it is not possible to do from Functional side.
    Any kind of input is highly appreciated.
    Thanks
    RKU

    Hello,
    think there is no 'customization' for the item-field in VF01 - it's just an only output field in Screen SAPMV60A / 0102 - it would be a modification.
    But you could just use the button 'selection list' - that one allows to pick only one or certain items from the document you want to bill. 
    Regards Wolfgang

  • How to change the billing qty directly during VF01 in AFS?

    Dear experts:
       Can anyone advise how we can change the billing qty directly during VF01 in AFS? Can anybody tell me why i can modify the billing qty in SAP R/3 ECC6.0, but it fail to in AFS, why?
    The operation was:
    1、I have  to done one customising, in VOV7 for my Item category change the Billing Relevance to "K";
    2、We setting up as Delivery note  related billing and would like to change the qty at the point of billing;
    3、Enter the Delivery note number Do not Press Enter, Then Click on u201Cselection listu201D, however , the field of "open quantity"  is in greyed out mode !
    In SAP R/3 ECC6.0 ,In transaction VF01 put the Delivery note NO. and before entering or executing go to "selection list" and we will find the quantities in editable mode and we can change there and then execute billing,but in AFS,the field of "open quantity"  is in greyed out mode ! I asked a lot of friends in AFS, they also  have this problem!
    Thanks
    Peter.lee
    Edited by: peter.lee on Nov 19, 2011 3:05 AM

    Hi Guys,
    Contrary to others IS (retail, oil etc...), AFS has been almost fully redesigned in some areas. That's why SAP releases first EHP business functions for standard and then try to enhanced the new created features later in AFS EHP.
    In regards to the change of the billing quantity, from my prospective this is not supported. Quantity always comes from preceding document.
    AFS is implemented in many industries like workwear, fashion high fashion, sportwear, underwear, bags etc...However I never got the same requirement to change the billing quantity.
    For which reasons do you need to change the billing quantity ? Can this be done in the sales order (in case of debit/credit memo request) or in the delivery ?
    The billing area has some restrictions, such as doing a pricing redetermination, in AFS it must be done in the sales order for example.
    You could potentially ask SAP and see whether an advanced modification could be provided (this is chargeable).
    Hope this might help.
    Regards,
    Mehdi

  • Excise Duty Value not flow from J1IJ to VF01

    Hi SAP Expert,
    I am facing the problem in Invoice to Customer(from Depot). Excise Values are not flowing from J1IJ for pricing procedure JINDEP. I maintained Alt Cal type as 356 in Pricing procedure JINDEP for Excise condition types JEXP. But it is still not flowing. I am using Tax Procedure TAXINN.
    Do I need to go to VTFL In item level copying requirement to set pricing type: to C ??
    But once i set, it will impact other billing document too. Please advise.
    Thanks.

    Hi,
    I have successfully posted Excise Invoice at Depot using J1iJ.
    When i create billing via Vf01, i am unable to see the value of Excise Duty in item pricing condition from J1iJ.
    I analyse the pricing condition for condition type JEXP, below is what i got :
    This message tells you that the condition record exists, but has not been set in the document. If pricing was carried out again for the document item, then the condition would be set.
    There are different reasons for this:
    1.The condition was deleted manually in the item condition screen.
    2. The condition record was created later. Please note that order processing and pricing have buffer mechanisms. This means that a newly added condition record might only be found after order processing has been left completely and then started again.
    If the condition type is used for subsequent settlement (rebate), there may be subsequent updating of business volume (the agreement is is created retrospectively). The document conditions do not contain the condition record, as the condition record was not created when pricing was carried out. Updating of business volume is carried out using special functions for subsequent settlement.
    1. When an item was added, the condition record was accessed with key fields other than change time. This could lead to different results in the requirements check at the time of adding and the change time. This can occur when modifications are made.
    2. In billing (or when copying orders): Certain condition types were not determined in the source document (this is usually controlled by the pricing requirements). When creating the document, the document flow (TVCPF,TVCPA) is processed using a pricing type that does not redetermine these condition types, although they are supposed to be called via the requirements.
    Is it correct that i assigned routine 356 to Pricing Condition JINDEP ?

  • Disable Billing Date in VF01 screen 6001

    Hi all,
             i need to disable(hide) the date field in vf01 (Billing  Invoice : create header data) for particular condition type or make it as the date equal to billing date. (screen 6001, field : vbrk-fkdat).
    i also tried RV60AFZC but i was not successfull.
    i searched in sdn but did not find such req .
    So kindly please suggest me.
    thanks in advance,
    kool.

    HI,
    i solved it by myself,
    the procedure is as follows
    navige to the include MV60AF0F_FELDAUSWAHL_SONDERREG
    (don't worry this is an enhance spot , so i giving the include name directly )
    not: you need to get access key.
    goto se38
    open MV60AF0F_FELDAUSWAHL_SONDERREG report in change mode
    in line number 268
    you wil get this code
      if ( fakt-tabstrip_subscreen  = '6105'
        or sy-dynnr = '0105' )    and
         screen-name = 'VBRK-XBLNR'.
        screen-input = 0.
        modify screen.
        perform xblnr_set_screen_attributes
                using     t180-trtyp vbrk
                changing  screen.
      endif.
    now under this you need to add your desired code
    in my case this is my code
    """""''MODIFIED BY ABAP1 06/09/2011
        if ( fakt-tabstrip_subscreen  = '6105'
        or sy-dynnr = '6001' )    and
         screen-name = 'VBRK-FKDAT' AND VBRK-FKART = 'ZMD' OR VBRK-FKART = 'F2'.
        screen-input = 0.
        modify screen.
        ENDIF.
    """""END OF MODIFICATION BY ABAP1.
    now save it and activate it and check in your vf01
    that field will be in non editable mode.
    regards,
    kool.

  • VF01/VF04 Custom enhancement

    Dear Experts,
    We got requirement where in we have to copy VF04 selection screen (<b>SCREEN #1</b>), add additional fields and filter output based on the selection criteria. Out put of this selection will be ALV out put <b>SCREEN #2</b>) where all line of sales order displayed only Quantity fields open for modification by user if they want to modify before creating billing document. In out put screen (<b>SCREEN #2</b>) user got 2 options ‘SAVE’ and ‘PRINT’. If Print then using VF31 report need to be outputted. If SAVE then I have to call either VF01 or VF04 to create billing document.
    My issue is if I call any of <b>VF01/VF04</b> input parameters will be sales order no/Billing type/Billing due date. But if I pass this, values (quantity) changed by user in <b>SCREEN # 2</b> will not reflect in billing document it will pick all again from sales order and do as standard functionality does. So my question is how can I make VF01/VF04 pick up details from <b>SCREEN #2</b> and process accordingly. I know it’s bit confusing, but this is enhancement customer want. Thanks in advance. Let me know if any additional details required Any idea or directions if you can think how I can handle this requirement will be of great help.
    Regards,
    Tim

    Hi Tim
    you cannot influence the quantities to be invoiced in the way you describe. You only can make a full invoice of the preceding documents with some rules based on copy control in customizing.
    It is dangerous to manually change the quantities in a user-exit, because SAP has a lot of addinitonal index tables which would be corrupted.
    You can only print with VF31, when invoice is already created. So you need a third screen which shows all invoices   created by Screen2 where you can start printing.
    Regards
    Rauno

  • Add customer fields on item level billing document VF01

    Hi gurus,
    Does anybody know a user exit (or another way) to add 3 customer fields on a subscreen during creation of a billing document (transaction VF01) ? I'm afraid I need to do a modification for this but maybe there is a better solution.
    Thanks for your reaction.
    Serge

    Hi
    These are the userexits
    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
    may be you can look into this SDVFX010
    Please reward if useful.

  • BADI in Billing Transaction (VF01)

    Dear All,
    I am new to BADIs Development. And I want to put a BADI in Billing Transaction VF01. My users want some extra fields for putting the data. So please guide me how can I do that.
    Regards,
    Vishal

    Hi vishal
    if u specify exact fields and requirements , i think more forum memebers can guide u.
    take help of technical consultant for finding out exact BADI  in applicable abap code u can use t.code SE17 and Se18 for the same.
    a generic info for you is from sap help check this if it helps
    Enhancement of Tables of Billing Document  
    Use
    For all components of the billing document there are customer includes that you can use to add your own fields without the need for modifications.
    Features
    All layers use the same customer includes. This means that, for example, when you include a field in the customer include of the document header, this field exists in the database layer, the logical layer, and the display layer. You cannot enhance the structures of the inbound interface of BAPI_ISTBILLDOC_CREATEMULTIPLE using customer includes. In accordance with the guidelines for programming BAPIs, you have to use the import table EXTENSIONIN to fill the fields in the customer include of the billing document.
    For technical reasons, there are two customer includes in the components of the billing document. One customer include is designed for fields of a character nature that can be transferred automatically. The transfer is supported by predefined BAPI table enhancements. If you use this predefined BAPI table enhancement when you fill table EXTENSIONIN, the fields in the customer include are provided with data automatically. You do not need a BAdI implementation. For more information, see the section  Customer Enhancement and Modification of BAPIs (CA-BFA) in the documentation for SAP NetWeaver under Cross-Services ® Further Development, Modifications, u2026 (CA-BFA).
    The predefined BAPI table enhancements also include the above-mentioned customer includes. The following table shows the names of the BAPI table enhancements and customer includes:
    Part     BAPI Table Enhancement     Customer Include
    Header     BAPI_TE_FKKINVBILL_H     CI_FKKINVBILL_H
    Items     BAPI_TE_FKKINVBILL_I     CI_FKKINVBILL_I
    Tax Items     BAPI_TE_FKKINVBILL_T     CI_FKKINVBILL_T
    Additional Items     BAPI_TE_FKKINVBILL_A     CI_FKKINVBILL_A
    A further customer include is designed for customer-defined fields that are not of a character nature or required for mapping. An example is additional currency fields. For these fields you have to implement a method of the BAdI ISTINV_BAPIBILL. The following table shows the names of the customer includes and the related methods that you have to implement for the transfer of the data:
    Part     BAdI Method     Customer Include
    Header     MAP_HEADER     CI_M_FKKINVBILL_H
    Items     MAP_ITEM     CI_M_FKKINVBILL_I          
    Tax Items     MAP_TAXITEM     CI_M_FKKINVBILL_T          
    Additional Items     MAP_ADDITEM     CI_M_FKKINVBILL_A
    The following figure shows how you can use the EXTENSION table to fill customer-defined fields:
           1.      The standard SAP fields are provided with data automatically. This means, for example, that the values of the structure HEADERS are transferred to the standard fields of the structure FKKINVBILL_H. Usually no BAdI implementation is required.
           2.      Use the customer include CI_FKKINVBILL_H for customer-defined character fields whose value is to be transferred from the interface to the billing document header unchanged. This include is also included in the BAPI table enhancement BAPI_TE_FKKINVBILL_H. Entries in table EXTENSIONIN that refer to this structure are processed automatically. A BAdI implementation is not required. However, we recommend BAdI implementation for checking. In the same way, you can add character fields to other parts of the billing document and provide them with data.
           3.      If you want to add a numerical field to the billing document header, you have to use the customer include CI_M_FKKINVBILL_H. Also define a BAPI table enhancement. We recommend that you only use character fields in the BAPI table enhancement. Implement method MAP_HEADER of the BAdI ISTINV_BILL. Use your BAPI table enhancement to identify the corresponding entries in table EXTENSIONIN in the method. Convert the character field from your BAPI table enhancement into the numerical field from the customer include CI_M_FKKINVBILL_H. In the same way, you can add numerical fields to other parts of the billing document and provide them with data.
           4.      You can also use the EXTENSIONIN table to provide a customer-defined table with values.
    Regards
    Mandar

  • Exits in VF01

    Hi All,
    I need to add a date field in VF01 transaction.
    Can anyone suggest which exit can i use for this? Pls explain fully as i am new to Exits.
    What is the procedure to add a field and what code is to be written?
    Full points will be rewarded.
    Thanks in advance.
    Naba.

    n.saha,
    These are the screen exits for VF01  map with your requirement.
    V61A0001 Customer enhancement: Pricing
    V60P0001 Data provision for additional fields for display in lists
    V60A0001 Customer functions in the billing document
    V05N0001 User Exits for Printing Billing Docs. using POR Procedure
    V05I0001 User exits for billing index
    SDVFX011 Userexit for the komkcv- and kompcv-structures
    SDVFX010 User exit item table for the customer lines
    SDVFX009 Billing doc. processing KIDONO (payment reference number)
    SDVFX008 User exit: Processing of transfer structures SD-FI
    SDVFX007 User exit: Billing plan during transfer to Accounting
    SDVFX006 User exit tax line in transfer to accounting
    SDVFX005 User exit reserves in transfer to accounting
    SDVFX004 User exit G/L line in transfer to accounting
    SDVFX003 User exit cash clearing in transfer to accounting
    SDVFX002 User exit for A/R line in transfer to accounting
    SDVFX001 User exit header line in delivery to accounting
    Business Add-in
    SD_CIN_LV60AU02 BADI for billing
    VOR_WA_FAKTURA Billing before Goods Issue
    Process...
    Step by Step   user exits.
    User exits
    1. Introduction
    2. How to find user exits
    3. Using Project management of SAP Enhancements
    1. Introduction
    User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to
    a functionmodule. The code for the function module is writeen by the developer. You are not writing
    the code directly in the function module, but in the include that is implemented in the function module.
    The naming standard of function modules for functionmodule exits is:  EXIT_<program name><3
    digit suffix>
    The call to a functionmodule exit is implemented as: CALL CUSTOMER.-FUNCTION <3 digit suffix>
    Example:
    The program for transaction VA01 Create salesorder is SAPMV45A
    If you search for CALL CUSTOMER-FUNCTION i program SAPMV45A you will find ( Among other user
    exits):
    CALL CUSTOMER-FUNCTION '003'
    exporting
    xvbak   = vbak
    xvbuk   = vbuk
    xkomk   = tkomk
    importing
    lvf_subrc = lvf_subrc
    tables
    xvbfa = xvbfa
    xvbap = xvbap
    xvbup = xvbup.
    The exit calls function module EXIT_SAPMV45A_003
    2. How to find user exits
    Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT
    If you know the Exit name, go to transaction CMOD. Choose menu Utillities->SAP Enhancements.
    Enter the exit name and press enter.
    You will now come to a screen that shows the function module exits for the exit.
    3. Using Project management of SAP Enhancements
    We want to create a project to enahance trasnaction VA01
    Go to transaction CMOD
    Create a project called ZVA01
    Choose the Enhancement assign radio button and press the Change button
    In the first column enter V45A0002 Predefine sold-to party in sales document . Note that an
    enhancement can only be used i 1 project. If the enhancement is allready in use, and error message
    will be displayed
    Press Save
    Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002.
    Double click on the exit.
    Now the function module is displayed. Double click on include ZXVVAU04 in the function module
    Insert the following code into the include: E_KUNNR = '2155'.
    Activate the include program. Go back to CMOD and activate the project.
    Goto transaction VA01 and craete a salesorder. Note that Sold-to-party now automatically is "2155" .
    A Short Tutorial on User Exits
    Content Author: Abhishek
    User exits :
    1. Introduction
    2. How to find user exits
    3. Using Project management of SAP Enhancements 
    1. Introduction:
    User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a functionmodule. The code for the function module is writeen by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.
    The naming standard of function modules for functionmodule exits is: 
    EXIT_<program name><3 digit suffix> 
    The call to a functionmodule exit is implemented as:
    CALL CUSTOMER.-FUNCTION <3 digit suffix>
    Example:
    The program for transaction VA01 Create salesorder is SAPMV45A
    If you search for CALL CUSTOMER-FUNCTION i program
    SAPMV45A you will find ( Among other user exits):
    CALL CUSTOMER-FUNCTION '003'
      exporting
        xvbak   = vbak
        xvbuk   = vbuk
        xkomk   = tkomk
      importing
        lvf_subrc = lvf_subrc
      tables
        xvbfa = xvbfa
        xvbap = xvbap
        xvbup = xvbup.
    The exit calls function module EXIT_SAPMV45A_003
    2. How to find user exits?
    Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT
    If you know the Exit name, go to transaction CMOD.
    Choose menu Utillities->SAP Enhancements. Enter the exit name and press enter.
    You will now come to a screen that shows the function module exits for the exit.
    3. Using Project management of SAP Enhancements, we want to create a project to enahance trasnaction VA01 .
    - Go to transaction CMOD
    - Create a project called ZVA01
    - Choose the Enhancement assign radio button and press the Change button
    In the first column enter V45A0002 Predefine sold-to party in sales document. 
    Note that an enhancement can only be used in 1 project. If the enhancement is already in use, and error message will be displayed
    Press Save
    Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002. Double click on the exit.
    Now the function module is displayed. Double click on include ZXVVAU04 in the function module
    Insert the following code into the include: E_KUNNR = '2155'.
    Activate the include program. Go back to CMOD and activate the project. 
    Goto transaction VA01 and craete a salesorder. 
    Note that Sold-to-party now automatically is "2155"
    What is User Exits and Customer Exits?
    Difference between user exits & customer exits:
    User exit - A user exit is a three character code that instructs the system to access a program during system processing.
    SXX: S is for standard exits that are delivered by SAP.   XX represents the 2-digit exit number.
    UXX: U is for user exits that are defined by the user.  XX represents the 2-digit exit number
    Customer exit - The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications. SAP creates customer exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.     *-- Mani
    The following document is about exits in SAP :-
    The R/3 enhancement concept allows you to add your own functionality to SAP’s standard business applications without having to modify the original applications. 
    SAP creates user exits for specific programs, screens, and menus within standard R/3 applications. These exits do not contain any functionality. Instead, the customer exits act as hooks. You can hang your own add-on functionality onto these hooks.
    Types of Exits 
    There are several different types of user exits. Each of these exits acts as hooks where you can attach or "hang" your own add-ons.
    Menu Exits
    Menu exits add items to the pulldown menus in standard SAP applications. You can use these menu items to call up your own screens or to trigger entire add-on applications.
    SAP creates menu exits by defining special menu items in the Menu Painter. These special entries have function codes that begin with "+" (a plus sign). You specify the menu item’s text when activating the item in an add-on project.
    Screen Exits
    Screen exits add fields to screens in R/3 applications. SAP creates screen exits by placing special subscreen areas on a standard R/3 screen and calling a customer subscreen from the standard screen’s flow logic.
    Function Module Exits 
    Function module exits add functions to R/3 applications. Function module exits play a role in both menu and screen exits. 
    When you add a new menu item to a standard pull down menu, you use a function module exit to define the actions that should take place once your menu is activated. 
    Function module exits also control the data flow between standard programs and screen exit fields. SAP application developers create function module exits by writing calls to customer functions into the source code of standard R/3 programs. 
    These calls have the following syntax: 
    CALL CUSTOMER-FUNCTION ‘001’.
    Field Exits
    Field exits allow you to create your own programming logic for any data element in the Dictionary. You can use this logic to carry out checks, conversions, or business-related processing for any screen field.  Example: The data element BBBNR identifies a company’s international location number. You might want to set up your R/3 System so that all international location numbers are larger than 100. 
    The field exit concept lets you create a special function module that contains this logic. 
    You assign the special function module to the data element BBBNR. You then assign the module to any programs and screens in which users can add new international location numbers. When you activate your field exit, the system automatically triggers your special routine whenever a user enters a company location number. 
    In 4.6c, you can use "RSMODPRF" program to create field exits.
    An example of a user exits :-
    MODULE user_exit_0001 INPUT 
        CASE okcode.
            WHEN 'BACK OR EXIT'.
                CASE sy-dynnr.
                        WHEN '100'.
                             SET SCREEN 0.
                             LEAVE SCREEN.
                        WHEN '200'.
    Note that you can write any code that satisfy your needs.                                                     ****
    But in this case, this was wrote as a sample code for reference sake.                                    ****
    And you can test it.                                                                                ****
                             SET SCREEN 100.
                             LEAVE SCREEN.
                 ENDCASE.
          ENDCASE. 
    Hi
    Go through this, surely it will help you,
    User exits (Function module exits) are exits developed by SAP. The exit is implementerd as a call to a functionmodule. The code for the function module is writeen by the developer. You are not writing the code directly in the function module, but in the include that is implemented in the function module.
    The naming standard of function modules for functionmodule exits is:
    EXIT_<program name><3 digit suffix>
    The call to a functionmodule exit is implemented as:
    CALL CUSTOMER.-FUNCTION <3 digit suffix>
    Example:
    The program for transaction VA01 Create salesorder is SAPMV45A
    If you search for CALL CUSTOMER-FUNCTION i program
    SAPMV45A you will find ( Among other user exits):
    CALL CUSTOMER-FUNCTION '003'
    exporting
    xvbak = vbak
    xvbuk = vbuk
    xkomk = tkomk
    importing
    lvf_subrc = lvf_subrc
    tables
    xvbfa = xvbfa
    xvbap = xvbap
    xvbup = xvbup.
    The exit calls function module EXIT_SAPMV45A_003
    2. How to find user exits?
    Display the program where you are searching for and exit and search for CALL CUSTOMER-EXIT
    If you know the Exit name, go to transaction CMOD.
    Choose menu Utillities->SAP Enhancements. Enter the exit name and press enter.
    You will now come to a screen that shows the function module exits for the exit.
    3. Using Project management of SAP Enhancements, we want to create a project to enahance trasnaction VA01 .
    - Go to transaction CMOD
    - Create a project called ZVA01
    - Choose the Enhancement assign radio button and press the Change button
    In the first column enter V45A0002 Predefine sold-to party in sales document.
    Note that an enhancement can only be used in 1 project. If the enhancement is already in use, and error message will be displayed
    Press Save
    Press Components. You can now see that enhancement uses user exit EXIT_SAPMV45A_002. Double click on the exit.
    Now the function module is displayed. Double click on include ZXVVAU04 in the function module
    Insert the following code into the include: E_KUNNR = '2155'.
    Activate the include program. Go back to CMOD and activate the project.
    Goto transaction VA01 and craete a salesorder.
    Note that Sold-to-party now automatically is "2155"
    Also Check this out--
    1. Storage Location Determination at Sales Order:
    You can do it through user exit... this is the exit...
    USEREXIT_SOURCE_DETERMINATION (MV45AFZB)
    2. Pricing Authorisation:
    Refer OSS Note 105621
    http://www.sapfans.com/forums/viewtopic.php?t=80256
    3. Making some of the Fields as Mandatory in Customer master based on the Business Rule.
    Enhancement is SAPMF02D. Activate it through CMOD. The Following are the example to stop the Customer master creation with Tax jurisdiction Code.
    *& Include ZXF04U01 *
    *This user exit has been written for not to save the customer master *
    *to whom the Tax Juridiction code is not updated. The Export Customer *
    *is exceptional. Exit written by M. Murali on 18.05.2004. *
    IF i_knvv-vkorg ne '2000' .
    if i_kna1-TXJCD is initial .
    Message ID 'ZK' type 'E' number '005' .
    endif .
    endif .
    4. Different Billing Document Number range based on Company code / Plant Code for the same billing type.
    The Following are the example for different invoice number based on Plant.
    Use the Exit RV60AFZZ.
    FORM USEREXIT_NUMBER_RANGE USING US_RANGE_INTERN.
    if (
    xvbrk-fkart = 'ZF3' or xvbrk-fkart = 'ZF2' )
    and xvbrk-vkorg = '1000'.
    case xvbrp-werks.
    when 'AGR'.
    us_range_intern = '22'.
    when 'AHD'.
    us_range_intern = '28'.
    Endif.
    ENDFORM.
    5. Changing the billing Date to Current date or Changing some of the Field values of the Billing data.
    Create a Data transfer routine for the billing and do the changes what ever you want. The following are the example for changing the billing date to current date.
    *& Form DATEN_KOPIEREN_611
    text
    FORM DATEN_KOPIEREN_611.
    IF VBRK-FKDAT NE SY-DATUM .
    SY-SUBRC = 0 .
    MESSAGE ID 'ZSD1' TYPE 'I' NUMBER '014' .
    VBRK-FKDAT = SY-DATUM .
    ENDIF .
    ENDFORM. "DATEN_KOPIEREN_611
    Userexits are places in the SAP standard code that are designed to insert code by the customer. It happens often that some values are set by default by SAP but are not appropriate for the business
    For more information on User Exits, please check this links.
    http://www.easymarketplace.de/userexit.php
    http://www.erpgenie.com/abap/code/abap26.htm
    http://www.planetsap.com/userexit_main_page.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/ab038.htm
    http://www.easymarketplace.de/userexit.php
    Some more information on userexits and enhancements.-----
    Enhancement/Modifications
    1) Execute tcode SMOD to find available enhancement/modifications.
    2) Create a project for the enhancement in tcode CMOD.
    3) You must activate your project first in order to hit a break-point or get into debug mode for your existing enhancements/modifications, if you do not, the best you will be able to do is step through the main program until you hit the call for that particular customer enhancement.
    4) To get into debug, you can enter a hard break-point in the enhancement itself, set a soft break-point with the stop sign, or the long way, before you execute your transaction or while you are in your transaction, you can place a /h in the ok code area (this is the area of your gui where you can type in a tcode). Once you have the /h, hit enter and that will take you into debug, from there, you can do many different things to find exactly what you are looking for.
    User Exits
    1) Identify the main program you want to locate a user exit/debug.
    2) For example, go to SE80 and do a search by program or dev class (SAPMV45A sales order or Dev Class VMOD, most SD user exits are in this dev class). In SE80 if you go by program, most user exit programs end in a 'Z' on a rare occasion 'X' or 'Y'.
    3) If you are looking at including MV45AFZZ, you can see where there are different forms. These forms will get called at times within the program. If you are looking to fill the storage location on the sales order, you will probably want to take a look at the perform that fills in a field in vbap.
    4) If this is what you are trying to accomplish, you will need to do the select against the config Table TVKOL based on the shipping point/plant and possibly storage condition based on your picking strategies.
    5) For the debug part, you can do the same as in the enhancements/modifications but you will not need to activate any projects
    PDF which is available with me Userexits in FICO. We can do the same in SD also.------
    http://www.ficoexpertonline.com/downloads/User%20ExitsWPedit.doc
    Go to transaction SE81.
    Click on SD .
    Click "edit" on the menu bar .
    Choose select subtree.
    Click on "information system" .
    Open Environment node, customer exits, and enhancements.
    Press F8 to get all the user exits for that module.
    In brief: SE81->SD->Select subtree->Information System->Envir->Exit Techniques->Customers exits->enhancements->Execute(F8)
    USEREXIT
    Userxits allow us to add our own functionality to SAP standard program
    without modifying it . These are implemented in the form of subroutines and hence are also known as FORM EXITs. The userexits are generally collected in includes and attached to the standard program by the SAP.
    All Userexits start with the word USEREXIT_...
    FORM USEREXIT_..
    z..
    ENDFORM.
    The problem lies in finding the correct userexit and how to find it if one exists for the purpose. Once the correct userexit is found the necessary
    customer code is inserted in the customer include starting with the z..
    in the form routine.
    e.g. USEREXIT_SAVE_DOCUMENT_PREPARE
    Certain application like SD still provide this form of enhancement using userexit but this practice is no longer being followed for newer extensions
    instead they are using EXITs which come bundeled in enhancement packages . Neverthiless existing USEREXITS will be supported by SAP an all the newer versions of SAP.
    HOW TO FIND USEREXITS
    Userexits can be found in number of ways:
    1) To find userexits in SD module , goto object navigator(SE80) and select
    development class from the list and enter VMOD in it. All of the userexits in SD are contained in the development class VMOD. Press
    enter and you will find all the includes which contain userexits in SD for
    different functions like PRICING, ORDER PROCESSING etc. Select the userexit according to the requirement and read the comment inserted in it
    and start coding .
    Some examples of userexits in SD(SALES & DISTRIBUTION ) are:
    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:
    USEREXIT_NUMBER_RANGE
    This userexit is used to assign a different internal document number to the
    sales order(VA01) when it is created depending on some criteria like a different SALES ORGANIZAION(VKORG) .
    USEREXIT_SAVE_DOCUMENT_PREPARE
    This userexit is used to insert the ABAP code which will be called when
    the document (sales order VA01) is just about to be saved.This userexit is used generally for custom checks on different fields , to display some information before the order will be saved or for making changes to certain fields before the sales order will be saved.
    Exits & Enhancements
    There are mainly six types of EXITs in sap which have been collected in the form of enhancement packages and attached to standard code in SAP.
    These are different from USEREXIT in the way that they are implemented
    in the form of FUNCTIONs while in USEREXITS we use form routines for their implementation. These are also sometimes known as function exits .
    These start from the word EXIT_ followed by the program name and then followed by a three digit number.
    e.g. EXIT_SAPMV45A_002
    This exit is found in SD in enhancement V45A0002.
    TYPES OF EXITS
    1)MENU EXITS
    2)FUNCTION EXITS
    3)TABLE EXITS
    4)SCREEN EXITS
    5)KEYWORD EXITS
    6)FIELD EXITS
    We use SAP transactions CMOD and SMOD to manage exits. Before implementing an exit , it is required to create the project by using CMOD
    selecting the enhancement e.g. V45A0002 and selecting the component
    (one which fulfills our need) i.e the exit which will be implemented in SMOD and after coding has been done the project has to be activated.
    An exit can be coded only once.
    FUNCTION EXITS
    These are used to add functionality through ABAP code . These start from the word EXIT_programname_NNN ending in a 3 digit number. No access code is required to implement any tupe of exit including function exits.
    The function exits are called from the standard SAP program in the form
    of ABAP statement
    CALL CUSTOMER-FUNCTION 'NNN'
    This is in contrast to USEREXITs where PERFORM statement is used to call
    the required userexit.
    To implement the FUNCTION EXITs first of all the project is created and a suitable enhancement package is selected and from its compnents the function exit to be implemented is selected and on double clicking it the exit code will appear in ABAP EDITOR(se38) where a Z include will be found and the customer code should be entered in this include.
    e.g.
    ADDING A DEFAULT SOLD-TO-PARTY in Sales Order Creation
    To show a default sold-to-party in this field when the user creates a sales order (VA01) we can use a function exit .This function exit is located
    in enhancement no V45A0002 . Before we can choose the exit we have to
    create a project in CMOD after that enter V45A0002 in the enhancement field and click on the components . In the components you will see the
    exit EXIT_SAPMV45A_002 . This exit is used for our purpose.
    Double clicking on this exit will takes us to function builder (SE37) . This
    function exit has one exporting parameters and two importing parameters, we are interested in exporting parameter which is E_KUNNR
    of type KNA1-KUNNR i.e if we move the desired customer name to this
    structure(E_KUNNR) it will be shown in the field as the default value when we create the sales order.
    This function also contains a customer include ZXVVA04 . This include
    will be used to write our custom code .
    Double clicking on this include and it will prompt us that this include does not exists do you want to create this object ,select yes and the include will be created .In this include we can write our own code that will fill the field E_KUNNR.
    e.g. E_KUNNR = 301.
    Activate the include and Activate the project. Now when ever the SALES ORDER will be created , sold-to-party field will come up with a predefined
    customer .
    FIELD EXITS
    The field exits are managed,created,activated through program RSMODPRF. The field exit is associated with a data element existing in ABAP dictionary and hence to the screen field using that data element.
    The format of field exit is :
    FIELD_EXIT_dataelement_A-Z or 0-9
    If a particular screen and program name is not specified than the field exit will effect all the screens containing that data element.
    The function module associated with field exit shows two parameters
    INPUT and OUTPUT. Input parameter contains the data passed to the field exit when the field exit was invoked by the R/3 , We can write our own code to change the output parameter depending upon our requirements.
    Before the field exit can have any effect the system profile parameter
    ABAP/FIELDEXIT in all the application servers should be set to YES
    ABAP/FIELDEXIT = YES.
    Don't forget to reward if useful....

  • Add Custom Field in VF01 in Screen 104

    Hi,
    I want to add one single character zfield(check box) in VF01 screen no: 104 (Over view of Billing Items) ,If the user tick this check box, it means the new billing invoice created is RE-BILLING invoice(the invoice is created again after cancellation).
    I am not able to find any screen exit for this.Please can you help me in the solution where  the change should be very limited,It would be really great if there is any soultion that i can do without any modification to SAP standard. <removed by moderator>.
    Thanks in Advance
    Ranjith
    Edited by: Ranjith Rupireddy on Jul 5, 2011 9:56 AM
    Edited by: Thomas Zloch on Jul 5, 2011 9:57 AM

    Hi Eduardo
    Thanks for your reply, but VF04 is "Maintaining Billing Due List" ..Which is no where related to screen 104 of VA01..
    Here the requirement is when creating the Billing document with Billing type "Invoice Before GI" and press enter it takes to screen no:104 "Over View of Billing Items" Here i should add one check box and update .It will be available in display mode in VF02 and VF03.Actually there is no screen exit also for this as i mentioned earlier.I want to know is there any other good solution in which it can be done without adding this field manually in screen painter and updating the same with available enhancement.Thanks in advance
    Ranjith

  • Error while raising a invoice using VF01

    Hi,
    I am getting an error while raising a invoice using VF01.
    Error as follows
    RV_MESSAGE_UPDATE
    Update was terminated
    System ID....   TIP
    Client.......   300
    User.....   user1
    Transaction..   VF01
    Update key...   E66E6454075548D8922BAC091E81F0CB
    Generated....   18.07.2007, 18:57:38
    Completed....   18.07.2007, 18:57:38
    Error info...   TD 443: WRITE_FORM
    Pls help
    Points will be rewarded.
    Thanks

    Hi,
    This is an ABAP short dump. If you go through the error log, there will be a section where in you can see > What caused the problem.
    Try to analyze this log and you can find a solution. Probably, you can also check whether there is any OSS note with this error message.
    Thanks
    Murali.

  • Error while transporting modification in module pool of a specific infotype

    HI experts,
    While transporting some modifications that have be done on the PAI of a module pool of a specific infotype, we have an error with code return = 8, the error is --> Original object R3TRPROGMP900730 must not be changed!!!
    Any suggestion .
    Tanhks a lot .

    Hi ,
    Nice to know that your problem is solved. If any of the replies were usefull please acknowledge their work.
    And it would be great if you can just put in your remarks about the best  solution you had in solving that problem.
    It might be useful to other users when they encoutner such problem.
    BR,
    Vijay.

Maybe you are looking for

  • Acrobat X; Standard; Saving error

    I'm running Windows 7 Pro w/ SP1. I've had this installed for well over a year and it's worked perfectly...until now... If I open a PDF, and edit it in ANY fashion, I can no longer save it and then get the following error message: "The Document canno

  • About servletContext (i need a good explanation)

    Hi! what is the use of servlet context. what is the difference between request.GetRequestDispatcher and servletContext.gerRequestDispatcher . Friends,i need a clear explanation with some example code.

  • Very Disappointed with iPad Air 2 Battery life

    My New iPad air 2 is only holding a 5 to 5:30 battery life after a 100% charge. I have stopped all push notifications, stopped all app refresh options and followed every suggestion Apple has offered.

  • Implementation of complex strategy methodology

    Hello experts, I have read all of the forum threads and didn't find the answers. We are in need to estimate does the SAP SMM will fit for certain strategy methodology. The methodology is used in public sector and is approved by the local government.

  • Auto Application of Credit Memo to an Invoice

    Hi experts, We have a requirment of auto applying a credit memo to an invoice. The situation is as follows:- Invoices are imported from external system to Oracle AR by Auto Invoice Import Credit Memos are imported from external system to Oracle AR by