How to create a instance for the method

it is showing me dump error for the call method
data: i_tab type /SCMB/DM_ORDER_TAB,
      grid1  TYPE REF TO /SCA/CL_SVORDER .
CALL METHOD grid1->READ_BY_IDS
  EXPORTING
   IS_CTRL      =
    IV_ORTYPE    = gt_po_detl-ortype
   IV_LOCKFLG   = /SCMB/CL_C_ORDER=>GC_FALSE
   IV_NOADDRESS = /SCMB/CL_C_ORDER=>GC_FALSE
   IV_MAPID     = /SCMB/CL_C_ORDER=>GC_FALSE
   IV_DUEQUAN   = /SCMB/CL_C_ORDER=>GC_FALSE
    IT_ORDERID   = itab_orderid
  IMPORTING
    ET_ORDERS    = i_tab
   ET_PROT      =
u r attempting to use a null object reference access a component (variable 'GRID!")
an object reference must point to an object (an instance of  a class ) before it can be used to acess a component either the reference was never set or it was set to null using the clear statement

sridhar loganathan,
A ABAP Class is just a definition of fields/variables called attributes and routines (like in standard ABAP forms and functions) called methods. Also you can have events, don't care about before necessary.
The definition itself is just a blueprint. Nothing exists, nothing can be used before you create an instance for this definition.
DATA: grid1 TYPE REF TO /SCA/CL_SVORDER creates a 'handler' for ( to be created) instances of the class.
The statement CREATE OBJECT grid1 creates an instance of the class as defined in the 'blueprint' and assigns the reference to this instance (with all methods, attributes and events) to reference field grid1.
In 999 of 1000 cases SAP creates just one object of a class. In those cases the definition of classes and uses of object oriented programming is more or less obsolete.
Anyway: Just keep in mind that you can not uses attributes and methods of the class directly (blueprint!) but only of the instance created.
An Exception to be noted are so-called Static attributes and methods where an instance is not required. Example ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB gives the character for horizontal tab regardless of platform and char encoding (unicode!). Class ABAP_CHAR_UTILITIES defines static attribute HORIZONTAL_TAB - no instances necessary because this will never change in a given system.
Hope this sheds some light on it
Regards,
Clemens

Similar Messages

  • How to create an instance for RemoteSession without using create() method

    How to create an instance for RemoteSession without using create() method?

    What's RemoteSession? Not in the JDK. And does the question have anything to do with concurrency?

  • How to create an instance of the database

    No that won't work. I have to set it up independant from each other because I can't get to Uni until Monday and I want to have this done over the weekend really.
    The main issue seems to be now how to create an instance of the database

    To create a database:
    you first connect as internal (user) with the passeword 'oracle'
    the syntax is: connect internal/oracle
    You type in this script:
    STARTUP NOMOUNT PFILE=$PFILE
    CREATE DATABASE db01
    LOGFILE
    GROUP 1 ('c/oracle/oradata/db01/redo_01a.log',
    'c/oracle/oradata/db01/redo_01b.log'
    ) size 100k,
    GROUP 2 ('c/oracle/oradata/db01/redo_02a.log',
    'c/oracle/oradata/db01/redo_02b.log'
    ) size 100k
    MAXLOGFILES 32
    MAXLOGMEMBERS 2
    MAXLOGHISTORY 1
    DATAFILE 'c/oracle/oradata/db01/system01.dbf'
    size 7M
    MAXDATAFILES 254
    MAXINSTANCES 1;
    This script could be modified to reflect the features you want for your database.
    db01 = the name you can give to your database
    Good luck,
    Henri

  • How to create a validation for the project coding mask

    Hi,
    Would just like to ask how to create a validation for the project coding mask wherein the WBS elements hierarchy will be checked against the template saved. For example,
    project coding mask is XXXX-XXXXX-XX-X-X-X-00-X
    mother WBS should be XXXX-XXXXX-X and lower level WBS would be XXXX-XXXXX-XX.
    The validation should not allow a mother WBS to be XXXX-XXXXX-XX.
    How can we go about this?

    Hi Jacquiline Bersamin,
    You can use validation with the combination of the level and the coding mask.
    In the validation:
    Pre requisite: WBS level = 1
    Validation: Prps-posid = prps-posid :1-12:
    Message : Error
    If required you can give the parameters for your detail error message.
    Please let me know if this does not work.
    Thanks
    Regards
    Srinivasan Desingh

  • How to create a password for the pdf file

    In Adore Acrobat XI, how to create a password for the file? The help states going to Tools Menu and clicking on Protection tab - but there is no such option. In the file - properties - security screen, it shows the security details but does not allow to edit it.

    I think you may be mixing up two different products: Adobe Reader (free), and Acrobat ($$).

  • HOW TO CREATE SEVERAL folder for the generation and READING FILE

    HOW TO CREATE SEVERAL folder for the generation and READING FILE WITH THE COMMAND utl_File.
    please give an example to create 3 folders or directories ...
    I appreciate your attention ...
    Reynel Martinez Salazar

    I hope this link help you.
    [http://www.adp-gmbh.ch/ora/sql/create_directory.html]
    create or replace directory exp_dir as '/tmp';
    grant read, write on directory exp_dir to eygle;
    SQL> create or replace directory UTL_FILE_DIR as '/opt/oracle/utl_file';
    Directory created.
    SQL> declare
      2    fhandle utl_file.file_type;
      3  begin
      4    fhandle := utl_file.fopen('UTL_FILE_DIR', 'example.txt', 'w');
      5    utl_file.put_line(fhandle , 'eygle test write one');
      6    utl_file.put_line(fhandle , 'eygle test write two');
      7    utl_file.fclose(fhandle);
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> !
    [oracle@jumper 9.2.0]$ more /opt/oracle/utl_file/example.txt
    eygle test write one
    eygle test write two
    [oracle@jumper 9.2.0]$
    SQL> declare
      2    fhandle   utl_file.file_type;
      3    fp_buffer varchar2(4000);
      4  begin
      5    fhandle := utl_file.fopen ('UTL_FILE_DIR','example.txt', 'R');
      6 
      7    utl_file.get_line (fhandle , fp_buffer );
      8    dbms_output.put_line(fp_buffer );
      9    utl_file.get_line (fhandle , fp_buffer );
    10    dbms_output.put_line(fp_buffer );
    11    utl_file.fclose(fhandle);
    12  end;
    13  /
    eygle test write one
    eygle test write two
    PL/SQL procedure successfully completed.
    SQL> select * from dba_directories;
    OWNER                          DIRECTORY_NAME                 DIRECTORY_PATH
    SYS                            UTL_FILE_DIR                   /opt/oracle/utl_file
    SYS                            BDUMP_DIR                      /opt/oracle/admin/conner/bdump
    SYS                            EXP_DIR                        /opt/oracle/utl_file
    SQL> drop directory exp_dir;
    Directory dropped
    SQL> select * from dba_directories;
    OWNER                          DIRECTORY_NAME                 DIRECTORY_PATH
    SYS                            UTL_FILE_DIR                   /opt/oracle/utl_file
    SYS                            BDUMP_DIR                      /opt/oracle/admin/conner/bdumpRegards salim.
    Edited by: Salim Chelabi on Apr 4, 2009 4:33 PM

  • How to create search path for the file on the desktop..

    hello experts..
          I have used gui_upload module to upload the data from flatfile to the internal table, in that how can i create search path for the file selection in the selection screen, also please help me the code to update the ztable.
    thanks

    HI
      If iam not wrong you want to select a file from a location that you don't know so if this is ur problem then use the function module
    F4_FILENAME
    this FM helps to locate and select the desired file from the system.
    Sample code that you can check is
    How to get windows filename
    PARAMETERS: lv_file LIKE rlgrap-filename.
    Method 1
        CALL FUNCTION u2019KD_GET_FILENAME_ON_F4u2019
        EXPORTING
        MASK = u2019,.txt,.*u2019
        STATIC = u2019Xu2019
        CHANGING
        FILE_NAME = LV_FILE.
    Method 2
    CALL FUNCTION u2019F4_FILENAMEu2019
    EXPORTING
             program_name = syst-cprog
             dynpro_number = syst-dynnr
             field_name  = u2019 u2019
         IMPORTING
             file_name   = LV_FILE.
    Regards
    Pavan

  • How to create a playlist for the movies I have?

    Hope someone can help me here. How do you set the movies to play continuously? I can't seem to create a playlist for the movies. You can create playlist for podcast videos and musics but how do you creat playlist for the 3 movies I have got on my iphone?
    Any help will be greatly appreciated.

    Not exactly true. As absurd as it sounds, if you have just one music track in your playlist, then you can select it from the Playlists section on the iPhone and play your videos, movies etc. one after the other.
    I have created a completely empty music track in Garageband which I drag onto the end of each and every video playlist I create. An ugly solution, but it works.
    You have to remember to check the playlist in both the Video and Music sections in iTunes->Devices->Your iPhone.

  • How to create an Invoice for the sales order using the T-Code VF01

    Hello Experts,
    How to create an Invoice for a sales order using the T-Code VF01?
    Thanks in advace,
    Suma

    hi,
    Make the following settings-
    1. Create sales document and billing type
    2. assign billing type in sales document type config VOV8
    3. Activate itemcategory as sales order related billing
    4. Maintain copy control header and item level between sales order and billing
    5. Maintain pricing procedure for sales order and billing
    6. Define Output procedure in case to print invoice
    Regards
    Goutham

  • How to create a matchcode for the list of Customers "Group key" KNA1-KONZS

    Hi All,
    with reference to the creation of "Group key" KNA1-KONZS for Customers,
    I'd like to know if is possible to create a matchcode for the list of Customers "Group key" created.
    Thanks
    Gandalf

    Hi
    MAINTAIN THE GROUP KEY IN GENERAL DATA ---CONTROL DATA SCREEN
    If the customer or the vendor belongs to a group, you can enter a group
    key here. The group key is freely assignable.
    If you create a matchcode using this group key, group evaluations are
    possible.
    KNA1-KONZS
    Cya
    udayakumar

  • How to create a BADI for the sceanrio

    Hi abapers,
    I have a scenario as follows.
    I create a Transaction where in i put the details of the product and quantity for a particular project's site. The amount gets calculated based on the products  unit value and its displayed in net value field. Now the user saves the transaction and a number gets generated. If the net value amount is less than 500 then the user can approve , if its greater than 501 and less than 1500 then a mail should be generated to his superior who is able to approve and ifs amount is greater than 1501 then a mail should be generated to the top of hierarchy who should approve it.
    Now the real challenge is if the same project card  has more than 1  new request and the amount is less than 500 the user should not be able to approve  instead it should generate a mail to his hierarchy for approval  since  the site has already been exceeded its limit of approval. bcoz earlier 500 and current 400 which will make it to greater than 500.similarly for the hiearchy.How do i go about  it.
    Now i want to create a BADI  on the save event of transaction to check the net value amount as well as check for earlier amounts saved for the particular site.
    Any help will be appreciated.
    Regards,
    Navin .

    hai navin
    r u using ECC 6.0 or 4.7 if 4.7 u can create badi defintiion directly form se18 transaction
    and define the interface and its methods , once u define them activate them
    and to use in ur code u create an instance of ur badi name
    and then use
                     cl_exithandler=>get_instance  method in instance name parameter just pass ur badi name and this will create a badi defintion in ur code, and an oen can implement it
    if u r usign ecc6.0 then u can either create new badis usign enhancments or classical badis
    for clasical badis just go to menu  utilites and create classical badis and follw the sam eprocedure
    regards
    m.a

  • How to create new instance of the process from external web apps?

    Hi Everyone,
    How to create a new instance of the process which deploy to the weblogic server from the external web app?
    Thank you.

    Assuming the process includes a message start event, the simplest way is to use Web Service call. Once you've deployed the process you can use Enterprise Manager to get the URL of the WSDL. There's and icon at the top of the composite summary page for getting the WSDL, or you can get it from the test page. Use that WSDL URL to construct the client to use from the web app. If it's an ADF client you can generate either an ADF Data Control or a client proxy.

  • How to create clean text for the web in Photoshop/Illustrator

    I am puzzled to death on how in the world to get clean text for the web in Photoshop/Illustrator, particularly white text. I want my text to turn out exactly like the text at this website: thepainteddoor.org
    If you scroll down to the bottom of that page, notice the titles "Featured Media", "Social Networking", and "Contact Information". They are all .gif images. I have tried to replicate what these images look like for about 3 hours now to no avail. Can anyone tell me how to do this? It just looks like a simple outline or drop shadow, but I can't get it to show up like that. If someone could help me replicate that effect with text (aka make it show up clean as an image), I would graciously give them money through PayPal*.
    * = I will only give cash if it will replicate it exactly (and I mean exactly)..and it won't be too much..I'm a poor college student. :-P
    Thanks in advance!
    Thomas

    You would do it the way I created it:
    Select the Text tool in Photoshop and set the font and parameters as I have listed.  Then enter whatever text you like.  It will be rendered over the top of the lower layers you may have in the document.  Save as an image of the appropriate type and you're there.
    Note that "lower layers you may have in the document" could conceivably be none at all (i.e., you render the text over a transparent document).  You could imagine saving that as a .png with transparency and get light text in an image that could then be put over the top of anything else.  The alpha mixing will see to it that the edges smoothly blend with the background.  I haven't actually tried this (I usually do try my own suggestions) because of lack of time right now.
    -Noel
    Edit:  Markerline and I seem to be on the same crystal-controlled wavelength. 

  • How to create a service for the OHS (Apache 2.0) on Windows?

    I've downloaded the Oracle HTTP Server (Apache 2.0) (10.1.3.3.0).
    It works also fine with DB 10gR2 and APEX.
    But how do I create a windows service for the opmnctl.exe?
    Thanks
    Ralph

    I've downloaded the Oracle HTTP Server (Apache 2.0) (10.1.3.3.0).
    It works also fine with DB 10gR2 and APEX.
    But how do I create a windows service for the opmnctl.exe?
    Thanks
    Ralph

  • How to create more instances for this text game.  Help please!

    Hey guys, so far this code works great, but I'm trying to add more questions and answers to this and I'm having trouble doing that. I've tried using different methods and just going from method to another, but I can't seem to get it to work right. Should I be able to do it with different methods or is there another way I should be doing this?? I also want to add a score to this game as well. Adding points for each correct guess and I searched online trying to find a point to start, but couldn't quite get a hold on it. This is just something that would be cool to add, but isn't necessary if you don't think you can help me out. Thanks for checking this out and for the help!!
    public class TextShuffleGame
         private CinReader reader;
         public TextShuffleGame ()
              reader = new CinReader();
         public void go ()
              System.out.println("");
              System.out.println("Welcome to Text Shuffle.");
              int tries = 0;
              boolean correctGuess = false;
              while (correctGuess == false && tries < 5)
              System.out.println("What 6-letter word is made up from the letters \"dunops\"?");
              String guess3 = reader.readString();
              String answer3 = "pounds";
                        if (guess3.equalsIgnoreCase(answer3))
                             System.out.println("Hooray! You are correct!");
                             correctGuess = true;
                        else
                             System.out.println("Sorry, Try again!");
                             tries++;
              public static void main(String[] args)
              TextShuffleGame thisClass3 = new TextShuffleGame();
                   thisClass3.go();
    }

    If I understand you correctly, you want to add more words to the program. If so, then create an array or some other Collection to store a bunch of words. Then you need to randomly select a word from the list. Create another method to randomly shuffle the letters and display that instead of hardcoding it. Then when a user types a guess you compare it to the word in the list, once again instead of hardcoding it.

Maybe you are looking for

  • Attempting to install Creative Cloud

    I have been trying to install the Creative Cloud app for two days. I keep getting an error message about 10 seconds into the install. The error code is A12E5  Adobe Installer: We've encountered the following issues: There seems to be a problem with t

  • I can't move files to trash

    I can't move files to the trash without the finder wanting an administrator password and then the file is immediately deleted.  This just strarted a few days ago.

  • Mail sends when I hit return

    Don't know what happened.  But when I hit return to start a new paragraph it SENDS. Is there some weird preference that suddenly activated?

  • Stopping update in ACS 5.1

    Hello I tried to update my ACS 5.1 appliance. I applied patch 5.1.0.44.3 and made an big mistake: I booted the server due to the fact that it was not reachable after one hour after appplying the patch. Now the server shows following message, when I t

  • Unable to see Preferences button in Infoview.

    Hello, I am new to Business Objects. We recently installed Business Objects XI 3.1 and have imported our database from previous version and was able to configure it. I have changed the properties in CMC for the Infoview application and have selected