‎2007 Apr 27 8:49 PM
Hi,
i have a selection screen in which i have two parameters. once the user enters the value in first field f1, he goes for F4 functionality on the second field f2, where i perform some validations and display the values with in 'at selection screen on value req..'.
however, i cannot see the value entered unless i hit 'Enter' after entering the value in the first field, f1.
what should i do in order to get the value entered in the first field with in my program. kindly let me know
Regards,
kumar
‎2007 Apr 27 9:27 PM
hello kumar,
How you can say, u dont get value of p1 using dynp_values_read ?
here is what i tested for u. It is working perfect for me.
parameters : p1 like vbak-spart,
p2 like vbak-bsark.
at selection-screen on value-request for p2.
data : t_dyn like DYNPREAD occurs 0 with header line.
t_dyn-fieldname = 'P1'.
append t_dyn.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = sy-repid
DYNUMB = sy-dynnr
TRANSLATE_TO_UPPER = ' '
REQUEST = ' '
PERFORM_CONVERSION_EXITS = ' '
PERFORM_INPUT_CONVERSION = ' '
DETERMINE_LOOP_INDEX = ' '
TABLES
DYNPFIELDS = t_dyn
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2007 Apr 27 8:51 PM
Make a call screen before calling second seelct option, as any change require a trigger of an event to get complete.
REgards,
Amit
Reward all helpful replies.
‎2007 Apr 27 8:53 PM
‎2007 Apr 27 8:57 PM
Before calling the on selection screen event for seond option make a use call screen, this will trigger an event and your value will be saved.
Regards,
Amit
‎2007 Apr 27 8:54 PM
Hi,
You can use the FM DYNP_VALUES_READ to read the values..
Thanks,
Naren
‎2007 Apr 27 9:07 PM
Hi,
here is the code
parameters : f1 like...
f2 like...
AT SELECTION SCREEN ON VALUE REQUEST FOR f2.
i can't see f1 value here. even if i use dynp_values_read
please suggest any inputs. amit can you suggest some sample code.
Regards,
kumar.
‎2007 Apr 27 9:36 PM
Check this code -
REPORT zaktest.
tables: pa0000.
*data: t_530 type standard table of t530 with header line.
parameters : f1 type pa0000-massn,
f2 type pa0000-massg.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR f2.
data : t_dyn like DYNPREAD occurs 0 with header line.
t_dyn-fieldname = 'F1'.
append t_dyn.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = sy-repid
DYNUMB = sy-dynnr
TABLES
DYNPFIELDS = t_dyn.
You will get the value in t_dyn-fieldvalue.
‎2007 Apr 27 9:27 PM
hello kumar,
How you can say, u dont get value of p1 using dynp_values_read ?
here is what i tested for u. It is working perfect for me.
parameters : p1 like vbak-spart,
p2 like vbak-bsark.
at selection-screen on value-request for p2.
data : t_dyn like DYNPREAD occurs 0 with header line.
t_dyn-fieldname = 'P1'.
append t_dyn.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = sy-repid
DYNUMB = sy-dynnr
TRANSLATE_TO_UPPER = ' '
REQUEST = ' '
PERFORM_CONVERSION_EXITS = ' '
PERFORM_INPUT_CONVERSION = ' '
DETERMINE_LOOP_INDEX = ' '
TABLES
DYNPFIELDS = t_dyn
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.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
‎2007 Apr 27 9:35 PM
Hi,
Check this code..
PARAMETERS: p_werks TYPE werks_d,
p_lgort TYPE t001l-lgort.
AT SELECTION-SCREEN ON p_lgort.
DATA: itab LIKE dynpread OCCURS 0 WITH HEADER LINE.
DATA: v_prog LIKE d020s-prog.
v_prog = sy-repid.
itab-fieldname = 'P_WERKS'.APPEND itab.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = v_prog
dynumb = '1000'
TABLES
dynpfields = itab.
READ TABLE itab INDEX 1.
TABLES: t001l.
SELECT SINGLE * FROM t001l
WHERE werks = itab-fieldvalue
AND lgort = p_lgort.
IF sy-subrc <> 0.
MESSAGE e208(00) WITH 'Invalid storage location'.
ENDIF.
THanks,
Naren
‎2007 Apr 27 10:18 PM