Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Selection-screen Processing.

Former Member
0 Kudos

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??

11 REPLIES 11

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

Did you look at the Search help COPA_KSCHL_ALL.

A

Former Member
0 Kudos

Try to read screen field values using function module dynp_values_read.

0 Kudos

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???

0 Kudos

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.

0 Kudos

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..

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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