Skip to Content
author's profile photo Former Member
Former Member

How to get the id of the function from the name

I want to call my function created in BRF+. But the factory class allows me to pass only the ID to instantiate the class. But I want to pass the name instead of the id and get the object instantiated and run the function. Can anyone point me to the right way of passing the name to get the factory object instance.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Apr 19, 2011 at 06:49 AM

    A function name is usually unique within an application. But in case of transports and source system switches it can thoeretically happen, that the name is not unique.

    You can get the ID by the following way

    1. Get factory instance with an application ID provided (you get a factory instance for the application ID)

    2. Get a query instance from the factory (query for the application ID)

    3. Use method GET_IDS, there should be only one entry; do not forget to pass object type to the method.

    4. I would add an assert statement for the case more than 1 ID is returned

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 20, 2011 at 08:07 PM

    Worked.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.