on 09-07-2007 1:39 PM
what is the use of this one DYNP_VALUES_READ
REPORT zsel_f4help .
*---Report with selection screen and to display the list of
possible entries for field 'B' as per the value in field 'A'.
PARAMETERS: p_vbeln TYPE vbak-vbeln,
p_posnr TYPE vbap-posnr.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_posnr.
DATA: BEGIN OF help_item OCCURS 0,
posnr TYPE vbap-posnr,
matnr TYPE vbap-matnr,
arktx TYPE vbap-arktx,
END OF help_item.
DATA: dynfields TYPE TABLE OF dynpread WITH HEADER LINE.
dynfields-fieldname = 'P_VBELN'.
APPEND dynfields.
**Read the Values of the SCREEN FIELDs
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
translate_to_upper = 'X'
TABLES
dynpfields = dynfields
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.
**Find out the Value of P_VBELN
READ TABLE dynfields WITH KEY fieldname = 'P_VBELN'.
p_vbeln = dynfields-fieldvalue.
**Convert the Value into internal format
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_vbeln
IMPORTING
output = p_vbeln.
**Fetch the correponding itemnos from VBAP
SELECT posnr matnr arktx INTO TABLE help_item
FROM vbap
WHERE vbeln = p_vbeln.
**Generate the F4 help with internal table values
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'POSNR'
dynprofield = 'P_POSNR'
dynpprog = sy-cprog
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = help_item.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When you want to read the Screen or a Selection scren values where the values are not avialble then we can use this function module .
If you want morre information, then Goto SE37 and give the function module and press Goto --> Documentation --> Function moduel Documentation
regards
Sudheer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can read the value of screen elements using this FM.
Say from a customer exit - u r trying to read a particular screen element value.
clear t_dynpread[].
clear t_dynpread.
t_dynpread-fieldname = 'SAVE_X'.
append t_dynpread.
clear t_dynpread.
t_dynpread-fieldname = 'SAVE_A'.
append t_dynpread.
clear t_dynpread.
t_dynpread-fieldname = 'SAVE_N'.
append t_dynpread.
clear t_dynpread.
t_dynpread-fieldname = 'SAVE_U'.
append t_dynpread.
call function 'DYNP_VALUES_READ'
exporting
dyname = d020s-prog
dynumb = d020s-dnum
translate_to_upper = 'X'
* REQUEST = ' '
tables
dynpfields = t_dynpread.
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.