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

Help required on Freely Programmed Input help

Dear all,

I have developed a component, say comp1, in which i have implemented the interface IWD_VALUE_HELP.

In the respective view(MAIN) of Comp1 i have a dropdown which contains a list of company codes fetched from T001 table.

Apart from these two, I have also embedded the Main view into the window WD_VALUE_HELP.

...................................................................................

Now, I have created another component, say Comp2, in which i Used the dynpro component Comp1, and also in the MAIN view of my Comp2. Now in the MAIN view of Comp2 I have created a input field from the node T001 in the context which contains the single attribute BUKRS type String. In the properties of the BUKRS attribute I have also changed the Input help to "Freely Programmed" and linked to the component for the Input help.

After this, I have created the application for my component Comp2. When i run the application and when i press F4 on the input field i am able to get the window from Comp1 component, and a dropdown with values.

.....................................................................................

Now the question is, How can i pass the value selected in that window of Comp1 into the input field of Comp2? we do the same in OVS, when ever a value is selected from the Hitlist, it will be cascaded into the input field, just like that i want to do here.

Please suggest me how to do this, and also please tell when to go for Freely programmed Input help and its advantages.

Thank you,

Shashi.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 12:43 PM

    Hi

    In comp1 create an interface node with an attribute same as the input field,In the onselect method add the code in such a way to set the attribute of the interface node with value what you selected.

    In comp2 include this interface node,now the value what you have selected in comp1 will be visible in the comp2 also, use this attribute and fill the inputfield

    Also you can refer this code tutorial for more detail

    [https://wiki.sdn.sap.com/wiki/display/WDABAP/Freelyprogrammedinput+help]

    Hope this helps you

    Thanks and regards

    Tamilselvan.K

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Maheshkumar gattu

      Dear Mahesh,

      In you first component for freely programmed input help, create a node in the Component controller, and check the property Interface node of that node. This makes the node of your first component to be present in the interface controller.

      Now in the second component, where your first component is being used, go to v_main view's context, and u can find a the nodes present in Interface controller of your first Component to the right side of the screen.

      Please select and drop it in your v_main context.

      This enables the nodes to be shared in between two Components through Interface controller.

      I think i have succeded in answering your question.

      Reward if useful.

      Good day!

  • Posted on Jul 22, 2008 at 03:06 PM

    You can do as suggested already and use interface nodes and cross component mapping; but that is all really not necessary. It creates a situation where you calling application is too dependent upon the freely programmed input help. You want to try to avoid the situation where the calling application needs code or mappings to communicate with the input help.

    That is easy to do because the framework passes all the information you need into the freely programmed input help via the value_help_listener object.

    Part of the Freeley Programmed Input Help Component should be the component interface IWD_VALUE_HELP. This comes with a component controller method called SET_VALUE_HELP_LISTENER. This allows your freely programmed value help to capture this object called listener of type IF_WD_VALUE_HELP_LISTENER. I generally just store it awa into a component controller attribute.

    With this listerner object you have direct access to the context attribute in the calling component. You can query information about the calling UI element and of course set values directly back into it. The listener is a hugely helpful object and should be the way you interact with the calling component whenever possible. Here is small example:

    • set single attribute

    wd_this->value_help_listener->f4_context_element->set_attribute(

    exporting

    name = wd_this->value_help_listener->f4_attribute_info-name

    value = l_time

    ).

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 10:09 AM

    Create the interface contexts to pass the data between the cross-components .

    For eg make the interface context in the Component controller in the Comp1 component . Add the usage of the Comp1 in the second component Comp2

    , go to the component usages of the Comp2 and map the interface context to the Comp2 Comp controller , then u will get the desired values.

    U can refer to the WDR_TEST_APPL_DEF_VH

    and WDR_TEST_APPLDEF_VH1

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 04:32 AM

    Solved

    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.