‎2012 Jul 18 9:18 AM
Hello,
I like to know how to create Searchhelp for a field in TableControl.
I have a Dynpro with two TableControls on it. Both transacted with internal table.
One of these TableControls has 3 keys. Over the first one you can choose the right combination.
But after this selection only the first key is taken up to the Dynpro. The other two keys are empty.
All 3 keys have the same name like the appropriate structure. A Data Dictionary - relation is not possible.
The 3 keys of the structure have filled in the searchhelp and in the searchhelp the 3 fields are as well importing as exporting.
Have someone an idea how to resolve this problem?
Thanks for your help!
Kristin
‎2012 Jul 18 10:26 AM
Hi,
If you want to set the standard serach help for a field, you can give the SEARCH HELP name in the REFERENCES tab under the ELEMENT LIST tab.
Go to the element list tab, place the cursor in the I/O field of the your table control and click on the Attributes Button. Then give the standard search help name in SEARCH HELP field.
If you want to set the custom F4 help for a field, write the module inside the statement PROCESS on VALUE REQUEST. Then use the function module f4if_int_table_value_request to populate the custom search help.
Example:
PROCESS ON VALUE-REQUEST.
FIELD <field name> MODULE <module name>.
Cheers
~Niranjan
‎2012 Jul 18 10:26 AM
Hi,
If you want to set the standard serach help for a field, you can give the SEARCH HELP name in the REFERENCES tab under the ELEMENT LIST tab.
Go to the element list tab, place the cursor in the I/O field of the your table control and click on the Attributes Button. Then give the standard search help name in SEARCH HELP field.
If you want to set the custom F4 help for a field, write the module inside the statement PROCESS on VALUE REQUEST. Then use the function module f4if_int_table_value_request to populate the custom search help.
Example:
PROCESS ON VALUE-REQUEST.
FIELD <field name> MODULE <module name>.
Cheers
~Niranjan
‎2012 Jul 18 1:38 PM
Dear Niranjan,
thanks for your help!
Now I have the solution for getting all 3 keys by using the searchhelp.
(because it's in PROCESS on VALUE REQUEST)
But what I have to do, if I write something in the field of the first key and click return?
Then nothing happens.
And if I write FIELD <field name> MODULE <module name> ON CHAIN-REQUEST. between CHAIN and ENDCHAIN of the loop from my internal table (PAI), the searchhelp is displayed but only the first key is taken up to the Dynpro.
Is there another function I required?
Thanks a lot!
Kristin
‎2012 Jul 18 3:52 PM
Hi Kristin,
I am unable to get your question.
Can you please post your requirement/issue in details. If possible, can you post the screen shot of the issue?
Cheers
~Niranjan
‎2012 Jul 19 4:06 PM
Hi Niranjan,
with your help one side works - the custom F4 help - directly click on the searchhelp.
(PROCESS ON VALUE-REQUEST.
FIELD <field name> MODULE <module name>.
with the function module f4if_int_table_value_request)
Now I con choose with the searchhelp and all 3 keys are taken up to the Dynpro.
And now I need the same when I write something in the first key and click "return".
Example: I write "AB" in the field of the first key. Now I click "return". At next I get a list with all values which beginns with "AB" (for example: ABA, ABC and ABE). Now I pick up the second value "ABC" (= first key) with the second key = U and the third key = 2.
But the values for the second (U) and the third key (2) are not taken up to the Dynpro.
What can I do?
Thanks for your help
Kristin
‎2012 Jul 19 4:49 PM
Hi,
I hope your requirement is to put the value "U" and value "2" in the screen. For this, you need to modify the internal table of the associated table control.
Once you change the value of the internal table, it will be displayed in the table control.
Cheers
~Niranjan
‎2012 Jul 19 5:00 PM
Hi,
yes, this is my requirement.
But I don't know how to modify the internal table.
Ich have in the PAI:
loop internal table
CHAIN
...
FIELD KEY 1<field name> MODULE <module name> ON CHAIN-REQUEST.
FIELD KEY 2
FIELD KEY 3
ENDCHAIN
endloop internal table
The module has also the f4if_int_table_value_request and after this the function
DYNP_VALUES_UPDATE (with the values of the return_tab).
sy-subrc is 0, but the values for the second (U) and the third key (2) are not taken up to the Dynpro
Cheers Kristin
‎2012 Jul 20 5:06 AM
Hi,
Please try the below mentioned logic.
PAI
loop internal table
CHAIN
FIELD KEY 1<field name> MODULE <module name> ON CHAIN-REQUEST.
FIELD KEY 2
FIELD KEY 3
MODULE <module name>
ENDCHAIN
endloop internal table
Inside the new module, write the code to modify the new internal table.
Cheers
~Niranjan
‎2012 Jul 20 1:10 PM
Hi Niranjan,
thank you very much! Now it works.
Cheers
Kristin