Identity(Prebably using FM) whether a class exists in a system or not?

Hi,
I want to check whether a class exists in a system or not in my program.
How can I do that?
There is a function module FUNCTION_EXISTS which tells whether a function module exists or not.
Similar one if existing for a class if any would help.
Regards,
Bikash.

Hello Bikash
I would use static method CL_OO_CLASS=>GET_INSTANCE (alternative: CL_OO_OBJECT).
If this method cannot get an instance of the class then the class does not exist.
Corresponding fm is: SEO_CLASS_GET
For interfaces you may use: CL_OO_INTERFACE of SEO_CLIF_GET
Regards
  Uwe

Similar Messages

  • How to check whether transport path exist between two systems in sld??

    Hi,
         I have two systems namely 'A' and 'B' and created business systems for both of them.Then i created transport path between the two systems.How i check whether what i have done is right in SLD.

    <b>WRT to CMS</b>
    am not sure with this but u can try:
    1. Start CMS: http://<host>:<J2EE Engine http port>/webdynpro/dispatcher/sap.com/tcSLCMS~WebUI/Cms.
    2. Goto lansdscape configurator and check there
    Message was edited by:
            Prabhu  S

  • How to Find whether  JRE is installed in a system or not ?

    I have to write an application in which I want my app to find whether jre is installed or not ?
    Can any one help in this ? My E-Mail ID is
    [email protected]
    Kumanan.

    For windows OS this is the solution.
    Find out the following key in the registry.
    HKEY_LOCALMACHINE/Software/javaSoft/Java Runtime Environment
    if the key to javasoft is there then JRE is installed and to see the version of JRE look a level down further and you will find the versions.

  • "Your script uses objects from a non-existent collection"

    I have a multiple page form with a barcode on each form.  I created a separate collection for each barcode.  The auto generated code looks fine and has the correct collection created, however I still get the error, Paper Forms Barcode error "Your script uses objects from a non-existent collection".
    I'm not sure what is wrong and I don't know how to fix it.  Anyone else run into this?

    You will need to create a shared folder in Dropbox, then populate that with what ever folders you need to organize the files. It appears the DropBox app,will not handle this, but you can do, it by logging in to you account via Safari. Once the folders are created, they will show up in the app. Likewise with designating the folders as shared. Anyone you wish to share with will need a Dropbox account. (using the public folder will not work since links out it are for files only, not folders. An odd restriction, but it is what it is).
    IF you have copies of the files on a PC, you will find that will be the easiest place to upload them from. If they are only in iBooks on the iPad, you will need to synch and use the file management function to copy them off. not sure if you can synch them back over to DropCopy within iTunes (never tried it).
    DEpending on your needs, a couple of apps to look into are iCab Mobile (a browser), and GoodReader (doc viewing and management app). Both integrate well with DropBox.

  • Transporting Process Chain - error  Source system does not exist

    Hi,
    I tried to transport a local PC by itself (not including its main meta chain) since I have only done modifications in the local PC only. In the PC, there are PSA Processing, ODS Processing, ODS Activation, ABAP Program w/ variants and Infocube Rollup.
    However, I got the following transport error: Source system does not exist
    =======
    Diagnosis
    Source system  is not known.
    System Response
    The imported data for DataSource  was deleted again because the referenced source system does not exist and no mapping is defined in table RSLOGSYSMAP on an existing productive source system.
    Procedure
    Create the referenced source system in the Data Warehousing Workbench or define mapping to a known source system in table RSLOGSYSMAP.
    You get to maintenance using Tools -> Conversion of the logical system names.
    ============
    I have checked at the table RSLOGSYSMAP and all source system mappings are in order.
    And the weird thing is, upon checking the PC itself in the transport-to box, I can activate it without any error.
    FYI, we are currently upgrading to BI Accelerator. Am not sure if this could be one of the reasons.
    Any inputs and tips are highly appreciated and will be rewarded with points accordingly.
    Thanks

    Hi,
    This error is due to the fact that the
    mapping table for the after import (RSLOGSYSMAP) is not correct maintained in PB7 system.
    You need to maintain table RSLOGSYSMAP in each system
    You can find the steps to do it in the attached note 127326:
    o  Maintain table 'RSLOGSYSMAP' in the target BW with view
       'V_RSLOGSYSMAP' and enter as 'original source system' the logical name of the source system in the source BW and as 'target source system' the logical name of the source system in the target BW.
       This maintenance is required since it allows the correct source system reference of the InfoSources to be transported.
    This source system reference in turn is absolutely necessary to activate the transfer structure.
       Example:
       Source BW with source system AAA.
       Target BW with source system BBB where the source system AAA
       corresponds to the source system BBB.
       Entry in RSLOGSYSMAP in the target BW:
       Original source system: AAA, target source system: BBB.
       Give the DDIC user in the source BW in client 000 the
       authorization profile S_RS_ALL to create BW objects.
    Cheers
    Rajesh

  • Form SYSTEM does not exist "Message no. TD 705"

    Hello all,
    When I go to transaction FB03 for any document. Drill down on a line item.  Click on pencil to change the line item.  Click on long text button.  Click on the editor icon.  Message received "Form SYSTEM does not exist".  The display is in SAPscript editor.  I am unable to change to the Word editor using menu Goto > Change Editor.   Message "Form SYSTEM does not exist" appears as the message.
    Any idea what the message "form system does not exist" and how can this be corrected?
    Thanks

    Hi,
    You encounter this problem because a the editor form needed is not available.
    Speak with your ABAPer who can help you in the same.
    Please also check if the form is activated.
    Caio
    Raghu

  • How to check whether portal user exists or not using UM API.

    Hi Experts,
    Let us say i need to create an user account "PortalUser",i know how to create an user,setting first name,lastname,password for that.
    but here before creating the portal user, i need to check whether that user exists or not.If user already exists ,then i  need to skip the below for creating the user.
    IUserFactory userFact = UMFactory.getUserFactory();
    IGroupFactory groupFact = UMFactory.getGroupFactory();
    IRoleFactory roleFact = UMFactory.getRoleFactory();
    IUser tuser = userFact.getUserByLogonID("PortalUser");
    IUserMaint newUser = userFact.newUser("PortalUser");
    newUser.setFirstName("PortalUser");
    newUser.setLastName("Test");
    newUser.setEmail("PortalUser.Testatgmaildotcom");
    //Locale PortalLanguage = new Locale(Lang.toLowerCase(), "");
    Locale PortalLang=new Locale("en");
    newUser.setLocale(PortalLang);
    newUser.save();
    newUser.commit();
    IUserAccount userAcc = UMFactory.getUserAccountFactory().newUserAccount("PortalUser", newUser.getUniqueID());
    userAcc.setPassword("test1test$");
    userAcc.save();
    userAcc.commit();     
    Thanks in advance.
    Thanks
    Sony.

    Hi,
    Try this code,
    IUserFactory factory = UMFactory.getUserFactory();
    IUser user = factory.getUserByLogonID(userId);
    lastName = user.getLastName();
    firstName = user.getFirstName();
    refer this pdf,its very helpful
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/webinars-nw-rig/using%20the%20user%20management%20api%20with%20ep%20applications%20-%20webinar%20powerpoint.pdf
    Regards,
    Sunaina Reddy T

  • Just started out using Collections, Verifying Whether a Collection Exists

    What do I query to see if a collection exists? When it hasn't got any members, yet?
    Pete

    Okay, am somewhat closer:
    Verifying Whether a Collection Exists
    Use COLLECTION_EXISTS to determine if a collection exists. For example:
    l_exists := HTMLDB_COLLECTION.COLLECTION_EXISTS (
    p_collection_name => collection name );
    What kind of value does this function return? How do I check this, am not sofar into pl/sql.
    If I want to make the creation of a collection conditional, only execute the creation when it doesn't exist. How do I do this?
    Please help.
    Pete
    Message was edited by:
    Pete

  • How to test whether a table exists in database?

    How can I test whether a table exists in a database before I execute a query? If the table doesn't exist, I want first create a default table with certain name so that I can always display something in JTable.
    Thanks!

    Hi,
    There are tow ways :
    The first one is :
    - load the list of tables of the Database in a Vector for exemple by using methode DatabaseMetaData.getTables () and you can test if the table exist or not in the vector by using methode Vector.contains(Object o).
    The code seems Like that :
    // Loading List Of Tables
    // you need to load the list of tables at the begening of
    // your class
    Vector listOfTables = new Vector();
    try
    rs = yourConnection.getMetaData().getTables();
    while (rs.next())
    listOfTables.addElement(rs.getString(3));
    catch(SQLException exp)
    // When you need to test the existance of table name
    // you add this line
    if(listOfTables.contains(tableName))
    // your code
    The second one :
    try
    //execute your query
    catch
    //Create your default JTable
    I hope that my response can help you!
    Ciaou,
    Anis

  • Checking to see whether a user exists in a Windows Active Directory

    I have a little java applet that has to run through a large list of users, and for one of its tasks, it has to check to see whether that user exists. Mostly this is the same as running with local users, with the one exception that I can't just check to see if a home directory exists.
    Right now I am checking the return code from "net user <username>", but executing this program for every potential user is extremely slow.
    Are any java facilities to deal with users on the local system? If not, does anyone else have any suggestions?
    Also, a note for any responses- I'm using java to get around the lack of any easy way to set up a good scripting environment on Windows. I have a completed tool, and I don't want to rewrite it.

    <sarcasm>
    I seem to remember this service - what's it called? Ah, Google. Yes.
    </sarcasm>
    Try http://www.google.com/search?q=java+active+directory+query

  • Loadjava error: ORA-29540: class oracle/aurora/rdbms/DbmsJava does not exist

    Hi,
    I'm trying to create a simple Java stored procedure running 8.1.6. When using loadjava (c:\jdk1.2.2\bin\java -classpath .;d:\orant8i\lib\aurora_client.jar;d:\orant8i\javavm\lib\aurora.zip;d:\orant8i\sqlj\lib\translator.zip;d:\orant8i\jdbc\lib\classes111.zip oracle.aurora.server.tools.loadjava.LoadJavaMain -u system/manager -f -v Test.class), I get the above error. The problem: file DbmsJava exists in the included aurora.zip package. To verify this, I checked the zip file, and I successfully compiled a test program importing the class.
    Any ideas?
    Thanks,
    Bernd

    I also tried another approach to create a Java stored procedure, and got an error which I think has the same cause as above:
    public class Test { public static void test() {System.out.println("Test");}}
    create directory dir as 'C:\Test';
    create java class using bfile(dir, 'Test.class');
    create procedure test is language java name 'Test.test()';
    call test();
    ORA-29541: class CM.Test could not be resolved

  • What determines whether a class is available to be added?

    When I am trying to create MetaData, I get to the Choose Classes dialog. I hit the ellipsis and a choice of classes is presented to me. However only some classes in the folder whether the classes reside are available to me. Why is this?

    Sure..
    When you don't know the material code or if you don't have any material master record, then you just do use the short tecx at item overview...Press enter...System will ask you to enter other details like material group, account assignment catagory. etc....
    So now as you have not described the material number/code, system takes it as consumption material along with the account assignment cat. defined there to post to consumption account...
    Regards
    Priyanka.P

  • How to Use Pattern and Matcher class.

    HI Guys,
    I am just trying to use Pattern and Matcher classes for my requirement.
    My requirement is :- It should allow the numbers from 1-7 followed by a comma(,) again followed by the numbers from
    1-7. For example:- 1,2,3,4,5 or 3,6,1 or 7,1,3 something like that.
    But it should not allow 0,8 and 9. And also it should not allow any Alphabets and special characters except comma(,).
    I have written some thing like..
    Pattern p = Pattern.compile("([1-7])+([\\,])?([1-7])?");
    Is there any problem with this pattern ??
    Please help out..
    I am new to pattern matching concept..
    Thanks and regards
    Sudheer

    ok guys, this is how my code looks like..
    class  PatternTest
         public static void main(String[] args)
              System.out.println("Hello World!");
              String input = args[0];
              Pattern p = Pattern.compile("([1-7]{1},?)+");
              Matcher m = p.matcher(input);
              if(m.find()) {
                   System.out.println("Pattern Found");
              } else {
                   System.out.println("Invalid pattern");
    }if I enter 8,1,3 its accepting and saying Pattern Found..
    Please correct me if I am wrong.
    Actually this is the test code I am presenting here.. I original requirement is..I will be uploading an excel sheets containg 10 columns and n rows.
    In one of my column, I need to test whether the data in that column is between 1-7 or not..If I get a value consisting of numbers other than 1-7..Then I should
    display him the msg..
    Thanks and regards
    Sudheer

  • 'CL_BATCH_EVENT' class exist in ECC 5.0

    Hi experts,
    Can any one tell me and help me class "'CL_BATCH_EVENT'.
        with methodname = 'CREATE'. in ECC 5.0  system.
    Please check your system and let me know if it is exist if not tell me not..
    looking for confirmation..
    Thanks
    sailu

    Can any one please give me a confirmation about this class 'CL_BATCH_EVENT'  and method name "Create"  whether it is exist in ecc 5.0 or not.

  • How to check whether a file exist in the program folder or not?

    Hi guys,
    how to check whether a file exist in the program folder or not? Let is say i recieve a file name from user then i want to know if the file is there not and act on that base.
    abdul

    Look at the class java.io.File and the .exists() method:
    http://java.sun.com/j2se/1.4/docs/api/java/io/File.html

Maybe you are looking for