cancel
Showing results for 
Search instead for 
Did you mean: 

DYNP_VALUES_READ

Former Member
0 Kudos

what is the use of this one DYNP_VALUES_READ

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.