‎2010 Nov 16 8:55 AM
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
‎2010 Nov 16 9:07 AM
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.
‎2010 Nov 16 9:07 AM
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.
‎2010 Nov 16 10:19 AM
You can control SY-UCOMM to check only when you SAVE.
Regards
‎2010 Nov 17 9:19 AM
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
‎2010 Nov 17 10:06 AM
Hi,
Give the type of the button as Type 'E' for back button,it will solve the problem.
Regards,
Raghu.