I do have a requirement that if a user picks up a customer which do not have any account group assigned, the layout cannot be plannable. Account grp is an attribute of customer.I kept this function under function attribute before layout display. It is not giving any message if the selected combination of the variables in the planning data do not have any data. The user should get a message even before the data is entered.
My basic understanding is that the below function is reading thru transaction data and is not reading the variable values before opening the planning layout under planning folder.
Any suggestions.. Your help is greatly appreciated.
Code is below------
DATA CUSTOMER TYPE 0CUSTOMER.
DATA ACCOUNTGRP TYPE ZKATR3.
IF ACCOUNTGRP = #.
MESSAGE E003(/SEM/001) WITH '*** CUSTOMER NOT PLANNABLE:*'.