Function Module or Class to write the source code of a class

Hi all,
Does anyone know a FM or a class using which I can read the source code of the methods of the class?
Thanks,
Sükrü

Sure,  something like this?
REPORT  zrich_0002.
DATA includename TYPE program.
DATA _classname TYPE seoclsname VALUE 'CL_GUI_ALV_GRID'.
DATA isource TYPE STANDARD TABLE OF string WITH HEADER LINE.
includename = cl_oo_classname_service=>get_pubsec_name( _classname ).
READ REPORT includename INTO isource.
LOOP AT isource.
  WRITE:/ isource.
ENDLOOP.
includename = cl_oo_classname_service=>get_prosec_name( _classname ).
READ REPORT includename INTO isource.
LOOP AT isource.
  WRITE:/ isource.
ENDLOOP.
includename = cl_oo_classname_service=>get_prisec_name( _classname ).
READ REPORT includename INTO isource.
LOOP AT isource.
  WRITE:/ isource.
ENDLOOP.
includename = cl_oo_classname_service=>get_ccimp_name( _classname ).
READ REPORT includename INTO isource.
LOOP AT isource.
  WRITE:/ isource.
ENDLOOP.
includename = cl_oo_classname_service=>get_ccdef_name( _classname ).
READ REPORT includename INTO isource.
LOOP AT isource.
  WRITE:/ isource.
ENDLOOP.
includename = cl_oo_classname_service=>get_ccmac_name( _classname ).
READ REPORT includename INTO isource.
LOOP AT isource.
  WRITE:/ isource.
ENDLOOP.
Regards,
RIch Heilman

