2009 May 11 6:55 AM
Hi friends,
I have declared a Select option with no intervals, Multiple values can be entered
I am trying to Read the Select options using DYNP_VALUES_READ in AT ...ON HELP REQUEST for another field on selection screen
I am able to read only one value of the selection option using the above FM, Any inputs on how to read the multiple values
Thanks
Chandra
Hello,
You have to write the event in this way
example
Try this
AT SELECTION-SCREEN ON VALUE-REQUEST FOR y_p_list-low.
2009 May 11 7:02 AM
Hello,
We need to append 2 things
1) dynpfields-fieldname = 'S_WERKS-LOW'.
APPEND dynpfields.
Call the DYNP_VALUES_READ
2) dynpfields-fieldname = 'S_WERKS-HIGH'.
APPEND dynpfields
For LOW and HIGH we need to call the FM 2 times.
DYNP_VALUES_READ
See this example Program
BALV1F01
BCALV_GRID_11
BCALV_GRID_VERIFY
BCALV_GRID_VERIFY_OLD
BCALV_TREE_VERIFY
BCALV_VERIFY_DTYPES_F01
BC_SCR_FORMS
2009 May 11 7:02 AM
2009 May 11 7:03 AM
Hi friends,
I have declared a Select option with no intervals, Multiple values can be entered
I am trying to Read the Select options using DYNP_VALUES_READ in AT ...ON HELP REQUEST for another field on selection screen
I am able to read only one value of the selection option using the above FM, Any inputs on how to read the multiple values
Thanks
Chandra
*----
*
FORM VARIANTEN_AUSWAHL *
*----
*
Auswahl einer ALV Variante für die Liste (F4) *
*----
*
--> pvari : Variantenname *
*----
*
FORM varianten_auswahl CHANGING p_vari LIKE disvariant-variant.
**commented by ajay_05/13/2008
DATA: x_exit(1) TYPE c,
x_variant LIKE disvariant,
x_variant2 LIKE disvariant.
DATA: fieldvalues TYPE dynpread OCCURS 1 WITH HEADER LINE,
crepid like sy-repid,
summb LIKE fieldvalues-fieldvalue.
crepid = sy-repid.
Feld SUMMB vom Dynpro einlesen.
(Da der PAI noch nicht durchlaufen ist!)
CLEAR fieldvalues.
REFRESH fieldvalues.
MOVE: 'SUMMB' TO fieldvalues-fieldname.
APPEND fieldvalues.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = crepid
dynumb = '1000'
TABLES
dynpfields = fieldvalues
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.
READ TABLE fieldvalues INDEX 1.
summb = fieldvalues-fieldvalue.
else.
clear summb.
endif.
Aktueller Reportname
x_variant-report = sy-repid.
... Variantenname
x_variant-variant = p_vari.
Anzeigevarianten für (Nicht)Summenbericht unterschiedlich!
IF summb = 'X'.
x_variant-handle = 'SUMX'.
ELSE.
x_variant-handle = ''.
ENDIF.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = x_variant
i_save = 'A'
IMPORTING
e_exit = x_exit
es_variant = x_variant2
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
Keine Varianten für den Report vorhanden
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF x_exit = space.
Augewählten Variantennamen übernehmen
p_vari = x_variant2-variant.
ENDIF.
ENDIF.
ENDFORM. "varianten_auswahl
Edited by: Ajay kumar on May 11, 2009 8:03 AM
Edited by: Ajay kumar on May 11, 2009 8:04 AM
2009 May 11 7:07 AM
Hi Santosh,
I dont have a High value, i have only low value
@Ajay, can you format your code and post it so that its easy to understand
2009 May 11 7:07 AM
try setting following exportig parameter
DETERMINE_LOOP_INDEX = 'X'
2009 May 11 7:08 AM
2009 May 11 7:09 AM
Hello,
You have to write the event in this way
example
Try this
AT SELECTION-SCREEN ON VALUE-REQUEST FOR y_p_list-low.
2009 May 11 7:10 AM
Hi Chandrashekar,
Get the values of your first Select Option into another temporary internal table ex: t_temp, and then for using these values as F4 help for another Select Option use the below FM:
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ISTAT'
dynprofield = 'S_STAT'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = t_temp.
where S_STAT is the Select option for which you want the F4 help.
ISTAT is the Type of that selectoption and T_TEMP is the values from the previous select option.
Regards,
Amit.
2009 May 11 7:21 AM
Hi,
At selection-screen on help request for p_kunnr-low.
call the function module dypn_value_read.
At selection-screen on help request for p_kunnr-high.
call the function module dypn_value_read.
Regards,
Naveen M.
2009 May 11 7:24 AM
Hi Chandrasekhar,
If your requirement is to check whether a particular value is present in the sel-option (with no-intervals), then you can very well use the 'READ' statement.
READ TABLE s_sel WITH KEY low = '<VALUE TO BE FOUND>'.
IF sy-subrc = 0.
<SUCCESS>.
ENDIF.
The above logic is to check whether a particular value is present in select-option. Note that this logic also checks for the values entered in extension.
Regards,
Rajesh
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |