Error calling class methods CL_GUI_FRONTEND_SERVICES

Hi all,
I have a requirement in BAPI (integrating solman to portal) to download file from app. server to local directory. I used the below FM to get temp directory of presntation server.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_TEMP_DIRECTORY
   CHANGING
     TEMP_DIR             =  LV_TEMP_DIR
   EXCEPTIONS
     CNTL_ERROR           = 1
     ERROR_NO_GUI         = 2
     NOT_SUPPORTED_BY_GUI = 3
     others               = 4.
   CALL METHOD cl_gui_cfw=>flush.
It works fine in R3, but when i called it from portal it shows Access not possible using 'NULL' object reference with a short dump .
st22 shows
Error in ABAP application program.
The current ABAP program "CL_GUI_FRONTEND_SERVICES======CP" had to be
terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
An exception occurred. This exception is dealt with in more detail belo
. The exception, which is assigned to the class 'CX_SY_REF_IS_INITIAL',
neither
caught nor passed along using a RAISING clause, in the procedure
"GET_TEMP_DIRECTORY" "(METHOD)"
Since the caller of the procedure could not have expected this exceptio
to occur, the running program was terminated.
The reason for the exception is:
Attempt to access a component using 'NULL' object reference (points
to nothing).
An object reference must point to an object (an instance of a class)
before you can use it to access components (variable:
"CL_GUI_FRONTEND_SERVICES=>HANDLE").
Either the reference has not yet been set, or it has been reset to
'NULL' by a CLEAR statement.
When i put external break point and the dump comes during execution of CALL METHOD cl_gui_cfw=>flush.
Is it not possible to use CL_GUI_FRONTEND_SERVICES in RFC ??.
thanks and regards
Jijo

[CL_GUI_FRONTEND_SERVICES|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=cl_gui_frontend_services+portal&adv=false&sortby=cm_rnd_rankvalue] needs a SAPGUI, so it is not possible to use it in RFC, BSP or other portal.
Regards

