Explain about import statement..

Hi All,
what is happening for the below code, pls explain.
  import mdpsx release_9400 block_9400 upd_mro_9400 route_9400 mdvux
      from database indx(zb) id indx_key.
below is the information
mdpsx - Internaltable
release_9400 - Internaltable
block_9400 - Internaltable
upd_mro_9400 - Internaltable
route_9400 - Internaltable
mdvux - Internaltable
indx - Database Table
indx_key is the structure and have the below files in that structure:
matnr like matvp-matnr
werks like matvp-werks
subbu.

hi
you wrote..
>
subbu ilam wrote:
> what is happening for the below code, pls explain.
>
>
>   import mdpsx release_9400 block_9400 upd_mro_9400 route_9400 mdvux
>       from database indx(zb) id indx_key.
>
> below is the information
>
> mdpsx - Internaltable
> release_9400 - Internaltable
> block_9400 - Internaltable
> upd_mro_9400 - Internaltable
> route_9400 - Internaltable
> mdvux - Internaltable
> indx - Database Table
>
> indx_key is the structure and have the below files in that structure:
>
> matnr like matvp-matnr
> werks like matvp-werks
>
>
> subbu.
NOTE :-IMPORT nad EXPORT is use to importing exporting data to or from the ABAP memory
import mdpsx release_9400 block_9400 upd_mro_9400 route_9400 mdvux
     from database indx(zb) id indx_key.
in the above statement mdpsx release_9400 block_9400 upd_mro_9400 route_9400 mdvux is import from the from the ABAP memory database indx(zb)
hope this helps
Regards
Ritesh

