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

Field Exit : How to pass screen field values to function module

Former Member
0 Likes
875

Hi all,

I need to validate the data entred in the field. For this i created a field exit.

1)Executed the program RSMODPRF.

2) Function module has been created.

How to pass the screen field values to the function module?

Thanks

Partha

Hi all,

I need to validate the data entred in the field. For this i created a field exit.

1)Executed the program RSMODPRF.

2) Function module has been created.

How to pass the screen field values to the function module?

Thanks

Partha

3 REPLIES 3
Read only

Former Member
0 Likes
658

Hi,

You can only pass the field value for which you create a field exit...other values on the screen are not captured...

The value on the screen for which the screen exit is put will be available in the import paramter: INPUT of the field exit function module...

Reward if useful

Regards

Shiva

Read only

Former Member
0 Likes
658

Hi,

Have a look@:

DATA: BEGIN OF dynpfields OCCURS 3.

INCLUDE STRUCTURE dynpread.

DATA: END OF dynpfields.

*

DATA: w_flag(1).

  • Auto Fin confirmation

MOVE 'CORUF-AUTER' TO dynpfields-fieldname.

APPEND dynpfields.

  • Final confirmation

MOVE 'CORUF-ENDRU' TO dynpfields-fieldname.

APPEND dynpfields.

*

CALL FUNCTION 'DYNP_VALUES_READ'

EXPORTING

dyname = 'SAPLCORU'

dynumb = '5910'

  • TRANSLATE_TO_UPPER = ' '

  • REQUEST = ' '

  • PERFORM_CONVERSION_EXITS = ' '

  • PERFORM_INPUT_CONVERSION = ' '

  • DETERMINE_LOOP_INDEX = ' '

TABLES

dynpfields = dynpfields

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.

*

  • Please note that control comes here even from First screen of CORK

  • however at that point in time sy-subrc will not be returned as 0

*

CHECK sy-subrc = 0.

*

  • Now we know for sure that control is coming here from screen 5910

  • where Active Final confirmation radio-button is appearing.

*

  • Now check if radio button Active final confirmation is on

*

Check sy-ucomm = 'BU'."Should be executed only after Save button pressed

*

READ TABLE dynpfields WITH KEY fieldname = 'CORUF-AUTER'.

Case sy-subrc.

When 0.

w_auter =

DYNPREAD-FIELDVALUE.

Regards

Raju Chitale

Read only

Former Member
0 Likes
658

Hi,

Have you created the field exit as global or local. If the field exit has been created as global then it will reflect in all screens. If you want to validate the value only for a specific screen then assign the program and screen number to the field exit. The field exit will already have the screen field value (INPUT). Once you are done with the creation first activate the field exit. Validate and give the requried message inside the field exit. But you can see the message only when an action is performed - switching of a tab or saving. And if the validation is succesful do not forget to pass the INPUT value to the OUTPUT value.

Thanks.