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)

Similar Messages

  • Enhance BTQ1Order with new Parameter

    Hi,
    I thought I have an easy task :-). But it seems, that I do not understand, how to solve it.
    I will add a new Parameter to dynamic search BTQ1Order. The new Parameter is CREATED_BY from crmd_orderadmh.
    So I add a append to  CRMST_QUERY_1ORDER_BTIL - with CREATED_BY     (Type CRMT_CREATED_BY). Than I created a implementation for BADI CRM_BADI_RF_Q1O_SEARCH and added the Filter BTQ1Order = OBJ_IL. But my BADI is never called. Do I have to do something different?
    From the other side, I'm not sure if it is the right way. If I understand right - than I have to handle the search by my own. This means make a "standard" dynamic search - and in the 2nd step - check the result against my selection parameter - sounds not really fast.
    Or is the right way to create own dynamic search.
    Thanks in advance Paul

    Hi Paul,
    The BADI implementation part is correct, but before your badi is called/triggered a check is carried out to confirm if the search parameters entered/present on screen are also available in the standard structure -
    (1) Please check if CREATED_BY field is present in CRMC_Q1O_FIELDS table, if not maintained you can manually maintain an entry there.
    (2) The other table you need to check is CRMC_REPDY for an entry matching field 'CREATED_BY'.
    Please check the entry matches:-
    SEL_FIELD = CREATED_BY
    NAME_ON_DB = CRMD_ORDERADM_H~CREATED_BY
    DYN_METHOD = DYN_ORDERADM_H
    If not maintained, please maintain it manually as well.
    Once these 2 checks are performed, the Badi willl be definitely triggered.
    Again, please make sure the Badi is activated in your client.
    - Dedeepya

  • How to change payment method with new credit card details. Not able to change current one as card has expired. Pl help

    I want to change my payment method with new credit card information as current credit card has expired. But when I try to change payment method , returns your payment method is not valid or allowed and continues to prompt to change the same. But when I try to update with whew credit card number, it doesn't accept and continue to refuse the payment method.
    This problem is not allowing me to purchase of any kind either paid or even free as well. Doesn't allow to even purchase free books even
    Please help to solve the issue
    Thanks
    Dpvora
    India

    You need to contact Apple Support for this kind of problem.
    http://www.apple.com/support/contact/

  • 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.

  • 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

  • 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

  • SAP CRM 7.0 - Interactive reporting tool enhancing reports with new fields

    Hi Everyone,
    I am a BW Professional, currently working on evaluating the true benefits of implementing Interactive Reporting tool for our company. As I understand the Interactive reporting tool restricts us to report on individual reporting areas like Activities, Leads, Opportunties etc.
    But according to our business it is very important for us to be able to report on cross reporting areas real time i.e. activities & leads together or activties, leads & opportunties together etc.
    I learned about the enhancement work bench in interactive reporting tool where we can add SAP fields to individual reporting areas, so I thought of adding leads & opportunties to activities. This is where the fun part starts.
    Here I learned that all activty ID, Lead ID and Oppo ID are all fed from one single field from SAP CRM i.e. OBJECT_ID, which means the system is dividing this data into individual reporting areas based on type of data i.e. leads or oppor's etc. and may be based on some key like account etc. So here is a technical question, for me to add a new field to a reporting area I have to give a field name but we already have OBJECT_ID from where I am pulling activties data, so if I want to include leads also in activties then I will have to add some logic manually to get that and can't use enhancement workbench because it is for missing fields from SAP CRM whereas in my case I already have OBJECT_ID from where I am getting Activity data.
    Sorry if I am driving you guys crazy but I am just trying to think loud to make myself clear with concepts.
    Also I have seen that a reporting area in Interactive reporting tool is based on a BW query, but I am not sure why not all the fields in BW query are available for reporting in Interactive reporting tool?
    Any help or commets will be greatly appreciated.
    Thanks & Regards,
    SRV

    Hello,
    checking with the config wizard is always a good idea since it's the only supported way to configure this scenario
    The secret is that you apparently did not activate the report areas. It is a bit missleading that the queries are checked before the report areas are checked, therefore you see the errors concerning the queries first. Below those errors you should find some lines like
        Report areas: delivered 15, active <?>
        CRM interactive reports: delivered 20, active <?>
        Activation of report areas checked
    The last line offers some documentation and the actual link to activate the report areas.
    Best regards

  • 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.

  • Using boku payment method with new student account

    Hi,was just wondering, I want to use the spotify discount from unidays on my account as I am yet to use it . I am aware its costs around 4.99 a month, however I'd like to use the boku payment method to pay for this as I don't have a debit card to pay with, I can't afford the 9.99 fee monthly so can someone help me, thanks

    Hey there , welcome to the community!
    I'm afraid the student discount can only be payed using a debit/credit card. :(

  • Payment method with new bank details

    Hi All,
    im using a program to print the salary cheques for certain payment methods, after running the payroll.
    but now that the new bank details is not updated when i try to print the cheques.still looking at the old bank details for a payment method.
    so could any one help me whether do i need to update any configuration link for the payment method and bank details.
    Thanks in advance.
    Sud

    Hi Sumit,
    I have one problem for creating employee as a vendor. For creating employee as a vendor we are using PRAA T.Code. While creating system is picking House bank as a DB but according to my company code our house bank is SB01.
    I believe this is becoz of DTAKT Feature. Can you pls. guide me how to maintain return value for this feature.
    5-character code for bank: This is house bank Code?
    5-character bank account code: It means bank key of house bank?
    Thanks & Regards
    Rajesh

  • Scope of global & pl/sql variable in open_form with new session

    Hi,
    What will be the scope of the Oracle forms global variable & variable declared in a pl/sql pckage, if the value in these variable is updated from the Oracle Form GUI, if the form is opend by using the open_form method with new session or Active session.
    My requirement is , I developed one application with custom user login name & password - not the Oracle username & password.
    But I need to track the user actions on the forms - Inser/Update/Delete action, for this i included user_name as one of the column in the base table, and from the form, initialise this field with login user name.
    I implemented this in the trigger of the base table. But for delete, I am not getting the user name who deleted, only getting the user who created this record, because :NEW is not in scope for after delete trigger. So for the delte, I created a variabe in a PL/SQL package, and created two procedure to set & get the user name to that variable, and from the Form, before delete by using the set method I assign the current login user name to the variable, and in the trigger by using the get() get the user name from the variable, So far this is working fine, my doubt is What will be the value in the variable, if two different user made delete action from at a same time, Whether first user name will be replace with second one, or this variable will be in different session, If I opened the forms by using SESSION parameter. Also can I use Oralce Forms global varaible instead of the PL/SQL varibale.
    Thank in advance.

    Thanks Andreas,
    I did the same way. But my doubt is All the user login will be in different session, I mean, Whether the vairable used to store the user name will be in different session to each Oracle Forms user, it wont overwrite one user name with the next login user name.
    -- Copied from you old message:
    <<On the forms-side after the login, call PK_USER.PR_SET_USER(THE_USER_TAKEN_FROM_SOMEWHERE);
    In your db-triggers where you actually use something like USER, use PK_USER.FK_GET_USER instead>>
    Thanks
    Rizly

  • Enhanced SAP class with new methods - Not showing these from standard task

    Dear Gurus,
    I have enhanced SAP standard class with new methods. After I have activated my new methods and would like to create a workflow task using these new methods. when I create a task and input object category as "ABAP Class" and object type is SAP enhanced class. When I try to drop down for methods SAP is not showing my new methods. I do not know why. Am I missing any? Any help would be appreciated.
    Note: Remember I am trying to use SAP ABAP class custom methods.
    Thanks,
    GSM

    Hi,
    Your thread has had no response since it's creation over
    2 weeks ago, therefore, I recommend that you either:
    - Rephrase the question.
    - Provide additional Information to prompt a response.
    - Close the thread if the answer is already known.
    Thank you for your compliance in this regard.
    Kind regards,
    Siobhan

  • 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 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

  • Enhancing standard component with new component usage

    Hi!
    I try to enhance standard component /SAPSRM/WDC_AOFC_BEV with new component usage (say, SALV_WD_TABLE). It allows me to add new usage, but the usage does not appear in the "Component Usages" tree node.
    Is it a bug? Is it possible to enhance a standard component with new component usage?

    Hi Thomas!
    We've been communicating with SAP on this issue for a while and last response we obtained is next:
    Dear customer,
    the possibility to create external controller usages (as required for
    the ALV-usage) is not supported by the Web Dynpro ABAP development
    tools. However, you could try a programmatic apporach by adding the
    ALV-usage dynamically (e.g. in methods or method exits created within
    your enhancement implementation).
    See test component WDR_TEST_DYN_ALV_USAGE for details.
    What's your opinion on this? Is it really not a bug?

Maybe you are looking for