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: 

How to get screen data.

Former Member
0 Kudos

How Can I get the particular screen data given by user

in the program other than field exits

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Prashanth,

If you are talking about standard transactions and you want to add your custom logic to it, you will find the appropriate user exit for the same. The user exit will have some parameters, so you will look into those parameters if you have required data.

Anyways, you can use the function module DYNP_VALUES_READ

to read the screen data. However, it might not be useful in all the cases.

Regards,

Ravi

Note : Please mark the helpful answers

6 REPLIES 6

Former Member
0 Kudos

Prashanth,

If you are talking about standard transactions and you want to add your custom logic to it, you will find the appropriate user exit for the same. The user exit will have some parameters, so you will look into those parameters if you have required data.

Anyways, you can use the function module DYNP_VALUES_READ

to read the screen data. However, it might not be useful in all the cases.

Regards,

Ravi

Note : Please mark the helpful answers

Lakshmant1
Active Contributor
0 Kudos

Hi Prashanth,

Check demo program DEMO_DYNPRO_F4_HELP_MODULE on how to read screen data.

Hope this helps

Thanks

Lakshman

0 Kudos

Hi

This function module i am not getting in se37

please give the steps.

0 Kudos

Prashanth,

I can see the function DYNP_VALUES_READ, in SE37.

Regards,

Ravi

Former Member
0 Kudos

Dear,

please try to use FIELD-SYMBOLS.

example:

  • Declaration

FIELD-SYMBOLS: <fs> TYPE ANY.

ASSIGN '(MYPROGRAM)MYFIELD' TO <fs>.

IF sy-subrc IS INITIAL.

...

ENDIF.

.

.

.

Regards

Former Member
0 Kudos

Hi Prashant,

You can read the value of any screen field you have entered, in the FM named DYNP_VALUES_READ.

Eg:

DATA: PROGNAME LIKE SY-REPID,

DYNNUM LIKE SY-DYNNR,

DYNPRO_VALUES TYPE TABLE OF DYNPREAD,

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = PROGNAME

dynumb = DYNNUM

TRANSLATE_TO_UPPER = 'X'

  • REQUEST = ' '

  • PERFORM_CONVERSION_EXITS = ' '

  • PERFORM_INPUT_CONVERSION = ' '

  • DETERMINE_LOOP_INDEX = ' '

tables

dynpfields = DYNPRO_VALUES

  • 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.

Now, the table DYNPRO_VALUES will contain the value that you have entered.

Regards,

SP.