How to pass parameter in Validation User Exit

Hi All,
We need to create a Validation to match USER ID with PERSON RESPONSIBLE (that is maintained in Funds Center master record). This is required to ensure that only person responsible can release budget.
How can I pass "Funds Center" as a parameter to the User Exit so that I can run database query to find person responsibel of that Funds Center.
Regards,
Hanif

Hi Alex,
I belive i could not explain the problem properly... let me write it again.
1. I maintained Validation using  FMVABD.
2. In PREREQUISITE I checked budget release operation using BPJA_VALID-VORGA = 'KBFR'
3. In CONDITION I used a user exit U100.
4. Made a copy of RGGBR000 as ZRGGBR000 and assigned it using GCX2.
5. Added following ABAP Code in FORM U100.
<CODE>
b_result = B_FALSE.
SELECT SINGLE * FROM FMFCTR WHERE BOSSID = SY-UNAME AND FICTR = '??????'.
IF SY-SUBRC = 0.
  b_result = B_TRUE.
ENDIF.
</CODE>
'??????' In the second condition of WHERE CLUASE I want to mention Fund Center for which Budget is being released.
Another point is while maintaining validation using FMVABD, under TABLE FIELDS tab, one can find BPJA_VALID-FISTL (means Funds Center) but but I can not use in my ABAP Code.... it gives error message "BPJA_VALID" is unknown.
My appolgies for lengthy explanation... but hope it will help understanding the issue.
Regards,
Hanif