Similar Messages

  • Please explain the IMPORT statement?

    I have been searching for information on the import statement, but can't seem to locate it. I understand how to use import, but I would like to know, in detail, exactly what it does.
    When I import, for example; "java.awt.*", I would expect this statement to import ALL of the classes define under "java.awt". However, I notice in the DiveLog class, that I must also import "java.awt.event.*". This is confusing to me.
    Can someone either explain this for me, or point me to the imort documentation?

    aye - what yawmark says. And also be aware that import doesn't really "import" any source (not the way #include does, if'n you're an old school C coder). It's just there to shorten typing. You can either type "java.io.IOException" a lot, or import java.io.IOException and get away with just typing "IOException". But you've just "imported" the namespace, not any kind of source.
    Make sense?
    Lee

  • Concept about  import statements

    Hi all,
    I write a GUI application and I notice I have to write these two import statement at the same time in order to handle the events:
    import java.awt.*;
    import java.awt.event.*;
    Why is that? Does java.awt.* not include java.awt.event.*?
    thank you,
    Li

    I'm unsure what you are talking about...do you mean something like this?
    import java.util.LinkedList;
    import java.util.concurrent.*;-or- perhaps something like:
    import java.util.*;
    import java.util.LinkedList;In the case of the former, that is perfectly legal and possible. In the case of the latter, it is possible, but absurd. Perhaps neither of these were what you were talking about. If not, let me know more precisely what you mean and we'll see about it.

  • Question about import statements

    Why is it that I must have the import statement on the
    same frame
    and same layer
    as the AS code that utilizes the Class that I am importing?
    At least that is how it appears.

    Because that is how it works.
    Remember, import doesn't actually "import" anything. It is
    just a shortcut so you don't have to type the whole package name
    every time you use the coded in your example.
    It is actually kind of nice when you come back to code later
    or if you open somebody else's code (that you have to update or
    change) and to see at the top, "Oh, this bit of code has a reliance
    on class blah.blah.Yadda." In a way it kind of helps enforce a bit
    of good coding practice.

  • Question about import statement

    Hi all!
    I was wondering if a line like this:
    import java.io.*imports all classes from java.io or just the classes needed by your program (the classes you actually using in your code). Can anyone give me a little hint on that?

    The way I understand it is that it simply makes the
    classes in that package 'visible'. This means that you
    don't have to type the fully qualified name each timeOh, yeah. I was thinking too much in C and it's #include.
    Thanks :-)

  • Newbie question about import statement

    Lets say for example I have a class A and a class B.
    Then lets say I import class A into class B.
    If I instantiate some objects and methods in class A
    Will I be able to access them in class B.
    Thanks gemann

    Imports are used to import classed from another package.
    Conside a package named package1 and class named A in it.
    package package1;
    public class A{
      //public method
      public void publicmethod() {}
      //private method
      private void privatemethod() {}
      //default method
      void defaultmethod(){}
      //protected method
      void portectedmethod(){}
    }Now conside another package named package2 having a class B.. and you want to make an object of class A and want to call its method..
    package package2;
    import  package1.A;  // or import package1.*   it imoprts every class in this package
    class B{
    B(){
    A a=new A() ; // possible since we imported it..
    a.publicmethod() // possible since it is public method
    a.defaultmethod()// Not possible. since it is a this is in a different package
    a.protectedmethod()// Not possible since this is in  a different package, and this is not a derived a derived class of B
    a.privatemethod() // Not possible since it is private
    }Hope it is clear now..
    appu

  • Confused about CLASSPATH and how java handles import statements...

    Hello,
    I must admit I don't get it. I read the articles about setting CLASSPATH etc. but I still wonder:
    If you use an import statement, what does the compiler do? I.e. where does it look for the specified classes? I find it confusing because I see in different locations different .jar files:
    C:\jdk1.3.1_03\lib\dt.jar
    C:\jdk1.3.1_03\lib\htmlconvertor.jar
    C:\jdk1.3.1_03\lib\tools.jar
    and also
    C:\jdk1.3.1_03\jre\lib\i18n.jar
    C:\jdk1.3.1_03\jre\lib\rt.jar
    C:\jdk1.3.1_03\jre\lib\jaws.jar
    C:\jdk1.3.1_03\jre\lib\sunrassign.jar
    Can someone explain me what the purpose is of these files?
    And why do I have the same contents in
    C:\Program Files\JavaSoft\JRE\1.3.1_03\lib
    and in
    C:\jdk1.3.1_03\jre\lib
    Why is that?
    Thanks for answering my questions!
    -mike

    Thanx for the answers, but I still wonder, everyone
    here says I need to set the classpath, but I don't.Probably because your classes are already in the class path. The compiler/jvm also look for classes by themselves not just in jar files, when just a directory is supplied in the class path. And a period (".") is a valid directory.
    Programs importing different classes compile with no
    problem. So what's up with that?
    Presumably you are referring to your own code - because they are in the class path.
    Second, I still don't understand why the runtime needs
    the .jar files. The runtime uses classes, like String, that have to come from somewhere.
    This would also mean that end-users
    need to set the classpath to the .jar files in their
    JRE directory to be able to run programs that import
    classes from these .jars. But this is not true, right?No it is true. The end-users will have to set the class path. There are variations on this which make it seem like no class path is set. For instance applets in a browser are java but the end-user does not need to set a class path. That is because the browser knows how to download classes/jars and how to set it up so it uses them. (Actually it uses a class loader, but that is probably more information that you need.)
    Because if I make some nice classes myself and import
    them, how can I expect my end-user to install these
    classes and make a classpath for them?That would be between you and you end-user.
    First installation is not part of java. For installation you will have to find something outside of java to accomplish the goal.
    Additionally how the class path gets set is OS specific. Java does not deal with that. You will also have to find some way to deal with this (most likely part of the installation.)
    There are also variations on this. For example the browser example I gave above. Or using the ext directory. Or creating an executable jar. Or simply setting the class path.
    In my understanding it should only be needed in the JDK, not
    in the JRE. True or am I mistaken?Mistaken. The class path is needed in the JRE as well. You will need to set it.

  • Import statement .. what does it do ??

    Hi All,
    What is IMPORT statement doing ??
    IMPORT order_items_in to w_order_items_in from MEMORY ID
    'FREEGOODSTERMS'.
    can you kindly explain what this statement is doing ?
    I was by my friend that this is used to pass order_items from one session to this sesssion, but when I searched for FREEGOODSTERMS, I could find export after this statment. I was wondering how can import me first and then export.
    Please let me know.
    Thanks
    venkat.

    Hello Venkat,
    Sorry for late reply..
    Please see the program which other program submitting somewhere.
    if they are using multiple purpose then export and import statement may possible in one include.
    Best way just use where used list for that include and other programs searching like export and submit..
    For better understanding about export and import then see the below sample programs.
    Create one program and paste below code :
    REPORT  ZTEST_AMEM1.
    tables : lfa1.
    data : begin of i_lfa1 occurs 0 ,
           lifnr like lfa1-lifnr,
           name1 like lfa1-name1,
           land1 like lfa1-land1,
           end of i_lfa1.
    start-of-selection.
    select lifnr
           name1
           land1 from lfa1
           into table i_lfa1 up to 100 rows.
    Export
    export i_lfa1 to memory id 'SAP'.
    submit ztest_amem2 and return.
    write:/ 'hello'.
    Now create one more program  and paste below code :
    REPORT  ZTEST_AMEM2.
    data : begin of j_lfa1 occurs 0,
           lifnr like lfa1-lifnr,
           name1 like lfa1-name1,
           land1 like lfa1-land1,
           end of j_lfa1.
    start-of-selection.
    import i_lfa1 to j_lfa1 from memory id 'SAP'.
    loop at j_lfa1.
    write:/ j_lfa1-lifnr,j_lfa1-name1,j_lfa1-land1.
    endloop.
    Thanks
    Seshu

  • Import statement clashes

    Hi,
    If 2 import statements happen to import the same class implicitly (as opposed to naming the exact class in the import statement), then how does the compiler decide which one is used? Apparently the order of the import statements doesn't matter... already tried that.
    For example:
    //class Test.java
    import java.lang.*; /redundant, but shows that we're importing Object
    import org.omg.CORBA.Object;
    public class Test {
    public static void main(String[] args) {
    Object obj = new String();
    ... here, the compiler complains about "found: java.lang.String" and "required: org.omg.CORBA.Object". Switching the order of the import statements had no effect... same issue. How are name clashes handled with import statements?

    The conflict is not resolved -- if there is any ambiguity the compiler complains. In these cases you need to use the fully qualified class name; e.g. java.lang.Object or org.omg.CORBA.Object -- it's not allowed to use the simple name "Object" because there's no way to know which of the two is meant.

  • Import statement and directory structure

    First of all, sorry for such a long post, I believe part of it is because I am unsure of the concept of importing in Java. Secondly, Thanks to anyone who can ultimately enlighten me to the concept of import. I did ask this question before in the "erorr and error handling" forum, and the people who have helped me there did a great job. But, I believe I require a little more clarification and thus have decided to post here.
    Anyhow, my question..
    Could someone explain to me the concept of the import statement, or direct me to a webpage with sort of explanation for newbies? For some reason, I am having a hard time grasping the concept.
    As I understand it, the import statement in Java, is very similar to the namespace keyword in C. That is to say, import doesn't actually "import" any source code, the way that the #include statement does in C.
    So I suppose what my question is, say I have a java class file like below:
    //filename: sentence.java
    //located: c:\school\csc365
    package csc365;
    class sentence
    //some variables here..
    //some constructor here..
    //some methods here..
    And some sample program like the one below which implements the above..
    //filename: test.java
    //located: c:\school\csc365
    import csc365.*;
    import java.io.*;
    class test.java
    //creates some sentence object
    //uses the object's methods
    //some other things.
    As I understand it, the test.java file should not compile because the csc365 package is not in the correct directory. (assuming of course, the classpath is like c:\school\csc365;c:\school )
    But, ... where then should the sentence.java be located? In a subdirectory of c:\school called csc365 (i.e c:\school\csc365\) ?
    And thus that would mean the test.java file could be located anywhere on the hard drive?
    I suppose, I just need a little clarification on the correlation between a package's "name" (i.e package csc365; ) and its corresponding directory's name, and also how the javac compiler searches the classpath for java classes.
    ..So, theoretically if I were to set the classpath to look in every conceivable directory(provided the directory names were all unique) of the harddrive, then I could compile a test.java anywhere?
    As a note: I have been able to get the test.java file to compile, by leaving out the import statement in the test.java file, and also leaving out the package statement for the sentence class, but I assume this is because the files are defaulted to the same package?

    Hi Mary,
    No, import isn't analogous to C++ namespace - Java package is closer to the namespace mark.
    import is just a convenience for the programmer. You can go your whole Java career without ever writing an import statement if you wish. All that means is that you'll have to type out the fully-resolved class name every time you want to use a class that's in a package other than java.lang. Example:
    // NOTE: No import statements
    public class Family
       // NOTE: fully-resolved class names
       private java.util.List children = new java.util.ArrayList();
    }If you use the import statement, you can save yourself from typing:
    import java.util.ArrayList;
    import java.util.List;
    public class Family
       // NOTE: fully-resolved class names
       private List children = new ArrayList();
    }import isn't the same as class loader. It does not bring in any source code at all.
    import comes into play when you're compiling or running your code. Java will check to make sure that any "shorthand" class names you give it live in one of the packages you've imported. If it can't find a matching fully-resolved class name, it'll give you a message like "Symbol not found" or something like that.
    I arrange Java source in a directory structure that matches the package structure in the .class files.
    If I've got a Java source file like this:
    package foo.bar;
    public class Baz
       public static void main(String [] args)
            Baz baz = new Baz();
            System.out.println(baz);
       public String toString()
           return "I am a Baz";
    }I'll store it in a directory structure like this:
    root
    +---classes
    +---src
          +---foo
               +---bar
                    +---Baz.javaWhen I compile, I go to root and compile by typing this:
    javac -d classes foo/bar/*.javaI can run the code from root by typing:
    java -classpath classes foo.bar.BazI hope this wasn't patronizing or beneath you. I don't mean to be insulting. - MOD

  • Import statement in .java files and .jsp files

    Guys I have few mysteries about this import statement.
    Please correct me if I am wrong.
    1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
    BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import the class I want to use.That is i have to say
    <%@page import="one"%>
    and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder.(Note that My.class is created in a folder different from c:\ClassFolder )
    But I am wondering why was there no need for me to import one.class in two.java.
    (Note I am using JDeveloper and Apache server)
    Please help.
    In this case the pSo I am wondering in JSP why it doesn't take the class I am looking for from the classpath .
    Help.

    You have to understand Java scoping rules. In the 1st scenario with the two Java files I am guessing neither one of them begins with a package statement. This means that they belong to the default package. When you compile the compiler uses the classpath to resolve method calls looking in the default package since there was no import statement specified in two.java. JSP is a little different. Now I just read this here in these forums a couple of days ago. Since the classfiles generated from the JSP files are not in the CLASSPATH they are loaded by a different classloader. This is why you have to import all references to all classes in the default package.

  • Import statement in .java files and .jsp files ..correction

    Guys I have few mysteries about this import statement.
    Please correct me if I am wrong.
    1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement in two.java I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
    BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import one.class in My.jsp .That is i have to say
    <%@page import="one"%>
    in My.jsp.
    and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder and MyJsp is compiled sucessfully.(Note that My.class is created in a folder different from c:\ClassFolder )
    But I am wondering why was there no need for me to import one.class in two.java.
    (Note I am using JDeveloper and Apache server)
    Please help.

    It has to do with packages. Most java classes are in a package, the name of which must conform to its place on the filesystem relative to the classpath. By that I mean that if you have com.mystuff.One.java, it must be in a folder com/mystuff where com is located somewhere in the classpath.
    What you've done is a little different. I'm assuming a couple of things:
    1. you have no package declaration at the top of one.java or two.java
    2. you have the current directory "." in your classpath.
    Java has the concept of the "default package", which covers classes without a declared package, and in your case is the current directory.
    So when you're in c:\sourcefolder and run the compiler, then "."="c:\sourcefolder", and that directory is part of the default package. No import statements are necessary for classes that are in the same package. This is why two.java can call methods in one.java without an import statement.
    When you run your jsp, the "current directory" part of your classpath is not c:\sourcefolder, but some other value (probably the directory you start your jsp engine from) You will have to import all non-java-library classes because the jsp itself becomes a java class, with a package that is determined by the jsp engine.

  • Length error occured in IMPORT statement

    Hello everyone,
    i hv one requirment in PO print(ME23N). in po print asset no nt display without changing other format.
    so that i first copy both smartform and driver program, in that i made certain changes such that i declare the patameter p_ebeln and i comment to data statement of p_ebeln & p_ebeln = nest-objky.
    then i join asset no (anek-anln1) with the help of inner join. then in smartform i gave condition that if bsart = 'ZCAP'
    wa_final-anln1 = gv_anln1.
    endif.
    i import gv_anln1 in smartform and exported in deriver program.
    both are synthetically currect but when i gave print preview dump is occured.
    length error occured in IMPORT statement
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_IMPORT_MISMATCH_ERROR', was
         not caught in
        procedure "%GLOBAL_INIT" "(FORM)", nor was it propagated by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        During import the system discovered that the target object has
        a different length than the object to be imported.
    what i do?

    Hello,
    can u send me coding for that?
    program line is already created for that
    and their first coding is like that,
    if gv_bsart = 'ZCAP'.
    wa_final-matnr = space.
    endif.
    and in text they fetch matnr no.
    but as per requirement they want asset no when bsart = 'ZCAP'
    how that asset no will come.
    matnr comes there is bsart is other that ZCAP, but bsart = ZCAP they want asset no instead of matnr.

  • How can i append the variable to filename in import statement?

    how can i append variable(substitution variable) to file name in import command for maxL?
    example : For suppose there is a file like "dataload.txt" and a variable like cur_month(august).How can i rename the file like daload_august in import statement.
    Edited by: 788996 on Aug 22, 2010 11:18 PM

    Are you saying you want to use an OS level environment variable in a MaxL statement to substitute for an entire file name? I am going to illustrate Windows, but do it your own way in *nix if you want.
    YourCallingCode.cmd
    REM Note the \\ and then the \\, you had \\ and \
    SET curmon=c:\\ABC\\datafile_21_AUG.txt 
    REM Call MaxL with a paramenter
    startMaxL.cmd DoItForTheCurrentMonth.msh %curmon%DoItForTheCurrentMonth.msh
    login blah blah for blah ;
    import database appname.dbname data from local text data_file $curmon using server rules_file "rulefile"
         on error abort ;The trick is to change whatever's in % and % and replace it with a $ in the MaxL script.
    I gave a presentation last year on MaxL at ODTUG Kaleidoscope. If you go to http://www.odtug.com, then Tech Resources, then Essbase, then search on my name, you'll find "Master Essbase with MaxL Automation". More than you could ever want to know about MaxL, variables (parameter, environment, and explicitly declared), scripting, etc., etc., are all there for the taking. If you're not already a member, you'll have to join, but an associate membership is free. You can then download my presentation and all of the others. It is a treasure chest of technical tips and knowledge.
    Yes, I am a fan a member of the Hyperion SIG, so I am ever so slightly biased. Regardless, it is good information, for free.
    Regards,
    Cameron Lackpour
    Edited by: CL on Aug 24, 2010 5:33 AM
    If you want to substitute part of the data file name, you can do that too:
    set curmon=21_AUG
    Your MaxL statement would look like:
    import database appname.dbname data from local text data_file "c:\\ABC\\datafile_$curmon.txt" using server rules_file "rulefile"
         on error abort ;

  • Need Business case Explaination about the Field in Customer Master

    Hi all,
    I have a doubt in Customer master Record
    1. Customer Group
    2. Price Group
    3. Price list
    4. Customer Stat.group
    What I mentioned above fields i need business case explination, but all the above fileds are explaining  about the Price and Statistics about the report. By using F1 Help i can understand but i need business case
    Is there any link between those fields ?
    @ Please dont close the thread if it is basic question please provide the details and link because i serached in Google but i couldn't able to findout

    hi
    anuradha,
    In my knowledge customer pricing group is the main in the customer master ,
    you will one test case in customer pricing group in customer u can not fill it,  the same customer u can rise the sale order , system sows earorr message, no customer master records maintain, it means when u create the sale order system  take pricing procedure , pricing procedure determination ; sales area+customer pricing procedure +document pricing procedure assign to pricing procedure,(ovkk) ,
    customer statical group
    Sales Organization      0001   Sales Org. 001
    Distribution Channel    01
    Division                       00
    Cust.stats.grp              1      'A' Material
    CustGroupMaterial       1      'A' Material
    StatGrpSalesDoc         2      Returns, Credit Memo
    StatGrpDocumentItm     1      Returns, Credit Memo
    Update Group               1      SIS: Sales Document, Delivery, Billing Document
    it is the static updating group for item level,
    Sales Organization     0001   Sales Org. 001
    Distribution Channel    01
    Division                        01
    Cust.stats.grp             1      'A' Material
    StatGrpSalesDoc        1      Order, Debit Memo
    Update Group              1      SIS: Sales Document, Delivery, Billing Document
    it is for static updating group for header level
    it is use full in vov7 ,
    price list and price group it is use full pricing to the customers,  you can check it sale order header in sale tab u can find your required fields,

Maybe you are looking for