2009 Feb 20 6:31 AM
Hi All,
In my report i am having two different selection parameters.
one is single field and other is range (using options).
i have search help for the second range field where in i call up a function module to display the search help.
but i need the first single field selection parameter for calling this function module.
Issue: the first single field parameter is available only when i press enter before going for search help of second field. when i enter first field with some value and go to search help of second field without pressing enter, the first field value is not available.
please let me know if i can get value on screen before pressing enter.
Thanks in advance,
Ujwal
Hi All,
In my report i am having two different selection parameters.
one is single field and other is range (using options).
i have search help for the second range field where in i call up a function module to display the search help.
but i need the first single field selection parameter for calling this function module.
Issue: the first single field parameter is available only when i press enter before going for search help of second field. when i enter first field with some value and go to search help of second field without pressing enter, the first field value is not available.
please let me know if i can get value on screen before pressing enter.
Thanks in advance,
Ujwal
2009 Feb 20 6:58 AM
2009 Feb 20 7:46 AM
Hi Goutham,
Thanks for your response but unfortunately your document didn't solve my purpose.
I am not using any f4 help methods. I have my own function module which will display pop-up
based on input values. So that input value i am getting it from other screen parameter.
I want to get that value even if "enter" is not pressed and search help is pressed for the second range field which uses this function module as search help.
let me know if you are not clear with my requirement.
Thanks and Regards,
Ujwal
2009 Feb 20 8:06 AM
Hi Ujwal,
The 'dynpread' structure helps you out..
paste u r code if possible..
Regards,
Goutham.
2009 Feb 20 8:24 AM
Hi Goutham,
i have used following code.
*****************************************************************************************
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(19) text-010 FOR FIELD p_input1.
SELECTION-SCREEN POSITION 21.
PARAMETERS: p_input1 TYPE type1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-006 FOR FIELD p_input2.
SELECTION-SCREEN POSITION 18.
SELECT-OPTIONS : p_input2 FOR type2.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN.
Validations
*check for p_input1
if p_input1 is not intial.
process p_input1.
endif.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_input2-low.
CALL FUNCTION 'get_input2'
EXPORTING
input1 = p_input1
IMPORTING
input2 = p_input2.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_input2-high.
CALL FUNCTION 'get_input2'
EXPORTING
input1 = p_input1
IMPORTING
input2 = p_input2.
*****************************************************************************************
now the issue is p_input1 is available only after presing enter. if i enter p_input1 on screen and then press f4 help of p_input2 without pressing enter, p_input1 is not available in "AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_input2-low." line.
Hope this you are clear with my requirement now.
Thanks and Regards,
Ujwal
2009 Feb 20 8:56 AM
Hi Ujwal,
i have used the same code (modified a bit to execute the prog) and i'm able to get the value..
TABLES : vbak.
DATA : itab TYPE STANDARD TABLE OF dynpread,
wa TYPE dynpread,
v_index TYPE i.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(19) text-010 FOR FIELD p_input1.
SELECTION-SCREEN POSITION 21.
PARAMETERS: p_input1 TYPE c.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(15) text-006 FOR FIELD p_input2.
SELECTION-SCREEN POSITION 18.
SELECT-OPTIONS : p_input2 FOR vbak-vbeln.
SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN.
Validations
*check for p_input1
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_input2-low.
wa-fieldname = 'P_INPUT1'.
BREAK-POINT.
APPEND wa to itab.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = itab.
break-point.
check the 'itab-fieldvalue' .. u can pass this value to u r FM.
Regards,
Goutham.
2009 Feb 20 9:12 AM
Hi Goutham,
I tried similar steps and now in debug mode i do get p_input1
but i am getting strange error after passing it to search help FM.
error is "Control Parameters are not mainatined for input1".
is it selection screen specific error or search help FM specific error?
Thanks again,
Regards,
Ujwal
2009 Feb 20 9:19 AM
Hi Goutham,
I think this error is application specific.
Thanks a lot for your help and i have rewared points accordingly.
Thanks again,
Regards,
Ujwal
2009 Mar 12 1:35 PM
Very nice..gr8... solution...
past 2 months i was searching for this ....
Thanks Gautham...