Creating a method with ByRef parameter

Hi All,
when i am creating a method with parameter as ByRef, i am getting the message as fallows.
Please use valid signature.
help me to overcome frojm this.
Thanks in advance.
With Regards
Raju

Hi,
strange... I even thought that ByRef is default parameter type for sub... maybe you can try this.
Or try to create your sub directly in the project file, maybe then you will have a proper error message from MS.
Regards,
Wolfhard

Similar Messages

  • How to create a method with an interface parameter?

    Hi there.
    I would create a method with an interface parameter. I mean this:
    public interface MyInt {
        public void method(int i);
    public class SubClass implements MyInt {
        public void method(int i) {
            System.out.println("The number is: " + i);
    public class MainClass {
        public MainClass(MyInt inter) {
            inter.method(10);
        public static void main(String[] args) {
    (*)     new MainClass(new SubClass());
    }I tried to compile this but do not work (incompatible types on (*)) . Is it possible to do something like that or not?

    I compiled and runned this code on my machine and it works fine.
    How did you did to compile and run this code ?
    Did you put each code on its own file or all codes in the same file ?
    I did like this:
    I put each code in its own file and put all in the same dir, after I did:
    javac -classpath . MainClass.java
    After that, I did:
    java -classpath . MainClass
    I hope this help you
    Lucas

  • Enhance method with new parameter

    How can I enhance an existing method with a new Parameter?
    In some tutorial is written that this should be possible. But there is no exact description.

    Thx Rich Heilman 
    but in the Doku "Enhancements to Global Classes and Interfaces"
    http://help.sap.com/saphelp_nw70/helpdata/en/58/4fb541d3d52d31e10000000a155106/content.htm
    you find:
    You can enhance the components of a global class or global interface by:
    ●     Inserting new, optional formal parameters for existing methods (but no new exceptions)

  • How can I create a method with throws  instruction

    Hello Everybody!
    How can I create this method inside WebDynpro.
    I enter "throws CloneNotSupportedException" manually an it removes always.
    What is wrong ?
    public java.lang.Object clone( ) throws CloneNotSupportedException{
        //@@begin clone()
         __Tdag__Is_Charactconfig that= (__Tdag__Is_Charactconfig)super.clone();
           return that;
        //@@end
    Regards
    sas

    I only checked in my 7.1 IDE and there this section exists.
    If it does not exist in your IDE, just create the method manually in the //@@begin others ... //@@end user-coding-area at the end of the controller class. This solves the issue for methods that are called from inside the controller. For public methods to be called from other controllers, this will not help.
    Armin

  • Using Java Reflection to call a method with int parameter

    Hi,
    Could someone please tell me how can i use the invoke() of the Method class to call an method wiht int parameter? The invoke() takes an array of Object, but I need to pass in an array of int.
    For example I have a setI(int i) in my class.
    Class[] INT_PARAMETER_TYPES = new Class[] {Integer.TYPE };
    Method method = targetClass.getMethod(methodName, INT_PARAMETER_TYPES);
    Object[] args = new Object[] {4}; // won't work, type mismatch
    int[] args = new int[] {4}; // won't work, type mismatch
    method.invoke(target, args);
    thanks for any help.

    Object[] args = new Object[] {4}; // won't work, type
    mismatchShould be:
        Object[] args = new Object[] { new Integer(4) };The relevant part of the JavaDoc for Method.invoke(): "If the corresponding formal parameter has a primitive type, an unwrapping conversion is attempted to convert the object value to a value of a primitive type. If this attempt fails, the invocation throws an IllegalArgumentException. "
    I suppose you could pass in any Number (eg, Double instead of Integer), but that's just speculation.

  • Dynamic Imagelink Component - Calling Impl method with input parameter

    Hi All,
    I have requirement where Imagelinks are created dynamically on the pageload. Generated the components and the components are displayed on the jspx.
    Now when I click the image link, a method in AMImpl should invoke and this method takes some input parameters.
    I am able to call the method successfully in AMimpl with the help of below code. But I could not understand how to pass the input parameters to that method.
                               RichCommandImageLink lockimageLink =
                                new RichCommandImageLink();
                            lockimageLink.setIcon("icon.png");
                            lockimageLink.setId("icon" + index);                   
                            MethodExpression me =
                                JSFUtils.getMethodExpression("#{bindings." +
                                                             "MyMethodName" +
                                                             ".execute}");
                            lockimageLink.addActionListener(new MethodExpressionActionListener(me));
      public static MethodExpression getMethodExpression(String name) { 
       Class [] argtypes = new Class[1]; 
       argtypes[0] = ActionEvent.class; 
       FacesContext facesCtx = FacesContext.getCurrentInstance(); 
       Application app = facesCtx.getApplication(); 
       ExpressionFactory elFactory = app.getExpressionFactory(); 
       ELContext elContext = facesCtx.getELContext(); 
       return elFactory.createMethodExpression(elContext,name,null,argtypes); 
      } Can some one please suggest how to pass input parameters to the Impl method.
    Jdeveloper Version : 11.1.1.4.0
    Thanks,
    Morgan.
    Edited by: 900114 on May 12, 2012 11:23 PM

    You can use the below method to call an AMImpl method. You can pass parameters as well to the AMImpl method.
    DCBindingContainer bindings = getDCBindingContainer();
    OperationBinding ob = bc.getOperationBinding("MyMethodName");
    Map m = ob.getParamsMap();
    ob.put("paramName", "paramValue"); paramName is the parameter in AMImpl and paramValue is the value to be passed.
    ob.execute();
    Where getDCBindingContainer() is:
    public DCBindingContainer getDCBindingContainer() {
    ExpressionFactory exprFactory;
    ELContext elContext;
    ValueExpression valueExpression;
    DCBindingContainer dcBindingContainer;
    FacesContext facesContext = FacesContext.getCurrentInstance();
    exprFactory = facesContext.getApplication().getExpressionFactory();
    elContext = facesContext.getELContext();
    valueExpression =
    exprFactory.createValueExpression(elContext, "#{bindings}",
    Object.class);
    dcBindingContainer =
    (DCBindingContainer)valueExpression.getValue(elContext);
    return dcBindingContainer;
    Hope this helps
    Edited by: umesh.agarwal on May 13, 2012 12:10 AM
    Edited by: umesh.agarwal on May 13, 2012 12:10 AM

  • How to do this: Link which calls a methode with a parameter?

    Hello!
    I have a small question:
    I have a jsp-site with some beans.
    On the jsp-site I have the following code which isnt functional:
    <c:forEach items="${filter.resultlist}" var="result">
        <c:url action="#{filter.selectedAoid(result.aoid)}">
             <c:out value="${result.name}" / >
         </c:url>
    </c:forEach>-> As you can see:
    I want to make a Link, which is named like the String in the List and accessable by ${result.name} and on a click it should run "filter.selectedAoid()" with an int Parameter.
    (So I can access the right object with my Aoid-identifier...)
    The List comes from a DB and I am able to access the values of the Objects in the list.
    Could someone please tell me how that is done?
    Thanks in advance
    Fuchur

    One way of hacking this problem is by dynamically updating the job step which executes the stored procedure to include the parameters the user provided.  You can do so by using
    msdb.dbo.sp_update_jobstep.
    So for example, you could create a job named "Test job" and in that job the first step would be to execute your stored procedure.  You would then use the following code to update that step at run time:
    execute msdb.dbo.sp_update_jobstep
    @job_name = N'Test job',
    @step_id = 1,
    @command = 'execute my_proc @my_variable = ''my_value'''
    You'd then use sp_start_job like so:
    execute msdb.dbo.sp_start_job @job_name = 'Test job'
    Your job would then execute using the value provided at run time for the @my_variable parameter.

  • Create DATA ELEMENT with passing Parameter

    Dear All,
         When we create the Data elementt in tcode SE61, normally we will write the text inside the text area.  How about can we  pass the paramater to the data element in tcode SE61 ?
      Example i pass the parameter with the text  "Tesing 123" , so the Data element will display Testing 123 when being called. The text flexible.
    Thank

    Hello
    I want to use TPLNR to create data element in Operating Concern but I am not able to because of length of TPLNR (30) in Operating Concern we can create data element only upto 18 char. If i want to create new data element YTPLNR.
    I did following steps
    1. SE11
    2. Data Element
    3. and settings of particular data element what ever is required.
    My question is how can I use YTPLNR as characteristic as same value of TPLNR. I want all data that is available in TPLNR. I am creating new element because of data length issue.
    Table: IFLOT has data element TPLNR. I want all information of TPLNR in YTPLNR how it is possible to use that info in that.
    I tried to create user defined characteristics for operating concern
    i want to use with reference to existing value option in user define
    How can I do that
    thank you

  • How to create a Mapping with Input Parameter?

    Hi,
    I have a target table where the primary key column should be loaded with an Input parameter value. How can we implement this? Let me know if any examples are available?
    Regards
    Kishan

    Use a map input operator in your mapping. In the outgroup add an attribute, mapp the attribute with the column and then you can start the mapping with an extra input parameter.
    Bye
    Detlef

  • How to create Function Module with TABLE parameter (for internal table)

    Hi Guys,
    I am trying to create a function module by using TABLE parameter. I have to pass an internal table to this function module for processing.
    But it saying : TABLES parameters are obsolete!
    And I am not going further.
    Please suggest any work arround.
    Thanks

    Hi,
    create a table type in SE11..
    Then use that in your function module importing/exporting/changing parameter for passing internal tables..
    Thanks,
    Naren

  • How to create a chart with parameter ?

    hello,
    i would like to know if we can create a form with some parameter to fill, and when you submit, you can create a chart.
    Nowadays, we can create a chart with the assistant, but can we create a chart without it ?

    Hi,
    This is not possible in Oracle. What u can do is create the view without the where clasue and supply the where clause at runtime.
    Hope this helps...
    Regards,
    Ganesh R

  • Try to create a method to return an object as xml

    I'm trying to create a method for an object to return the objects attributes in xml format.
    here is what I have done so far:
    -- create the object hierachy
    create or replace type ras4.atomic_tp as object
         (atomic_instance_id     varchar2(8),
         service_instance_id     varchar2(8),
         parent_atomic_instance_id varchar2(8),
         MEMBER FUNCTION return_xml RETURN varchar2)
    NOT INSTANTIABLE
    NOT FINAL;
    create or replace type ras4.parm_const_tp under ras4.atomic_tp
         (parameter_name          varchar2(75))
    NOT INSTANTIABLE
    NOT FINAL;
    create or replace type ras4.contact_tp under ras4.atomic_tp
         (address_line_1          varchar2(80),
         address_line_2          varchar2(80),
         address_line_3          varchar2(80),
         city               varchar2(20),
         state               varchar2(2),
         country               varchar2(20),
         postal_code          varchar2(20),
         voice_telephone          varchar2(20),
         dns_telephone          varchar2(20),
         fax               varchar2(20),
         email               varchar2(80),
         url               varchar2(20),
         contact_inst          varchar2(255))
    NOT INSTANTIABLE
    NOT FINAL;
    create or replace type PERSON_tp under contact_tp
         (prefix               varchar2(7),
         first_name          varchar2(50),
         middle_name          varchar2(50),
         last_name          varchar2(50),
         suffix               varchar2(20),
         nick_name          varchar2(50),
    OVERRIDING MEMBER FUNCTION return_xml return varchar2)
    INSTANTIABLE
    FINAL;
    create table ras4.person_tb of ras4.person_tp;
    insert into ras4.person_tb values
    (ras4.person_tp('00001', '00001', '00001', '1111 Trail Lake Dr.', null, null, 'Fort Worth',
    'TX', 'USA', '76233', '(817)346-0004', null, null, '[email protected]', 'www.tom.com', 'no calls after 10:00 please',
    'Mr.', 'Tom', 'Scott', 'Tiegen', null, 'Tom'));
    commit;
    -- now different things I have tried to get the member function to work:
    CREATE or replace TYPE BODY RAS4.PERSON_TP AS
         overriding MEMBER FUNCTION RETURN_XML RETURN VARCHAR2 IS
    qryCtx DBMS_XMLGEN.CTXHANDLE;
    result CLOB;
    BEGIN
         qryCtx :=
         DBMS_XMLGEN.NEWCONTEXT ('select self.first_name from dual;');
    result := DBMS_XMLGEN.GETXML(qryCtx);
              RETURN (RESULT);
         END;
    END;
    I try to invoke the method as below:
    DECLARE
    v_person ras4.person_tp;
    v_person_ref ref ras4.person_tp;
    V_string varchar2(2000);
    BEGIN
    select value(a)
    into v_person
    from ras4.person_tb a
    where a.atomic_instance_id = '00001';
    v_string := v_person.return_xml;
    DBMS_OUTPUT.PUT_LINE(v_string);
    END;
    I get the following error:
    DECLARE
    ERROR at line 1:
    ORA-19206: Invalid value for query or REF CURSOR parameter
    ORA-06512: at "SYS.DBMS_XMLGEN", line 83
    ORA-06512: at "RAS4.PERSON_TP", line 7
    ORA-06512: at line 12
    -- I try to use
    from the command line I type in this:
    select sys_xmlgen(value(p))
    from person_tb p
    where p.atomic_Instance_id = '00001';
    and it seems to work.
    trying to put this into a member function - I try this:
    CREATE or replace TYPE BODY RAS4.PERSON_TP AS
         overriding MEMBER FUNCTION RETURN_XML RETURN VARCHAR2 IS
    v_string varchar2(200);
    v_person ras4.person_tp;
    BEGIN
         v_person := self;
         select v_person.first_name into v_string from dual;
         return (select sys_xmlgen(value(v_person)));
         END;
    END;
    This fails to compile.
    any help is greatly appreciated.
    tom

    PN,
    First, it's impossible to create static method with WD IDE designers for controllers.
    Next, if you simply need to call method from wdDoModifyView, just create instance method createHTMLViewer in regular way then call it from wdDoModifyView via wdThis.createHTMLViewer().
    Third, you may create this method manually directly in source code, just place it at the end of controller between comments //@begin other ... //@end.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Report with user parameter is not runnig

    Hi
    I have created the report with user parameter p_deptno and qyery"select * from emp where depno=:p_deptno";
    when i run the report in paper layout a popup kind page will open and ask us to enter the deptno and based on input parameter it fetches record in report.
    if i tried the same thing with url :http://localhost:portno/reports/rwservlet?destype=cache&desformat=pdf&report=emp.jsp&userid=scott/tiger@orcl
    the parameter window not opening and and blank report will open with coloumn headings.
    help me to solve the problem.
    i am using devsuite oracle10g release 2 on linux(OEL4).

    Hello,
    You have to provide the parameter in the URL :
    For example :
    http://localhost:portno/reports/rwservlet?destype=cache&desformat=pdf&report=emp.jsp&userid=scott/tiger@orcl&p_deptno=10
    or use the Web parameter Form :
    http://localhost:portno/reports/rwservlet?destype=cache&desformat=pdf&report=emp.jsp&userid=scott/tiger@orcl&paramform=true
    Regards

  • A question about a method with generic bounded type parameter

    Hello everybody,
    Sorry, if I ask a question which seems basic, but
    I'm new to generic types. My problem is about a method
    with a bounded type parameter. Consider the following
    situation:
    abstract class A{     }
    class B extends A{     }
    abstract class C
         public abstract <T extends A>  T  someMethod();
    public class Test extends C
         public <T extends A>  T  someMethod()
              return new B();
    }What I want to do inside the method someMethod in the class Test, is to
    return an instance of the class B.
    Normally, I'm supposed to be able to do that, because an instance of
    B is also an instance of A (because B extends A).
    However I cannot compile this program, and here is the error message:
    Test.java:16: incompatible types
    found   : B
    required: T
                    return new B();
                           ^
    1 errorany idea?
    many thanks,

    Hello again,
    First of all, thank you very much for all the answers. After I posted the comment, I worked on the program
    and I understood that in fact, as spoon_ says the only returned value can be null.
    I'm agree that I asked you a very strange (and a bit stupid) question. Actually, during recent months,
    I have been working with cryptography API Core in Java. I understood that there are classes and
    interfaces for defining keys and key factories specification, such as KeySpec (interface) and
    KeyFactorySpi (abstract class). I wanted to have some experience with these classes in order to
    understand them better. So I created a class implementing the interface KeySpec, following by a
    corresponding Key subclass (with some XOR algorithm that I defined myself) and everything was
    compiled (JDK 1.6) and worked perfectly. Except that, when I wanted to implement a factory spi
    for my classes, I saw for the first time this strange method header:
    protected abstract <T extends KeySpec> T engineGetKeySpec
    (Key key, Class<T> keySpec) throws InvalidKeySpecExceptionThat's why yesterday, I gave you a similar example with the classes A, B, ...
    in order to not to open a complicated security discussion but just to explain the ambiguous
    part for me, that is, the use of T generic parameter.
    The abstract class KeyFactorySpi was defined by Sun Microsystem, in order to give to security
    providers, the possibility to implement cryptography services and algorithms according to a given
    RFC (or whatever technical document). The methods in this class are invoked inside the
    KeyFactory class (If you have installed the JDK sources provided by Sun, You can
    verify this, by looking the source code of the KeyFactory class.) So here the T parameter is a
    key specification, that is, a class that implements the interface KeySpec and this class is often
    defined by the provider and not Sun.
    stefan.schulz wrote:
    >
    If you define the method to return some bound T that extends A, you cannot
    return a B, because T would be declared externally at invocation time.
    The definition of T as is does not make sense at all.>
    He is absolutely right about that, but the problem is, as I said, here we are
    talking about the implementation and not the invocation. The implementation is done
    by the provider whereas the invocation is done by Sun in the class KeyFactory.
    So there are completely separated.
    Therefore I wonder, how a provider can finally impelment this method??
    Besides, dannyyates wrote
    >
    Find whoever wrote the signature and shoot them. Then rewrite their code.
    Actually, before you shoot them, ask them what they were trying to achieve that
    is different from my first suggestion!
    >
    As I said, I didn't choose this method header and I'm completely agree
    with your suggestion, the following method header will do the job very well
    protected abstract KeySpec engineGetKeySpec (Key key, KeySpec key_spec)
    throws InvalidKeySpecException and personally I don't see any interest in using a generic bounded parameter T
    in this method header definition.
    Once agin, thanks a lot for the answers.

  • How to create a function with ref_cursor as parameter in OWB 10.1

    Hi,
    Can any one help me how to create a function with ref_cursor as parameter in OWB 10.1.?
    Its urgent. Please help me.
    Thanks,
    Siv

    Hi David,
    Thanks for your reply.
    Before going for this function, I need to create a package in transformation node in owb module.
    My package is as follows,
    Create or replace package 123
    type xxx is RECORD ( parameters);
    type yyy is RECORD (parameters);
    type aaa is table of yyy;
    type bbb is REF CURSOR return xxx;
    type ccc is record (parameters);
    type ddd is ref cursor return eee;
    END;
    How can I create the above kind of package manually in OWB 10.1 (Should not to import the package)
    Please help me its urgent.
    Thanks,
    Siv

Maybe you are looking for

  • Maximum upload of 100MB/s on Thunderbolt to Gigabit Ethernet Adapter

    I recently got a new Macbook Pro and also switched internet providers to get a 500/500 fiber optics connection. When I connect via wifi I reach speeds like 350 MB/s down and 250 MB/s up. When I do the same test via the thunderbolt cable I get 498 MB/

  • SOAP to SOAP Scenario with an Attachment

    Hi, We are using this scenario for transfering file from one location to another location with an attachment.  From Web service client we are succefully sending an attachment to XI system.  During mapping, we are facing problem while sending an attac

  • How to Include Service Offering in Notification

    I'm trying to figure out how to include the selected Service Offering title or category in an email notification template in SCSM 2012 R2.  I've tried a few options with no success, although I have gotten the Request Offering to display properly.  Wh

  • Can I generate .hlp files

    We just upgraded to Frame 9 (from 7.1) and RoboHelp 8. Prior to the upgrade, I was using WebWorks to generate my .hlp files - is there a way to generate .hlp and .cnt files with RH8? Thanks in advance! Debby

  • I sold my phone to a user in greece

    i sold my iPhone 3 to someone in greece last week. I have since returned to the U.S.A. I made the mistake of not resetting the phone and not shutting off the find my phone feature. I am currently using the iPhone 5s. When i opened the safari tab, i s