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

while saving data in xd02

former_member190312
Active Participant
0 Likes
801

hi all,

one subscreen is created for Customer master (XD02) & there is one field in the sub screen.

To validate this field( it should not be blank), i put error message in SAPMF02D exit.

if i do not put any data on this field & then press 'SAVE' button, it gives me that error i put in exit.

Then the field becomes disable & then repeatedly it gives me the same error if i press 'BACK' button.

i just need the error while SAVE but not when BACK button.and the field should be active so that user can put data.

Please suggest where i did mistake. Thanks.

Regd

mohan

Edited by: pabitra rout on Nov 16, 2010 9:58 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
638

Hi pabitra rout,

To get that required functionality, write your code in PAI of the screen using CHAIN & ENDCHAIN . For example :


CHAIN : ZFIELD MODULE CHECK_MAND "Here ZFIELD is the field of the customer screen.
ENDCHAIN. 

Thanks & Regards

Faheem.

4 REPLIES 4
Read only

Former Member
0 Likes
639

Hi pabitra rout,

To get that required functionality, write your code in PAI of the screen using CHAIN & ENDCHAIN . For example :


CHAIN : ZFIELD MODULE CHECK_MAND "Here ZFIELD is the field of the customer screen.
ENDCHAIN. 

Thanks & Regards

Faheem.

Read only

Former Member
0 Likes
638

You can control SY-UCOMM to check only when you SAVE.

Regards

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
638

If you want to give message on Save then

check SY-UCOMM EQ 'SAVE'.

Display error message.

Plusit is a good practice to have the filedsin CHAIN-ENDCHAIN so that whenver you throw an error it remains in Input enabled mode.

Thanks

Nabheet

Read only

Former Member
0 Likes
638

Hi,

Give the type of the button as Type 'E' for back button,it will solve the problem.

Regards,

Raghu.