2010 May 20 1:10 PM
Hi,
I am using FM: POPUP_GET_VALUES_USER_HELP to get a field entry.
This is all working fine, but how can I pick up what the user has entered
to use in my selection?
I am using this setup.
Dialog box for requesting values, call of user exits and help
CALL FUNCTION 'POPUP_GET_VALUES_USER_HELP'
EXPORTING
POPUP_TITLE = LTP_POPUP_TITLE
PROGRAMNAME = SY-CPROG
FORMNAME = 'TCODE_EXIT'
F4_PROGRAMNAME = SY-CPROG
F4_FORMNAME = 'TCODE_F4'
IMPORTING
RETURNCODE = LTP_RETURNCODE
TABLES
FIELDS = LTA_FIELDS.
Now when the user press F4 for input help I want to make a selection for the selected entry.
Say the user enters Z* I want only to display these in the display list.
How can I from the TCODE_F4 form find out what the user has entered?
I need this information for filling a range for the additional select needed for feeding the
FM: F4IF_INT_TABLE_VALUE_REQUEST.
Please help me out 😃
Greatful for a quick reply.
/Fredrik.
Hi,
I am using FM: POPUP_GET_VALUES_USER_HELP to get a field entry.
This is all working fine, but how can I pick up what the user has entered
to use in my selection?
I am using this setup.
Dialog box for requesting values, call of user exits and help
CALL FUNCTION 'POPUP_GET_VALUES_USER_HELP'
EXPORTING
POPUP_TITLE = LTP_POPUP_TITLE
PROGRAMNAME = SY-CPROG
FORMNAME = 'TCODE_EXIT'
F4_PROGRAMNAME = SY-CPROG
F4_FORMNAME = 'TCODE_F4'
IMPORTING
RETURNCODE = LTP_RETURNCODE
TABLES
FIELDS = LTA_FIELDS.
Now when the user press F4 for input help I want to make a selection for the selected entry.
Say the user enters Z* I want only to display these in the display list.
How can I from the TCODE_F4 form find out what the user has entered?
I need this information for filling a range for the additional select needed for feeding the
FM: F4IF_INT_TABLE_VALUE_REQUEST.
Please help me out 😃
Greatful for a quick reply.
/Fredrik.
2010 May 20 1:58 PM
Hi,
if you read the documentation for the function, it is mentioned programme RSSPO440 as an example for úsing the function.
additionally, I think that you should work only with F4IF_INT_TABLE_VALUE_REQUEST.
2010 May 20 2:46 PM
Hi,
Thank you for your quick answer.
However I have looked at that program and could not get this to work in my case.
The field is not populated (TSTC-TCODE).
There is another popup in the SAP program and after this that field is populated to be used in the search.
In my case the F4-module is happening directly and no data information exists.
I don't quite understand what you mean by only using F4IF_INT_TABLE_VALUE_REQUEST,
since this is for the value help popup.
I think I should be able to receive the information from the popup screen somehow.
2010 May 21 3:05 PM
Hi,
I got it to work, just wanted to share the knowledge.
In the F4 module you need to call FM: DYNP_VALUES_READ.
DATA: LTAB_FIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE.
DATA: LC_DYNAME LIKE SY-REPID.
DATA: LC_DYNUMB LIKE SY-DYNNR.
LTAB_FIELDS-FIELDNAME = 'SVALD-VALUE'. "<<< Here you need to find out what field name it is,
"since the db field you are looking for is not the correct name from the popup.
APPEND LTAB_FIELDS.
LC_DYNAME = 'SAPLSPO4'. "<<< Here you need to use the popup program and not the running program.
LC_DYNUMB = SY-DYNNR. "<<< This should be ok to use.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = LC_DYNAME
DYNUMB = LC_DYNUMB
TABLES
dynpfields = ltab_fields
EXCEPTIONS
OTHERS = 01.
LTAB_FIELDS-FIELDVALUE containts the screen value.
I would suggest to just put in some temporary code like LOOP AT SCREEN in the F4 module
just to find out what name it should be.
I hope that someone can benefit from this solution.
Thanks and regards,
/Fredrik.