How to pass entire class as a parameter in a method of other class- OpenScr

Hi Folks,
Whenever we create a script in OpenScript, it can contain only one class. However I want to declare several variables in a class/script and pass this entire class B as a parameter in a methodA of classA.
What I mean by mean that is , I create ClassB something like below
public class MyParams.....
variable1;
variable2;
variable3;
variable4;
variable5;
public class Original.....
public void methodA(MyParams params)
params = new MyParams();
field1 = params.variable1;
field2 = params.variable2;
field3 = params.variable3;
field5= params.variable5;
Edited by: OATS Explorer on Mar 8, 2012 1:53 AM

Hi
I have a stand alone program (can be used by all other users) which will accept request_id and To_Email as parameters. I am developing a new request set in which I want to incldue this stand alone program and want to pass Prog#1 request Id to the 2nd stand alone program as a parameter so that I can send the output of the Prog#1 to the users through E-mail.
Do we have any options to pass Prog#1 requeset id in to Prog#2 as a parameter in the request set without modifying the stand alone concurrent program code.
Please note that i dont want to change stand alone program code becuase this code/program was developed to work in general for all the users and I dont want to change this code for new requirement/purpose...
Hope you understood my requirement...
Thanks!!

Similar Messages

  • How to pass  internal table values to parameter

    hi,
             how to pass  internal table values to parameter in selection screen.if is it possible means please sent codeings.
    thanks.
      stalin.

    hi,
    tables : mara.
    data :  begin of itab_mara occurs 0,
              matnr like mara-matnr,
              ernam like mara-ernam,
              end of itab_mara.
    selection-screen : begin of block blk1 with frame title text-001.
    parameters : p_matnr like mara-matnr.
    selection-screen : end of block blk1.
    select matnr ernam from mara into corresponding fields of itab_mara
                                                                    where matnr = p_matnr.
    loop at itab_mara.
    write :/ itab_mara-matnr,
               itab_mara-ernam.
    endloop.
    <b><REMOVED BY MODERATOR></b>
    Message was edited by:
            Alvaro Tejada Galindo

  • 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 PASS SELECT-OPTIONS AS IMPORT PARAMETER TO A CLASS

    Hi experts,how to pass select options value as a export parameters to a zclass.
    can  give me some idea.
    Thanks
    sai

    As Sachin already said, selection options are stored in an internal table. You can reconstruct the table type without the corresponding input fields using the type addition RANGE OF.
    So - assuming you have the following in your program:
    DATA: wa TYPE sflight.
            SELECT-OPTIONS so_car FOR sflight-carrid.
    you can create a publically-visible type in your class using direct type entry and the code
    TYPES: my_selectoption TYPE RANGE OF sflight-carrid.
    and use this to define the importing parameter of the method.
    The only other thing you have to remember is that select-options generates an internal table with header line. Thereore, to pass the table to the method, you would use (in the above example) so_car[], and not just the name of the select-option.
    Hope this helps.
    Regards
    Jon.

  • How to pass a Class as a parameter of a method?

    I have a method like below. Inside this method I need to create a variable that his type is the type of the class I have passed as a method's parameter.
    For example, if I call the method like this "Meth1(ClassPerson);" insed the method I need to declare a  variable of class "ClassPerson", but if I call like "Meth1(ClassCity);" I need the same variable to be declared as a ClassCity.
    public function Meth1( /*I dont know what to put here*/   ):void{
         /*I dont know what to put here to declare my variable*/
         /*here
         comes
         more
         code
         using
         the
         variable*/
    I tried as below but dont worked:
    public function Meth1( classtype:Class):void{
         var var1:classtype = new classtype();
    Can someone help me?

    evyatarBH, after declare the variable like you said an error occurs when I try to access some property of the variable. I receive a mesage telling that this property dont exists.
    public function Meth1( classtype:Class ):void{
         var var1:* = new ClassFactory(classe);
         //when I try to do something like the line below the error appear
         inputtext1.text = var1.fieldname;
    rashare, I can't do this because I can't declare the object before the method is called. I must inform to the method only which class I will use, but the object must be created only inside the method.

  • ABAP OO: how to pass a internal table with objects as a method parameter

    Hello all,
    I have a class "ZCL_VEHICLE", this class contains the attribute WHEELS.
    This attribute contains objects of the class ZCL_WHEEL.
    (definition: data WHEELS TYPE TABLE OF REF TO zcl_wheel.).
    I now need a method that gives this table back (as return or export parameter). How can I define a parameter for this method that will contain this table?
    Thanks for the help.
    Best regards,
    Wim

    Hi Wim
    Excuse me! I understood you wanted to define it in a program, not in a class.
    You can define your type into CLASS (use the same statament: go to TYPES (there's a pushbotton on status gui).
    TYPES: MY_WHEELS TYPE TABLE OF REF TO .....
    Now you can use this type to create a parameter like that, but you can use that type for an object of class defined as PRIVATE.
    Infact if your object is public, you'll use it in a your program, so you'll probably have to define a variable like the type defined in the class.
    It shouldn't make sense to define the same type for two times or more (one in the class, the others in each program uses your class). So you should define your type in dictionary (all abap object could use it).
    If you think to have to use your class in few program (perhaps in olny one), you shuold consider to create your class as local class.
    Max
    Message was edited by: max bianchi

  • SSRS How to pass a value for Hidden parameter ?

    Hello,
    I have a SSRS report deployed on the Report server. This report is having an "Hidden" parameter.
    Could someone please guide me, how to pass the value to this internal parameter in each of the following case - 
    1. Report is accessed through a Desktop application/Web application in Report Viewer.
    2. Report is accessed through the Url.
    3. Report is accessed through the Report Manager.
    Any quick help on this is highly appreciated.
    Thanks!
    -Vinay Pugalia
    If a post answers your question, please click "Mark As Answer" on that post or
    "Vote as Helpful".
    Web : Inkey Solutions
    Blog : My Blog
    Email : Vinay Pugalia

    Hi Vinay Pugalia,
    Internal Parameters in SSRS are parameters that are not configurable by the end-user at run-time and values cannot be passed to this type of parameter (when present in the child report) in case of a drill-through report implementation. This
    type of parameter is read-only and not accessible in parent report.
    This varies from a Hidden Parameter, which the user is not prompted to provide, but can still be configured through the URL to the report server.
    So no matter you access the report through report manager, URL or Report Viewer. The passing value to the internal parameter will not work.
    As you have mentioned that I will also suggest you use the hidden parameter instead.
    More details information in this blog for your reference:
    SSRS – Understanding Report Parameter Visibility
    How to pass value to  hide parameter is the same as that of the visible parameter, similar thread for your reference:
    Passing the value in action property of a text box
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • How to pass an object as a parameter

    how do you pass an object as a parameter? (what type should it be ?)

    Well you can use a [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html]String
    Or you can take a [url http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Double.html]Double
    And you can pass [url http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Event.html]Events
    and get yourself in trouble
    and you can use a [url http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Frame.html]Frame
    or maybe take a [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html]List
    but some will use [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html]Collection
    depends you your direction
    so if you need to know
    if you should use a [url http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.html]Map
    then this is what to do
    just browse the [url http://java.sun.com/j2se/1.4.2/docs/api/]API

  • How to pass (String[] args), as a parameter.

    * StringMethods
    * @author (Robin)
    * @version (1)
    public class StringMethods
        private String[] args;
        private int numArgs;
        public void printIt(String[] args)
            System.out.print ("You have entered " + numArgs + " Strings");
                if (numArgs > 10)
                    int temp = numArgs;
                    System.out.print (", the last " + (numArgs - 10) + " will not be processed.");
                    numArgs = temp;
            for (int i = 0; (i < numArgs) && (i < 10); i++)
            System.out.println ("[" + i + "] : " + args[i] + " is " + (args).length() + " characters long.");
    public void getArgs(String[] input)
    numArgs = input.length;
    arraycopy(input, 0, args, 0, numArgs-1);
    arraycopy(input, 0, args, 0, numArgs-1)This is my method class for my main method StringArray.
    What I want to know is how to pass command line arguments, i.e. {"example1", "example2", "example3"} from my main method to my method class?

    * StringMethods
    * @author (Robin)
    * @version (1)
    public class ArgMethods
    private String[] args = new String[0];
    private int numArgs;
    public String[] input = {"null", "null"};
    // constructor that takes string args to be manipulated by methods
    public ArgMethods(String[] input)
    numArgs = input.length;
    String[] args = new String[numArgs];
    System.arraycopy(input, 0, args, 0, input.length);
    public void printIt()
    if (args.length > 0)
    System.out.print ("You have entered " + numArgs + " Strings");
    if (numArgs > 10)
    int temp = numArgs;
    System.out.print (", the last " + (numArgs - 10) + " will not be processed.");
    numArgs = temp;
    for (int i = 0; (i < numArgs) && (i < 10); i++)
    System.out.println ("[" + i + "] : " + args[i] + " is " + (args).length() + " characters long.");
    else
    System.out.println ("You must enter at least one String at the command line.");
    public void reverseIt()
    if(args.length > 0)
    int next = args.length-1;
    for (int index = 0; index < args.length/2; index++)
    String temp = args[index];
    args[index] = args[next];
    args[next] = temp;
    next--;
    * StringArray
    * @author (Robin)
    * @version (1)
    public class stringArray
    public static void main (String[] args)
    int numArgs = args.length;
    // correct for output if strings less than 10 and greater than 0
    if (numArgs > 0)
    System.out.print ("You have entered " + numArgs + " Strings");
    if (numArgs > 10)
    int temp = numArgs;
    System.out.print (", the last " + (numArgs - 10) + " will not be processed.");
    numArgs = temp;
    for (int i = 0; (i < numArgs) && (i < 10); i++)
    System.out.println ("[" + i + "] : " + args[i] + " is " + (args[i]).length() + " characters long.");
    else
    System.out.println ("You must enter at least one String at the command line.");
    ArgMethods test = new ArgMethods( args );
    // test.printIt();
    // test.reverseIt();
    // test.printIt();
    *almost finished -- posting this up here so i can get it at home ((only accessible e-mail down plus can't find pen drive))..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to pass value to select-option parameter using SET PARAMETER Command

    Hi,
        Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass  MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??
    Passing values to parameter id
    set parameter id 'VKS' field kschl.
    set parameter id 'VKO' field vkorg.
    set parameter id 'VTW' field vtweg.
    set parameter id 'KDA' field erdat.
    set parameter id 'MAT' field matnr_from.
    Change condition price.
    call transaction 'VK12' and skip first screen.
    Thanks in advance.
    Regards,
    Balamurugan.

    Hi,
    instead of using set parameters and dden call transaction use this..........
    submit RV13A004  WITH SELECTION-TABLE rspar
    Effect
    If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
    SELNAME (length 8),
    KIND (length 1),
    SIGN (length 1),
    OPTION (length 2),
    LOW (length 45),
    HIGH (length 45).
    To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
    SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
    KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
    SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
    If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
    The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
    Notes
    In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
    When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
    Cheers
    Will.

  • How to passing multiple values for a parameter of discoverer(url parameters

    Hi All,
    I am trying to pass multiple values for a parameter of disco report. I am trying to include my url for discoverer viewer report. the values has the following
    'jeff,mark'
    'sfophiee,angela'
    Thanks and Regards
    Venkat

    Hello Venkat,
    I know there are some problems with 10.1.2.0.2, maybe if you haven't done yet you can try with 10.1.2.2, assuming this version should be working for multiple parameter values :
    OracleAS Discoverer 10.1.2.2 is installed with the following patch :
    Patch 4960210 PLACEHOLDER BUG FOR AS/DS 10G R2 PATCH SET 2 10.1.2.2
    So, once installed you can try adding your parameter as param_<parameter_name>='sfophiee,angela'
    Hope this helps, otherwise feel free to log a Service Request to Support.
    Best Regards,
    Gianluca

  • How to pass a string as a parameter after it has been generated on console

    This is wat i want to do...when a sentence has been generated on console(using Bingo.startConversation())..i want to pass this sentence(which is ofcourse string) as a parameter into another method Bingo.reply(???)..wat shud i use in the place of ???
    this is my code
    public static void main(String[] args) {
    Conversation conversation=new Conversation();
    Bingo bingo=new Bingo ();
    System.out.println("Start");
    System.out.println(">>");
    System.out.println(Bingo.startConversation());//this line generates a sentence on console//
    System.out.println(Bingo.reply(???));

    -> this is my code
    Still didn't use the "Code" tags like you've been asked to do in other postings.
    So, still no help.

  • Passing an Internal Table as parameter to a method

    Hi,
       Can we pass an internal table as a parameter to a method.if so how can we do that?i am new to abap objects..

    Hi Matt,
            Here is the code that i am trying to execute.I am extracting the data in the method "Extract" and passing it to the method "Display" to produce a report output.When i execute this it is giving me an error saying that t_mara is not an internal table since i just refered it with x_mara in the class definition.So how can i modify this code to pass t_mara as an internal table from the method "Extract".Please help me.
    *& Report  ZOBJ_PRAC                                      *
    REPORT  zobj_prac                                                   .
          CLASS example DEFINITION
    CLASS example DEFINITION.
      PUBLIC SECTION.
            TYPES : BEGIN OF x_mara,
                  matnr TYPE matnr,
                  ersda TYPE ersda,
               END OF x_mara.
        METHODS : extract EXPORTING t_mara TYPE x_mara,
                          display IMPORTING it_mara TYPE x_mara.
    ENDCLASS.                    "example DEFINITION
    "example IMPLEMENTATION
          CLASS example IMPLEMENTATION
    CLASS example IMPLEMENTATION.
      METHOD extract.
        DATA :lt_mara TYPE STANDARD TABLE OF x_mara INITIAL SIZE 0,
                  lw_mara TYPE x_mara.
        SELECT matnr ersda FROM mara INTO TABLE lt_mara UP TO 10 ROWS.
        t_mara[]  =  lt_mara[].
      ENDMETHOD.                    "extract
      METHOD display.
        DATA :lt_mara TYPE STANDARD TABLE OF x_mara INITIAL SIZE 0,
              lw_mara TYPE x_mara.
        lt_mara[]  =  it_mara[].
        LOOP AT lt_mara INTO lw_mara.
          WRITE:/ lw_mara-matnr,
                20 lw_mara-ersda.
        ENDLOOP.
      ENDCLASS.                    "example IMPLEMENTATION
    START-OF-SELECTION.
      DATA :  b1 TYPE REF TO example.
    CREATE OBJECT b1 TYPE example.
      TYPES : BEGIN OF x_mara,
                  matnr TYPE matnr,
                  ersda TYPE ersda,
               END OF x_mara.
    data : t_mara type standard table of x_mara initial size 0,
           it_mara type standard table of  x_mara initial size 0.
      call method b1->extract
        importing
         t_mara = t_mara.
         it_mara[]  =  t_mara[].
      call method b1->display
        exporting
         it_mara = it_mara.
    Edited by: Sai Chaitanya on Dec 2, 2008 5:30 AM

  • Calling a Method in other Class

    I want to call a method in another class when an action is preformed can anyone suggest how I might do this??
         addSquare.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
         

    I want to call a method in another class when an
    action is preformed can anyone suggest how I might do
    this??
            addSquare.addActionListener(new ActionListener()
                 public void actionPerformed(ActionEvent e)
                 {               OtherClass oc = //getrefererncetootherclass
                   oc.methodtocall(params, to, pass);

  • JFrame not showing components when called method in other class

    Hi everyone,
    I am new to SWING,and have this little problem.
    i have created a JFrame which has a button and its calling a method in another class.the result takes much more time(around 3mins) as the call involved with FTP.
    My problem is , i click the button(other componetns also there),and waiting for the result.all the time my Frame doesnt show any of the components,it looks as if the components are added to it.but when the call returns.everything is OK.
    Can any1 help me?
    Thanx in advance
    ethirajan

    http://java.sun.com/docs/books/tutorial/essential/threads/
    http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
    http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html

Maybe you are looking for

  • Updating LIKP-ANZPK when goods receiving one line item of Inbound Delivery

    I am Goods Receipting a single inbound delivery line item via function module WS_DELIVERY_UPDATE. Once the line item, and associated Handling Unit, are received, I would like LIKP-ANZPK (number of packages) to be updated with a new total of HU's that

  • Query Builder in 2.0

    The Query Builder in 2.0 is really sweet, great job guys! You do know you are going to get all sorts of "how did you do this ..." questions about the various cool things you did in there, right? :-) When you get a chance, could you please put up demo

  • Netting of PIR

    Dear All, Can anybody explain what is Netting of Planned Indipendent Requirement? Regards, Basavaraj

  • Photoshop CC buffer overflow

    Why does my virus protection software keep shutting down Photoshop CC? It started happening Friday, May 23, 2014 and this is the alert I receive from my virus protection software: PC intrusion blocked. Firewall blocked a hacker from exploiting the Bu

  • Changing SSIS package owner

    I'm ready to deploy my packages, do I have change the owner from developer to sa or dba? If yes can someone guide me how to do that and are there any other things I have to take care of like Protection level (which is presently set to EncryptSensitiv