<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Validations on User exits in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287654#M154390</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have worked for some user exits in Purchasing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best way is first find out which user exit gets triggered just before you save data. I am attaching code of a sample program. Pls create a temporary program in your development box and add code. Execute this program. Give input as any Tcode for which u r looking for a user exit. Keep a breakpoint and run the tcode to see which gets triggered just before SAVE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ME22N, try EXIT_SAPMM06E_012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZUSEREXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Finding the user-exits of a SAP transaction code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Enter the transaction code in which you are looking for the user-exit&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and it will list you the list of user-exits in the transaction code.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Also a drill down is possible which will help you to branch to SMOD.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            TABLES DECLARATION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;TABLES : TSTC,              "SAP Transaction Codes.&lt;/P&gt;&lt;P&gt;         TADIR,             "Directory of Repository Objects.&lt;/P&gt;&lt;P&gt;         MODSAPT,           "SAP Enhancements - Short Texts.&lt;/P&gt;&lt;P&gt;         MODACT,            "Modifications.&lt;/P&gt;&lt;P&gt;         TRDIR,             "System table TRDIR.&lt;/P&gt;&lt;P&gt;         TFDIR,             "Function Module.&lt;/P&gt;&lt;P&gt;         ENLFDIR,           "Additional Attributes for Function Modules&lt;/P&gt;&lt;P&gt;         TSTCT.             "Transaction Code Texts&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           INTERNAL TABLE DECLARATIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;DATA : ITAB LIKE TADIR OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            DATA DECLARATIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;DATA : V_FIELD1(30).&lt;/P&gt;&lt;P&gt;DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            INPUT SCREEN DECLARATIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;PARAMETERS : P_TCODE LIKE TSTC-TCODE OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            START OF SELECTION EVENT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;*--Read SAP Transaction Code from the given input.&lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;  FROM TSTC&lt;/P&gt;&lt;P&gt;  WHERE TCODE EQ P_TCODE.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;*--Get the Directory of Repository Objects for the&lt;/P&gt;&lt;P&gt;*---selected program name.&lt;/P&gt;&lt;P&gt;   SELECT SINGLE *&lt;/P&gt;&lt;P&gt;     FROM TADIR&lt;/P&gt;&lt;P&gt;     WHERE PGMID = 'R3TR' AND&lt;/P&gt;&lt;P&gt;           OBJECT = 'PROG' AND&lt;/P&gt;&lt;P&gt;           OBJ_NAME = TSTC-PGMNA.&lt;/P&gt;&lt;P&gt;   MOVE : TADIR-DEVCLASS TO V_DEVCLASS.&lt;/P&gt;&lt;P&gt;      IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;*--Read System table TRDIR for the selected program name.&lt;/P&gt;&lt;P&gt;         SELECT SINGLE *&lt;/P&gt;&lt;P&gt;           FROM TRDIR&lt;/P&gt;&lt;P&gt;           WHERE NAME = TSTC-PGMNA.&lt;/P&gt;&lt;P&gt;*--Get the function module name for the selected program name.&lt;/P&gt;&lt;P&gt;         IF TRDIR-SUBC EQ 'F'.&lt;/P&gt;&lt;P&gt;            SELECT SINGLE *&lt;/P&gt;&lt;P&gt;              FROM TFDIR&lt;/P&gt;&lt;P&gt;              WHERE PNAME = TSTC-PGMNA.&lt;/P&gt;&lt;P&gt;*--Get the function group for the selected program name.&lt;/P&gt;&lt;P&gt;            SELECT SINGLE *&lt;/P&gt;&lt;P&gt;              FROM ENLFDIR&lt;/P&gt;&lt;P&gt;              WHERE FUNCNAME = TFDIR-FUNCNAME.&lt;/P&gt;&lt;P&gt;*--Read the development class for the corresponding function group.&lt;/P&gt;&lt;P&gt;            SELECT SINGLE *&lt;/P&gt;&lt;P&gt;              FROM TADIR&lt;/P&gt;&lt;P&gt;              WHERE PGMID = 'R3TR'  AND&lt;/P&gt;&lt;P&gt;                    OBJECT = 'FUGR' AND&lt;/P&gt;&lt;P&gt;                    OBJ_NAME EQ ENLFDIR-AREA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            MOVE : TADIR-DEVCLASS TO V_DEVCLASS.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;*--Read all the entries into the internal table itab.&lt;/P&gt;&lt;P&gt;       SELECT *&lt;/P&gt;&lt;P&gt;         FROM TADIR&lt;/P&gt;&lt;P&gt;         INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;         WHERE PGMID = 'R3TR' AND&lt;/P&gt;&lt;P&gt;               OBJECT = 'SMOD' AND&lt;/P&gt;&lt;P&gt;               DEVCLASS = V_DEVCLASS.&lt;/P&gt;&lt;P&gt;*--Read Transaction code information from the table tstct.&lt;/P&gt;&lt;P&gt;        SELECT SINGLE *&lt;/P&gt;&lt;P&gt;          FROM TSTCT&lt;/P&gt;&lt;P&gt;          WHERE SPRSL EQ SY-LANGU AND&lt;/P&gt;&lt;P&gt;                TCODE EQ P_TCODE.&lt;/P&gt;&lt;P&gt;*-- Column Headings&lt;/P&gt;&lt;P&gt;        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.&lt;/P&gt;&lt;P&gt;        WRITE:/(19) 'Transaction Code - ',&lt;/P&gt;&lt;P&gt;             20(20) P_TCODE,&lt;/P&gt;&lt;P&gt;             45(50) TSTCT-TTEXT.&lt;/P&gt;&lt;P&gt;                    SKIP.&lt;/P&gt;&lt;P&gt;        IF NOT ITAB[] IS INITIAL.&lt;/P&gt;&lt;P&gt;           WRITE:/(95) SY-ULINE.&lt;/P&gt;&lt;P&gt;           FORMAT COLOR COL_HEADING INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;           WRITE:/1 SY-VLINE,&lt;/P&gt;&lt;P&gt;                  2 'Exit Name',&lt;/P&gt;&lt;P&gt;                 21 SY-VLINE ,&lt;/P&gt;&lt;P&gt;                 22 'Description',&lt;/P&gt;&lt;P&gt;                 95 SY-VLINE.&lt;/P&gt;&lt;P&gt;           WRITE:/(95) SY-ULINE.&lt;/P&gt;&lt;P&gt;           LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;*--Read SAP Enhancements short texts information.&lt;/P&gt;&lt;P&gt;              SELECT SINGLE *&lt;/P&gt;&lt;P&gt;                FROM MODSAPT&lt;/P&gt;&lt;P&gt;                WHERE SPRSL = SY-LANGU AND&lt;/P&gt;&lt;P&gt;                      NAME = ITAB-OBJ_NAME.&lt;/P&gt;&lt;P&gt;                   FORMAT COLOR COL_NORMAL INTENSIFIED OFF.&lt;/P&gt;&lt;P&gt;                   WRITE:/1 SY-VLINE,&lt;/P&gt;&lt;P&gt;                          2 ITAB-OBJ_NAME HOTSPOT ON,&lt;/P&gt;&lt;P&gt;                         21 SY-VLINE ,&lt;/P&gt;&lt;P&gt;                         22 MODSAPT-MODTEXT,&lt;/P&gt;&lt;P&gt;                         95 SY-VLINE.&lt;/P&gt;&lt;P&gt;           ENDLOOP.&lt;/P&gt;&lt;P&gt;           WRITE:/(95) SY-ULINE.&lt;/P&gt;&lt;P&gt;           DESCRIBE TABLE ITAB.&lt;/P&gt;&lt;P&gt;           SKIP.&lt;/P&gt;&lt;P&gt;           FORMAT COLOR COL_TOTAL INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;           WRITE:/ 'No of Exits:' , SY-TFILL.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;           FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;           WRITE:/(95) 'No User Exit exists'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;          WRITE:/(95) 'Transaction Code Does Not Exist'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            AT LINE-SELECTION EVENT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;   GET CURSOR FIELD V_FIELD1.&lt;/P&gt;&lt;P&gt;   CHECK V_FIELD1(4) EQ 'ITAB'.&lt;/P&gt;&lt;P&gt;   SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).&lt;/P&gt;&lt;P&gt;*-- call transation SMOD : Sap Enhancement.&lt;/P&gt;&lt;P&gt;   CALL TRANSACTION 'SMOD' AND SKIP FIRST   SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---End of Program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Apr 2006 14:33:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-04-04T14:33:33Z</dc:date>
    <item>
      <title>Validations on User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287653#M154389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to do some validations on financial documents with transactions like FB01,FB60,FB70,ME21n,MIGO,MIRO and do some check on the RCC codes, Company codes, Accounts and some custome fields before user saves data and dispaly some error  message if something is wrong. So if you someone has done anything similar can you provide me with a sample code and also what the requirement was so that i can work on similar lines and get my task done..Any help would be greatly appreciated and would be helpful to me..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Mohsin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 14:28:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287653#M154389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-04T14:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Validations on User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287654#M154390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have worked for some user exits in Purchasing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best way is first find out which user exit gets triggered just before you save data. I am attaching code of a sample program. Pls create a temporary program in your development box and add code. Execute this program. Give input as any Tcode for which u r looking for a user exit. Keep a breakpoint and run the tcode to see which gets triggered just before SAVE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For ME22N, try EXIT_SAPMM06E_012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT ZUSEREXIT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Finding the user-exits of a SAP transaction code&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Enter the transaction code in which you are looking for the user-exit&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;and it will list you the list of user-exits in the transaction code.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Also a drill down is possible which will help you to branch to SMOD.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;************************************************************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            TABLES DECLARATION&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;TABLES : TSTC,              "SAP Transaction Codes.&lt;/P&gt;&lt;P&gt;         TADIR,             "Directory of Repository Objects.&lt;/P&gt;&lt;P&gt;         MODSAPT,           "SAP Enhancements - Short Texts.&lt;/P&gt;&lt;P&gt;         MODACT,            "Modifications.&lt;/P&gt;&lt;P&gt;         TRDIR,             "System table TRDIR.&lt;/P&gt;&lt;P&gt;         TFDIR,             "Function Module.&lt;/P&gt;&lt;P&gt;         ENLFDIR,           "Additional Attributes for Function Modules&lt;/P&gt;&lt;P&gt;         TSTCT.             "Transaction Code Texts&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;           INTERNAL TABLE DECLARATIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;DATA : ITAB LIKE TADIR OCCURS 0 WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            DATA DECLARATIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;DATA : V_FIELD1(30).&lt;/P&gt;&lt;P&gt;DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            INPUT SCREEN DECLARATIONS&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;PARAMETERS : P_TCODE LIKE TSTC-TCODE OBLIGATORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            START OF SELECTION EVENT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;START-OF-SELECTION.&lt;/P&gt;&lt;P&gt;*--Read SAP Transaction Code from the given input.&lt;/P&gt;&lt;P&gt;SELECT SINGLE *&lt;/P&gt;&lt;P&gt;  FROM TSTC&lt;/P&gt;&lt;P&gt;  WHERE TCODE EQ P_TCODE.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC EQ 0.&lt;/P&gt;&lt;P&gt;*--Get the Directory of Repository Objects for the&lt;/P&gt;&lt;P&gt;*---selected program name.&lt;/P&gt;&lt;P&gt;   SELECT SINGLE *&lt;/P&gt;&lt;P&gt;     FROM TADIR&lt;/P&gt;&lt;P&gt;     WHERE PGMID = 'R3TR' AND&lt;/P&gt;&lt;P&gt;           OBJECT = 'PROG' AND&lt;/P&gt;&lt;P&gt;           OBJ_NAME = TSTC-PGMNA.&lt;/P&gt;&lt;P&gt;   MOVE : TADIR-DEVCLASS TO V_DEVCLASS.&lt;/P&gt;&lt;P&gt;      IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;*--Read System table TRDIR for the selected program name.&lt;/P&gt;&lt;P&gt;         SELECT SINGLE *&lt;/P&gt;&lt;P&gt;           FROM TRDIR&lt;/P&gt;&lt;P&gt;           WHERE NAME = TSTC-PGMNA.&lt;/P&gt;&lt;P&gt;*--Get the function module name for the selected program name.&lt;/P&gt;&lt;P&gt;         IF TRDIR-SUBC EQ 'F'.&lt;/P&gt;&lt;P&gt;            SELECT SINGLE *&lt;/P&gt;&lt;P&gt;              FROM TFDIR&lt;/P&gt;&lt;P&gt;              WHERE PNAME = TSTC-PGMNA.&lt;/P&gt;&lt;P&gt;*--Get the function group for the selected program name.&lt;/P&gt;&lt;P&gt;            SELECT SINGLE *&lt;/P&gt;&lt;P&gt;              FROM ENLFDIR&lt;/P&gt;&lt;P&gt;              WHERE FUNCNAME = TFDIR-FUNCNAME.&lt;/P&gt;&lt;P&gt;*--Read the development class for the corresponding function group.&lt;/P&gt;&lt;P&gt;            SELECT SINGLE *&lt;/P&gt;&lt;P&gt;              FROM TADIR&lt;/P&gt;&lt;P&gt;              WHERE PGMID = 'R3TR'  AND&lt;/P&gt;&lt;P&gt;                    OBJECT = 'FUGR' AND&lt;/P&gt;&lt;P&gt;                    OBJ_NAME EQ ENLFDIR-AREA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;            MOVE : TADIR-DEVCLASS TO V_DEVCLASS.&lt;/P&gt;&lt;P&gt;          ENDIF.&lt;/P&gt;&lt;P&gt;       ENDIF.&lt;/P&gt;&lt;P&gt;*--Read all the entries into the internal table itab.&lt;/P&gt;&lt;P&gt;       SELECT *&lt;/P&gt;&lt;P&gt;         FROM TADIR&lt;/P&gt;&lt;P&gt;         INTO TABLE ITAB&lt;/P&gt;&lt;P&gt;         WHERE PGMID = 'R3TR' AND&lt;/P&gt;&lt;P&gt;               OBJECT = 'SMOD' AND&lt;/P&gt;&lt;P&gt;               DEVCLASS = V_DEVCLASS.&lt;/P&gt;&lt;P&gt;*--Read Transaction code information from the table tstct.&lt;/P&gt;&lt;P&gt;        SELECT SINGLE *&lt;/P&gt;&lt;P&gt;          FROM TSTCT&lt;/P&gt;&lt;P&gt;          WHERE SPRSL EQ SY-LANGU AND&lt;/P&gt;&lt;P&gt;                TCODE EQ P_TCODE.&lt;/P&gt;&lt;P&gt;*-- Column Headings&lt;/P&gt;&lt;P&gt;        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.&lt;/P&gt;&lt;P&gt;        WRITE:/(19) 'Transaction Code - ',&lt;/P&gt;&lt;P&gt;             20(20) P_TCODE,&lt;/P&gt;&lt;P&gt;             45(50) TSTCT-TTEXT.&lt;/P&gt;&lt;P&gt;                    SKIP.&lt;/P&gt;&lt;P&gt;        IF NOT ITAB[] IS INITIAL.&lt;/P&gt;&lt;P&gt;           WRITE:/(95) SY-ULINE.&lt;/P&gt;&lt;P&gt;           FORMAT COLOR COL_HEADING INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;           WRITE:/1 SY-VLINE,&lt;/P&gt;&lt;P&gt;                  2 'Exit Name',&lt;/P&gt;&lt;P&gt;                 21 SY-VLINE ,&lt;/P&gt;&lt;P&gt;                 22 'Description',&lt;/P&gt;&lt;P&gt;                 95 SY-VLINE.&lt;/P&gt;&lt;P&gt;           WRITE:/(95) SY-ULINE.&lt;/P&gt;&lt;P&gt;           LOOP AT ITAB.&lt;/P&gt;&lt;P&gt;*--Read SAP Enhancements short texts information.&lt;/P&gt;&lt;P&gt;              SELECT SINGLE *&lt;/P&gt;&lt;P&gt;                FROM MODSAPT&lt;/P&gt;&lt;P&gt;                WHERE SPRSL = SY-LANGU AND&lt;/P&gt;&lt;P&gt;                      NAME = ITAB-OBJ_NAME.&lt;/P&gt;&lt;P&gt;                   FORMAT COLOR COL_NORMAL INTENSIFIED OFF.&lt;/P&gt;&lt;P&gt;                   WRITE:/1 SY-VLINE,&lt;/P&gt;&lt;P&gt;                          2 ITAB-OBJ_NAME HOTSPOT ON,&lt;/P&gt;&lt;P&gt;                         21 SY-VLINE ,&lt;/P&gt;&lt;P&gt;                         22 MODSAPT-MODTEXT,&lt;/P&gt;&lt;P&gt;                         95 SY-VLINE.&lt;/P&gt;&lt;P&gt;           ENDLOOP.&lt;/P&gt;&lt;P&gt;           WRITE:/(95) SY-ULINE.&lt;/P&gt;&lt;P&gt;           DESCRIBE TABLE ITAB.&lt;/P&gt;&lt;P&gt;           SKIP.&lt;/P&gt;&lt;P&gt;           FORMAT COLOR COL_TOTAL INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;           WRITE:/ 'No of Exits:' , SY-TFILL.&lt;/P&gt;&lt;P&gt;        ELSE.&lt;/P&gt;&lt;P&gt;           FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;           WRITE:/(95) 'No User Exit exists'.&lt;/P&gt;&lt;P&gt;        ENDIF.&lt;/P&gt;&lt;P&gt;      ELSE.&lt;/P&gt;&lt;P&gt;          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.&lt;/P&gt;&lt;P&gt;          WRITE:/(95) 'Transaction Code Does Not Exist'.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;            AT LINE-SELECTION EVENT&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;*----&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;AT LINE-SELECTION.&lt;/P&gt;&lt;P&gt;   GET CURSOR FIELD V_FIELD1.&lt;/P&gt;&lt;P&gt;   CHECK V_FIELD1(4) EQ 'ITAB'.&lt;/P&gt;&lt;P&gt;   SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).&lt;/P&gt;&lt;P&gt;*-- call transation SMOD : Sap Enhancement.&lt;/P&gt;&lt;P&gt;   CALL TRANSACTION 'SMOD' AND SKIP FIRST   SCREEN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*---End of Program&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 14:33:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287654#M154390</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-04T14:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Validations on User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287655#M154391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;look in your system after an  EXIT-Formpool for Uxxx-Exits - e.g. program ZGGBR000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) define an exit in Ta ob28&lt;/P&gt;&lt;P&gt;2) define that exit in above program &lt;/P&gt;&lt;P&gt;  EXITS-NAME  = 'UK001'.&lt;/P&gt;&lt;P&gt;  EXITS-PARAM = C_EXIT_PARAM_CLASS.&lt;/P&gt;&lt;P&gt;  EXITS-TITLE = TEXT-101.&lt;/P&gt;&lt;P&gt;  APPEND EXITS.  &lt;/P&gt;&lt;P&gt;3) ceate form routine uk001: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM UK001 USING B_RESULT. &lt;/P&gt;&lt;P&gt;           &lt;/P&gt;&lt;P&gt;-&amp;gt; here define your rules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 14:35:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287655#M154391</guid>
      <dc:creator>andreas_mann3</dc:creator>
      <dc:date>2006-04-04T14:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Validations on User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287656#M154392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Andreas,&lt;/P&gt;&lt;P&gt;Can you please explain in more detail what you meant there also if someone has some sample code of the validations they have done please forward it to me with the requirement on which they were working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mohsin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 16:05:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287656#M154392</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-04T16:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Validations on User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287657#M154393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to do some validations on financial documents with transactions like FB01,FB60,FB70,ME21n,MIGO,MIRO and do some check on the RCC codes, Company codes, Accounts and some custome fields before user saves data and dispaly some error message if something is wrong. So if you someone has done anything similar can you provide me with a sample code and also what the requirement was so that i can work on similar lines and get my task done. This is urgent so plzzz help me out..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 19:04:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287657#M154393</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-04T19:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Validations on User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287658#M154394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To define validations for FI documents:&lt;/P&gt;&lt;P&gt;step 1 : Identify the include name to write the subroutines using transaction GCX2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;step 2 : Define the validation in transaction OB28. Call point might be at header,item or complete document level. In this transaction u will define the steps includes pre requisite,check and message.&lt;/P&gt;&lt;P&gt;In the check u can give the sub routine name defined in the  step 1.&lt;/P&gt;&lt;P&gt;In the subroutine u will get the structure BSEG with data. U can read the data and validate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example sub routine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;***FORM U503  changing  B_RESULT.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;here bseg is available for reading&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;    if bseg-bukrs = '1000'.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  ...do validation here&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;   B_RESULT  = B_TRUE.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt; ELSE.&lt;/P&gt;&lt;/LI&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;  further checks ...&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;LI level="2" type="ul"&gt;&lt;P&gt;   B_RESULT  = B_FALSE.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;*ENDFORM.           "U503&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vamshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 19:23:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287658#M154394</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-04T19:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Validations on User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287659#M154395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello vamshi&lt;/P&gt;&lt;P&gt;how can we write subroutines using GCX2..And you mean that i have to define all the validations in OB28(Can you tell me the steps how we need to define here)..Once we define validations in OB28 all we need to do is call it in the subroutine using GCX2, am i right??..or ne other way to do it..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mohsin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 19:36:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287659#M154395</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-04T19:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Validations on User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287660#M154396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(i)In GCX2 you can see the include name configured, Like&lt;/P&gt;&lt;P&gt;ZGGBR000 or GGBR000( standard program ). If its GGBR000&lt;/P&gt;&lt;P&gt;u need to change to ZGGBR000 to include ur code in this program.Because u cannot modify the standard program.&lt;/P&gt;&lt;P&gt;(ii)In OB28, while creating step in the check u give the subroutine defined in the program ZGGBR000...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;about the order u want to define both the way u can do,&lt;/P&gt;&lt;P&gt;either first gcx2 or ob28.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find link for help :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_47x200/helpdata/en/34/70278406b611d3b4370060941936fa/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_47x200/helpdata/en/34/70278406b611d3b4370060941936fa/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this help..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;vamshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2006 19:47:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287660#M154396</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-04-04T19:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Validations on User exits</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287661#M154397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the same program ZGGBR000 to include the exits. When i am creating a new step in the Validation using transaction OB28 and saving it, the save is getting terminated by an abort message "User exit form pool ZGGBR000 contains a syntax error".&lt;/P&gt;&lt;P&gt;But when i save , check and activate ZGGBR000 , it doesnt give any syntax error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have searched in SDN but not able to get any appropriate solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Bhavika&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jul 2009 08:26:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/validations-on-user-exits/m-p/1287661#M154397</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-03T08:26:35Z</dc:date>
    </item>
  </channel>
</rss>

