a month ago
Hi Friends,
Happy new year !
I encountered a requirement where I have a search help available linked to T157D to return a text to a field in table maintenance generator "New entries" screen. Now, the analyst wanted an option where the user can just type the reason code and on the next column (field) the description would automatically appear. Again, not use the F4 help and just type and enter key.
I achieved this using search help by populating the table parameter dynplfd_mapping of FM F4IF_INT_TABLE_VALUE_REQUEST. This automatically populates the next column (field) after choosing a record from F4 help window.
I tried FM DYNP_UPDATE_FIELDS (can't make it work) but it requires getting a value from the screen using FM DYNP_VALUES_READ. The requirement is just to type without reference value from screen and through query in the background it will return the value by automatically populating the field next to it.
I attached a screenshot, here, if user types 001, it will automatically put Functional under reason for movement field.
Super appreciate your help.
Thank you,
Geoff
3 weeks ago
I used events (05) - new entry. This shows the table name and you can edit it right away, values updated gets displayed instantly. Problem solved.
a month ago - last edited a month ago
Assuming that "Reason" is a column of your custom table ZYOURS (foreign key to T157D-GRUND) but the "Reason for Movement" is not in your custom table (it's coming from T157E-GRTXT). Create a maintenance view joining ZYOURS and T157E by the reason code (GRUND), make T157E-GRTXT a read-only field, create the TMD (Table/View Maintenance Dialog) on this maintenance view.
That's it. No custom code.
Now, by starting the TMD of the maintenance view, the user can press F4 on ZYOURS-GRUND to get one reason code, press Enter and the reason text is automatically displayed.
4 weeks ago
Hi Sandra,
Thank you for your feedback. actually I already implemented the F4 for GRUND and I'm getting the text after user clicks on the suggested value. The request now is to allow user to type. Once user types (example) 123, presses enter, the corresponding text of 123 should appear on the next field. Is there a way to do this? if it's an ordinary text field I can declare it globally and just pass value there. But it's TMG, it's different.
4 weeks ago
As I said, I don't recommend your solution, but if you really want to continue with it, use DYNP_UPDATE_FIELDS with the screen line number in the component STEPL of the parameter DYNPFIELDS (top line of the screen = always 1).
From the F4 logic, use F4UT_GET_ENVIRONMENT to retrieve the line number (component STEPLNUM) where F4 is pressed.
4 weeks ago - last edited 4 weeks ago
Hi Sandra,
Thank you for your feedback. I agree, it's not a good approach but the analyst insists..
I used the DYNP_UPDATE_FIELDS but it displays the field on the bottom instead of the next field. Anyway, I tested other approach. I used events (05) new entry. This shows the table name and you can edit it right away, values updated gets displayed instantly. Problem solved. 🙂
4 weeks ago - last edited 4 weeks ago
F4UT_GET_ENVIRONMENT is for search helps, maybe it's DYNP_GET_STEPL then.
Thanks for the feedback. You may add a new answer how you solved and accept it as solution.
3 weeks ago
I used events (05) - new entry. This shows the table name and you can edit it right away, values updated gets displayed instantly. Problem solved.