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: 

User Exit, Field Exit

Former Member
0 Kudos

Hi Folks.

I have a question about user exit, or field exit. The question is that if is possible to fill a field with a value, depending on a value entered by the user within the same transaction.

Thanks for your help.

Regards,

Gilberto Li

3 REPLIES 3

Former Member
0 Kudos

Hi

Have to go for User exit for the respective Transaction

Field exit just when you enter the Input in it you can validate that value

It has just INPUT and OUTPUT parameters

you can't control the value depending on other field values

Use User exit

Regards

Anji

0 Kudos

Hi Anji thank you for your reply.

Could you explain me how to fill the value to the screen. Does this have to be done by setting the value to the ID of the field in the user exit?

Regards,

Gilberto Li

0 Kudos

The field Exit have only INPUT and OUTPUT, but u can validate using another values.

U can:

<b>1- Use the values in that Screen ( Using function GET_DYNP_VALUE)</b>

example:

DATA: l_vkorg TYPE STRING.

CALL FUNCTION 'GET_DYNP_VALUE'

EXPORTING

I_FIELD = 'RMMG1-VKORG'

I_REPID = 'SAPLMGD1'

I_DYNNR = '1004'

CHANGING

O_VALUE = l_vkorg.

<b>2- Use Parametes ID:</b>

example:

DATAL l_matnr TYPE MARA-Matnr.

GET PARAMETER ID 'MAT' FIELD l_matnr

<b>3- Get Data from tables using SELECT with any of the values that u can get in options 1 or 2.</b>

Example:

DATA:

l_matnr TYPE MARA-matnr,

l_mtart TYPE MARA-mtart.

IF INPUT is INITIAL.

GET PARAMETER ID 'MAT' FIELD l_matnr.

SELECT SINGLE MTART

INTO l_mtart

FROM MARA

WHERE MATNR = l_matnr.

Now I have the value l_mtart to validate.

IF l_mtart = 'Z001'

...

ENDIF.

Greetings