08-01-2008 4:53 PM
Hi
I have in my selection screen
CONDITION TYPE (T685-kschl) as Select-options (mandatory) -> S_cndtyp
CONDITION TABLE (T682I-Kotabnr) as Select-options (mandatory)->S_cndtbl
My requirement is that
Depending on the Condition Type given as input..I should display Valid Condition tables as pop-up when i press F4.
I have coded like this..
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_cndtbl-low.
PERFORM valid_cndtbl USING s_cndtbl-low.
and i wrote the logic for rest in the Subroutine mentioned above.
The Problem i'm getting is under this event mentioned above, S_cndtyp( condition type given in input) is not getting populated with the value given in the selection-screen previously.
How do i get that Select-options value??
08-01-2008 5:09 PM
Hello,
Try using the code in the at selection screen for field S_cndtyp, instead of the other field.
When S_cndtyp is populated, use the logic to fetch all the condition tables immediately.
If there are multiple condition tables, You need to populate an internal table with all the values and pass the table to the function module F4IF_INT_TABLE_VALUE_REQUEST , so that only those table values are displayed when the user wants the search help on the condition table.
cheers,
Sushil Joshi
08-01-2008 5:14 PM
In continuation to the Post i given ..the below code is the one i have used..my Problem is that S_cndtyp marked in bold in below code is not getting populated with the value filled on the selection-screen.
No need to go thru entire code given below..My question is how to access the S_cndtyp filled
on Selection-screen..Rest of the code is working fine..
Can i get some other approach??
&----
*& Form valid_cndtbl
&----
text
----
-->I_CNDTYP text
----
FORM valid_cndtbl using v_cndtbl.
Data: v_setyp type t681-setyp,
v_vtext type t681T-vtext.
Refresh: i_kozgf.
To get KOZGF for given Condition types
Select kozgf
from T685
into table i_kozgf
where kvewe = 'A'
and kappl = 'V'
and kschl in S_cndtyp.
If not i_kozgf[] is initial.
SELECT kotabnr
FROM t682i
INTO table i_tmpcndtbl
FOR ALL ENTRIES IN i_kozgf
WHERE kozgf eq i_kozgf-kozgf
AND kappl eq 'V'.
endif.
LOOP AT i_tmpcndtbl INTO wa_tmpcndtbl.
SELECT setyp
FROM t681
INTO v_setyp
WHERE kvewe = 'A' AND
kotabnr = wa_tmpcndtbl-kotabnr.
endselect.
SELECT vtext
FROM t681T
INTO v_vtext
WHERE kvewe = 'A' AND
kotabnr = wa_tmpcndtbl-kotabnr and
setyp = v_setyp.
endselect.
wa_cndtbl-kotabnr = wa_tmpcndtbl-kotabnr.
wa_cndtbl-vtext = v_vtext.
APPEND wa_cndtbl TO i_cndtbl.
Clear: v_setyp, v_vtext, wa_cndtbl.
ENDLOOP.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'KOTABNR'
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'V_CNDTBL'
value_org = 'S'
TABLES
value_tab = i_cndtbl
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " valid_cndtabl
Edited by: ksiva on Aug 1, 2008 9:45 PM
Edited by: ksiva on Aug 1, 2008 9:48 PM
08-01-2008 5:24 PM
Use loop-endloop to get all the values in the select options:
Loop at S_cndtyp.
processing logic to get values
endloop.
cheers,
Sushil Joshi
08-01-2008 5:10 PM
08-01-2008 5:34 PM
Try to read screen field values using function module dynp_values_read.
08-02-2008 9:02 AM
Ram
FM serves my purpose to some extent..Using the Fm given, i can retrieves the Screen field values only..
I need to fetch all values in the Select-options table (say given multiple values for Select-options )..
how can i retrieve the Entire Select-options table values???
08-02-2008 12:43 PM
FM serves my purpose to some extent..Using the Fm given, i can retrieves the Screen field values only..
I need to fetch all values in the Select-options table (say given multiple values for Select-options )..
can you not use this fm for all selection screen values one by one?
Amit.
08-04-2008 7:07 AM
I can use the Fm to read selection-screen values one by one..
Say for if the input is Select-options -> I can read its low and high value,
But my question is what if when the user enters multiple values for select-options..
the only option is i have to look for an approach where in i can capture the entire Select-options table, that is what i'm looking for..
08-04-2008 9:06 AM
Hi Siva,
when user click 'Multiple Selection' of the selection option to fill the values, the data populated in the condition_type internal table will be visible in the AT-SELECTION SCREEN event of condition_table selection otpion.Please debug and check. Hope this works.
For handling if user enter single values , you can use funtion module as said in the previous replies.
Regards
Mohamed Aboobacker Siddique
08-01-2008 7:39 PM
Hi,
Simply use the function module F4IF_INT_TABLE_VALUE_REQUEST for this purpose.
Please reward if you find the answer useful.
Thanks,
Kamesh Bathla
08-04-2008 9:16 AM
Hi Ksiva.
I would like to suggest,
These are the tables,
BAPIF4B - BAPI selection options for choosing values via search help
COMT_PRSEARCH_SEL_OPTION - Selection options for value selection with search help
DDSHSELOPT - Selection options for value selection with search help
SHSELOPT - Fields of the search help selection options
Hope that's usefull.
Good Luck & Regards.
Harsh Dave