Class cl_gui_pdfviewer , Dump in method CREATE_TOOLBAR.

Hello ,
Guys I have a problem with method  in line:
" pass toolbar settings to local class
  this_event_handler->document_close = document_close.
I got a dump with the following description :
"You attempted to use a 'NULL' object reference (points to 'nothing')
access a component (variable: " ").
An object reference must point to an object (an instance of a class)
before it can be used to access components.
Either the reference was never set or it was set to 'NULL' using the
CLEAR statement."
Im providing the following parameters  :
      tool_buttons      = 'X'
      view_buttons      = view_buttons_active
Do yo know  any other alternative class  ? .
thank you very much.

Hello,
Please see attached link for your ref.
<link farm removed>
Regards,
Sameer
Message was edited by: Suhas Saha

Similar Messages

  • How to use these method of class CL_GUI_PDFVIEWER

    how to use these methods in the class CL_GUI_PDFVIEWER
    1) CREATE_ANNOTATION
    2) GET_ANNOTATION_INFO
    3) SET_ANNOTATION_SETTINGS

    Hi,
       Refer
    https://forums.sdn.sap.com/click.jspa?searchID=10926572&messageID=1803295
    Regards
    Kiran

  • Unable to view PDF files -application server class CL_GUI_PDFVIEWER- open_d

    Hi
    I have PDF files in application server and trying to display the PDF files by using class CL_GUI_PDFVIEWER->open_document but i am unable to view the pdf files.
    Please let us know any other alternative way to view the PDF files via application server.
    Regards
    G

    Hi,
    steps tu visualize PDF files from app server via html_viewer:
    1. Upload PDF file to table type x255. (using for ecampo FM SCMS_UPLOAD)
    2. Create container (TYPE REF TO cl_gui_custom_container),
        create html_viewer (TYPE REF TO cl_gui_html_viewer).
    3. Load data from ypur xsting table to url:
      CALL METHOD html_viewer->load_data
        EXPORTING
          TYPE                = 'application'
          SUBTYPE           = 'pdf'
         IMPORTING
           assigned_url     = url
        CHANGING
          data_table          =  data_pdf.  "line type x255
    4. Show data from url:
      CALL METHOD html_viewer->show_data
        EXPORTING
          url                    = url.
    Regards,
    MaryM

  • Force Derived Class to Implement Static Method C#

    So the situation is like, I have few classes, all of which have a standard CRUD methods but static. I want to create a base class which will be inherited so that it can force to implement this CRUD methods. But the problem is, the CRUD methods are static. So
    I'm unable to create virtual methods with static (for obvious reasons). Is there anyway I can implement this without compromising on static.
    Also, the signature of these CRUD methods are similar.
    E.g. ClassA will have CRUD methods with these type of Signatures
    public static List<ClassA> Get()
    public static ClassA Get(int ID)
    public static bool Insert(ClassA objA)
    public static bool Update(int ID)
    public static bool Delete(int ID)
    ClassB will have CRUD signatures like
    public static List<ClassB> Get()
    public static ClassB Get(int ID)
    public static bool Insert(ClassB objB)
    public static bool Update(int ID)
    public static bool Delete(int ID)
    So I want to create a base class with exact similar signature, so that inherited derived methods will implement their own version.
    For E.g. BaseClass will have CRUD methods like
    public virtual static List<BaseClass> Get()
    public virtual static BaseClassGet(int ID)
    public virtual static bool Insert(BaseClass objBase)
    public virtual static bool Update(int ID)
    public virtual static bool Delete(int ID)
    But the problem is I can't use virtual and static due to it's ovbious logic which will fail and have no meaning.
    So is there any way out?
    Also, I have few common variables (constants) which I want to declare in that base class so that I don't need to declare them on each derived class. That's why i can't go with interface also.
    Anything that can be done with Abstract class?

    Hi,
    With static methods, this is absolutely useless.
    Instead, you could use the "Singleton" pattern which restrict a class to have only one instance at a time.
    To implement a class which has the singleton pattern principle, you make a sealed class with a private constructor, and the main instance which is to be accessed is a readonly static member.
    For example :
    sealed class Singleton
    //Some methods
    void Method1() { }
    int Method2() { return 5; }
    //The private constructor
    private Singleton() { }
    //And, most importantly, the only instance to be accessed
    private static readonly _instance = new Singleton();
    //The corresponding property for public access
    public static Instance { get { return _instance; } }
    And then you can access it this way :
    Singleton.Instance.Method1();
    Now, to have a "mold" for this, you could make an interface with the methods you want, and then implement it in a singleton class :
    interface ICRUD<BaseClass>
    List<BaseClass> GetList();
    BaseClass Get(int ID);
    bool Insert(BaseClass objB);
    bool Update(int ID);
    bool Delete(int ID);
    And then an example of singleton class :
    sealed class CRUDClassA : ICRUD<ClassA>
    public List<ClassA> GetList()
    //Make your own impl.
    throw new NotImplementedException();
    public ClassA Get(int ID)
    //Make your own impl.
    throw new NotImplementedException();
    public bool Insert(ClassA objA)
    //Make your own impl.
    throw new NotImplementedException();
    public bool Update(int ID)
    //Make your own impl.
    throw new NotImplementedException();
    public bool Delete(int ID)
    //Make your own impl.
    throw new NotImplementedException();
    private CRUDClassA() { }
    private static readonly _instance = new CRUDClassA();
    public static Instance { get { return _instance; } }
    That should solve your problem, I think...
    Philippe

  • How to determine the Class of a static methods class?

    hi,
    is there a way to get the code below to output
    foo() called on One.class
    foo() called on Two.classthanks,
    asjf
    public class Two extends One {
       public static void main(String [] arg) {
          One.foo(); // should say "foo() called on One.class"
          Two.foo(); // should say "foo() called on Two.class"
    class One {
       public static final void foo() {
          System.out.println("foo() called on "/*+something.getClass()*/);
    }

    - One.class won't resolve to Two.class when the static
    method is called via the class TwoThat's because static methods are not polymorphic. They cannot be overridden. For example try this:
    public class Two extends One {
       public static void main(String [] arg) {
          One.foo(); // should say "foo() called on One.class"
          Two.foo(); // should say "foo() called on Two.class"
          One one = new Two();
          one.foo();
          ((Two) one).foo();
       public static void foo() {
          System.out.println("foo() called on Two");
    class One {
       public static void foo() {
          System.out.println("foo() called on One");
    }

  • The class of the deferred-methods return type "{0}" can not be found.

    I am developing a multilingual portal application.
    I have the method that changes the locale based on user's choice in the bean and the method is being referred to as below.
    <af:selectOneChoice label="Select Language" autoSubmit="true"
    value="#{localeBean.locale}"
    valueChangeListener="localeBean.changeLocale">
    <af:selectItem label="English" value="en" id="si1"/>
    <af:selectItem label="French" value="fr" id="si2"/>
    <af:selectItem label="Dutch" value="nl" id="si3"/>
    </af:selectOneChoice>
    when i try to run the application, i am getting compile time errors as below,
    The class of the deferred-methods return type "{0}" can not be found.
    No property editor found for the bean "javax.el.MethodExpression".
    After going through the discussion forums i learned that the compilation errors can be resolved by setting the <jsp:directive.page deferredSyntaxAllowedAsLiteral="false> at the starting of the page.
    Even after that i am getting the compilation error.
    Any solutions, suggestions or possible approaches would be helpful as i am new to Webcenter Portal development.
    Thanks,

    The error you get points to a problem on the page (somewhere). Switch to source mode and check the right margin if you see orange or red marks. These are pointing to problems (not all are show stoppers, but they give you hints that something is not according to the standard for jsf, jsff, jsp or jspx pages.
    Have you checked that the bean is correctly defined and that it's reachable?
    Start a fresh page and isolate the problem, e.g. build a selectOneChoiuce on the new page (don't copy it as you might copy the error too) and make it work on the new page. Once you have it running you can compare the solution to your not running page.
    Timo

  • How do you call a java class from the main method in another class?

    Hi all,
    How do you call a java class from the main() method in another class? Assuming the two class are in the same package.
    Thanks
    SI
    Edited by: okun on May 16, 2010 8:40 PM
    Edited by: okun on May 16, 2010 8:41 PM
    Edited by: okun on May 16, 2010 8:47 PM

    georgemc wrote:
    To answer your impending question, either the method you're calling has to be static, or you need an instance of that other class to invoke it against. Prefer the latterAnd to your impending question after that: no, don't use the Singleton pattern.

  • How to use the class CL_CTMENU with the method DISABLE_FUNCTIONS

    Hi Friends,
    How to de-activate some functions in the Menu bar?
    Eg: - Sales document
                 Create
                 Change
                 Display
    I want to de-activate "Change"
    In other words: - How to use the class CL_CTMENU with the method DISABLE_FUNCTIONS in my program.
    Regards,
    Hari
    Edited by: Bhatlapenumarthy Hari Krishna on Jun 9, 2008 5:22 PM

    Krishna,
    It is not possible to deactivate the CHANGE option in themenu bar using the method disable_functions of cass CL_CTMENU. This method allows you to deactivate only the function codes of the CONTEXT MENU, which is available only when u press the left mouse button.
    U can use the SET PF-STATUS 'XXX' EXCLUDING fcodes option to disable the CHANGE.
    *****Reward points if useful
    Regards,
    Kiran Bobbala

  • How define a global variable in a class that all the methods will recognize

    hi friends,
    i need to define a global variable in a class that all the methods will recognize it.
    any suggestions?
    thanks,
    dana.

    Dera Dana,
    In se24, create your own "Z" class.
    Open the Attributes tab.
    Insert your variable in the declaration part.
    EQ:
    Attribute     Level                       Visibility   Typing      Associated Type         Description        
    ITAB     Instance Attribute     Public     Type     Structure name     Description
    In the Layout of View page,
    <phtmlb:formLayoutDropDownListBox id                = "Dropdown"
                                              label             = "Drop Down"
                                              table             = "<%= controller->Itab %>"
                                              nameOfKeyColumn   = "CODE"
                                              nameOfValueColumn = "VALUE"
                                              selection         = "<%= controller->feild to be selected %>"
                                               />
    Hope this will be helpful
    Regards,
    Gokul.N

  • Getting class in a static method

    I have a class with a static method. How can I return the class object with this method?
    public class Pencil {
    public static Class getClass() {
    Class class = ??? (this.getClass(), can�t use!)
    return class;
    Thanks!

    it would have to be like this:
    public static Class getClazz() {
    return Pencil.class;
    }

  • Enhance standard class with event handler method

    In trying to enhance a standard class with a new event handler class, I find that the ECC 6.0 EHP4 system does not appear to recognise the fact the method is an event handler method.  The specific example is a new method to handle the event CL_GUI_ALV_GRID->USER_COMMAND. 
    I notice that the flag called Active has not been ticked - see image below.  Perhaps this is the reason why the event handler is not being triggered.
    Note that there is an event handler for the same event in the standard class which obviously is executed as expected.  Any ideas on limitations in the system or I am missing a step?
    Thanks
    John

    Thank you for your replies.
    There is a bug in the ALV handler of a standard SAP class (when executed in ITS WebGUI) and I was hoping to create a custom event handler as an Enhancement to execute some custom code to sort of "handle the bug". 
    I agree - ideally it should be done in a Z class but that will not give me access to the object methods and attributes of the enhanced class.
    Cheers,
    John

  • Using a string or char as a class when calling a method

    Is there a way to take the string.charAt(int) method and use it as a stand in for a class that is one character long? (Examples below, as I'm sure that question makes no sense out of context.)
    Something like (note the last line):
    import java.util.Scanner;
    public class DRV
         public static void main(String[] args)
              Scanner inpt = new Scanner(System.in);
              String stringy;
              A a = new A();
              System.out.println("Enter 'a': ");
              stringy = inpt.next();
              [stringy.charAt(0)].lineOne();
    }Or will I just have to use a lot of if statements:
    import java.util.Scanner;
    public class DRV
         public static void main(String[] args)
              Scanner inpt = new Scanner(System.in);
              String stringy;
              A a = new A();
              System.out.println("Enter 'a': ");
              stringy = inpt.next();
              if (stringy.charAt(0) == 'a')
                   a.lineOne();
                   System.out.println();
    }I doubt this is possible, but it would be totally awesome if there was something like [stringy.charAt(0)].classmethod();. This would allow me to just use a couple for loops instead of a cluster of if's.
    Thanks for any help.
    Edited by: 797223 on Sep 28, 2010 11:21 PM

    What Kayaman said.
    Another suggestion, slightly more elaborate, is to use class.forName() and reflection to create an instance of the correct class:
    stringy = inpt.next();
    Class clazz = Class.forName(makeClassCase(stringy));
    Object o = clazz.newInstance();
    SomeInterface i = (SomeInterface)o;
    i.lineOne();This assumes that you write a method private String makeClassCase(String s) that returns the correctly cased class name (e.g. transforms 'a' to 'A') and adds the appropriate package name if applicable, and that you define method lineOne() in an interface SomeInterface and in all classes that implement it (assuming I have correctly understood that all your classes do expose the same lineOne() method).
    You'll have to make special provisions for error cases (e.g. the user types a class name that doesn't exist, or that doesn't implement the common interface).

  • Error accessing constnt public attribute of a class in an overwrite method.

    Hi Gurus,
    I am facing an error while accessing a constant public attribute while using it in the overwrite-exit of a methods.
    The constant which is declared as public in the attribute section of the class is not available in the overwrite-exit of the method.
    Please suggest me how to access the public attributes in the overwtire exits of the methods.
    Thanks.

    Hi Ramneek,
    Let me explain you the entire scenario:
    Actually we are trying to ehance the SAP standard class : CL_FITV_POWL_FEEDER_TRIPS in ECC 6.0 EHP 5 .
    We tried to create and overwrite-exit of the method "IF_POWL_FEEDER~GET_ACTIONS".
    Overwrite-exit of a method is just like a method which will be called instead of the standard method : IF_POWL_FEEDER~GET_ACTIONS.
    But the problem which we are facing here is that the Attributes which are defined in the class CL_FITV_POWL_FEEDER_TRIPS,  are getting accessed from the overwrite-exit method.
    Becuase of this we are not able to implement our custom logic.

  • Errors in a Java class when calling other methods

    I am giving the code i have given the full class name . and now it is giving the following error :
    Cannot reference a non-static method connectDB() in a static context.
    I am also giving the code. Please do help me on this. i am a beginner in java.
    import java.sql.*;
    import java.util.*;
    import DButil.*;
    public class StudentManager {
    /** Creates a new instance of StudentManager */
    public StudentManager() {
    Connection conn = null;
    Statement cs = null;
    public Vector getStudent(){
    try{
    dbutil.connectDB();
    String Query = "Select St_Record, St_L_Name, St_F_Name, St_Major, St_Email_Address, St_SSN, Date, St_Company, St_Designation";
    cs = conn.createStatement();
    java.sql.ResultSet rs = cs.executeQuery(Query);
    Vector Studentvector = new Vector();
    while(rs.next()){
    Studentinfo Student = new Studentinfo();
    Student.setSt_Record(rs.getInt("St_Record"));
    Student.setSt_L_Name(rs.getString("St_L_Name"));
    Student.setSt_F_Name(rs.getString("St_F_Name"));
    Student.setSt_Major(rs.getString("St_Major"));
    Student.setSt_Email_Address(rs.getString("St_Email_Address"));
    Student.setSt_Company(rs.getString("St_Company"));
    Student.setSt_Designation(rs.getString("St_Designation"));
    Student.setDate(rs.getInt("Date"));
    Studentvector.add(Student);
    if( cs != null)
    cs.close();
    if( conn != null && !conn.isClosed())
    conn.close();
    return Studentvector;
    }catch(Exception ignore){
    return null;
    }finally {
    dbutil.closeDB();
    import java.sql.*;
    import java.util.*;
    public class dbutil {
    /** Creates a new instance of dbutil */
    public dbutil() {
    Connection conn;
    public void connectDB(){
    conn = ConnectionManager.getConnection();
    public void closeDB(){
    try{
    if(conn != null && !conn.isClosed())
    conn.close();
    }catch(Exception excep){
    The main error is occuring at the following lines connectDB() and closeDB() in the class student manager. The class dbutil is in an another package.with an another file called connectionManager which establishes the connection with DB. The dbutil has the openconnection and close connection methods. I have not yet written the insert statements in StudentManager. PLease do Help me

    You're doing quite a few things that will cause errors, I'm afraid. I'll see if I can help you.
    The error you're asking about is caused by the following line:
    dbutil.connectDB();
    Now first of all please always ensure that your class names begin with capital letters and your instances of classes with lowercase letters. That's what everybody does, so it makes your code much easier to follow.
    So re-write the couple of lines at the beginning of your dbutil class like this:
    public class Dbutil {
    /** Creates a new instance of Dbutil */
    public Dbutil() {
    Now you need to create an instance of dbutil before you can call connectDB() like this:
    Dbutil dbutil = new Dbutil();
    now you can call the method connectDB():
    dbutil.connectDB();
    The problem was that if you don't create an instance first then java assumes that you are calling a static method, because you don't need an instance of a class to call a static method. If it was static, the method code would have been:
    public static void connectDB(){
    You have a fine example of a static method call in your code:
    ConnectionManager.getConnection();
    If it wasn't a static method your code would have to look like this:
    ConnectionManager connectionManager = new ConnectionManager();
    connectionManager.getConnection();
    See the difference? I also know that ConnectionManager.getConnection() is a call to a static method because it begins with a capital letter.
    Anyway - now on to other things:
    You have got two different Connection objects called conn. One is in StudentManager and the other is in Dbutils, and for the moment they have nothing to do with each other.
    You call dbUtil.connectDb() and so if your connectDb method is working properly you have a live connection called conn in your dbUtil object. But the connection called conn in StudentManager is still null.
    If your connection in the dbUtil object is working then you could just add a line after the call to connectDb() in StudentManager so that the StudentManager.conn object references the dbUtil.conn object like this:
    dbutil.connectDB();
    conn = dbUtil.conn;

  • How to get the current class name in static method?

    Hi,
    I'd like to get the current class name in a static method. This class is intended to be extended. So I would expect that the subclass need not to override this method and at the runtime, the method can get the subclass name.
    getClass() doesn't work, because it is not a static method.
    I would suggest Java to make getClass() static. It makes sense.
    But in the mean time, does anybody give an idea to work around it?
    Thank you,
    Bill

    Why not create an instance in a static method and use getClass() of the instance?
    public class Test {
       public static Class getClassName() {
          return new Test().getClass();

Maybe you are looking for

  • Payment run didnt pick the open items of Vendor(special G/L for downpmnt)

    Hi, Payment run didnt pick the open items of Vendor(special G/L for downpmnt). The line item is due on 2.11.2010. The payment run was done on 12.11.2010. Why this line was not picked? Edited by: Rudra Prasanna Mohapatra on Nov 14, 2010 11:11 AM

  • Please help with the URL class

    Hello, I am trying to write a Java app that will take a url and download it. I believe you can do this with the URL class but I don't understand how to. For example, if the http url location points to a picture file, how would I code the app to retri

  • Many times the only way i can close firefox is with the task manager

    Much of the time after exiting firefox and later try to restart it will not and i have to close it with task manager and then it will restart

  • Implementing non-blocking read

    Hi all I have some doubts about implementing non-blocking io in my application. I am using Jsch library (an ssh implementation) to open an ssh connection with a host. The API only provides me with methods to open a connection and retreive the input &

  • Adding the Oracle Database Resource to the Fail Safe Group

    Hi, I am installtin MSCS cluster for my EP system. After Adding the Oracle Database Resource to the Fail Safe Group my CI jcontrol.exe has been stopped. I tried to connect my SAPSR3DB user by sqlplus but it is giving follwoing error. SQL> conn SAPEPP