Read source code in BAdi

Hi All,
Is there any syntax or method to read the source code contains in a BAdi? Which is similar to the functionality of syntax READ REPORT which is use to read the source code in a program.
I need to read the source code and then look for particular syntax in it by a keyword.
Thanks.

This snipped of my scan report might be helpful....
Cheers
carsten
Get Interface Name for BADIs
    SELECT * FROM sxs_inter INTO TABLE gt_sxs_inter
        WHERE exit_name IN s_badi.
    CHECK sy-subrc EQ 0.
Get Implementation Names for BADIs
    SELECT * FROM sxc_exit INTO TABLE gt_sxc_exit
        FOR ALL ENTRIES IN gt_sxs_inter
        WHERE exit_name EQ gt_sxs_inter-exit_name.
Get implemented Classes for Interfaces
    SELECT * FROM sxc_class INTO TABLE gt_sxc_class
        FOR ALL ENTRIES IN gt_sxs_inter
        WHERE inter_name EQ gt_sxs_inter-inter_name.
Get Methods for Interfaces
    LOOP AT gt_sxs_inter.
      gv_cifkey = gt_sxs_inter-inter_name.
      CALL FUNCTION 'SEO_METHOD_READ_ALL'
        EXPORTING
          cifkey            = gv_cifkey
        IMPORTING
          methods           = gt_meth1[]
        EXCEPTIONS
          clif_not_existing = 1
          OTHERS            = 2.
      APPEND LINES OF gt_meth1 TO gt_meth.              .
    ENDLOOP.
    gt_meth1[] = gt_meth[].
    CLEAR: gt_meth, gt_meth[].
    LOOP AT gt_sxs_inter.
      LOOP AT gt_sxc_class
          WHERE inter_name EQ gt_sxs_inter-inter_name.
        LOOP AT gt_meth1
            WHERE clsname EQ gt_sxs_inter-inter_name.
Get Include names for Interface Methods
          gt_meth-clsname = gt_sxc_class-imp_class.
          CONCATENATE gt_meth1-clsname '~' gt_meth1-cmpname
              INTO gt_meth-cmpname.
          APPEND gt_meth.
Makro METHOD_TO_INCLUDE ?
         SYSTEM-CALL QUERY METHOD gs_mtdkey-cpdname
             OF CLASS gs_mtdkey-clsname
             INCLUDE INTO gv_filenam. " NO DBLOCK. "470
         if gv_filenam ne space.
           s_repid-low = gv_filenam.
           s_repid-option = 'EQ'.
           s_repid-sign = 'I'.
           append s_repid.
         endif.
        ENDLOOP.
      ENDLOOP.
    ENDLOOP.
  ENDIF.
  LOOP AT gt_meth.
    gs_mtdkey-clsname = gt_meth-clsname.
    gs_mtdkey-cpdname = gt_meth-cmpname.
Makro METHOD_TO_INCLUDE ?
    SYSTEM-CALL QUERY METHOD gs_mtdkey-cpdname
        OF CLASS gs_mtdkey-clsname
        INCLUDE INTO gv_filenam. " NO DBLOCK. "470
    IF sy-subrc EQ 0.
      APPEND gv_filenam TO gt_incl.
    READ REPORT gv_filenam INTO gt_source.
      PERFORM read_report USING gv_filenam.
      PERFORM scan_source TABLES gt_source
                USING gv_filenam '' gt_meth-clsname gt_meth-cmpname
                gv_filenam 'METH' 0.
      IF p_hist NE space.
        PERFORM scan_hist_source USING gt_meth-clsname
              gt_meth-cmpname gv_filenam 'METH'.
      ENDIF.
    ENDIF.
Find 'hidden' (redefinitons etc) methods via
TRDIR-includes for class not yet found
    AT END OF clsname.
      PERFORM check_incl_meth USING gt_meth-clsname.
      LOOP AT gt_incl.
        gv_prognam = gt_incl.
        gs_clskey-clsname = gt_meth-clsname.
