09-16-2008 7:21 AM
Hi
I have an issue.
There are 2 input fields in the selection screen. Both are Z fields and F4 help has been written for those 2 fields using F4IF_INT_TABLE_VALUE_REQUEST function module in AT SELECTION-SCREEN ON VALUE-REQUEST event. The 2nd input field displays values in the popup window based on the value available in 1st input field while pressing F4.
My question, if I'm not pressing F4 key and type the correct value manually in the 1st input field, and then I press the F4 help for the 2nd input field, it doesn't display any value in the popup window.
That is, the 2nd input field doesn't select any value into the popup window if I've not pressed F4 key in the 1st input field.
Could any one please help me to solve this issue?
Thanks
Senthil
09-16-2008 7:35 AM
hi use dynpro_values_read function module to get value of first field and to get f4 help for the second field.
at last use dynpro_values_update to update respective fields..
i want to see codings .please send it . i try my best.
regards,
kani.
09-16-2008 7:40 AM
Hi Kani
This is not screen programming. Normal report.
I've used Selection Screen only.
Regards
Senthil
09-16-2008 7:50 AM
Check the below code ........
*&--------------------------------------------------------------------*
*& Form F1000_QUARTER_HELP
*&--------------------------------------------------------------------*
* F4 help for Quarter field
* Use FM GET_DYNP_VALUE to fetch the value against the fields
* Quarter and year based on which modify the value Table and
* provide it as F4 help to the user
*---------------------------------------------------------------------*
FORM f1000_quarter_help .
DATA: w_quarter TYPE dfies-fieldname VALUE 'QUARTER'.
* Get year change value
CALL FUNCTION 'GET_DYNP_VALUE'
EXPORTING
i_field = 'P_YEAR'
i_repid = sy-repid
i_dynnr = sy-dynnr
CHANGING
o_value = p_year.
e_quarter-begda(4) = p_year.
e_quarter-endda(4) = p_year.
MODIFY t_quarter
FROM e_quarter
TRANSPORTING begda(4)
endda(4)
WHERE begda(4) NE p_year.
SORT t_quarter
by quarter.
READ TABLE t_quarter INTO e_quarter WITH KEY quarter = c_q4
BINARY SEARCH.
IF sy-subrc EQ 0.
e_quarter-begda(4) = p_year + 1.
e_quarter-endda(4) = p_year + 1.
MODIFY t_quarter FROM e_quarter INDEX sy-tabix.
ENDIF.
* Function module to get F4 help
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = w_quarter
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_QUART'
value_org = 'S'
TABLES
value_tab = t_quarter[]
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc NE 0.
* Do nothing
ENDIF.
Cheers ,
Jacks M
09-16-2008 8:02 AM
Thank you Jacks,
The FM GET_DYNP_VALUE has solved my problem.
Thanks again
Senthil
09-16-2008 8:03 AM