Similar Messages

  • User exit function module include how to write the code

    hi all,
    i am creating user exit  for ME22N  using this enhance  MM06E005 .
    in this i created subscreen and set some fields .
    that data has to be stoe in EKPO.
    inside the include i have to write the logic plz guide me how to follow .
    once i enter it will store on wish internal table and wish internal table to shall i move to EKPO .
    If Tcode is ME23N how to display data in disable mode.
    Regards,
    Hari.

    This is the code inside the function module .
    once i enter data in custom field the below wish table it will store.
    FUNCTION EXIT_SAPMM06E_016.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(I_EKPO) LIKE  EKPO STRUCTURE  EKPO
    *"     VALUE(I_AKTYP)
    *"     VALUE(I_CI_EKPO) LIKE  EKPO_CI STRUCTURE  EKPO_CI
    *"     VALUE(I_BSTYP) LIKE  EKKO-BSTYP
    *"     VALUE(I_NO_SCREEN)
    *"     VALUE(I_LFA1) LIKE  LFA1 STRUCTURE  LFA1
    *"     VALUE(I_LFM1) LIKE  LFM1 STRUCTURE  LFM1
    *"     VALUE(I_EKKO) LIKE  EKKO STRUCTURE  EKKO
    *"     VALUE(I_REKPO) LIKE  EKPO STRUCTURE  EKPO OPTIONAL
    *"     VALUE(I_KEKPO) LIKE  EKPO STRUCTURE  EKPO OPTIONAL
    *"     VALUE(I_AEKPO) LIKE  EKPO STRUCTURE  EKPO OPTIONAL
    *"     VALUE(I_REBAN) LIKE  EBAN STRUCTURE  EBAN OPTIONAL
    *"     VALUE(I_MT06E) LIKE  MT06E STRUCTURE  MT06E OPTIONAL
    *"     VALUE(I_EINA) LIKE  EINA STRUCTURE  EINA OPTIONAL
    *"     VALUE(I_EINE) LIKE  EINE STRUCTURE  EINE OPTIONAL
    *"     VALUE(I_EKPO_OLD) LIKE  EKPO STRUCTURE  EKPO OPTIONAL
    *"     VALUE(I_KOMP) LIKE  KOMP STRUCTURE  KOMP OPTIONAL
    *"     VALUE(I_ENJ_CALL) OPTIONAL
    *"  TABLES
    *"      TEKPO STRUCTURE  BEKPO OPTIONAL
    *"      TEKET STRUCTURE  BEKET OPTIONAL
    *"      TEKKN STRUCTURE  EKKNU OPTIONAL
    *"      TKOMV STRUCTURE  KOMV OPTIONAL
    INCLUDE ZXM06U41 .
    ENDFUNCTION.
    inside the INCLUDE ZXM06U41 .  i writen this code
    *&  Include           ZXM06U41
    DATA :
          FS_EKPO TYPE EKPO_CI.
    IF ( SY-TCODE EQ  'ME22N' OR SY-TCODE EQ 'ME23N'
          OR SY-TCODE EQ 'ME22' OR SY-TCODE EQ 'ME23' ) .
      LOOP AT TEKPO.
       IF ( TEKPO-EBELN EQ i_EKPO-EBELN
            AND TEKPO-EBELP EQ i_EKPO-EBELP ) .
        EKPO_CI-ZMATERIAL = TEKPO-ZMATERIAL.
        EKPO_CI-ZQUANTITY = TEKPO-ZQUANTITY.
        EKPO_CI-ZUNIT     = TEKPO-ZUNIT.
        EKPO_CI-ZPRICE    = TEKPO-ZPRICE.
        EKPO_CI-ZCURRENCY = TEKPO-ZCURRENCY.
       ENDIF.
      ENDLOOP.
    ENDIF.
    Regards,
    Hari.

  • How to read the source code of class method

    Hi,
    I want to read the source code of a method which is in a BAdi implementation.
    I used SEO_METHOD_GET_SOURCE function module where I passed interface name as class and method name.
    But I didn't get the source code. Is there any other function module of method to read the source code.
    Thanks and regards,
    Venkat.

    Hi Venkat,
      You can still use the Function Module SEO_METHOD_GET_SOURCE with a small change in the parameter passing. It should be:
    Paramaters:
    MTDKEY-CLSNAME : <Implementaion Classname>
    MTDKEY-CPDNAME: <Interfacename~methodname>
    STATE : 'A' for active or 'I' for inactive
    For example:
    MTDKEY-CLSNAME :ZCL_IM_PLM_AUDIT_ALV_GRID
    MTDKEY-CPDNAME: IF_EX_PLM_AUDIT_ALV_GRID~ON_USER_COMMAND
    STATE: A
    After executing you will get the source code in the form of string in the 'SOURCE' parameter.
    Hope this helps you.
    Regards,
    Swarna Munukoti

  • How can you scan the Source Code of a bunch of function modules

    We are in a 46C system. I need to be able to scan the soruce code of a bunch of function modules. I was unable to use the RPR_ABAP_SOURCE_SCAN and return the lines with the string I was searching for.
    Thanks
    Hari

    Hi,
    Read the main program that is the funtion pool into an internal table with statement.
    READ REPORT
    Use the key-word
    SCAN ABAP-SOURCE
    You can use the addition with includes as the function pool contains only include programs the with includes addition will read the source code present in the include.
    Like this you can achieve it
    " Example
    DATA:
      itab TYPE TABLE OF char255,
      itab1 TYPE TABLE OF stoken,
      itab2 TYPE TABLE OF sstmnt.
    READ REPORT 'SAPLSFES' INTO itab.
    SCAN ABAP-SOURCE itab TOKENS INTO itab1
                          STATEMENTS INTO itab2
                          WITH INCLUDES.
    after this you can search the string in the internal table with lots of additions available in the SCAN ABAP_SOURCE
    regards
    sarves

  • How to make use of SE37- Function Module & how to find out the table?

    Hi ,
    1.Could anyone help me what's this SE37-Function module is all about,How to make use of this?
    For Eg,If i want to delete a BOM permanently from the system then I have to use the Function module CM_DB_DEL_FROM_ROOT_BOM.
    But after giving the particular name what should i do?
    Please help me.
    2.How to find out the respective table for a particular field sya for T code-COGI, T code MFBF,where its values are getting populated.,Please help in this issue.
    Thanks in adavnce for spending some time
    Raj.S

    Hi Raj
    Function Modules
    Function modules are procedures that are defined in special ABAP programs only, so-called function groups, but can be called from all ABAP programs. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.
    Function modules allow you to encapsulate and reuse global functions in the SAP System. They are managed in a central function library. The SAP System contains several predefined functions modules that can be called from any ABAP program. Function modules also play an important role during updating  and in interaction between different SAP systems, or between SAP systems and remote systems through remote communications.
    Unlike subroutines, you do not define function modules in the source code of your program. Instead, you use the Function Builder. The actual ABAP interface definition remains hidden from the programmer. You can define the input parameters of a function module as optional. You can also assign default values to them. Function modules also support exception handling. This allows you to catch certain errors while the function module is running. You can test function modules without having to include them in a program using the Function Builder.
    The Function Builder  also has a release process for function modules. This ensures that incompatible changes cannot be made to any function modules that have already been released. This applies particularly to the interface. Programs that use a released function module will not cease to work if the function module is changed.
    Check this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
    You can execute function module in SE37ie you can perform the activiites defined in the function module by executing it.
    By deleting BOM you mention the FM name in se37 and execute. In some function module it will ask input parameters as developed in the program , you have to give the input parameters and execute.

  • Which  Function Module is used for converting the DATE in BDC

    HI,
    Which  Function Module is used for converting the DATE Format in BDC for Uploading purpose please help me.

    data : date like sy-datum.
    data : odate(10) type c.
    date = sy-datum.        " in format YYYYMMDD
    CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'
      EXPORTING
       input         = date
    IMPORTING
       OUTPUT        = odate         .
    write:/ odate.  "in ur format '.
    1.
    In ur itab make a field for date as 10 characters and use this Fm to store the date .
    2. Pass the date as the charcter field to the screen and now check .

  • Infocube via function module or classes

    hi
    Is there any function module or classes to extract key figure from an infocube based on selection criteria?
    thanks.

    Check the links :
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    http://www.sapgenie.com/abap/functions.htm
    http://members.tripod.com/abap4/SAP_Functions.html

  • How to syntax check the source code of custom methos of classes?

    Hi,
    Experts,
    I want to check the syntax errors is present or not in methods of classes, to check that is there any function module or classes for that?
    Thank U,
    Shabeer Ahmed.

    T.CODE :- SLIN
    USING THIS T.CODE CHECK SYNTAX ERROR AND ALL
    LIKE
    SYNTAX
    PERFOMR/FORM
    FUNCTION
    AUTHORIZATION
    CHECK LOAD TABLE
    SET/GET PARAMETER IDs
    MESSAGE
    etc....

  • Documentation of Function Modules and Class Methods

    Hi
        I would like to know the function modules that handle the documentation of function modules and class methods.Is it possible to assign the same documentation of a function module to a method as method documentation?
        Are these documentations stored in some system tables?
    Thanks in advance,
    Hema

    The documentation text is stored as Standard text.
    you can see these details in the function module->
    goto->documentation->
    you will now see a screen, there GOTO->HEADER.
    YOU will see a screen with the below details.
    Text Name       Z0MM_SCM_FNC_EVCOR_DELIVERY
    Language        EN
    Text ID         FU   Function module
    Text object     DOKU       Online Documentation
    in this case TEXT NAME = FUNCTION MODULE NAME.
    These details are stored in STXH &STXL . But you can use select from these tables. you have to use READ_TEXT to read the documentation to the program.
    regards
    srikanth

  • How to Create a Function module z_create and to track the error records?

    I want to create a function module z_create which will insert the data from the internal tables gt_model_master and gt_model  into the corresponding database custom tables y_model_master.
    Secondly if any error is encountered during the above updation, then how to track those error records ?

    HI,
    check the sy-subrc ,if it is zero the insertion is success,otherwise use 
    message class.
    if sy-subrc ne 0.
    message e052(zmessage).
    endif.
    Edited by: rakesh dhudipala on Feb 12, 2008 2:33 PM
    Edited by: rakesh dhudipala on Feb 12, 2008 2:33 PM

  • Can generic function module extractions possible with CRM data sources.

    Hi Friends,
    can generic function module extractions possible with CRM data sources.
    90% extractions are generic function module extractions.
    How is it possible without BW adapters..
    It's very urgent ...Please.
    Thanks,
    Basava Raju

    Hi Madhu,
       Just curious ... if you already have a generic FM extractor then just go into it and find out where it is reading the data from. If its reading data from the CRM system then thre is no need for any BW adapter ... just in case you need any ABAP help ... post here ... I may be of use to you.
    Best regards,
    Kazmi

  • Function Module not being displayed in the Transport Request

    Hi,
    I Created a FM "RH_ACTIVATE_WFOBJECT_AFTER_IMP"  in my SAP System. After I created due to problem in editing I have deleted the FM and also deleted it from the request.
    I have re created the function module and if I see the object directory entry I find the following
    Identical request locks
    Request              User         Task/request         Object          
                       ****            *****                       R3TR FUGR RHWS  
    In the request I cannot find the function module but only the function group. Please help me to get my function module visible in the transport request.

    Hi ,
    When your creating the FM for first timw with new FGRP then no need to worry .
    You can see only the FGRP in the transport request number and when you move this transport request to further systems your FM automatically transport with the FGRP.
    Next time when your creating a new FM under the FGRP which is already moved to production you can see only your FM name under the transport request.
    When you go to FGRP main program by follwing the path
    FGRP -> Disply FGRP in SE37 you can see the main program of the FGRP there if you see one include with TOP and XX .
    double click on the XX Include.
    there you can see allthe FM under that FGRP.
    Thanks
    Naresh

  • Need name of a function module or BAPI to update the Tax Classification val

    Hi Guru's
    Need name of a function module or BAPI to update the Tax Classification value for Material master.
    Thanks in advance.

    Hi
    U can try to use BAPI_MATERIAL_SAVEREPLICA
    Max

  • Table Name or Function Module to find out all the Screens & Subscreens for

    Hello Experts,
          Table Name or Function Module to find out all the Screens & Subscreens for all T-Codes
    Helpful Answer will b rewarded
    Arif Shaik

    Hi Balaji,
       But TSTC only Gives the Program Name , T-Code and Screen but not all the Subscreen details
    Any other which U know

  • Function module for retrieving values of the Characteristics?

    Hi,
    is there a function module for retrieving values of the Characteristics?
    will reward,
    regards,
    M.

    Hello,
    Check this.
        L_OBJECT = G_T_STPO-IDNRK.
    *--- Merkmale incl. Bewertung zum Objekt/Klassenart lesen ----------*
        CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
             EXPORTING
                  CLASSTEXT          = 'X'
                  CLASSTYPE          = '300'
                  FEATURES           = 'X'
                  LANGUAGE           = SY-LANGU
                  OBJECT             = L_OBJECT
                  INITIAL_CHARACT    = ' ' "keine unbewertete M.
                  OBJECTTABLE        = 'MARA'
                  KEY_DATE           = SY-DATUM
    *            NO_VALUE_DESCRIPT  =
                  CHANGE_SERVICE_CLF = 'X'
                  INHERITED_CHAR     = 'X'
             TABLES
                  T_CLASS            =  H_CLASS
                  T_OBJECTDATA       =  H_CLOBJDAT
             EXCEPTIONS
                  NO_CLASSIFICATION  = 1
                  NO_CLASSTYPES      = 2
                  INVALID_CLASS_TYPE = 3
                  OTHERS             = 4.
    Regards,
    Vasanth

Maybe you are looking for

  • Questions on new XServe

    Apologies for the lengthy post. We're looking to update an older dual G5 XServe to a new Nehalem model. Our current server handles file sharing (AFP & SMB) and is our OD Master (we have 5 other XServes). It's connected via Fibre to an XServe Raid con

  • Viewing Full Screen Problem

    Hello I edit using an 27 inch IMac as my main FCP screen and an older monitor to display the Browser.  When I hit Command/F12 to payback a sequence full screen, the image goes to  the secondary, inferior monitor. Can't drag the display to the higher

  • Unlock status help!

    I've been waiting almost two weeks for Apple to unlock my iPhone 4 from the current phone network/carrier, how do I find out when it will be done? Thanks in advance, Paul.

  • How do I get a new credit card to work on iTunes

    I can not add a credit card to my new iTunes. It either says I need to verify the credit card or that the security code is not valid

  • IBook update mishap

    the ibook was doing updates and in those where some system updates and the update to 10.3.9 from 10.3.4 and it appeared to be froze and i restarted it and it now when it comes up shows what apears to be os 9 type small folder in the middle of the scr