Similar Messages

  • How to pass parameter into transaction iview ?

    Hi experts,
    I want to know "how to pass parameter into transaction iview ".
    Regards,
    Krishna Balaji T

    Hi Krishna,
    Not sure if this can help you.
    1) Passing a parameter to a transaction iview (I saw a resolved suggestion)
    Passing a parameter to a transaction iview
    2) Passing a parameter from the portal to R3 (helpful info for you)
    Passing a parameter from the portal to R3
    3) Create SAP Transaction iView using SAPGUI for Windows (Great Blog and info about TA Iview)
    Create SAP Transaction iView using SAPGUI for Windows
    Please check the following link for Transaction Iviews
    http://help.sap.com/saphelp_nw2004s/helpdata/en/02/f9e1ac7da0ee4587d79e8de7584966/frameset.htm
    Just some info: Portal is basically what the end user can see. What he can do, is still maintain in the backend system. If there are parameters setup already for the user in the backend system (in SU01), then those parameters should still valid for the transaction that the parameters are linked to.
    Hope that helps and award points for helpful suggestions.
    Ray

  • How to activate or deactivate a user-exit based a specific condition

    hi all,
    i want to activate or deactivate(make it trigger) a particular user-exit based in a condition.
    can i do that. if yes please tell me how.
    can we use COMMIT in user-exits or BADI's.
    Thanks & Regards,
    Saroja.

    Hello Saroja
    The solution provided by Rich should be used for testing purposes only in the the reverted sense:
    IF ( syst-uname ne '<specific user>' ).
      RETURN.
    ENDIF.
    " Execute user-exit for specific user
    However, for serious programming you should use a a better strategy. In principle, user-exits are either ON or OFF and, if they are ON, they are ON for <b>all </b>user which is usually not intended.
    The following example shows a (possible) strategy how to execute user-exits based on specific conditions.
    The SAP extension CATS0001 contains the component EXIT_SAPLCATS_001 with the following interface:
    FUNCTION EXIT_SAPLCATS_001.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(SAP_TCATS) LIKE  TCATS STRUCTURE  TCATS
    *"     VALUE(SAP_PERNR) LIKE  CATSFIELDS-PERNR
    *"     VALUE(SAP_DATELEFT) LIKE  CATSFIELDS-DATELEFT
    *"     VALUE(SAP_DATERIGHT) LIKE  CATSFIELDS-DATERIGHT
    *"     VALUE(SAP_DATEFROM) LIKE  CATSFIELDS-DATEFROM OPTIONAL
    *"     VALUE(SAP_DATETO) LIKE  CATSFIELDS-DATETO OPTIONAL
    *"  TABLES
    *"      SAP_ICATSW STRUCTURE  CATSW
    *"      SAP_ICATSW_FIX STRUCTURE  CATSW OPTIONAL
      INCLUDE ZXCATU01.
    ENDFUNCTION.
    The include ZXCATU01 contains only the following coding:
      CALL FUNCTION 'Z_EXIT_SAPLCATS_001'
        EXPORTING
          sap_tcats            = sap_tcats
          sap_pernr            = sap_pernr
          sap_dateleft         = sap_dateleft
          sap_dateright        = sap_dateright
          SAP_DATEFROM         = SAP_DATEFROM
          SAP_DATETO           = SAP_DATETO
        tables
          sap_icatsw           = sap_icatsw
          SAP_ICATSW_FIX       = SAP_ICATSW_FIX.
    This function module is just a copy of the exit function module in the customer namespace.
    Let us assume that your condition at which the user-exit should be executed is that the employee (SAP_PERNR) belongs to a specific controlling area. Thus, we make another copy of the original exit function module and call this fm within the "general" customer-specific exit function module:
    FUNCTION z_exit_saplcats_001.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(SAP_TCATS) LIKE  TCATS STRUCTURE  TCATS
    *"     VALUE(SAP_PERNR) LIKE  CATSFIELDS-PERNR
    *"     VALUE(SAP_DATELEFT) LIKE  CATSFIELDS-DATELEFT
    *"     VALUE(SAP_DATERIGHT) LIKE  CATSFIELDS-DATERIGHT
    *"     VALUE(SAP_DATEFROM) LIKE  CATSFIELDS-DATEFROM OPTIONAL
    *"     VALUE(SAP_DATETO) LIKE  CATSFIELDS-DATETO OPTIONAL
    *"  TABLES
    *"      SAP_ICATSW STRUCTURE  CATSW
    *"      SAP_ICATSW_FIX STRUCTURE  CATSW OPTIONAL
    " User-Exit specific for employees (SAP_PERNR)
    " belonging to controlling area 1000
      CALL FUNCTION 'Z_EXIT_SAPLCATS_001_1000'
        EXPORTING
          sap_tcats      = sap_tcats
          sap_pernr      = sap_pernr
          sap_dateleft   = sap_dateleft
          sap_dateright  = sap_dateright
          sap_datefrom   = sap_datefrom
          sap_dateto     = sap_dateto
        TABLES
          sap_icatsw     = sap_icatsw
          sap_icatsw_fix = sap_icatsw_fix.
    " User-Exit specific for employees (SAP_PERNR)
    " belonging to controlling area 2000
      CALL FUNCTION 'Z_EXIT_SAPLCATS_001_2000'
        EXPORTING
          sap_tcats      = sap_tcats
          sap_pernr      = sap_pernr
          sap_dateleft   = sap_dateleft
          sap_dateright  = sap_dateright
          sap_datefrom   = sap_datefrom
          sap_dateto     = sap_dateto
        TABLES
          sap_icatsw     = sap_icatsw
          sap_icatsw_fix = sap_icatsw_fix.
    ENDFUNCTION.
    Finally, within the specific exit function module we define the condition when the exit should be executed:
    FUNCTION z_exit_saplcats_001_1000.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(SAP_TCATS) LIKE  TCATS STRUCTURE  TCATS
    *"     VALUE(SAP_PERNR) LIKE  CATSFIELDS-PERNR
    *"     VALUE(SAP_DATELEFT) LIKE  CATSFIELDS-DATELEFT
    *"     VALUE(SAP_DATERIGHT) LIKE  CATSFIELDS-DATERIGHT
    *"     VALUE(SAP_DATEFROM) LIKE  CATSFIELDS-DATEFROM OPTIONAL
    *"     VALUE(SAP_DATETO) LIKE  CATSFIELDS-DATETO OPTIONAL
    *"  TABLES
    *"      SAP_ICATSW STRUCTURE  CATSW
    *"      SAP_ICATSW_FIX STRUCTURE  CATSW OPTIONAL
      IF ( <user BELONGS to CONTROLLING area 1000> ).
        "   execute user-exit
      ELSE.
        RETURN.
      ENDIF.
    ENDFUNCTION.
    The alternative would be to place the entire coding including the conditions in the include ZXCATU01. However, in this case you can test the user exit <b>only in the context of the transaction</b> in which the user-exit is passed.
    Using the strategy I have devised you are able to test the user-exit in general and the specific user-exits <b>independent </b>of the transaction. For example, if you are already working on 6.40 or higher then you could use ABAP Unit Testing for this purpose.
    The same logic can be applied for BAdI where we can have only a single active implementation.
    Finally, I hope to convince that it makes sense to spend some time into a reasonable strategy for implementing user-exits.
    Regards
      Uwe

  • Validation user exit at asset master data

    hi all,
    at asset master data creation level, if you want to validate company code vs asset class vs equipment type, how do you define validation user exit? Also, we have so many company codes. Do we have to individually validate rules for each and every company code?
    Regards,
    Rob

    Hope the below user exits are useful:
    AAPM0001 |Integration of asset accounting and plant maintenance
    AINT0001 |Extended checks when posting an asset   
    AIST0002 |Customer fields in asset master
    Pls assign points as wa to say thanks

  • How to pass parameter into a source variable of a invoke activity

    I'm an new BPELer, I created a invoke activity to submit Oracle Appplications concurrent program, but I don't know how to pass parameter into source variable.
    BTW, I have created the mapper file (.xsl) file.
    could anyone tell me how to do that?
    Thanks,
    Victor

    Hi.
    How you start application? I think you send message to webservice(BPEL process is webservice too). So construct message with variable and value.
    But I created only processes where input value doesn't matter. I haven't use mapper yet too.

  • How to Pass parameter to Custom Scheduler dynamically

    hi ,
    I am new to OIM.
    Need your help in passing parameters dynamically to Custom Scheduler.
    I have created Custom Scheduler by extending Task Support.
    I have registered the plugin through API , using PlatformService.registerPlugin() method.
    As I need to send the parameter(s) to this CustomScheduler, I have defined them in Metadata (CustomScheduleTask.xml) file as below and got it imported into DB
    through weblogicImportMetadata.sh script by providing the path of the file.
    <scheduledTasks xmlns="http://xmlns.oracle.com/oim/scheduler">
    <task>
    <name>CustomScheduleTask</name>
    <class>org.schedule.custom.task.CustomScheduleTask</class>
    <description>Fetch details of the given user_id</description>
    <retry>5</retry>
    <parameters>
    <string-param required="true" helpText="Login Name">Login Name</string-param>
    </parameters>
    </task>
    </scheduledTasks>
    Iam able to import this plugin as well as register the plugin successfully. Now I have defined a job to which this Custom SchedulerTask is mapped.
    Now in order to run this job(schedule task) I need to provide Login name( or id) which needs to be send as a parameter for the scheduler to get executed.
    But while defining the job with this Schedule Task on OIM console, I was not able to define or pass parameter to this job. hence parameter is null in
    CustomSchedule 's execute method .
    Kindly help me how to pass parameter dynamically while running the scheduler from OIM console so that the execute method would be able to receive it.
    Thank you in Advance.
    Regards,
    Kumar

    Hi,
    When you have created the schedule job for your custom schedule task, you should see your Login Name textfield in the schedule task. If not, then there verify your schedule task xml.
    In your schedule class code, add:
    public void execute(HashMap arg0) {
              final String METHOD_NAME = "execute :: ";
              logger.debug(CLASS_NAME + METHOD_NAME + "Entering Method - execute");
              try {
                   String LoginName = arg0.get("Login Name");
    Regards,
    Sunny

  • How to pass parameter as http POST in pageContext.setForwardURL

    Hi,
    I need to call a third party application page in my custom OAF page. I need to pass parameter to this third party page using POST method. I am using following command to call that -
    HashMap hm = new HashMap();
    hm.put("FirstName",firstName );
    hm.put("LastName",lastName);
    hm.put("AppSignature", signature);
    pageContext.setForwardURL(hopURL,
    null, // not necessary with KEEP_MENU_CONTEXT
    OAWebBeanConstants.KEEP_MENU_CONTEXT, // no change to menu context
    null, // No need to specify since we're keeping menu context
    hm, // request parameters
    false, // retain the root application module
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // display breadcrumbs
    OAException.ERROR);
    I am passing parameter to the page using hash map table. That application is expecting the parameters in POST format and I believe using hash map table the parameters will be passed as GET format.
    We figured that out because one of the parameter we have to send is AppSignature which is 160 characters long. When third party applicatoin received that parameter they got only 151 characters, looks like they are truncated by GET method.
    Any idea how to pass parameter using POST format so that this issue could be fixed.
    Regards
    Hitesh

    Sumit,
    Thanks for your reply. I have resolved this issue by forwarding all parameters in session using pageContext.putSessionValueDirect and redirect to a jsp using pageContext.redirectImmediately.
    in jsp I read the params from session and set in the form , and then redirected to my third party application.
    Regards
    Hitesh

  • How can i do a variable User exit that present the values before execute

    Hi Gurus,
    How can i do a variable User exit that present the values before execute, i need this:
    a variable that calculate SYS-DATUM until 30 days before (I got the code) but this  variable run automatic because is user exit, i want this variable but first present the values, not execute automatic, this is because the users want the report that automatic present the values , help

    Hi,
    Refer the below links,
    http://documentation.softwareag.com/natural/nat424mf/pdf/ops_mf/conf_usrex.pdf
    http://www.erpgenie.com/component/content/article/1097
    http://www.apentia-online.at/UP/Apentia/files/Article/SAP_BW_User_Exits_and_BAdIs.pdf
    Hope it helps you,
    Regards,
    Ravindra.

  • How to pass parameter /1BCDWB/DOCPARAMS from webdynpro?

    Hi Experts,
    We create a wdp view and indert an adobe form into it. And this form has an interface based on XML schema.
    Now we want to translate this form into multi-language, and in wdp side, we will display diffenent language version of form for different regions.
    I found that there is a paramater /1BCDWB/DOCPARAMS-LANGU, and it seems can control the language version in processing.
    But I donot know how to pass parameter /1BCDWB/DOCPARAMS from wdp to adobe form.
    Its my 1st to use adobe form and wdp, i really have no way out. Any advice will be Appreciated.
    Thank you.
    Richard

    @sahai: Hey no , I am using very very simple example without any query or complex statement. I just have 2 radio buttons in VIEW1. On clicking the radio button, the naviagtion to view2 is done and the value of selected radio button is passed as a parameter in the plug.
    In the view2 , i just have a caption in my layout where i am displaying the parameter value by setting the attribute.THe warning i get is in view2. Here is the code. Apart from this there is no coding in view2.
    METHOD HANDLEPLUG_IN_V2 .
        DATA:
          NODE_CAPT_MSG                       TYPE REF TO IF_WD_CONTEXT_NODE,
          ELEM_CAPT_MSG                       TYPE REF TO IF_WD_CONTEXT_ELEMENT,
          STRU_CAPT_MSG                       TYPE IF_VIEW2=>ELEMENT_CAPT_MSG ,
          ITEM_MSG                            LIKE STRU_CAPT_MSG-MSG.
    *   navigate from <CONTEXT> to <CAPT_MSG> via lead selection
        NODE_CAPT_MSG = WD_CONTEXT->GET_CHILD_NODE( NAME = `CAPT_MSG` ).
    *   get single attribute
        NODE_CAPT_MSG->SET_ATTRIBUTE(
          EXPORTING
            NAME =  `MSG`
            VALUE = PAR_1 ).
    ENDMETHOD.

  • How to pass parameter to the Query String of the Named Queries'SQL

    Firstly to say sorry,I'm a beginner and my English is very little.
    Now I want to know
    How to pass parameter to the Query String of the Named Queries'SQL in the Map editor.
    Thanks.

    benzi,
    Not sure if this is on target for your question, but see #5 in the link below for some web screencasts that show how to pass an input text form field value to the bind variable of a view object. If you're looking for something different, maybe provide some more details such as what you are trying to accomplish and what technology stack you are using - for example, ADF BC, JSF, etc.
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    Also see section 5.9 and chapter 18 in the developer's guide.
    thanks

  • How to pass parameter to intro.jsp page ?

    Hi all,
    Anybody please tell me how to pass parameter to intro.jsp page.
    Is there any param name defined in <forward > syntax ?
    I have made following configuration in struts-config.xml file.
    I want to pass parameter to intro.jsp page
    <global-forwards>
              <forward name="invalidsession" path="/intro.jsp" redirect="true" />
    </global-forwards>
    please reply soon.
    Thanking you.

    Hi all,
    I have a similar kind of question..
    Iam trying to pass a string variable from JSP to servlet thro URL..
    Im using tomcat5
    COde:
    String fname=request.getParamter("filename");
    <jsp:forward page="/servlet/coreservlets.filedownload?name=" +fname />
    It is generating a unterminated tag error..Please help..

  • How to   Pass Parameter from BIP  to Dashboard  Report

    Hi,
    Parameter from BIP to Dashboard Report
    If I select BIP report paremeter should pass value to dashboard report
    thanks in advance.
    CHEERS ,
    Jel

    Hi Saichand,
    I hav gone through above link its passing values from Dashboard prompt to BIP report only..
    just i need like reverse (if i click on BIP report value then it should pass that value to Dashboard reports) in this this case how to pass parameter from BIP to dashboard report
    Thanks in advance
    Cheers,
    Jel

  • Validation user exit / BADI

    Hello to you all,
    Does anyone know of validation user exit / BADI of FI documents that were created outside of the FI? Like invoice verification in logistic?
    I found a BADI AC_DOCUMENT for substitution,
    I am now looking for validation
    Thanks In advance,
    Yoav

    Hi Yoav,
    The LIV invoice posts a MM based document and a Finance document.
    A Validation in Finance will affect the posting for the Finance document mentioned above, even though it comes from LIV - MM.
    If you want to affect the MM document, then I would suggest you post this thread on the ABAP and MM boards as some of the users there may know a user exit that can be used to validate the values posted.
    Hope this helps.

  • How to find out the 'z' user exit used in a Particular Transaction

    Hi,
    I have requirement to analyse all the user exits used in a transaction say 'VA01' . How can i find the user exits in a VA01 transaction. Can anyone suggest how to find the User exits
    Thanks in Anticipation.
    With Best Regards
    mamatha

    you can execute the following program , give the transaction name and execute
    *& Report  YCHATEST                                                    *
    REPORT z_find_userexit NO STANDARD PAGE HEADING.
    *&  Enter the transaction code that you want to search through in order
    *&  to find which Standard SAP User Exits exists.
    *& Tables
    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
    *& Variables
    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.

  • Validation \ User-exit \ BADI \ BTE for F-43 for missing exchange rate

    Hi,
    I maintain the exchange rate on a daily basis in TCURR exchange rate table.
    But, let's say that, by accident, in one day I fail to input the exchange rate.
    In this case, when I input a invoice in F-43, I'd like for the system to issue a warning (blocking) message saying that there is no exchange rate for that specific posting (translation) date.
    I tryed to create a validation for F-43. But the conditions available in validation are just too simple and I couldn't achieve my goal.
    However, I saw I can attach an user exit to the validation or an user exit directly in F-43.
    I found in SMOD the following user-exits for F-43 (in package FBAS), but I don't know how to use them:
    F050S001 FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002 FIDCC1: Change IDoc/do not send
    F050S003 FIDCC2: Change IDoc/do not send
    F050S004 FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S005 FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
    F050S006 FI Outgoing IDoc: Reset Clearing in FI Document
    F050S007 FIDCCH Outbound: Influence on IDoc for Document Change
    F180A001 Balance Sheet Adjustment
    FARC0002 Additional Checks for Archiving MM Vendor Master Data
    RFAVIS01 Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00 Line item display: Checking of selection conditions
    RFKORIEX Automatic correspondence
    SAPLF051 Workflow for FI (pre-capture, release for payment)
    Can you help me to attach an user-exit to a validation or an user exit directly in F-43 to do the specified validation?
    Or maybe this can be done with a BADI \ BTE?

    Thanks for the reply.
    I succeded creating the validation with an user-exit. I made the following steps:
    1) I created the validation in GGB0 (for document header), issuing a standard message (420 "Exchange rate not found") from message class (ZRSAU) - which is a copy of RSAU message class (in the beggining I put no pre-requisites, checks or rules, just the message).
    2) In OB28 I attached the validation (with call point document header) and I made it active (without batch input).
    3) I copied the RGGBR000 program (which is standard program with an example of validation) into ZRGGBR00 (it should be maximum 8 characters).
    Then I changed the ZRGGBR00 program (form U100) comparing the translation date (from BKPF) with the date from table TCURR (and exchange rate type M, and documents currency other than local currency).
    If the program doesn't find any exchange rate in TCURR in that date, it issues the error message (assigned in GGB0).
    4) In GGB0, I put the U100 user exit as a check and rule
    5)  In GCX2, I attached the ZRGGBR00 program to the GBLR application area (which is for user exits for validations / rules).
    Now it's working fine!

Maybe you are looking for