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 Exits

Former Member
0 Likes
654

Hi

I have a requirement to put validation to the fields of transaction F-28. My requirement is :

I have to put validation like this.

I have 2 fields Reason code field and Xref2 field.

I have to check reason code field, if it is not empty then xref2 field should not be blank. I dont have parameter id's also for these fields.

So how to do validation using field exit.

Thanks & Regards

Haritha.

1 ACCEPTED SOLUTION
Read only

naimesh_patel
Active Contributor
0 Likes
627

Try to create field exits for both.

Field exit for the reason code would be like this:

if input is not initial.
  l_reason = input.
  export L_reason to memory id 'ZF28'.
endif.
output = input.

In the field exit of the XREF2, check the value of the L_REASON from the memory.

IMPORT L_REASON TO MEMORY ID 'ZF28'.
IF NOT L_REASON IS INITIAL.
* ... CHECK THE VALUE OF THE XREF2
ENDIF.
FREE MEMORY ID 'ZF28'.

Both L_REASON should have a same data definition.

I haven't tried this one.. but you can try it.

Regards,

Naimesh Patel

Hi

I have a requirement to put validation to the fields of transaction F-28. My requirement is :

I have to put validation like this.

I have 2 fields Reason code field and Xref2 field.

I have to check reason code field, if it is not empty then xref2 field should not be blank. I dont have parameter id's also for these fields.

So how to do validation using field exit.

Thanks & Regards

Haritha.

3 REPLIES 3
Read only

JozsefSzikszai
Active Contributor
0 Likes
627

hi Haritha,

you can do this with validation (transaction GGB0). Let me know if you need more help!

ec

Read only

naimesh_patel
Active Contributor
0 Likes
628

Try to create field exits for both.

Field exit for the reason code would be like this:

if input is not initial.
  l_reason = input.
  export L_reason to memory id 'ZF28'.
endif.
output = input.

In the field exit of the XREF2, check the value of the L_REASON from the memory.

IMPORT L_REASON TO MEMORY ID 'ZF28'.
IF NOT L_REASON IS INITIAL.
* ... CHECK THE VALUE OF THE XREF2
ENDIF.
FREE MEMORY ID 'ZF28'.

Both L_REASON should have a same data definition.

I haven't tried this one.. but you can try it.

Regards,

Naimesh Patel

Read only

Former Member
0 Likes
627

Hi,

You can use FM DYNP_VALUES_READ to read value of Reason code and Xref2 field values.

You have to pass program name , screen number and field name to the above FM.

Regards,

Naren