Similar Messages

  • Job is failing with the following error- Error calling a method of the tree

    dear SDNers,
    my question is where do i need to look for error.
    Will this be an ABAP issue?
    Please guide
    DETAILS
    In SM37 when we see the job XYZ, we get the following details.
       Job                              Ln    Job CreatedB    Status          Start date     Start time      Duration(sec.)     Delay (sec.)
      XYZ                                                                    Canceled        16.11.2009    10:11:30                  9                         27
    When the job log is checked this , we get the below details.
    The job XYZ is failing with the following error.
    Date      Time     Class  No.   Message
    +----
    +----
    2009/11/16 05:03:01 | 00     516 | Job started
    2009/11/16 05:03:01 | 00     550 | Step 001 started (program RBDMON00, variant
    SBCI287, user ID ABCDEF)
    2009/11/16 05:03:03 | TREE_C 000 | Error calling a method of the tree control
    2009/11/16 05:03:03 | 00     518 | Job cancelled
    Equest your assistance in knowing where to find the error for this.
    I have no clue as to where and how i need to debug or where i should i be looking for error.
    In BD87, the selection screen paramters that are given are changed on date (from and to) and IDOC status 51,66,69 and 64 and the message type is "Öutbound interface of picked shipments"
    Please guide.
    Regards,
    SuryaD.
    Edited by: SuryaD on Nov 23, 2009 5:36 PM
    Edited by: SuryaD on Nov 23, 2009 11:14 PM

    > 1. There is a job name ABCDEF
    > 2. When this job is run then the status shows cancelled and the job error log shows tHe details that "error calling a method of the tree control"
    > 3.ThIs error also points fingers to /link to BD87 as seen in the job log " (program RBDMON00, variant \SBCI287, user ID KRISF)"
    >
    BD87 is an IDOC processing.
    > My question to you Sampath.
    >
    > in order to answer your question on whether it is ALv or SALV.. please tell me as to how will i know which progrm is associated with the job ABCDEF?
    >
    Go to sm37 - double click on the job that was failed - Click on Step (on application tool bar) to get the program name - double click on the program name - new popup will be opened - then copy the program and variant
    Go to se38 - enter the program - execute (F8) - choose the variant that is there in the background job - run in forground first
    if the run is good - then check the program - SE38 - Display the program then see
    I just saw the above message BD87... .if that is true, you dont have to do all these
    I dont think it is possible to schedule a job with BD87. Is this the first time or is any job completed without errors for this?

  • Error calling a method of the tree control in BDC

    I'm connecting two systems Iplan(project management tool) with SAP PS using SAP XI.
    I've written an BDC(RFC) to assign people for the activity in an project(cj20n) it works fine in the foreground. But it doesn't work in the background.It doesn't give me error also.I've sap all authorization.
    When I connect with XI its throwing me an error "Error calling a method of the tree control" message type A (using the same user to connect r3). I believe something we should do prior handling the tree control in a BDC. IF any body come across this situation please let me know. your help is appreciated.
    Regards
    Anand

    BDCs over enjoy transactions do not get along together.  The containers and controls is more of a gui thing, and in background sometimes the BDC has a hard time with them.  I would suggest using the non-enjoy tcode instead, CJ20.
    Regards,
    Rich Heilman

  • Error calling JNI method

    Hello Everyone,
    I´m trying to call a method wich is inside a DDL by JNI. This works fine in a Java console application. However, this call doesn´t work when i put this operation in a web apllication and deploy in a weblogic server. I´ve already put the dll path in the PATH variable but it didn´t work. When I debug the application, the DLL can be loaded but i call the native method a error happens and a get the following message:
    java.lang.UnsatisfiedLinkError: criptografa
         at com.tim.util.cripto.ACC_Cripto.criptografa(Native Method)
    Why does it work when I use a java console application ?
    Thanks for help
    Rodrigo Lopes

    I see yere points but what I see on linux is it makes it to the constructor of the Java object and somewhere afterwards it bails out, the Java app does work alone. It appears to have problems initializing the JFrame, could there be a problem with the Java inheritance when a JVM is invoked throurgh native invocation??
    Here's some of the Java stuff
    public class Framework extends WindowAdapter {
        public int numWindows = 0;
        private Point lastLocation = null;
        private int maxX = 500;
        private int maxY = 500;
        public Framework() {
            System.out.println("JAVA Framework cnst");//GETTING HERE
            makeNewWindow();
        public void makeNewWindow() {
            System.out.println("JAVA makeWindow"); //GETTING HERE
            JFrame frame = new MyFrame(this); //NOT GETTING HERE!!!!!!!!!
            numWindows++;
            System.out.println("Number of windows: " + numWindows);
            System.out.println("Frame location: " + lastLocation);
            frame.setVisible(true);
            System.out.println("Post Java set frame visible");
        public static void main(String[] args) {
        System.out.println("Main method in Framework");
            Framework framework = new Framework();//GETTING HERE
    class MyFrame extends JFrame {
        protected Dimension defaultSize = new Dimension(200, 200);
        protected Framework framework = null;
        public MyFrame(Framework controller) {
            super("New Frame");
            System.out.println("MyFrame cnst ");//NOT GETTING HERE!!!!!!
            framework = controller;
            setDefaultCloseOperation(DISPOSE_ON_CLOSE);
            addWindowListener(framework);
            JMenu menu = new JMenu("Window");
            menu.setMnemonic(KeyEvent.VK_W);
           setSize(defaultSize);
    }

  • Error in class method

    Hi Friends,
    i am facing one problem while preparing code in proxy class method. i need to use same code so many places in my class method for that purpose  i was trying to use perform statements but system is giving syntax error 'Forms can not be defined in a class pool For this reason, there are no perform statements for internal FORM'S'.
    With out perform statements how to handle the repetative logic in same program. Any help will be highly appreciated.
    Thanks a lot in advance.

    If you are talking about global classes,
    then go to SE24 and create your class.
    In the class go to Methods tab, give a name to your method, Define it as a static method, if you want the values to be persisted and not specific to the instances that are created based on your class.
    Give the visibility as private, becuase you want these private methods only to be called in your class only.
    Then click on parameters and define your exporting and importing parameters.
    Double click on the method name and have your repetitive code there.
    YOu can call this method in other methods of the class using
    call method <method name>statement.
    Regards,
    Ravi

  • Calling class methods from jsp

    hi - this seems like it should be painfully obvious but I am missing something somewhere and can't seem to get it to work.
    The end result I am looking for is to be able to call a method similar to how I would do it in PHP or ASP.
    To do this I have writte the following class (just as an example) and combpiled it to /WEB-INF/classes/com/example/util/Echo.class:
    package com.example.util;
    class Echo
    public static void main(String[] args)
    System.out.println(args[0]);
    I then have a sample JSP that I attempt to use this in that looks like:
    <%@ page import="com.example.util.Echo" %>
    <%
    RDmail("I'm using my Echo class.");
    %>
    My expectation would be that when I run this page in a browser, I see the text "I'm using my Echo class." printed out on the page. Instead I get the following error:
    An error occurred at line: 1 in the jsp file: /classtest.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    /var/tomcat4/work/Standalone/localhost/raindance/classtest_jsp.java:47: cannot resolve symbol
    symbol : method Echo (java.lang.String)
    location: class org.apache.jsp.classtest_jsp
    Echo("I'm using my Echo class");
    ^
    1 error
    What am I doing wrong?

    Umm... I'm not entirely sure what you're attempting to do, but it looks like there's some discrepancy between your error message and your code...
    RDmail("I'm using my Echo class."); in your code
    and
    Echo("I'm using my Echo class"); in your error message.
    Is this just a cut/paste error?
    Also, the main() method is only called from a command line, and will not be run when you instantiate your bean in a JSP. If you want to have your String printed out when you create a new object, you should put the print statement in the constructor. Which would then be called when you created a new object..
    Echo e = new Echo("I'm using my Echo class");
    Or, you could create a static method inside Echo.java that prints out the statement.
    Finally, your System.out most likely will not print to your browser, but probably to a standard log, or perhaps a command window.

  • Error calling native methods

    HI
    I declared a static native method in a class and using the System.loadLibrary() method i load the dll.
    Now if i want to call the method from another class using instance of that class where i declare the native method, it shows an error
    java.lang.SpecifiedPathLink error. I have put the dll outside the package in the same directory.
    can anyone help me regarding this problem

    it shows this exception
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no PerfMonitor in jav
    a.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:834)
    at C3.CPUMemoryUsage.<clinit>(CPUMemoryUsage.java:6)
    at C3.Node.main(Node.java:18)

  • Error call JNI method

    In call native method print in sign applet got following error:
    java.lang.UnsatisfiedLinkError: LabelPrinter.print Possible causes: If you are trying to use J/Direct (@dll.import), check your compiler version (for JVC, requires 4336 or greater.) If you are trying to use RNI, there are new requirements: see documentation.
    at LabelPrinter.print (LabelPrinter.java)
    at LabelPrinter.start (LabelPrinter.java:110)
    at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
    at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
    at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
    at com/ms/applet/AppletPanel.run (AppletPanel.java)
    at java/lang/Thread.run (Thread.java)
    I not using J/Direct or RNI.
    Any ideas?
    Thanks
    Carlo Cerqueira

    This could be a matter of incorrect case in the Method or library you are calling out to - or it could be that the DLL is not found - are you specifying the full path to it on the client system?

  • Calling class method

    Hi,
    In classical report we click on the pattern and write the funciton module name there to get the import and export parameter of the fucntion.
    Can somebody tell me how to call the class method in the program with the parameters coming automatically .
    Thanks

    hi Arvind,
    Click on pattern.
    Choose ABAP object pattern radio button and press enter.
    You have four radio button-the first one call method is for your requirement.
    Enter the object instance name, class name and method name and press enter.
    You will get the call method for this instance of the class.
    Hope this helps.
    Regards,
    Richa

  • Newbie Q'n -- Calling class methods without instantiation

    Hello All,
    I would like to know how is it possible to call methods within a class without instatiating the class.
    For instance consider the following statement:
    String x = Integer.toString(10);
    Here there we are calling the toString() function of "Integer" class without instantiating it. How is it possible?? How does the JVM call the toString() function when there is no Integer object defined in my program?? Can the same functionality achieved for user created classes ??
    Can anyone explain ??
    If this appears as a trivial question, please forgive me.
    Thanks in advance,
    Arun

    String x = Integer.toString(10);
    Here there we are calling the toString() function of
    "Integer" class without instantiating it. How is it
    possible?? How does the JVM call the toString()
    function when there is no Integer object defined in my
    program?? Can the same functionality achieved for user
    created classes ?? It isn't possible, and its not happening in your example either:
    toString() is an instance method. toString(int) and toString(int, int) are class (static) methods.
    You might see documentation referring to a toString (notice no "()" at the end) method. When you do, it should usually be clear from the context which particular method is being referred to.
    Such confusion might well have been avoided if the original API designers had thought to call the methods something different (perhaps format?), but they didn't (in fact, toString(int) seems rather pointless).

  • Runtime error Calling Java Methods from C++

    I'm trying to add Java methods to an existing C++ program.
    I'm working in W2000 enviroment using Cygnus GCC compiler.
    Before adding these methods, I tested invoke example from Jni tutorial.
    All worked properly. But the problems arouse when I tried to run non-static methods.
    Here is the code I'm testing now:
    #include <stdio.h>
    #include <jni.h>
    #define PATH_SEPARATOR ';'
    #define USER_CLASSPATH "." /* where Prog.class is */
    int main(int argc, char *argv[]) {
    JNIEnv *env;
    JavaVM *jvm;
    JDK1_1InitArgs vm_args;
    jint res;
    jclass cls;
    jmethodID mid;
    jobject jobj;
    char classpath[1024];
    vm_args.version = 0x00010001;
    JNI_GetDefaultJavaVMInitArgs(&vm_args);
    sprintf(classpath, "%s%c%s",
    vm_args.classpath, PATH_SEPARATOR, USER_CLASSPATH);
    vm_args.classpath = classpath;
    res = JNI_CreateJavaVM(&jvm,(void **)&env,&vm_args);
    if (res < 0) {
    fprintf(stderr, "Can't create Java VM\n");
    exit(1);
    cls = env->FindClass("Prog");
    if (cls == 0) {
    fprintf(stderr, "Can't find consola class\n");
    exit(1);
    mid = env->GetStaticMethodID(cls, "Entrada", "()V");
    if (mid == 0) {
    fprintf(stderr, "Can't find consola.consola\n");
    exit(1);
    env->CallStaticVoidMethod(cls, mid);
    /*     jobj = env->NewObject(cls, mid);
    if (jobj == 0) {
    fprintf(stderr, "Can't find Prog.main\n");
    exit(4);
    jvm->DestroyJavaVM();
    And the java code Prog.java:
    public class Prog {
    public static void Entrada() {
    Consola Cons = new Consola();
    And Consola a user class tha shows a Java window and let's do something more.
    These code works fine and The Prog and Consola classes run properly.
    But when I try to change Entrada method to non-static, following error appears in a window.
    Microsoft Visual C++ Runtime library
    Runtime Error !
    Program: D:\javaini\JNI-INVOKE\invoke.exe
    abnormal program termination
    If I try
    jobj = env->NewObject(cls, mid);
    if (jobj == 0) {
    fprintf(stderr, "Can't find Prog.main\n");
    exit(4);
    instead of
    env->CallVoidMethod(cls, mid);
    I get the same error.
    Could anybody help me ?
    Am I doing anything wrong ?
    Thanks in advance. Ignasi Villagrasa.

    I found it.
    In JNI examples I saw
    mid = env->GetMethodID(cls, "<init>", "()V");
    to run constructor.
    And then NewObject function.
    So it's solved.
    But I find another problem now.
    If the class I'm calling is a graphic java class (In this case from swing), when the window is closed the application in C++ stops too.
    Should I create another thread to manage the window ?
    Couldn't I follow running lines after NewObject method ?
    Thanks in advance, Ignasi Villagrasa.

  • Does calling class methods from bean and JSP cause collision?

    Hi,
    Please look at the class below:
    public class X
    // no member variable
    public X() {}
    // pay attention to static keyword
    public static int getY()
    Think a bean (say BeanZ) that make calls to getY() method without initializing the class X (like this: X.getY() )
    And think many users having "page scope" in JSP make call to BeanZ or directly calls it from JSP.
    I'm wondering if any collision occurs because of STATIC method? Should I use "SYNCHRONIZED" keyword with it? If so, what about Math.cos() which also is a non synchronized static method ? Shouldn't I use Math.cos() (and the other static methods) in JSP or bean?
    Thank you for your help.
    Ali Sadik

    Hi,
    Thank you for your quick answer. Think my class like this:
    public class X
    // no member variable
    public X() {}
    // pay attention to static keyword
    public static int[] getY(int a, int[] b)
    // i know there is no need for the extra array.
    // just for example ;)
    int[] ret = new int[b.length];
    for(int i = 0; i < b.length; i++)
    ret[i] = a * b;
    return ret;
    Does it the type of class that you've mentioned ? It makes calculation to produce dynamic result. Shouldn't I use it as static ? If your answer is yes, what about Math.cos()? Doesn't it have dynamic calculation?
    Thanks a lot.

  • Calling class methods from listSelectionListener

    Hi,
    I have a GUI class which containt a few Jlist. I also have two listSelectionListener classes. How do I reach methods in the GUI class from the listSelection classes. Can I pass a reference of GUI to them somehow?
    Karl XII

    For the benefit of future readers, the answer is yes, either in your listSelectionListener constructor, or a listSelectionListener method you implement. In either case, just set a listSelectionListener member variable (added by you) to the desired value.

  • Running Browser calling method'CL_GUI_FRONTEND_SERVICES' in the background.

    Hello SAP Gurus
    My intention is to shutdown and restart communication channels on PI side. To do this externally, we can send a URL with right parameters.
    I have written a simple ABAP  code to do this by calling the method 'CL_GUI_FRONTEND_SERVICES 'with the URL. Since I have several channels, I am calling this method in a loop. It is doing the job well.
    However, for each channel an IE browser screen pops up with the XML data for that particular URL.  It is kind of annoying to see so many popups.
    Is there a way in ABAP to supress this multiple browser pop ups? Is there a way to make this method run in the background?
    I know that this method is meant to call a browser screen with the URL, however I want to suppress this Browser POP up and use the remaining function.
    Any feedback will be highly appreciated.
    Thanks
    Ram

    You cannot use a frontend (GUI) service when a program is running in the background.
    You'll have to call the URL in a different way... something that doesn't create a popup window. Or execute the command that is invoked when accessing that URL.

  • In webdynpro ,Passing field symbols as values to class methods

    Hi
    Please tell me the ways of accessing database in webdynpro abap(not directly). I am calling Class method for accessing database. As currently I am directly accessing database in my webdynpro application. I have created a class and method for the same.
    In my method I want to use select statement which will return table with values to webdynpro application. So for select statement(Calling Method) I need to use my field symbol values as where in clause .
    Could anyone please help with example code?
    Thanks,
    Ujjwal

    data: in_line type ref to data.
    CREATE DATA in_line LIKE LINE OF <dyn_tab>.
      ASSIGN in_line->* TO <dyn_wa>.
    You can create a data reference and assign it to a field symbol and change the values. direclty passing field symbols is not possible.
    Abhi

Maybe you are looking for

  • BADI/User exit for ME18 to specifically check for Approval Level...

    Hi all, I hope this is not a repost. I have found none so far in SDN forum. However if do, please point it to me. I will gladly close this thread. Ok, i need a userexit/badi, whichever will do, to check for user approval levels in ME18. So far I coul

  • Show "Video Used" in Project List view?

    Is there anyway to show the "Video user X times" feature, that is available in the icon video, in the list view? I know you can see this information, in list view, for the selected clip (using the preview area) but I want to look at a bin of 100 clip

  • Need help with XML trees

    Hi, I am writing a program and I need to dispaly two XMLs (preferably in tree control). The leaf nodes in the two XMLs are realted and I need to connect them with lines in the two trees. How do I do this. Any poniters? Regards, Raj

  • Disabling multiple row selection in JTable

    hi, I have a JTable and I want to disable the multiple row selection. I used getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);and this working fine with ctr+clicking on a row but if i am using shift key instead of Ctrl k

  • Xml to client call from bpm

    Hi , how does the client application receive the xml to client data from the bpm.Does the bpm use an internal jms queue or is there a direct call to the application .and what all does the client need to implement for the same . does the client need t