‎2009 Jul 09 7:39 AM
hi friends ,
i want to display f4 help for a field in a popup. this i can do, but this popup comes based on values
i entered in other screen fields . but these values are not updated to screen values when i trigger f4.
‎2009 Jul 09 7:42 AM
hi,
From what i understood is the values which you choose from the F4 list is not geeting saved in the screen field.. If this is the issue please check if you have done the following..
after calling the FM 'F4IF_INT_TABLE_VALUE_REQUEST'.
IF sy-subrc EQ 0.
IF NOT gt_matnr_returned[] IS INITIAL. <--------- Your internal table returned
READ TABLE gt_matnr_returned INTO gs_matnr_returned INDEX 1.
p_matnr = gs_matnr_returned-fieldval. <-------- Your screen field..
ENDIF.
ENDIF.
Let me know if your problem persists..
‎2009 Jul 09 7:42 AM
hi,
From what i understood is the values which you choose from the F4 list is not geeting saved in the screen field.. If this is the issue please check if you have done the following..
after calling the FM 'F4IF_INT_TABLE_VALUE_REQUEST'.
IF sy-subrc EQ 0.
IF NOT gt_matnr_returned[] IS INITIAL. <--------- Your internal table returned
READ TABLE gt_matnr_returned INTO gs_matnr_returned INDEX 1.
p_matnr = gs_matnr_returned-fieldval. <-------- Your screen field..
ENDIF.
ENDIF.
Let me know if your problem persists..
‎2009 Jul 09 7:53 AM
thank u, but thats not the problem. In my selection screen i have some other input fields other than this field.
when i press f4 i need to fetch data based on remaining input screen fields and display in a popup. when i write this in the event at selection screen on value request other in put vaues which i have given are not comming.how can i get those values
to fetch related data to display in popup.
‎2009 Jul 09 7:57 AM
Hi Sudheer,
Just go thru this link.
Basing on one screen field value it populates the search help for other field when user presses F4.Just have a look.
It shows the usage of the above function module.
https://wiki.sdn.sap.com/wiki/display/Snippets/F4Helpin
It will surely help u.
Regards,
Lakshman.
‎2009 Jul 09 8:01 AM
Hi,
Then use it in the AT selection screen.. First use the FM Module 'DYNP_VALUES_READ' to read the first field value and then use the internal table returned in the FM 'F4IF_INT_TABLE_VALUE_REQUEST'.. This will solve your problem...
‎2009 Jul 09 8:03 AM
Hi,
DATA: T_DYNPRO TYPE TABLE OF DYNPREAD,
WA_DYNPRO LIKE LINE OF T_DYNPRO,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_PARAM.
WA_DYNPRO-FIELDNAME = 'Screen Field Name'.
APPEND WA_DYNPRO TO T_DYNPRO.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = SY-REPID
DYNUMB = SY-DYNNR
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = T_DYNPRO
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE T_DYNPRO INTO WA_DYNPRO WITH KEY FIELDNAME = 'Screen Field Name'.
TEMP = WA_DYNPRO-FIELDVALUE.
" Select the values based on Temp and populate your internal table for F4 help using the Screen value Temp
"Call 'F4IF_INT_TABLE_VALUE_REQUEST' and display the pop up.
‎2009 Jul 09 7:44 AM
Hi Sudheer,
Please use this function module DYNP_VALUES_READ.
Its for Reading screen field values before any user action has triggered.
Regards,
Lakshman.
‎2009 Jul 09 8:15 AM