How to use method of Standard Class

Hi all,
              I want to call a pop up in pcui screen in some standard application with some text. I have made Zclass of  standard SAP class which i am using (cl_bsp_accmod_contact in CRM system).
I think i have to call 'PRINT_STRING' method of  standard class CL_BSP_ELEMENT.
<i>I am trying to use this code: </i>
<b>
data: lr_data type ref to cl_bsp_element.
  concatenate html 'rohit' into html.  (html is a string)
  lr_data->print_string( html ).</b>
<u>but it gives a dump:</u>
You attempted to use a 'NULL' object reference (points to 'noth
access a component (variable: "lr_data").
An object reference must point to an object (an instance of a class)
before it can be used to access components.
I dont know how to assign object reference to an object???
Plz help me in this regard,
Thanks in advance,
Rohit

Hi ,
try and use :
data: lr_data type ref to cl_bsp_element.
concatenate html 'rohit' into html. (html is a string)
lr_data->print_string( html = html ).
You are creating a variable...but not passing the value to the parameter...it is exactly like callin get_data or get_cell_value...!!
Hope this helps.
<i><b>Do reward each useful answer.</b></i>
Thanks,
Tatvagna.

Similar Messages

  • How to use method of one class in other class.

    Hi.I am new to object orient approach .I am developing a project which has a class as application .My class has it state control as another class which is notification class.I want to use my notification class method (init)in my application class method .i have also used read and write accessors vis.But i have broken lines in my code.Please help me correct it. and print screen is attached below.
    Attachments:
    Application.docx ‏143 KB

    On the left, you have wired 2 sources on the same tunnel/wire, so that's 1 broken wire.
    In the For loop, you are trying to wire a "Red" object from the first subVI to the input of the "Green" subVI, so a "Green" object. If Red is not a descendant class of Green (or share a common ancestor), it is not permitted.
    FInally, the output of the For loop, is a 1D array of "Green" objects, which is probably not the same data type as the input of the last subVI on the right (it's probably a "Green" object scalar).
    Overall, you can use the "List Errors" dialog box (Ctrl+L) to debug your code, and make exhaustive use of the contextual help (Ctrl+H) to see what is going on when focusing a broken wire.
    Regards
    Eric M. - Application Engineering Specialist
    Certified LabVIEW Architect
    Certified LabWindows™/CVI Developer

  • How to use iterator in standard BSP application BT115QIT_SLSQ

    Hi experts,
    I am new in BSP and my requirement is to put a checkbox icon beside the actions column (that has 2 existing icons already) of BT115QIT_SLSQ enhancement. I read a lot of article about iterators but I believe most of them are used in custom BSPs as we all know that standard BSP uses standard classes as well, which we cannot modify ourselves without access keys. Can someone help me how to use it in standard BSP? Or is there other much appropriate method?
    Thanks and Regards,
    Louie

    Dear Pradeep,
    Find the below link which explains a simple data download to excel from a table view.
    www.sapt echnical.com/Tutorials/BSP/Excel/Index.htm
    Try to avoid the way your using in the BSP application and it is abdicable to use the standard methods / class available like "cl_bsp_utility"
    Hope this will be helpful.
    Regards,
    Gokul.N
    Edited by: Gokul on Oct 8, 2009 9:57 AM

  • How to Use JavaScript in Controller Class...

    Hi All,
    Can any one tell me how to use JavaScript in Controller Class.
    Requirement is:
    I have
    Radio Group(RG1),
    Two Radio Buttons(RB1,RB2),
    Two messageTextInput(MTI1,MTI2),
    if i click RB1 i should Prompt to the end user to "Enter value for MTI1" or
    If i click RB2 i should prompt "Enter value for MTI2" while submitting page.
    Please let me know the steps to use JavaScript and the above client validation...
    Regards
    Alem...

    Using javascript is against the standard. I can tell you a workaround instead of you setting the javascript, check if that would be acceptable.
    You can use PPR and set the required property on the messageTextInput on clicking of the radio button. By doing this you will let UIX generate the javascript for you to handle the client side validation. But the validation will happen only on click of the submit button. The visual indicator is good enough to tell that the value has to be entered to the item.

  • Use methods of another class

    Dear Sir/madam,
    i have a question about using methods of another class. I will explane:
    i have made a class which is called A. This class has some attributes (studentName and examRank) and some methods.
    Now i need to made another class called B. Now i want to make an array where i can add some attributes of objects which i made of class A. How can i do that?
    Kind regards

    Here's a for-instance that doesn't use your exact program but demonstrates the point:
    public class A
      int value;
      String name;
      public A(int value, String name)
        this.name = name;
        this.value = value;
      public int getValue()
        return value;
      public String getName()
        return name;
      public String toString()
        return name + ": " + value;
    import java.util.Arrays;
    import java.util.Random;
    public class B
      private static final String[] NAMES =
        "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
      private static final int MAX = 100;
      private A[] myAs = new A[NAMES.length];
      private Random random = new Random();
      public B()
        for (int i = 0; i < myAs.length; i++)
          myAs[i] = new A(random.nextInt(MAX), NAMES);
    public String toString()
    return Arrays.toString(myAs);
    public int getTotal()
    int temp = 0;
    for (int i = 0; i < myAs.length; i++)
    temp += myAs[i].getValue();
    return temp;
    public static void main(String[] args)
    B b = new B();
    System.out.println(b);
    System.out.println("Total: " + b.getTotal());

  • How to use sdk in standard B1?

    Hi,All
       How to use sdk in standard B1? I want to use "sum in words" be thai languag which in standard no have so i must create it use sdk but i don't know that have solution using sdk in standard. example, Go menu Sales-A/R>Delivery and input data i want to convert price in Total to text which i use sdk for convert it But i don't khow that when i will call sdk? Can do in standard?

    Hi Virasak,
    You need to develop a (eventually small) application (= Add-On) which uses the SDK to do what you need it to do + is packaged and installed like e.g. any SAP Add-On.
    It should then just watch out for the "right" events which are propagated from the SAP Business One application through UI API (an interface in the SDK) to "interested" Add-On(s)...
    HTH,
    Frank

  • Use methods in other classes

    Can I use methods from other classes than the class that myClass extends?
    ex. myClass extends parentClass{
    myMethod()
    myMethod() is declared in i third class. Is this possible or can I only use classes from the parent class?
    -Thanks-

    I'm not really sure what the previous two answers were getting at.
    Yes, you can use methods all the way up the class hierarchy, as long as they are visible.
    For example, Object implements toString(). You can call toString() on any object in Java and it will render the object to a string in one way or another. That is because toString() is public.
    If toString() were protected, you would only be able to call the method if you were a subclass of of that object (or in the same package), which would make the toString() method much less useful.
    I would suggest reading up on the differences in the four visibility modifiers (private, (default), protected, and public). Private is the only one which nothing else can call. If you are public or protected, any subclass can call the method, even if there are 20 superclasses between the implementor and the caller.
    Good luck!
    Steve

  • How to use methods when objects stored in a linked list?

    Hi friend:
    I stored a series of objects of certain class inside a linked list. When I get one of them out of the list, I want to use the instance method associated with this object. However, the complier only allow me to treat this object as general object, ( of Object Class), as a result I can't use instance methods which are associated with this object. Can someone tell me how to use the methods associated with the objects which are stored inside a linked list?
    Here is my code:
    import java.util.*;
    public class QueueW
         LinkedList qList;
         public QueueW(Collection s) //Constructor of QuequW Class
              qList = new LinkedList(s); //Declare an object linked list
         public void addWaiting(WaitingList w)
         boolean result = qList.isEmpty(); //true if list contains no elements
              if (result)
              qList.addFirst(w);
              else
              qList.add(w);
         public int printCid()
         Object d = qList.getFirst(); // the complier doesn't allow me to treat d as a object of waitingList class
              int n = d.getCid(); // so I use "Object d"
         return n; // yet object can't use getCid() method, so I got error in "int n = d.getCid()"
         public void removeWaiting(WaitingList w)
         qList.removeFirst();
    class WaitingList
    int cusmNo;
    String cusmName;
    int cid;
    private static int id_count = 0;
         /* constructor */
         public WaitingList(int c, String cN)
         cusmNo = c;
         cusmName = cN;
         cid = ++id_count;
         public int getCid() //this is the method I want to use
         return cid;

    Use casting. In other words, cat the object taken from the collection to the correct type and call your method.
       HashMap map = /* ... */;
       map.put(someKey, myObject);
       ((MyClass)(map.get(someKey)).myMethod();Chuck

  • How to use method POST to send XML using utl_http?

    Hi,
    I am trying to work out how to use the POST method to mimic submitting data from a HTML form, using utl_http.
    I cannot use SOAP for this as the people I am sending the data to are just expecting an XML document to be sent to a standard CGI script running on their web server.
    There is a lot of documentation on how to submit data using the POST method (using Utl_Http.Write_Text etc), but I cannot find anything that tells me how to submit form variables.
    The examples on OTN say this:
    "Alternatively use method => 'POST' and Utl_Http.Write_Text to
    build an arbitrarily long message"
    but don't tell me how to actually place the data into the required input parameters of the CGI program I am hitting.
    I need to hit a URL such as
    www.asite.com/cgiprogram
    and pass in a parameter, eg
    in_param="test+data"
    I am currently doing this as a GET, which works, but the XML document I am passing in could potentially be bigger than the GET method will allow.
    Any help would be greatly appreciated.
    Thanks,
    Leon.

    Please try the PL/SQl forum

  • How to use a non-standard true type font that won't be changed by the native environment on others' computers when they open the document?

    We are using a non-standard true type font (Zurich Ex BT) when creating a .pdf document but when others view it, the font is changed on their computers.  How do we use this font and keep it from being changed when others look at it?

    This is actually good stuff and well written but I hesitate to advise people to use either the "oven trick" or really even the heat gun method as both are notriously short-lived even if they appear effective. Your far better bet is to send the board in to one of the vendors on the internet who are set up to do a proper reball. Even those fixes are good for maybe 12-18 mos. But again, you get a high grade for spelling it out.

  • Transaction code which using method of a class as start object

    Hi all,
    I'm creating a new tcode 'Z123' which is tied to a method of a class in SE93. However, when I run this tcode and into debug mode, SY-TCODE will always return OS_APPLICATION. How can I get the actual tcode, which is 'Z123' into my program?
    Thanks in advance

    You can try using the method GET_CURRENT_TRANSACTION of class CL_DYNPRO. Check this SAP documentation for details:
    ... the method GET_CURRENT_TRANSACTION of the class CL_DYNPRO can be used to obtain the transaction code of the current transaction. This method returns the transaction code during a parameter transaction or variant transaction instead of the transaction code of the implicitly called dialog transaction.
    But if i try checking sy-tcode in a tcode bound to a method of a class i get the correct tcode & not OS_APPLICATION.
    Br,
    Suhas

  • How to use method setXSLT

    Hi All!
    how I can use method setXSLT from OracleXMLQuery class
    when I try:
    java.lang.NoClassDefFoundError: oracle/xdb/XMLType
         oracle.xml.sql.query.OracleXMLQuery.setXSLT(OracleXMLQuery.java:747)
    code:
    xmlQuery = new OracleXMLQuery(this.mainDbConn.getConn(),sql);
    xmlQuery.setXSLT("/[path]/[name].xsl","");

    Specify stylesheet as a URI.
    xmlQuery.setXSLT("file://c:/util.xslt");this don't work :(

  • Error in using method get_event of class cl_htmlb_manager.

    Hi All,
    i am trying to get the event details in a particular method as follows;
    data: event type ref to cl_htmlb_event .
    event = cl_htmlb_manager=>get_event( runtime->              server-  >request ).
    i am getting an error
    field RUNTIME is unknown , it is neither in one of the specified tables nor defined by DATA statement. DATA statement. DATA statement.
    Where am i going wrong?
    plz help.
    BR,
    Annu.

    Hi Jorge,
    I am trying to use it in the method GET_LIST of class CL_SUS_M_ORDER_LIST .
    If i use
    event = cl_htmlb_manager=>get_event_ex( request ).
    again i get the error  Field REQUEST is unknown .
    and if i dont declare event using data statement
    data: event type ref to cl_htmlb_event .
    then i get the error that Field EVENT is unknown.
    My application is MVC pattern.
    So is there anyother way of geting the EVENT details when RUNTIME / REQUEST are not available ?
    Thaknks for the reply.

  • How to use commit work in class cl_bls

    Hi,
    When i have used commit work after email sent,
    it goes into dump.
    Here is the code segment:
      try.
        -------- create persistent send request ------------------------
          send_request = cl_bcs=>create_persistent( ).
        -------- create and set document -------------------------------
          pdf_content = cl_document_bcs=>xstring_to_solix( pdf_tab ).
          document = cl_document_bcs=>create_document(
                i_type    = 'PDF'
                i_hex     = pdf_content
                i_length  = bytecount
                i_subject = sub ).  "#EC NOTEXT
        add document object to send request
          send_request->set_document( document ).
        --------- add recipient (e-mail address) -----------------------
        create recipient object
          recipient = cl_cam_address_bcs=>create_internet_address( recip-recip ).
        add recipient object to send request
          send_request->add_recipient( recipient ).
        ---------- send document ---------------------------------------
          sent_to_all = send_request->send( i_with_error_screen = 'X' ).
         commit work.
          if sent_to_all is initial.
            message i500(sbcoms) with recip.
          else.
            message s022(so).
          endif.
      ------------ exception handling ----------------------------------
      replace this rudimentary exception handling with your own one !!!
        catch cx_bcs into bcs_exception.
          message i865(so) with bcs_exception->error_type.
      endtry.
    What could be the reason?
    Is there any way to use commit work in class while sending email as in SO_NEW_DOCUMENT_ATT_SEND_API1 fm?
    Thanks.

    Hi,
    I have used
    submit program.....
    but in update task i have used it.
    "Z_SD_ORDER_UPDATE".    program is a print driver program.
    However error says:
    There is probably an error in the program
    "Z_SD_ORDER_UPDATE".  
    This program is triggered in the update task. There, the
    following ABAP/4 statements are not allowed:
    -  CALL SCREEN
    -  CALL DIALOG
    -  CALL TRANSACTION
    -  SUBMIT
    I used submit as:
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                      WITH output = ' '
                    AND RETURN.
    Instead of submit i want to use commit work but i also get a dump after commit work too.
    How can i use commit work in above code?
    Thanks.

  • Use method from father class for event

    Hi,
    I want to use a preDelete event in my class, but the method I would like to call for the event is not in the class itself, but in the (abstract) predecessor class. Any chance to do this? At the moment I can't select the method in the event tab page (it's not in the list to choose from ...)
    Thank you!
    J.F.

    In 9.0.4 you will need to add the parent class as a descriptor and choose to deactivate it. This will allow you to choose methods from that class in the subclass descriptors.
    In 10.1.3 there is a dialog for specifying classes that are not persistent, but necessary in other persistent classes: http://www.oracle.com/technology/products/ias/toplink/doc/1013/main/_html/mw007.htm#sthref629
    A good explanation of why we don't store the parent and referenced classes unless explictly asked can be found here: Re: Mapping Workbench  10.1.3.0 Bug - Cannot add Implemented Interfaces
    Hope this helps,
    Karen

Maybe you are looking for

  • No longer able to drag Outlook emails to Outlook calendar events

    I use Outlook 2007 on my PC, and sync it to my iPhone and iPad using iCloud.  I used to be able to drag an email to the notes section of an Outlook calendar event, but it looks like this ability/feature is now gone.  Can I get this feature back? I ev

  • Consolidated entry in BED account as captured for BED, Ecess and HScess

    Dear SAP Gurus, RG23A Part 2 register print shows the combined payment under BED a/c. Upon execution of Payment/Utilization Entry via (J2IUN) which consolidates the payment under BED (114014)  as against being captured distinctly for BED, Education C

  • I have .mac and iCloud accounts on my ipad

    Do I really need both on my iPad.  If not, which should be deleted?

  • Do Flash Forms kill form spam?

    This may be a real newby question. Is it possible to stop 100% of form spam by using a hidden field in a Flash form, and then simply testing for is presence on the page the form posts to? Is it really this easy?

  • ITunes won't launch on my Mac.

    I have been using iTunes and my mac for a year now. I've never had a problem, didn't have the iTunes store lock up that many had. Now, I have a problem, and I'm at a loss what to do. I've tried the fixes posted here for other problems, including the