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: 

function module to GET VALUES FROM SCREEN FIELDS

Former Member
0 Kudos
7,466

Hi Experts,

I have four text fields in my screen. I want the values from them. I have to do it by looping at screen.

loop at screen.

/// I have screen-fieldname. Is there any function module to get the values of this field ? ///////

endloop.

Plz help........

Rewards Gauranteed..................

1 ACCEPTED SOLUTION

Former Member
508

Hi,

Use DYNP_VALUES_READ.

Thank you.

Reward points if found useful.

5 REPLIES 5

Former Member
509

Hi,

Use DYNP_VALUES_READ.

Thank you.

Reward points if found useful.

Former Member
0 Kudos
508

Hi,

1. DYNPRO_FIELD_GET

In this FM,

an internal table is returned,

FIELDS_TO_CONTAINERS

2. There are many fields in this internal table.

3. the ones which u want are :

LINE

COLUMN

LENGTH

VISLENGTH

HEIGHT

4. There are other useful fields also.

Regards,

Shiva Kumar

Former Member
0 Kudos
508

Hi Basu,

Try the below function modules

DYNP_VALUES_READ Read screen field values before PAI field transport

DYNP_VALUES_UPDATE Change screen field contents w/o PBO

DYNPRO_FIELD_GET Determine fields on screen

DYNP_UPDATE_FIELDS

pls reward if it is useful.

Regrards,

Boobalan Suburaj

Former Member
0 Kudos
508

Hi,

Use the function module DYNPRO_FIELD_GET to get the screen fields.

FU DYNPRO_FIELD_GET

____________________________________________________

Short Text

Determine fields on screen

The function module edits a screen in SAPscript format and puts it in the table LINES and passes the fields to the table FIELDS.

If the parameter FLG_CHECK is set to '1', a check is made whether the screen exists before fetching the screen information.

The flag FLG_CONTROL controls the information formatting.

If FLG_CONTROL = '0' only the field information is provided.

If FLG_CONTROL = '1' the field information and the screen texts are provided in SAPscript format.

The formatting SAPscript runs only in a 'Light version'. TableControls, icons and graphical elements are not implemented. The modules RS_SCRP_PRINT or RS_SCRP_PRINT_IN_LIST should be used for printing the screen.

Parameters

DYNPRO

FLG_CHECK

FLG_CONTROL

LANGU

PROGRAM

DYNP_FIELDS

LINES

Exceptions

DYNPRO_NOT_FOUND

Function Group

SDOP

Regards,

Raj.

former_member212653
Active Contributor
0 Kudos
508


  dynfields-fieldname = 'P_PROJ'.
  append dynfields.
  call function 'DYNP_VALUES_READ'
    exporting
      dyname     = 'Z_SYNTAX_CHECKER_EXIT'
      dynumb     = sy-dynnr
    tables
      dynpfields = dynfields
    exceptions
      others     = 0.

hope this helps you...