Get MethName via Include
        SYSTEM-CALL QUERY METHOD INCLUDE FROM gv_prognam
          CLASS INTO gs_clskey-clsname
          METHOD INTO gv_mtdname.
        CHECK sy-subrc EQ 0.
        READ REPORT gt_incl INTO gt_source.
      perform read_report using gt_incl.
        PERFORM scan_source TABLES gt_source
                  USING gt_incl '' gt_meth-clsname gv_mtdname
                  gt_incl 'METH' 0.
        IF p_hist NE space.
          PERFORM scan_hist_source USING gt_meth-clsname
                gv_mtdname gt_incl 'METH'.
        ENDIF.
      ENDLOOP.
      REFRESH gt_incl.
    ENDAT.
  ENDLOOP.

Similar Messages

  • Dynamic-side Box? Can't read source code with java

    Hi all,
    I am trying to read a source code of a web page with a java program. I can connect to the page and read a part of the source code without any problems however after a while when it comes to a part where mozilla and opera identifies as "dynamic-side box" my java program fails to read the source code and stops reading the rest of the page.
    Here is the part of the output I get from mozilla:
    <body id="city">
              <script type="text/javascript" src="/js/wz_tooltip.js"></script>
              <div id="container">
                   <div id="container2">
                        <div id="header">
                             <h1>Ikariam</h1>
                             <h2>Antik �a&#287;&#305; Ya&#351;a!</h2>
                        </div>
    <div id="breadcrumbs"><h3>Bulundu&#287;un nokta:</h3><a href="?view=worldmap_iso&islandX=78&islandY=80" title="D�nya haritas&#305;na d�n"><img src="skin/layout/icon-world.gif" alt="D�nya" /></a> > <a href="?view=island&id=2444" class="island" title="Adaya d�n">Sterios[78:80]</a> > <span class="city">ProPolis</span></div><!-- -------------------------------------------------------------------------------------
         ///////////////////////////// dynamic side-boxes. //////////////////////////////////
         //////////////////////////////////////////////////////////////////////////////////// -->
         <div id="information" class="dynamic">
              <h3 class="header">Info</h3>
              <div class="content">And here is the corresponding part in java console output:
    <div id="breadcrumbs">
        <h3>Bulundu&#287;un nokta:</h3>
         <span class="textLabel">Hata!</span>
    </div>
    <div id="information" class="dynamic"></div>
    <div id="mainview">
        <div class="buildingDescription">
            <h1>Hata!</h1>
        </div>
        <div class="contentBox01h">
            <h3 class="header"><span class="textLabel">Hata mesaj&#305;</span></h3>
            <div class="content">
                <ul class="h�bsch">
    <li><a href="http://ikariam.net"></a></li>            </ul>
            </div><!-- end #content -->
            <div class="footer"></div>
        </div><!-- end #contentbox -->
    </div><!-- end #mainview -->Is there a way to skip this dynamic-side boxes in java. Because I need to read an information that is located at the near end of the source code however since it stops when it hits to a dynamic-side box I can't.
    Thanks in advance, regards...

    Hi,
    That is what I was trying in deed! I was trying with a Scanner but I also tried with the link you have given. That also failed. Somehow java stops reading the source when it hits "dynamic-side box". However there has to be a way to skip this. If mozilla can do that, I know that java also can. I wonder how....
    Cheers...

  • Read Source Codes

    hi,
    as we know, to read a program''s source, we use the statement READ REPORT .....
    now my question is, how about on function modules?
    how do i read a function module's source code? 
    thanks!

    Hello,
    Try this code:
    DATA: V_PNAME TYPE PNAME,
          V_INCL TYPE INCLUDENR,
          V_REPID TYPE SY-REPID,
          ITAB TYPE TABLE OF STRING,
          WA TYPE STRING.
    PARAMETERS: P_FNAME LIKE TFDIR-FUNCNAME.
    SELECT SINGLE PNAME INCLUDE
      INTO (V_PNAME,V_INCL)
      FROM TFDIR
      WHERE FUNCNAME = P_FNAME.
    IF SY-SUBRC = 0.
      CONCATENATE V_PNAME 'U' V_INCL INTO V_REPID.
      V_REPID = V_REPID+3.
    ENDIF.
    TRY.
        READ REPORT V_REPID INTO ITAB.
      CATCH CX_SY_READ_SRC_LINE_TOO_LONG .
    ENDTRY.
    IF SY-SUBRC = 0.
      WRITE: 'Report is read. Hurray !!!'.
      LOOP AT ITAB INTO WA.
        WRITE / WA.
      ENDLOOP.
    ENDIF.
    Why did i concatenate 'U' to the variable V_REPID & remove the first 3 characters (which were 'SAP') before using READ REPORT ?
    1. For using READ REPORT on include programs SAP says:
    To use the READ REPORT statement for programs that are organized in framework programs and Include programs when created in the ABAP Workbench, you need to know exactly how the programs are structured as well as their names.
    The names of the framework programs for class pools and function group do not match the names of the global class and function group (see CLASS-POOL and FUNCTION-POOL statements).
    2. On how the include programs are arranged in a function group read this : [http://help.sap.com/abapdocu_70/en/ABAPFUNCTION-POOL.htm|http://help.sap.com/abapdocu_70/en/ABAPFUNCTION-POOL.htm]

  • Read source code of a method

    There's still one thing that i can't do, how can i read a source code of a method. Ex: read report '...~...' into .... .
    Maybe the answer is in your previously answer, but my english....
    thanks for wasting all this time with me.

    I don't know the exact table but methods are stored in program names like these:
    CL_GUI_CFW====================CM001
    CL_GUI_CFW====================CM002
    CL_GUI_CFW====================CM003
    Regards
    Vilmos

  • How to read source code in Safari?

    How do I read a web page source code using Safari?
    Thanks.

    Safari > Preferences > Advanced > Show Develop in menu bar
    then
    Develop > Show Page Source

  • Read Source code of a Web Page

    Hi,
    Could anyone suggest an ABAP Function module which when given a web page URL as input downloads the source code of the web page into an internal table. Thanks.
    Regards,
    Prabaharan.

    Hi,
    Chek this link:
    Extracting data from a HTML / XML web page
    Hope it helps you.
    Pleae reward helpful answers.
    Best Regards,
    Anjali

  • OIC: Need to find the Source Code for the YTDSummary.java file

    Hi All,
    We have 11.5.10 implemention and we are using the OIC(Incentive Compensation) Application. In the Report Module for the Year-To-Date Summary we need look for the Java Source Code.The cnytdsum.jsp file call the YTDSummary.java file. We have teh following question
    1. How we can get the Java Source Code and where and which directory we need to look into?
    2. Let say if we need to customize the java file how we can do that?
    3. where and which directory we have to complie the java file?
    Highly appreciate for any pointers
    Thanks,
    Johnson.

    But those must be platform dependant, not really that
    interesting to look at. I have never felt any need to
    look at those at least.Wake up and smell the coffee, abbie! I read the source code all the time and constantly tell my students to do that, too.
    1. Java source code is not platform dependent. The original poster wanted to look at linked list code, how could that be platform dependent?
    2. It is the implementation of the SDK APIs, so by definition it is implementation dependent code, liable to change in a later version. So don't assume anything beyond what is claimed in the API documentation. However, sometimes the documentation is incomplete or ambiguous to you, and reading the source can provide some insight, however implementation dependent. (Light a candle or curse the darkness.)
    3. Why read source code? It's a good way to learn how to program. You see something in the API and ask: how'd they do that? Or you realize you want to do something broadly similar, but you can't reuse the source code.
    For example, Images are not Serializable, but suppose you want a small image that is part of an object to be serialized with the rest of the object without too much fuss (ie, without using javax.imageio). You notice ImageIcon is serializable, so you use it. (An ImageIcon has-an Image.) Then you wonder: how'd they do that? You read the source and then you know.
    You live, you learn,
    Nax

  • Need to find the source code for java.util.LinkedList

    Hello all,
    I'm new to the forums and I actually need the LinkedList source file as well as all the source files for all Java packages and libraries. Please post a link here if you can, or email me at [email protected]
    Thanks again!
    copter_man

    But those must be platform dependant, not really that
    interesting to look at. I have never felt any need to
    look at those at least.Wake up and smell the coffee, abbie! I read the source code all the time and constantly tell my students to do that, too.
    1. Java source code is not platform dependent. The original poster wanted to look at linked list code, how could that be platform dependent?
    2. It is the implementation of the SDK APIs, so by definition it is implementation dependent code, liable to change in a later version. So don't assume anything beyond what is claimed in the API documentation. However, sometimes the documentation is incomplete or ambiguous to you, and reading the source can provide some insight, however implementation dependent. (Light a candle or curse the darkness.)
    3. Why read source code? It's a good way to learn how to program. You see something in the API and ask: how'd they do that? Or you realize you want to do something broadly similar, but you can't reuse the source code.
    For example, Images are not Serializable, but suppose you want a small image that is part of an object to be serialized with the rest of the object without too much fuss (ie, without using javax.imageio). You notice ImageIcon is serializable, so you use it. (An ImageIcon has-an Image.) Then you wonder: how'd they do that? You read the source and then you know.
    You live, you learn,
    Nax

  • How can I make my source code with jar file?

    I use JDK1.6.0. I can open a class file from rt.jar and get its source code. Does this because open source JDK? I wander how I can make my jar file with source code.

    CeciNEstPasUnProgrammeur wrote:
    youhaodiyi wrote:
    But why I can read source code from rt.jar? I found there are only class files in it.I say it's highly likely that you can't and your IDE's settings rather automatically refer to the src.zip file in the JDK's directory.I see. That's true. I use eclipse as the source code reader. It may refer to the source code zip file automatically.
    Thanks all.

  • How can I print source code with connecting lines on control structures?

    Anyone know of any programs that will format source code printouts and print connecting lines from the start to the end of control structures (such as: if--"end if", while-"end while" etc.)?

    Indentations and comments do help read source code. However, when you have a large program with many levels of nesting of control structures the readability of the code (even with indentations) becomes very difficult.

  • 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 to read the Java source code (in Netbeans)

    I use OS X10.5.5, NetBeans 6.1 and JSE 6 on a 64 bit mac.
    When I downloaded NB6.1 it had JSE 5 as it's default (and only) java platform. I ran Software Update to get Java 6 from Apple, used the Java Prefrences utitlity to set JSE6 as default. In NB I added the JDK6 platform, registered the JDK6 javadocs and noticed that I also have the option of registering the Java source code.
    I have three questions:
    1) How do I make JDK6 the default in NetBeans. The JDK5 keeps being default after I did the steps above and I don't see anywhere to change that.
    2) How do I read the Java 6 source code? I can see sun provides [source code| http://download.java.net/jdk6/] for their supported platforms. I dont see Apple doing the same for its JDK port. What would I need to do to get to read the java SE6 sources? or is it actually hiding somewhere in the /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home hierarchy?
    3) Where does the JVM look for the binary code to run when I make a call to, say java.util.ArrayList or any other library. In my naivety I would have assumed it would be a .class file somewhere in the java Home folder, but I don't see anything like it.
    thanks in advance,
    chris

    This is taken from the help included with netbeans. In response to question 1.
    By default, the IDE uses the version of the Java SE platform (JDK) with which the IDE runs as the default Java platform
    for compilation, execution, and debugging. You can view your IDE's JDK version by choosing Help > About and clicking the
    Detail tab. The JDK version is listed in the Java field.
    You can run the IDE with a different JDK version by starting the IDE with the --jdkhome jdk-home-dir switch on the command line
    or in your IDE-HOME/etc/netbeans.conf file. For more information, see IDE Startup Parameters.
    In the IDE, you can register multiple Java platforms and attach Javadoc and source code to each platform. For example, if you
    want to work with the new features introduced in JDK 5.0, you would either run the IDE on JDK 5.0 or register JDK 5.0 as a
    platform and attach the source code and Javadoc to the platform.
    In  , you can switch the target JDK in the Project Properties dialog box. In  , you have to set the target JDK in the Ant script itself,
    then specify the source/binary format in the Project Properties dialog box.
    To register a new Java platform:
    Choose Tools > Java Platforms from the main window.
    Click New Platform and select the directory that contains the Java platform. Java platform directories are marked with a  
    in the file chooser.
    Use the Sources and Javadoc tabs to attach Javadoc documentation and source code for debugging to the platform.
    Click Close.
    To set the default Java platform for a standard project:
    Right-click the project's root node in the Projects window and choose Properties.
    In the Project Properties dialog box, select the Libraries node in the left pane.
    Choose the desired Java platform in the Java Platform combo box.
    Switching the target JDK for a standard project does the following:
    Offers the new target JDK's classes for code completion.
    If available, displays the target JDK's source code and Javadoc documentation.
    Uses the target JDK's executables (javac and java) to compile and execute your application.
    Compiles your source code against the target JDK's libraries.
    If you want to register additional Java platforms with the IDE, you can do so by clicking the Manage Platforms button.
    Then click the Add Platform button and navigate to the desired platform.
    To set the target Java platform for a free-form project:
    In your Ant script, set the target JDK as desired in the javac, java, and javadoc tasks.
    Right-click the project's root node in the Projects window and choose Properties.
    In the Sources panel, set the level of JDK you want your application to be run on in the Source/Binary Format combo box.
    When you access Javadoc or source code for JDK classes, the IDE searches the Java platforms registered in the
    Java Platform Manager for a platform with a matching version number. If no matching platform is found, the IDE's default platform is used instead.
    See Also
    Managing the Classpath
    Declaring the Classpath in a Free-Form Project
    Stepping Through Your Program
    Legal Notices

  • ABAP WD, Read the source code of a html page

    Hi all,
    I have the URL link of .jsp page and I want to get the source code generated by this page to extract some data for my web dynpro.
    How do i solve this?
    Thanks

    Hi Antonio,
    not sure if i understand the question properly.
    You want to read html content of http site rendered via jsp.
    You can use cl_http_client
    to write a simple http client tool.
    This tool opens the page.  The html content is available to this class.
    You can extract the content here.
    See the attribute 'response' after making a call.
    regards
    Phil.

  • How to read the source code

    Hi,
    I want to know how to read the source code of web dynpro java from the source folder i.e. without loading the project in NWDS. Please answer me as soon as possible.
    Thanks & Regards,
    Aniruddha

    Hi,
    If you are using DC's then you can find the .Java files in the path
    <project Name>\_comp\gen_wdp\packages\<Pacjage>\<ComponentName>\..
    In the above path you can find the Java files of the controllers.
    Thanks,
    Raju Bonagiri

  • Visual basic 6.0 source code for reading DAQ 6015 USB

    I am doing a specific software in Visual Basic 6.0 to measure some characteristics of a filter.
    To do that I use a NI DAQ 6015 for USB; I need to drive a pressure controller by an analogic output with an increasing (step by step) tension DC.
    Can anyone give me the source code to do this.
    It seems that I have another problem : the sensors give me a right tension DC, but after the MAX software gives me always +10 Volts : is it a malfunction of the card or of the software; in this last case, can anyone give me the good code.
    Thanks a lot.

    Hello!
    Visual Basic 6.0 is now supported by NI-DAQmx 7.5, so you can directly use the NI-DAQmx drivers to use your DAQPad-6015.
    You can find an analog output example in the following folder "C:\Program Files\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\Analog Out\Generate Voltage\Cont Gen Volt Wfm-Int Clk". This will show you how to generate a continuous waveform.
    Concerning the voltage that is at 10 volts, it looks like you misconfigure the external connection. You should take a look at the NI-DAQmx help file in the section "Measurement Fundamentals >> Signals >> Analog >> Connecting Analog Input Signals" to check that you use the correct configuration.
    Best regards!

