Finding User Exists in an ABAP program

**How to findout where there is an exit are there in the ABAP Programs.
Thankyou for your time in giving the answers.
Bhaskar.

use cmod /smod transaction..
below is demo code to find BADI n user exits for a transaction ( u can go to se93 and create a transaction for ur report program) and then execute this piece of code -
reward if helpfull
TABLES : TSTC,
TADIR,
MODSAPT,
MODACT,
TRDIR,
TFDIR,
ENLFDIR,
SXS_ATTRT ,
TSTCT.
DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
DATA : FIELD1(30).
DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
PARAMETERS : P_TCODE LIKE TSTC-TCODE,
P_PGMNA LIKE TSTC-PGMNA .
DATA wa_tadir type tadir.
START-OF-SELECTION.
IF NOT P_TCODE IS INITIAL.
SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
ELSEIF NOT P_PGMNA IS INITIAL.
TSTC-PGMNA = P_PGMNA.
ENDIF.
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 EQ ENLFDIR-AREA.
MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
ENDIF.
ENDIF.
SELECT * FROM TADIR INTO TABLE JTAB
WHERE PGMID = 'R3TR'
AND OBJECT in ('SMOD', 'SXSD')
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:/(105) SY-ULINE.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
Sorting the internal Table
sort jtab by OBJECT.
data : wf_txt(60) type c,
wf_smod type i ,
wf_badi type i ,
wf_object2(30) type C.
clear : wf_smod, wf_badi , wf_object2.
Get the total SMOD.
LOOP AT JTAB into wa_tadir.
at first.
FORMAT COLOR COL_HEADING INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 'Enhancement/ Business Add-in',
41 SY-VLINE ,
42 'Description',
105 SY-VLINE.
WRITE:/(105) SY-ULINE.
endat.
clear wf_txt.
at new object.
if wa_tadir-object = 'SMOD'.
wf_object2 = 'Enhancement' .
elseif wa_tadir-object = 'SXSD'.
wf_object2 = ' Business Add-in'.
endif.
FORMAT COLOR COL_GROUP INTENSIFIED ON.
WRITE:/1 SY-VLINE,
2 wf_object2,
105 SY-VLINE.
endat.
case wa_tadir-object.
when 'SMOD'.
wf_smod = wf_smod + 1.
SELECT SINGLE MODTEXT into wf_txt
FROM MODSAPT
WHERE SPRSL = SY-LANGU
AND NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
when 'SXSD'.
For BADis
wf_badi = wf_badi + 1 .
select single TEXT into wf_txt
from SXS_ATTRT
where sprsl = sy-langu
and EXIT_NAME = wa_tadir-OBJ_NAME.
FORMAT COLOR COL_NORMAL INTENSIFIED ON.
endcase.
WRITE:/1 SY-VLINE,
2 wa_tadir-OBJ_NAME hotspot on,
41 SY-VLINE ,
42 wf_txt,
105 SY-VLINE.
AT END OF object.
write : /(105) sy-ULINE.
ENDAT.
ENDLOOP.
WRITE:/(105) SY-ULINE.
SKIP.
FORMAT COLOR COL_TOTAL INTENSIFIED ON.
WRITE:/ 'No.of Exits:' , wf_smod.
WRITE:/ 'No.of BADis:' , wf_badi.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'No userexits or BADis exist'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(105) 'Transaction does not exist'.
ENDIF.
AT LINE-SELECTION.
data : wf_object type tadir-object.
clear wf_object.
GET CURSOR FIELD FIELD1.
CHECK FIELD1(8) EQ 'WA_TADIR'.
read table jtab with key obj_name = sy-lisel+1(20).
move jtab-object to wf_object.
case wf_object.
when 'SMOD'.
SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
when 'SXSD'.
SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
CALL TRANSACTION 'SE1 ' AND SKIP FIRST SCREEN.
endcase.

