Application Development and Automation 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: 
Read only

Function Module Required

Former Member
0 Likes
982

Dear Experts,

Can any one suggest is there any FM or BAPI to find the

screen values in a custom screen.

Eg:

in a screen Plant and voltages are there

if i give the screen num and program name it need to give the plant and plant details,voltage and voltage details

Thanks

Surendra P

1 ACCEPTED SOLUTION
Read only

former_member150733
Contributor
0 Likes
928

FM: DYNP_VALUES_READ

7 REPLIES 7
Read only

former_member150733
Contributor
0 Likes
929

FM: DYNP_VALUES_READ

Read only

former_member217544
Active Contributor
0 Likes
928

Hi Surendra,

Is this what you are looking for: Function module: DYNP_VALUES_READ

Regards,

Swarna Munukoti

Read only

0 Likes
928

Dear Anish/Swarna

ya but while i give program name and screen num it is not giving any values and i give traslate = 'X'

is there any other values to pass in this function module

Thanks

Surendra

Read only

0 Likes
928

Hi Surendra,

Can you paste your code?

Regards,

Swarna Munukoti

Read only

0 Likes
928

Hi Swarna

just iam testing the function module which u gave

it is not returning any value

in that function module i pass program name and screen num ,translate

if testing is over than ill write

Read only

Former Member
0 Likes
928

Hello Suri,

Please check the code below...

DATA: DYNNUM TYPE SY-DYNNR, "Screen Number

DYNPRO_VALUES TYPE TABLE OF DYNPREAD, " Table that will have the value read

FIELD_VALUE LIKE LINE OF DYNPRO_VALUES, " U pass the name of the screen field to the FM in this

DYNNUM = SY-DYNNR. " Passing ur screen number

FIELD_VALUE-FIELDNAME = '<Name of the screen field to be read>'. " Passing the field whose scr value u need

APPEND FIELD_VALUE TO DYNPRO_VALUES.

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

DYNAME = PROGNAME

DYNUMB = DYNNUM

TRANSLATE_TO_UPPER = 'X'

DETERMINE_LOOP_INDEX = 'X'

TABLES

DYNPFIELDS = DYNPRO_VALUES.

READ TABLE DYNPRO_VALUES INDEX 1 INTO FIELD_VALUE.

Now, FIELD_VALUE-FIELDVALUE will contain the screen value of the field u passed in FIELD_VALUE-FIELDNAME.

Hope this helps....

Regards,

Jaison

Read only

Former Member
0 Likes
928

Solved by MySelf,

first need to get the fields from the screen.

using DYNPRO_FIELD_GET

and there after use the below function module to get the values of the fields

DYNP_VALUES_READ