Maybe you are looking for

  • Cairo-dock 2.2.0

    Updating with $yaourt -Syu --aur, I get a possible update: aur/cairo-dock-plug-ins 2.1.3-9 -> 2.2.0-4 Then, calling for its compilation, one of dependances "cairo-dock=2.2.0" has to be updated too. but later on, it wants to re-install the current ver

  • Backup to a mapped drive on another server

    Backup to a mapped drive on another server I am trying to backup to another windows 2003 server through enterprise manager. I can have the jobs save locally without any problem but cannot save to a mapped drive on another server, I know it should be

  • I cannot change my phone number. NEED HELP!!!!

    I want to change my phone number, but the website always told me"The activity you are trying to perform is currently unavailable. Please try again later." What can I do for it?

  • Deleting Old Versions of iTunes?

    I have multiple versions of iTunes on my computer and I'm wondering if I can delete the older ones after installing the new updates. It seems to me that all they are doing is taking up space, but I don't want to delete them if it will cause problems

  • InDesign CS3 Silent Installation Language Issue

    We install InDesign CS3 via silent Install following Adobe guidelines using Enteo Netinstall for the automatic deployment:<br />Setup.exe --mode=Silent --deploymentFile="dir\install.xml"<br /><br />Contents of the "install.xml":<br /><?xml version="1