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: 

issue with function module exits

Former Member
0 Kudos

Hi,

execute the T.Code MK01, enter the language 'English' and country 'de'. it's allowing to save the data. I want to raise one pop-up message as 'country and language are not the valid combination please choose right one'. I enhanced in the function module exit. it's raising the message , but it's executing the next screen. how to stop it's first screen and I have to choose the right combination even though I raised message as Error, it's repeating same thing. Please give me any suggestion on this issue.

Thanks & Regards,

Seshu.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

I have executed CMOD T.Code, we can find the 'include zxf05u01' program . I wrote the code in this include program. select statement is like this. check the code here.

" select single land1

spras

into wa_t005

from t005

where land1 = i_lfa1-land1

and spras = I_lfa1-spras.

if sy-subrc <>0.

  • country &1 and language &2 are not the valid combination.

message e015(zall) with I_lfa1-land1 I_lfa1-spras.

endif."

4 REPLIES 4

Former Member
0 Kudos

Hi,

Could you please post the code you enhanced?

Your enhanced code should get called in the PAI of the initial screen.

Debug the code and see.

I hope the place where you have written your logic is not the right one.

Check it out.

Cheers,

Raja.D

nabheetscn
Active Contributor
0 Kudos

Can you please explain in detail where did you put this validation?

Nabheet

Former Member
0 Kudos

I have executed CMOD T.Code, we can find the 'include zxf05u01' program . I wrote the code in this include program. select statement is like this. check the code here.

" select single land1

spras

into wa_t005

from t005

where land1 = i_lfa1-land1

and spras = I_lfa1-spras.

if sy-subrc <>0.

  • country &1 and language &2 are not the valid combination.

message e015(zall) with I_lfa1-land1 I_lfa1-spras.

endif."

0 Kudos

try,..

if.

message.

return.

endif.

then also if not happening, try with set cursor field.

if.

set cursor field.

message.

endif.