Can you call a class method as an RFC function

Hi
I would like to know whether it is possible to instantiate a class in another system via RFC and then call a method eg. cl_abap_typedescr=>describe_by_name, of that class in the other system like you can with an RFC enabled function.
Thanks
Faaiez

Its not possible to call a method like RFC.
What you could do is write a RFC and within that instantiate the class and call desired method .
And now you can call this RFC from the other system.
Regards
Raja

Similar Messages

  • Can you call a public method in a custom skin?

    I made a custom skin for a button. In the skin there's a method to change some text. Can I call this method from my application?
    I get an error message when I try to call it like a normal object:
    uploadNewBtn.setNewPhotosLabel("test");
    Error 1061: Call to a possibly undefined method setNewPhotosLabel through a reference with static type spark.components:Button.

    You said it yourself, the method is inside skin not the HostComponent (button in your case). Obviously you cannot call it.
    There is a skin protperty inside SkinnableComponent, but it is typed as UIComponent so you still cannot cal it on the skin without casting. I don't know your use case, so in theory you either push the text/label from the host towards the skin, or you listen or bind from the skin on the hostcomponent.
    C

  • How can I call a servlet method from a javascript function

    I want to call l a servlet method from a javascript function.
    Does any one have an example of code.
    Thinks in advance

    Actually, as long as the servlet returns valid javascript, you can indeed "call it" from the client. It will initiate a request and return the result to the browser.
    This example uses Perl, but it could be easily modified to go to a servlet instead.
    Note that it is only supported in DOM browsers (IE6+/NN6+/etc)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
    <html>
    <head>
    <title> Test server-side JS </title>
    </head>
    <body>
    <script type="text/javascript">
    function checkIt(variable, value)
    var newScript = "cgi-bin/validateJS.cgi?"+variable+"="+value;
    var body = document.getElementsByTagName('body').item(0)
    var scriptTag = document.getElementById('loadScript');
    if(scriptTag) body.removeChild(scriptTag);
    script = document.createElement('script');
    script.src = newScript;
         script.type = 'text/javascript';
         script.id = 'loadScript';
         body.appendChild(script)
    </script>
    <p>Test.</p>
    <form id="f1" action="">
    <input type="text" name="t1" id="t1" onChange="checkIt(this.name, this.value)">
    </body>
    </html>
    validateJS.cgi
    #!/opt/x11r6/bin/perl
    use CGI qw(:all);
    my @valArray = split(/=/,$ENV{QUERY_STRING});
    print "Content-type: text/javascript\n\n";
    # myPass is the password
    $myPass = "foobar";
    if ("$valArray[1]" eq "$myPass")
    print "alert(\"Success!!\")";
    else
    print "alert(\"Failure!!\")";

  • Can we call super class method from Overwrite method using SUPER keyword

    Hi All,
    For one of our requirement , I need to overwrite "Process Event" method of a feeder class  ,where process event is present is protected method. so when we are making a call , then its saying
    "Method  "process event"  is unknown or Protected  or PRIVATE ".
        But we are just copied the source code in the "Process Event" method to the Overwrite method.
    Can anyone provide me the clarification , why system behaving like this.
    Thanks
    Channa

    Hi,
    I think you can not.
    Because, only public attributes can be inherited and they will remain public in the subclass.
    for further detail check,
    http://help.sap.com/saphelp_nw70/helpdata/en/1d/df5f57127111d3b9390000e8353423/content.htm
    regards,
    Anirban

  • Can we call a static method without mentioning the class name

    public class Stuff {
         public static final int MY_CONSTANT = 5;
         public static int doStuff(int x){ return (x++)*x;}
    import xcom.Stuff.*;
    import java.lang.System.out;
    class User {
       public static void main(String[] args){
       new User().go();
       void go(){out.println(doStuff(MY_CONSTANT));}
    }Will the above code compile?
    can be call a static method without mentioning the class name?

    Yes, why do it simply?
    pksingh79 wrote:
    call a static method without mentioning the class name?For a given value of   "without mentioning the class name".
        public static Object invokeStaticMethod(String className, String methodName, Object[] args) throws Exception {
            Class<?>[] types = new Class<?>[args.length];
            for(int i=0;i<args.length;++i) types[i] = args==null?Object.class:args[i].getClass();
    return Class.forName(className).getDeclaredMethod(methodName,types).invoke(null,args);

  • Is it possible to call a class method using pattern in ABAP editor.

    Hi,
         Is it possible to call a class method using pattern in ABAP editor.
    Thank U for Ur time.
    Cheers,
    Sam

    Yes,
    Click patterns.
    Then choose Abap objects patterns.
    Click on the Tick
    It will give a new screen
    Here Give the name of the class first.
    Then the object (instance of the calss)
    And finally the method ..
    it will give you the pattern
    Hope this helps.

  • Can we call a BO method directly

    Hi all,
    Can we call a BO method  explicitly in a program .
    e.g. can i  call the method approve of the  FORMABSENC BO.
    Regards,
    Sateesh.

    Of course you can. You just need to include the macros include so you can create objects and call the methods. If you are not familiar with the different macros, just browse through <CNTN01> to find what you need. There is documentation in the code.
    You will probably need at least the following four macros
    SWC_CREATE_OBJECT to create an object from its type and key.
    SWC_SET_ELEMENT one or more times to fill the container with appropriate parameters.
    SWC_CALL_METHOD to call the method.
    SWC_GET_ELEMENT one or more times to retrieve returned parameters.
    Note that SWC_SET_ELEMENT does not work for table parametes, use SWC_SET_TABLE instead.

  • Calling up class methods

    I suffer problems understanding how to call up class methods from within my programs and would like to see further examples of coding and a lending hand with the problem below, program one ProductClass works out stock item lines of a product, the program then needs to ask for the StaticProduct Class(the second program attached) to check for a valid barcode length and for how many odds and even numbers are within it a valid barcode would be 5000127062092
    I would very much appreciate some help:
    * This is a program to Enter and check product codes and prices
    * and give a summary of values at the end
    * @author (Jeffrey Jones)
    * @version (version 2 5th April 2003)
    public class ProcessProduct
    public static void main(String args[])
    StaticProduct Product = new StaticProduct();
    //declare variables
    String manuf;
    String name;
    int sLength;
    String p;
    String barcode;
    int price;
    int quantity;
    int totalPrice=0;
    int transactions=1;
    int totalQuantity=0;
    int totalValue=0;
    int averageCost=0;
    //Input Details
    System.out.print("Enter Product Manufacturer : ");
    manuf = UserInput.readString();
    //start of while loop checking for 0 to exit loop
    while (!manuf.equals("0"))
    System.out.print("Enter Product Name : ");
    name = UserInput.readString();
    System.out.print("Enter Bar Code : ");
    barcode = UserInput.readString();
    //check for invalid data
    if (StaticProduct.isValidBarcode(barcode))
    {barcode = new code();
                        p = new Product("manuf","name","quantity","price");
                        }//closing bracket of if
    else
    {//error handling
    }//closing bracket of if
    //check for quantity input and errors
    System.out.print("Enter Quantity : ");
    quantity = UserInput.readInt();
    if (quantity<=0)
    { System.out.print(" Error, invalid value ");
    System.exit(0);
    }// check for invalid entries
    System.out.print("Enter Price :");
    price = UserInput.readInt();
    //check for price input and errors
    if (price<=0)
    { System.out.print(" Error, invalid value ");
    }// check for invalid entries
    //total price value
    totalPrice=price*quantity;
    //Output of correctly inputted data
    System.out.println(manuf+":"+name+":"+barcode+":"+price);
    System.out.println(quantity+" @ "+price+" = "+totalPrice);
    //update variables quantities
    //update total quantity
    totalQuantity = (totalQuantity + quantity);
    //keep count of total value
    totalValue = (totalValue + totalPrice);
    //keep count of totqal no of transactions
    transactions = (transactions++);
    //Input Details
    System.out.print("Enter Product Manufacturer : ");
    manuf = UserInput.readString();
    }//closure of loop
    //display final totals
    System.out.println("Transactions: "+transactions);
    System.out.println("Total quantity: "+totalQuantity);
    System.out.println("Total value: "+totalValue);
    System.out.println("Average Cost: "+totalValue/totalQuantity);
    System.exit(0);
    }//closing bracket input and output of data
    }//end class
    * Write a description of class StaticProduct here.
    * @author Jeffrey Jones
    * @version 1 1st April 2003
    public class StaticProduct
    * isValidBarcode method - to check for correct barcode and length
    * @return boolean
    public static boolean isValidBarcode(String barcode) {
    barcode = new barcode();
    // validateBarcode length
    if ( barcode.length() != 13 ) {
    System.out.println("Invalid barcode " + barcode + " not 13 characters");
    return false;
    }//if
    for ( int i = 0; i < barcode.length(); i++ ){// Check every char a digit
    if ( ! Character.isDigit( barcode.charAt(i) ) ){
    System.out.println("Invalid barcode " + barcode + " not all digits");
    return false;
    }//if
    }//endfor
    int sum1 = 0; // Sum first + third + etc.
    for ( int i = 0; i < barcode.length() - 1; i += 2 ){
    sum1 += barcode.charAt(i) - '0';
    }//endfor
    int sum2 = 0; // Sum second + fourth + etc.
    for ( int i = 1; i < barcode.length() - 1; i += 2 ){
    sum2 += barcode.charAt(i) - '0';
    }//endfor
    int check = sum1 + 3 * sum2; // 1st sum + three times 2nd sum.
    check = check % 10; // Remainder on division by 10.
    if ( check != 0 ){
    check = 10 - check;
    }//endif
    if (check != barcode.charAt(12) - '0'){
    System.out.println("Invalid barcode " + barcode + " check digit error");
    }//endif
    return ( check == barcode.charAt(12) - '0' );
    }//end isValidBarcode
    public static void main(String[] argv) {
    System.out.println(isValidBarcode("1234567890123"));
    System.out.println(isValidBarcode("123"));
    System.out.println(isValidBarcode(""));
    System.out.println(isValidBarcode("5018374496652"));
    }//end main
    }//end class

    Read through your text book or some java tutorials from this site to understand what classes are, what are methods, etc.
    Your program is full of wrong initializations (as you rightly said you dont understand how to call up class method I would add that you dont understand how to call classes and what do they return e.g.
    You have declared
    String p;
    then you go ahead and do this
    p = new Product("manuf","name","quantity","price"); This is syntax for calling a class is this class returning a String? :s
    Please go through the basics of Object Oriented Programming and then start with the coding part else you will face such very many difficulties and waste more time of yours in just coding with no results.
    Look for the tutorials on this site and read through them and do example as given in them.

  • How can I call the create method in BO from Application Service

    Hello!
    When I create a Business Object, CAF generates some methods automatically.
    How can I call the create method in the BO from Application Service logic?
    When i call the method then the entityManager and the sessionContext is NULL.
    How can I initialize this?
    Can anybody help me?
    Thanks, Thomas

    If you are using CE 7.11...
    1) In the Application Services, add the BO as dependant object in dependencies tab.
    2) In the implemention, add the following codes to call create method of the BO:
    this.get<BO>.createMethod();
    julius

  • I cannot download adobe reader in order to download an item. can you call me Removed by Moderator

    I cannot download adobe reader in order to download an item.  can you call me

    What is your operating system & version?
    Define "cannot" - what happens when you try?
    Try downloading the offline installer from http://get.adobe.com/reader/enterprise/
    P.S. this is a user-to-user support forum; you can use paid support if you want telephone support: http://helpx.adobe.com/reader.html

  • Can you Call qdbus?

    Hi
    After allot of upgrades, lot of .pacnew files resolving, a boot partition resize and grub reinstallation, I had allot of problems which is hardly surprising but I solved them all except one: when I login to KDE through KDM or GDM I get the good old error message
    Could not start D-Bus. Can you Call qdbus?
    And yes, I can call qdbus. I was seeing this error before I switched to systemd, but this was long time ago and then it was working until yesterday.
    I can start kde by starting X from the console and then typing
    DISPLAY=0 startkde &
    but not from a display manager. Gnome starts fine.
    I'm running out of ideas. Where should I look?

    After
    ln -s /usr/bin/qdbus /qdbus
    I can login into kde and I do not get the above message. But kde get unresponsive from time to time when I switch between windows. I had this problem more than a year ago and was using xfce in the meantime. Does anyone have any ide this time what causes this error?

  • Can you call a plsql application process from a validation?

    Can you call an on-demand plsql application process from a page validation?
    Thank you,
    Gayle

    Gayle:
    I don't think you can do that. You could consider moving the ODP into the database as a stored procedure . The stored procedure can then be referenced in the ODP and in your validation code as well.
    varad

  • How can we call a class file of one package for class file of another

    How can we call a class file of one package from class file of another package and both packages exist in a same folder

    How can we call a class file of one package from
    class file of another package and both packages exist
    in a same folder
    Luckily they don't so it's really not a problem after all.

  • I want to make an identity card of my dad. he is a government employee. so can you send me whole method to make it using Photoshop CS2 ? please its urgent,

    i want to make an identity card of my dad. he is a government employee. so can you send me whole method to make it using Photoshop CS2 ? please its urgent

    Identity cards are not things individuals typically make.
    You can get yourself into big trouble forging fake IDs.
    -Noel

  • Can you code 2 classes into one source file?

    Can you have 2 classes coded in one source file? If so, do you end up with 2 .class files after the compile?

    yes you can code 2 classes in one source file. I
    believe that you have to reference one class is an
    "object" class of the class under which you save the
    file as.
    Example:
    File name is A.java
    class A{
    class B{
    When you want to refer to class B, you have to say
    A.B ( eg: A.B ab = new A.B() ). The class file(s)
    will be A.class and A$B.class.
    This is what I recall at best at the time. good luckI presume you mean when one is an inner class? Otherwise:
    public class one {
      one() { System.out.println("one");
      public static void main( String[] argv ) {
        new one();
        new two();
    class two {
      two() { System.out.println("two");
    }Will work fine, and will create one.class and two.class. But that does not mean it is a good idea to do it ;o)

Maybe you are looking for

  • Oracle does not start automatically ORA-01031: insufficient privileges

    Hi, OS WS2008R2. ORACLE 11gR2. Oracle Instance does not start with oracle services but if i stop and restart the services it comes up clean. Moreover if i change service ownership to Domain\Administrator it again works well. Checked registery and all

  • Pdf file can not be found

    Why I can´t open the pdf document in this site? http://www.gave.min-edu.pt/np3content/?newsId=134&fileName=clonagem.pdf and in other sites I have installed windows 7 mozilla firefox 4.0 beta 7 plugins : adobe acrobat 9.4.1.222

  • Please help about firewire card

    hi i have to buy one audiocard firewire for my PowerBook I need to buy it soon before i go in holidays ! please council to me : is better the Presonus Firebox , or the Focusrite Saffire ?? I use logic pro 7.1 is much apreciate help !! grazie !!!

  • Using ATV as media player exclusively for years, now what?

    My G5 crashed more than a year ago. I was using my ATV and imac together flawlessly. Since the crash, I was unable to afford a new one, so I was using the ATV as my only link to the internet and purchased quite a bit of media from itunes. I finally h

  • Deadline Randomization and software updates

    Hello, Over the weekend, I saw that once of our patch groups had a very low compliance rate. After digging deep, it looks like the low compliance rate is a recurring thing, with this weekend's compliance rate being the lowest.  Anyways, while I was t