Similar Messages

  • How to find user exit implemented in the program

    how to find user exit implemented in the program or standerd transaction

    try this program to get the list of all the user exits for a transaction...
    *& Report  Z_USER_EXIT                                                 *
    *REPORT  Z_USER_EXIT                             .
    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.

  • Print an existing spool in ABAP program.

    Hi Experts, 
    I have a problem to print an existing spool. 
    I need print many an existing spools in ABAP program 
    - I used the SHDB and call transaction with BDC data but work only for 1st. 
    - I tried use the RSPO_RPRINT_SPOOLREQ function but don't work.

    I resolved my own problem.
    I use the function RSPO_OUTPUT_SPOOL_REQUEST...
    The only parameters to this functions was spool_request_id  - ID spool.
    Thanks for  help!

  • Tcode to find the load in server is 20 users run a particular ABAP program

    I want to find the load in the SAP Server (in terms of CPU Usage, memory usage) if a particular Query or ABAP program is executed by 20 users.
    Pls let me knwo the Tcode for the same
    As per my understanding ST03 can be used to view the report of previous information only.

    Balaji
    You have the analyze the load while 20 users executing the following transaction code.
    OS06 - operting system monitor and click on detailed analysis where you can monitor the various instances
    if do you find the other transaction which will show you load of current program being used by 20 users, please share with the expert communitiy to help to other users.
    REgards
    Anwer Waseem

  • How can i find item category usage in abap program

    HI, EXPERTS
    I HEARD USAGE MAINTAINED IN ABAP PROGRAM .
    ANY ONE KNOW WHERE I CAN FIND ABAP PROGRAM FOR ITEM CATEGORY USAGE??
    THANKS.^
    Edited by: jong seok Lee on Feb 2, 2010 10:01 AM

    Hi,
    Item Category Usage: An item categories usage is defined by SAP when creating a sales order, The system determines for example, that the usage refers to a text item as oppossed to a deliverable item when you enter text in the order item rather than  a material number. Based on this usage, the system will use the item category determination to propose an item category.
    You can also find the usage in Custoemer material info record (T.Code VD51), if you want to determine any customer specific item category you may use the usage field in Custoemr master info record.
    You can devlop an user exit to determine the item category based upon usage field as well.
    regrads
    Vivek.

  • Need to find SAP query for corresponding ABAP program.

    Hello SAP Experts,
    I have an ABAP program "AQDESYSTQV000001ORDERDETAILS==" in ECC 4.7. We had a client copy recently from ECC 4.7 to ECC 6.0. Now in ECC 6.0 I am unable to find this program in SE38.
    Can you please tell me how to create this program in ECC 6.0 ? Also, by the name of this program it is clearly seen that this program is automatically created by using SAP query.
    I tried to generate the program using SQ01, but system asks me for the SAP query.
    Can you please tell me how to find the SAP Query for the corresponding abap program ? Also, the steps as in how to generate the program in ECC 6.0.
    Thanks.

    Hi Danish,
    In the program name, the query name is always attached.
    For example : The program name is , AQ10SD==========Z10SD_INVPRODL=
                           Here the query name is Z10SD_INVPRODL and if you go to transaction SQ01 and enter the query name
    then you can find the infoset.
    And also you can gernate the program with the help of query name.
    Please try the same and let me know if any details are required.
    Regards,
    Darshana

  • Finding Hard coded Text in ABAP program

    Gurus,
    Is there any method to find out Hard coded TEXT in an abap Program? For Example
    write:/ TEXT-T01,
    'Hello World',TEXT-T02.
    In which i need to find out Hello world which is inside ''. I am not able to find with Search command.
    Can you Please guide me,
    Regards,
    Lijo Joseph
    Message was edited by: Lijo Joseph vazhappilly

    try this.
    data: report_pg type SY-REPID ,
          rpt_source type standard table of D022S .
    REFRESH rpt_source .
    move: <rpt name> to report_pg .
    READ REPORT report_pg INTO rpt_source .
    now do a search/find in rpt_source.
    Regards
    Raja

  • To find user exists after the BOM explosion in C041 .

    Hello Gurus,
                     I want to stop the making production order after making the plan order from CO41 if any the componemts of that BOM material is block in the material Master. So Please give the user exists in this flow where I can give error message and stop making of the production order.
                     Please help for this issue as soon as possible
    Regards ,
    Sagar

    Hello,
    Transaction Code - CO41                     Coll. Conversion of Planned Orders
    Exit Name           Description
    CCOWB001            Customer exit for modifying menu entries
    COIB0001            Customer Exit for As-Built Assignment Tool
    COZF0001            Change purchase req. for externally processed operation
    COZF0002            Change purchase req. for externally procured component
    PPCO0001            Application development: PP orders
    PPCO0002            Check exit for setting delete mark / deletion indicator
    PPCO0003            Check exit for order changes from sales order
    PPCO0004            Sort and processing exit: Mass processing orders
    PPCO0005            Storage location/backflushing when order is created
    PPCO0006            Enhancement to specify defaults for fields in order header
    PPCO0007            Exit when saving production order
    PPCO0008            Enhancement in the adding and changing of components
    PPCO0009            Enhancement in goods movements for prod. process order
    PPCO0010            Enhancement in make-to-order production - Unit of measure
    PPCO0012            Production Order: Display/Change Order Header Data
    PPCO0013            Change priorities of selection crit. for batch determination
    PPCO0015            Additional check for document links from BOMs
    PPCO0016            Additional check for document links from master data
    PPCO0017            Additional check for online processing of document links
    PPCO0018            Check for changes to production order header
    PPCO0019            Checks for changes to order operations
    PPCO0021            Release Control for Automatic Batch Determination
    PPCO0100            test
    STATTEXT            Modification exit for formatting status text lines
    PPCO0022            Determination of Production Memo
    PPCO0023            Checks changes to order components
    No of Exits:         26
    Vasanth

  • Find dictionary object used in ABAP program

    Dear All,
    Pl help me find out all the dictionary objects used in report program and dialog program.
    Input will be program name(report or module pool). output will give name of the database tables used in that program.
    thanks.

    Hi,
    Use the FM RS_PROGRAM_TABLES
    pass the object type as PROG for report and the program name for object name
    Vikranth

  • Find user that enter to program

    Hi,
    i wont to find user number that enter to program,
    how i can do that?
    regards

    Hi
    If yuo need to know the user by abap u can check SY-UNAME, but if u need to know the users are using a certain program u can try to use trx like SM50/SM51 and SM04
    Max

  • How to check frequency of ABAP program usage

    Dear Experts,
    How to find out the frequency of ABAP programs executed by users? the reason is because we want to do a housekeeping on all the ABAP reports that we have developed over the years, we want to deactivate those reports that are no longer executed by the user within 1 year. Anyone can give suggestion?
    I already tried using SM36, but this is only for those programs scheduled in background or immediate, how about those programs running on foreground?

    Hello,
    You can use the trxn SM20N. But bear in mind some prior config needs to be in place for the logging to be active (trxn SM19).
    For further details on SM20 read this: [Security Audit Log|http://help.sap.com/SAPhelp_nw70/helpdata/en/2c/c59d37d373243de10000009b38f8cf/frameset.htm]
    @Sap Fan: STAD can be used in case the audit log is not available (e.g., due to missing config) but afaik there is a limitation on the date range you can provide.
    BR,
    Suhas
    Edited by: Suhas Saha on Sep 7, 2010 9:39 AM

  • How to find out the hard coded Z program in my server

    Hi,
    I have more than 5000 program in the server in that i need to find out how many programs being hardcoded by developer . If hardcoded what feild they hardcoded Like BUKRS , WERKS like that.
    Is there any standard program to find out ? Please let me know.
    Thanks !
    Regards,
    Nallu

    So many Utilities are there in SAP to find it out a particular string.
    Experiment all and choose more appropriate one for your requirement.
    Program Name : RPR_ABAP_SOURCE_SCAN - Search for a particular string
    Program Name : AFX_CODE_SCANNER - Scans Report/Funct. Group/Class Code
    Transcation code : EWK1 - Cust.Development: Curr.in Report Txt
    Program Name : RKCTSEAR - String search in Programs
    Program Name : RSRSCAN1 - Find a String in a ABAP program
    Even you can use code inspector also

  • New ABAP Program to check Direct UPDATE in Database Table

    Hi all,
    As per customer requirement , I have to develop ONE  Program which find out that  in which ABAP Program , Programmer has used Open Sql command like  UPDATE , DELETE , INSERT , MODIFY to direct update in Database Table.
    Have a look on all Z-ABAPs, find out if there are statements with "update", "delete", "insert" or "modify" in the coding, then find out if updates to sap-Tables are done
    How can I achived that ?
    Please , If anybody is having idea , than please let me know..
    Thanks You ,

    Hi
    Kindly refer to the below link. This has step by step how you can achieve the checks.
    [http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/12659a90-0201-0010-c18b-9d014f9bed0d]
    But if you want to check if any program they have used 'UPDATE' then you can do like below.
    Go to SE38
    Utilities---> Find in Source Code-
    Find --- UPDATE
    In program - Z* or ZX* if you want to search only in Exits
    Regards,
    Vijay V .

  • How to read a word in a abap program for syntax check

    program for finding keywords:
    into a given program name in selection screen.
    e.g Parameters Keyword in YXABC propgram.
    How to find a word in a abap program for syntax check

    Hi!
    Read table TNAPR for the program names.
    Then use the READ REPORT  statement for it and load the program into an internal table.
    Then loop at the table.
    Regards
    Tamá

  • Find user SAP Portal role in an abap program

    Dear all,
    We would like to check the SAP Portal role of a Portal user in a R/3 abap program.
    do you know if there is a bapi or a RFC module function to do that ?
    For example : the user CCDEMO (exists in EP and in R/3 backend) has a Buyer Portal role. In an abap program, I would like to have this information.
    Thanks
    kind regards
    Véronique

    Dear all,
    We would like to check the SAP Portal role of a Portal user in a R/3 abap program.
    do you know if there is a bapi or a RFC module function to do that ?
    For example : the user CCDEMO (exists in EP and in R/3 backend) has a Buyer Portal role. In an abap program, I would like to have this information.
    Thanks
    kind regards
    Véronique

Maybe you are looking for

  • Exchange rate field greyed out when i use custom PO order type

    Hi! Upon creation of PO using SAP standard order type NB, the field exhange rate is editable. While when i used csutom PO order type, it is greyed out. How can we edit this? Where is the configuration of the exchange rate per order type? If this is c

  • To develope  material aging report

    hi   i want to develope a material aging report plz tel floe for this one and tables thanks venkat Moderator Message: Please read the rules of Engagement. SCN is not here to your job for you Thread locked. Edited by: Neil Gardiner on Jun 15, 2011 3:5

  • Crystal Reports crashing when tries to run

    My coworker is trying to run his crystal report he said he's using version R2 and the top error message said something like Crystal Reports stopped working. also, the error details are below. Does anyone have information about this error?  thanks Pro

  • Reset bios password of hp mini 110-1145nr

    good evening everyone I have my sister who has activated the password bios, she forgot. cost of the computer does not start. he asks the password of the bios before starting Windows. 3 after fatal error puts tantative CNU938540. it is a hp mini 110-1

  • Dell Latitude E6410 Laptop for PPCC editing?

    I'm thinking of purchasing a Dell Latitude E6410 Laptop for mobile editing when I travel.  My question is would it be sufficient to use for editing on PPCC?  It will have an Intel Core I5 processor and 8gb of RAM.