Copying  SAP Exit to Customer Exit

Dear Experts,
        i need to create Customer exit for Clearing Date, Posting Date and netDuedate. For this i am going to copy the SAP EXIT Variables 0p_keydt, 0p_Keyd2, 0p_keyd3, Bcoz i had created Infoset, sothe technical name get changed, So I cant call SAP Exit variables for this new Info Object.
What I need is Can U please Explain me how to copy these theree variables in to Customer Exit as i am very new to ABAP. After Copying the Code what i need to change to suits my requirement.
Please help me in this regard as this is very Urgent.
I ahve tries in searching the previous thread, i just got the Overview alone.
Thanks in Advance

Hi,
I do not know if we can directly convert a SAP exit to a CMOD exit.
What I was suggesting was that, create a CMOD exit (custom project) and in the coding part you can copy the code from the existing code and replace the varaible names.
Check this link for more help on CMOD project creation -
[http://wiki.sdn.sap.com/wiki/display/ABAP/CustomerExits(CMOD)]
Hope it helps.
Regards,
RahulM

Similar Messages

  • User exit  vs customer exit

    Hi experts ,
    i am confusing user exit and customer exit plz give good diffrence and where we use these exits
    thanks and advance

    Hi,
    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.
    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
    Development
    Creating a Project to include the enhancement
    1. Go to transaction CMOD and create a project.
    2. Enter a description for the project. Then, click on the pushbutton ‘Enhancement Assignments’ in the Application Toolbar.
    3. Enter the name of the enhancement and Save.
    4. Go to ‘Components’.
    Creating Custom Include for ANLU
    The screen shown below will appear, showing all the enhancement components under the assignment AIST0002. Double-click on the name of the Include Structure to create it.
    Create the include structure with three new fields, as required. Then, save and activate it.
    Develop the subscreen and the program
    Go to transaction SE80. For the function group XAIS, create a new subscreen 9000.
    Create it as subscreen.
    Then, go to the Layout of the screen and create three new fields from Database table ANLU.
    Drag the fields in the screen body and place them.
    Then, save and activate the screen and come back to screen flow editor.
    Create the PAI module to add validation for field “Location 2”, as required .
    Activate the whole function group and come out.
    Write code in the Function Exits to synchronize the programs
    Now, code has to be written in the function modules EXIT_SAPLAIST_002 and EXIT_SAPLAIST_003 so that data flows to and fro between the main SAP program and custom subscreen program. For that, go back to transaction CMOD and change the function exits.
    Write code in the function module EXIT_SAPLAIST_002 called once at the beginning of the transaction:
    Write code in EXIT_SAPLAIST_003 to pass the data from the subscreen to SAP main program.
    Then, activate everything – the whole project and come out.
    Complete the configuration to link the subscreen
    The development portion is complete. Now, linking of the subscreen has to be done with the subscreen area of the main program. In most of the cases, this linking can be done in the enhancement itself. But, here, requirement is a bit different. It is done by configuration using SPRO.
    Assets are created under Asset class. And for each asset class, there is a layout assigned to it. For a layout, there are multiple tab pages assigned to it. And, for each tab page, there are multiple screen groups/field groups assigned.
    Here, the requirement is to create these three custom fields in the tab page ‘General’ of asset master screen ( AS01/AS02/AS03/AS91).
    Determine the Layout
    To achieve this, first of all, we need to find out which layout is assigned to asset class 1000.For that, go to transaction AOLK( information has to be obtained from functional consultant).Select the Asset Class ‘1000’ and click on folder ‘General Assignment of Layout’.
    Here, for Asset class 1000, for all the user groups, tab layout SAP is assigned. Since layout ‘SAP’ cannot be changed, it has to be copied and manipulated to include our screen group. Later, the new layout has to be assigned over here.
    Create new tab layout
    Go to transaction AOLA. Copy the tab layout ‘SAP’ to create another layout, say, YSUB.
    System will copy all the settings and will inform you about that.
    Select your newly created layout and double-click on the folder ‘Tab page titles’.
    You want to put your custom fields in the tab page “General”. So, select this tab page entry and double-click on the folder "Position of Groups".
    Here, all the field groups currently residing in the tab-page “General” are shown. Add an entry for your newly created fields.
    Select the group box from the list. An entry will come with “U” padded with the custom subscreen prepared by you.
    Then, save and come out.
    Assign the new Layout to Asset Class
    Now, go to tcode AOLK and assign tab layout YSUB for asset class 1000.
    Save and come out.
    Test the Exit
    Everything is over. Now, go to transaction code AS01/02/03 or AS91 to deal with an asset of asset class 1000. You will see your new fields added to the screen. Add values to them…save. Then, enter into the tcodes again to see whether the values entered by you are being displayed or not.
    Please check these links for more information.
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    http://www.sapdevelopment.co.uk/enhance/enhancehome.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    Customer exit and User Exit
    User Exit Vs Customer Exit
    Regards,
    Priyanka.

  • USER EXITS Vs CUSTOMER EXITS

    Hi all,
    can any one clearly explain me the diff between user exits & customer exits.....
    points will b rewarded .....
    Thank You.
    Regards,
    Prashanth.

    Hi Prashanth Polsani  ,
    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.    
    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. 
    As with customer exits two different views are available:
    In the definition view, an application programmer predefines exit points in a source that allow specific industry sectors, partners, and customers to attach additional software to standard SAP source code without having to modify the original object. 
    In the implementation view, the users of Business Add-Ins can customize the logic they need or use a standard logic if one is available.
    USER-EXITS can be used only one time.
           Ex:- if your assigning a USER-EXIT to a project in (CMOD), then you can not assign the same to other project.
    These r the following web-sites which may find helpful to u :
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/difference-between-badi-and-user-exits.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.planetsap.com/userexit_main_page.htm
    http://www.easymarketplace.de/userexit.php
    *****Pls reward points if u find this useful
    cheers,
    gyanaraj

  • User-exit or Customer Exit while save of Invoice (VF01)

    Hi,
    I want ot sand mail on the time of click on save button of VF01.
    Can any one tell user-exit or Customer exit which hit while save of invoice.
    Regards
    Durgesh Kumar

    Hello,
    You can use RV60AFZZ. Please check sy-tcode = 'VF01' on this user-exit.
    Regards,
    Burak

  • User exit and Customer exit

    Hi all
    Can any one tell me how to find out whether a transaction contains customer exit or user exit??
    If so how to find out the both in a particular transaction??
    Thanks and Regards
    Arun Joseph

    hi,
    you can try this one.
    REPORT  Z_FIND_USEREXIT NO STANDARD PAGE HEADING.
    TABLES : tstc, "SAP Transaction Codes
    tadir, "Directory of Repository Objects
    modsapt, "SAP Enhancements - Short Texts
    modact, "Modifications
    trdir, "System table TRDIR
    tfdir, "Function Module
    enlfdir, "Additional Attributes for Function Modules
    tstct. "Transaction Code Texts
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    *& Selection Screen Parameters
    SELECTION-SCREEN BEGIN OF BLOCK a01 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK a01.
    *& Start of main program
    START-OF-SELECTION.
    Validate Transaction Code
    SELECT SINGLE * FROM tstc
    WHERE tcode EQ p_tcode.
    Find Repository Objects for transaction code
    IF sy-subrc EQ 0.
    SELECT SINGLE * FROM tadir
    WHERE pgmid = 'R3TR'
    AND object = 'PROG'
    AND obj_name = tstc-pgmna.
    MOVE : tadir-devclass TO v_devclass.
    IF sy-subrc NE 0.
    SELECT SINGLE * FROM trdir
    WHERE name = tstc-pgmna.
    IF trdir-subc EQ 'F'.
    SELECT SINGLE * FROM tfdir
    WHERE pname = tstc-pgmna.
    SELECT SINGLE * FROM enlfdir
    WHERE funcname = tfdir-funcname.
    SELECT SINGLE * FROM tadir
    WHERE pgmid = 'R3TR'
    AND object = 'FUGR'
    AND obj_name = enlfdir-area.
    MOVE : tadir-devclass TO v_devclass.
    ENDIF.
    ENDIF.
    Find SAP Modifactions
    SELECT * FROM tadir
    INTO TABLE jtab
    WHERE pgmid = 'R3TR'
    AND object = 'SMOD'
    AND devclass = v_devclass.
    SELECT SINGLE * FROM tstct
    WHERE sprsl EQ sy-langu
    AND tcode EQ p_tcode.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE:/(19) 'Transaction Code - ',
    20(20) p_tcode,
    45(50) tstct-ttext.
    SKIP.
    IF NOT jtab[] IS INITIAL.
    WRITE:/(95) sy-uline.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 sy-vline,
    2 'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    WRITE:/(95) sy-uline.
    LOOP AT jtab.
    SELECT SINGLE * FROM modsapt
    WHERE sprsl = sy-langu AND
    name = jtab-obj_name.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    WRITE:/1 sy-vline,
    2 jtab-obj_name HOTSPOT ON,
    21 sy-vline ,
    22 modsapt-modtext,
    95 sy-vline.
    ENDLOOP.
    WRITE:/(95) sy-uline.
    DESCRIBE TABLE jtab.
    SKIP.
    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:/ 'No of Exits:' , sy-tfill.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(95) 'No User Exit exists'.
    ENDIF.
    ELSE.
    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(95) 'Transaction Code Does Not Exist'.
    ENDIF.
    Take the user to SMOD for the Exit that was selected.
    AT LINE-SELECTION.
    GET CURSOR FIELD field1.
    CHECK field1(4) EQ 'JTAB'.
    SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
    CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

  • How and where to create SAP Exit or Customer Exit in query variable

    Hi,
    I have to create a date variable in BEx and it should always contain default value as SY-DATUM i.e. current date.
    I dont have 0CalDay in any of my data flow,also I am not supposed to add 0CALDAY.
    If so,where i can write that exit.
    Thanx in advance.

    Actually,what my requirement is...
    I will not filter any characteristic based on this sy-datum instead I will use that variable value in formulae.
    For ex: in my selection,i mention As of date = today's date..then inside the quer designer,a formula will calculate No.of days=As of date-Due date,where "As of Date" is nothing but the date which i have enterd in my selections.
    please let me know any solution

  • User exit or customer exits while saving the  the ME51N transaction

    i have the Requirement in ME51N, that i want to place a field in the item level tab, when i want to save the transaction the data eneterd in that field also saved in a Z-table.
    Help me on this issue.
    Regards
    Bobby

    hi
    check this link
    ME51N user exit
    Hope this helps!!
    Cheers
    Alfred

  • How to find out the customer exit and sap exit variables created provider?

    Hi all,
    How to identify what are all the customer exit and sap exit variables are been created for an info provider. is there any tables which allow us to find out.
    thanxs
    haritha

    Hello haritha,
           SAP Exit and Customer Exit variables are created for  Characteristics and not for individual InfoProviders.
    So whenever the characteristic is used in the InfoProvider, by selection the appropriate variable the exit can be called.
    So the same Exit can be in one or more InfoProviders.
    Hope it helps.
    Thanks,
    Chandran

  • What is diff b/w user & customer exit

    Hi
    Good afternoon everybody,
    Plz differentiate user exit and customer exit.
    What is the way to findout user exits and how to modify it.
    Thanks in advance
    Venkat

    Hi Venkat,
    Check the following description
    Customer exits: 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.
    If you want to enhance the functionality of your SAP System, you should take advantage of the exits available in standard R/3 applications. There are two main reasons why you should use exits rather than modifying SAP software yourself. Add-ons attached to exits have the advantage that:
    They do not affect standard SAP source code
    When you add new functionality to your SAP System using SAP’s exits, you do not alter the source code of standard SAP programs in any way. The code and screens you create are encapsulated as separate objects. These customer objects are linked to standard applications, but exist separately from SAP’s standard software package.
    They do not affect software updates
    When you add new functionality to your SAP System using SAP’s exits, your objects (called customer objects) must adhere to strict naming conventions. When it comes time to upgrade a to a new software release, customer objects’ names ensure that they will not be affected by any changes or new additions to the standard software package.
    In contrast to customer exits, user exits allow developers to access and modify program components and data objects in the standard SAP System.
    User exits: Programs with user exits contain subroutine calls at certain points in their syntax that are identified by the prefix USEREXIT. The actual user exits are located in an include that has been assigned to a module pool. This is where customers can include any changes (enhancements) that they want to make to the system. These includes are always processed during program flow.
    I hope this helps.
    Regards,
    Kinshuk

  • Difference b/w Customer exits and User Exits

    Hi,
    Can anybody explain diff b/w user exits and customer exits .
    How to find out and Impement the coding ..
    Thanks Advance
    Rohan.A

    Hi Rohan,
    Check this matter , this may be helpful to you.
    <b>CUSTOMER EXITS</b>
    The 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 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.
    If you want to enhance the functionality of your SAP System, you should take advantage of the exits available in standard applications. There are two main reasons why you should use exits rather than modifying SAP software yourself. Add-ons attached to exits have the advantage that:
    •        They do not affect standard SAP source code
    When you add new functionality to your SAP System using SAP’s exits, you do not alter the source code of standard SAP programs in any way. The code and screens you create are encapsulated as separate objects. These customer objects are linked to standard applications, but exist separately from SAP’s standard software package.
    •        They do not affect software updates
    When you add new functionality to your SAP System using SAP’s exits, your objects (called customer objects) must adhere to strict naming conventions. When it comes time to upgrade a to a new software release, customer objects’ names ensure that they will not be affected by any changes or new additions to the standard software package.
    Customer exits are not available for all programs and screens found in the SAP System. You can only use customer exits if they already exist in the SAP System.
    <b>User exits :</b>
    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
    Hope this is helpful.
    Reward all the helpful answers.
    Regards

  • How to use a customer exit in WebI

    Hi expert,
    I read from official SAP document that customer exit variable are supported within WebI query.
    I created an universe based on a query bex. In this query I use a variable exit for 0calmonth2.
    Within the WebI universe I don't see any variable.
    How can I use/build a customer exit variable in my WebI query?
    System feature: BO 3.1
    Many Thanks.
    Claudia

    Hi,
    I havethe same issue, even though I place the user exit variable in Filter section, its not working as expected in WEBI/crystal.
    the variable that i have created will assign default value as sysdate.its working fine BW.
    Are there any extra settings at BEX/BW level which have to be set before using user/sap exit variables in webi/crystal?
    How should the user/customer exit variables be defined in order to get them carried properly to webi or crystal, I mean what should be the properties set for these variables?

  • User or customer exit for ME21N

    Hi all,
    I have to make a check before saving the Purchase order thru ME21N. Is there any user exit or customer exit available to do this check? Plz clarify.
    Regards,
    Steve

    Hi
    Use the BADI ME_PROCESS_PO_CUST
    see the sample code and the doc for BADI
    BAdI Name: ZCHECK_PO_LINE_ITEM (Implementation name) PO Account assignment
    Definition Name: ME_PROCESS_PO_CUST
    Interface Name : IF_EX_ME_PROCESS_PO_CUST
    Implementing Class: ZCL_IM_BADIN_ACCOUNT_ASSGN
    Method :            PROCESS_HEADER
    METHOD if_ex_me_process_po_cust~process_header .
      DATA : re_data TYPE mepoheader.
    *get the item data
      CALL METHOD im_header->get_data
        RECEIVING
          re_data = re_data.
      re_header = re_data.
      IF ( re_data-bsart NE 'ZOC' AND re_data-bsart NE 'ZPC' ).
        IF ( re_data-bsart <> 'ZIC' AND re_data-bsart <> 'UB' ).
          IF re_data-bukrs NE '1001'.
            MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'Use only Sipchem Company'
                                            'Code for External Procurement'.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDMETHOD.
    Method :            PROCESS_ITEM
    METHOD if_ex_me_process_po_cust~process_item .
      DATA: v_menge TYPE bamng,   " PR Quantity
            v_statu.              " PR Status
      DATA : re_data TYPE  mepoitem,
           re_data1 TYPE mepoaccounting,
    re_accountings TYPE purchase_order_accountings ,
    header TYPE purchase_order_accounting.
    *get the item data
      CALL METHOD im_item->get_data
        RECEIVING
          re_data = re_data.
      IF ( re_header-bsart NE 'ZOC' AND re_header-bsart NE 'ZPC' ).
        IF re_header-bsart EQ 'ZRL'.
          IF re_data-konnr EQ space.
        MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant create a Release order'
                                              'without a reference to Outline Agreeement'.
          ENDIF.
        ENDIF.
        IF ( re_data-banfn EQ space AND re_data-anfnr EQ space ).
          MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You can create a Purchase order'
                                                         'only with reference to a PR or RFQ'.
        ENDIF.
        IF re_data-knttp NE 'K' AND re_data-pstyp NE '9' .
          IF syst-cprog EQ 'RM_MEPO_GUI'.
            IF re_data-uebto IS NOT INITIAL OR
               re_data-uebtk IS NOT INITIAL OR
               re_data-untto IS NOT INITIAL.
          MESSAGE ID 'ZM_MSG' TYPE 'E' NUMBER '000' WITH 'You cant change delivery settings'.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDMETHOD.
    DEFINING THE BADI
    1) execute Tcode SE18.
    2) Specify a definition Name : ZBADI_SPFLI
    3) Press create
    4) Choose the attribute tab. Specify short desc for badi.. and specify the type :
    multiple use.
    5) Choose the interface tab
    6) Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7) Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method level desc
    Linese;ection instance methos some desc
    8) place the cursor on the method name desc its parameters to define the interface.
    Parameter type refe field desc
    I_carrid import spfli-carrid some
    I_connid import spefi-connid some
    9) save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION
    1) EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2) Specify aname for implementation ZIM_LINESEL
    3) Specify short desc.
    4) Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5) Specify short desc for method
    6) Dbl clk on method to insert code..(check the code in “AAA”).
    7) Save , check and activate the code.
    Some useful URL
    http://www.esnips.com/doc/e06e4171-29df-462f-b857-54fac19a9d8e/ppt-on-badis.ppt
    http://www.esnips.com/doc/10016c34-55a7-4b13-8f5f-bf720422d265/BADIs.pdf
    http://www.esnips.com/doc/43a58f51-5d92-4213-913a-de05e9faac0d/Business-Addin.doc
    http://www.esnips.com/doc/1e10392e-64d8-4181-b2a5-5f04d8f87839/badi.doc
    www.sapgenie.com/publications/saptips/022006%20-%20Zaidi%20BADI.pdf
    http://www.sapdevelopment.co.uk/enhance/enhance_badi.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/04/f3683c05ea4464e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/e6/d54d3c596f0b26e10000000a11402f/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
    Now write a sample program to use this badi method..
    Look for “BBB” sample program.
    “AAA”
    data : wa_flights type sflight,
    it_flights type table of sflight.
    format color col_heading.
    write:/ 'Flight info of:', i_carrid, i_connid.
    format color col_normal.
    select * from sflight
    into corresponding fields of table it_flights
    where carrid = i_carrid
    and connid = i_connid.
    loop at it_flights into wa_flights.
    write:/ wa_flights-fldate,
    wa_flights-planetype,
    wa_flights-price currency wa_flights-currency,
    wa_flights-seatsmax,
    wa_flights-seatsocc.
    endloop.
    “BBB”
    *& Report ZBADI_TEST *
    REPORT ZBADI_TEST .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Error while executing customer Exit Variable (No value could be determined for variable.  BRAIN 632)

    Hello,
    I created a customer exit variable which has to show the range between the first and last day of the previous month. The query will be executed every first of the month.
    Variable is declared as: Customer exit, based on 0CALDAY, Interval, Mandatory and NOT input.
    When i debug the query, it is making the calculation but its not populating my variable; when I execute the query from RSRT, the output test shows a message:
    ENo value could be determined for variable ZRANGE_PREVMONTH.                            BRAIN               632ZRANGE_PREVMONTH
    Below the code i'm using (SAP 7.4)
    ***Customer Exit to calculate previous month.
    IF i_step = 2.
         CASE i_vnam.
              WHEN 'ZRANGE_PREVMONTH'.
    DATA:  LS_RA_SID  TYPE   RSR_S_RANGESID.
    DATA:  yyyy(4) TYPE n.
    DATA:  mm(2) TYPE n.
    DATA:  dd(2) TYPE n.
    DATA:  fst_date LIKE sy-datum.
    DATA:  fst_date2 LIKE sy-datum.
    LOOP AT i_t_var_range_c INTO loc_var_range
        WHERE vnam = '0DAT'.
          dd = sy-datum+6(2).
          mm = sy-datum+4(2).
          yyyy = sy-datum+0(4).
          fst_date2 = sy-datum.
          IF dd = '01' AND mm = '01'.
            mm = '12'.
            yyyy = yyyy - 1.
          ELSEIF dd = '01' AND mm <> '01'.
            mm = mm - 1.
          ELSEIF dd <> '01'.
            mm = mm - 1.
          ENDIF.
          CLEAR: fst_date.
          CONCATENATE yyyy mm '01' INTO fst_date.
          fst_date2 = fst_date2 - 1.
          CLEAR: ls_ra_sid.
          ls_ra_sid-sign = 'I'.
          ls_ra_sid-opt = 'BT'.
          ls_ra_sid-high = fst_date2.
          ls_ra_sid-low = fst_date.
          APPEND ls_ra_sid TO e_t_range.
    ENDLOOP.
    ENDCASE.
       ENDIF.

    Hi Fernanda,
    Try this:
    DATA:  LS_RA_SID  TYPE   RSR_S_RANGESID.
    DATA:  fst_date LIKE sy-datum.
       CASE i_vnam.
              WHEN 'ZRANGE_PREVMONTH'.
    fst_date = sy-datum - 1.
    concatenate fst_date(6) '01' into ls_ra_sid-low.
          ls_ra_sid-sign = 'I'.
          ls_ra_sid-opt = 'BT'.
          ls_ra_sid-high = fst_date.
          APPEND ls_ra_sid TO e_t_range.
    ENDLOOP.
    ENDCASE.
       ENDIF.
    Just post here for any queries..
    Regards,
    Loed

  • Difference between USER-EXISTs and Customer-Exits???

    Hi,
    Can anyone give me the difference between the user-exits and customer-exits?
    Please respond at the earliest. Thanks in advance.

    Hi,
    USER EXITS->
    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>
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    CUSTOMER EXITS-> t-code CMOD.
    As of Release 4.6A SAP provides a new enhancement technique, the Business Add-Ins.
    Among others, this enhancement technique has the advantage of
    being based on a multi-level system landscape (SAP, country versions, IS solutions, partner,
    customer, and so on)
    instead of a two-level landscape (SAP, customer) as with the customer exits.
    You can create definitions and implementations of business add-ins at any level of the system landscape.
    To unify enhancements of the SAP Standard you can migrate customer exits to business add-ins.
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/content.htm
    In order to find out the user exits for any tcode,
    1. get the developement class of the tcode from SE93.
    2. Now goto transaction SMOD and press F4,
    3. give in the Deve class in the dev class and Press ENTER
    this will show u the exits for any tcode.
    or execute this report
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    which gives the list of exits for a tcode
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
    For information on Exits, check these links
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    Regards,
    Lijo Joseph
    *Reward if useful.

  • Customer Exit Variable Value

    Hi Everyone,
    I've been searching around this forum and couldn't find what I'm looking for hence resulted me starting a new thread here. I'm a fairly beginner in ABAP and I come across a problem where I have no idea on how to solve it.
    Basically, I have a customer exit with multiple variables and it is being filtered out by certain criteria, the question is when I did not fill in any input and execute the query, the result is return as expected however, if i fill in an input that is not supposed to display, it will display as well, and when I debugged, there's no value  E_T_RANGE in the export  Sorry, I might cause some confusion here, but I'm not sure on how to re-phrase my current situation
    I'm guessing that, the variable stores the value eventhough it's being filtered based on the criteria, is that possible? My question is, is it possible to clear the current value in the variable and export the value (E_T_RANGE) ?
    Regards,
    Kilo

    Hi Kilo,
    thanks a lot.
    This is what SAP documentation says about usage of this exit:
    "With this enhancement to global variables in reporting you have the
    option of determining your default values for variables. You can use
    this enhancement for variables, for which 'Processing by Customer-Exit'
    has been selected in the variable maintenance. This is valid for all
    variable types (characteristic value, node, hierarchy, formula and text
    variables). You use the Exit EXIT_SAPLRRS0_001 for this.
    You could, for example, establish the default value of a characteristic
    value variable depending on the user."
    In your exit, first thing to do is check what variable has been passed in parameter I_VNAME. Check if this variable has been set for 'Processing by Customer-Exit' in reporting.
    I think the way to exclude certain values is to use the SIGN 'E' in the range, i.e.
    l_s_range-low = '<variablevalue to exclude> '.
              l_s_range-high = ' '.
              l_s_range-sign = 'E'."Exclude
              l_s_range-opt  = 'EQ'.
    Also, I think the exit is called 3 times per variable name, for you I_STEP = 2 and I_VNAM = 'Z_MUL_O_ZBO00021_091' is relevant.
    I have limited experience with BEX reporting so you may check SAP Help for [Customer Exits in Reusable Query Components|http://help.sap.com/saphelp_nw70/helpdata/en/f1/0a56f5e09411d2acb90000e829fbfe/frameset.htm]. There is info about  [Dependencies for Variables of Type Customer Exit with sample source code|http://help.sap.com/saphelp_nw70/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/frameset.htm]. Check also R. Prem Kumar's very good article [Using User Exit for Variables in BEx Reporting|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d09d4588-3832-2c10-e185-f778d9dbea85?quicklink=index&overridelayout=true].
    Hope this helps you to solve the issue.
    Note: When asking a question, give a short description of what you are doing and what you want to achieve in business terms and natural language. Add relevant technical details and help is just around the corner.
    BTW: Did you search and/or find the information in the links I gave? G*gle was my servant here.
    Regards,
    Clemens

Maybe you are looking for

  • Can I set up a small home network on mt BThub3

    Hi, I have two standard PCs one running on Vista and the other on XP also a laptop. They all successfully access the internet via a BT Hub 3. One computer connects via a LAN cable the laptop and the other computer connect via a wirless connection If

  • Error while connecting microsoft Excel to sap business objects

    Hi, I am trying to connect sap business objects to Microsoft Excel using Power Query add in but i am getting  Proxy time out connection error  when adding Credentials, As per the SAP documents i am using SAP Restful Web service URL when connecting to

  • Self Signed in Certificates without CA server

    Hi Team, I am working to configure expressway for Cisco Jabber but i stuck now in certificate step, can i do self signed in certificate without CA server ? if yes what are the procedures to do that. Thanks

  • Best way to handle large amount of text

    hello everyone My project involves handling large amount of text.(from conferences and reports) Most of them r in Ms Word. I can turn them into RTF format. I dont want to use scrolling. I prefer turning pages(next, previous, last, contents). which me

  • How to export tables on different condition

    HI, i want to use export backup of my oracle 10g database, where i want to full export of some tables and some tables with "QUERY" parameter.so how can i make this script where some table are full exported and some based on condition. conditions defi