Skip to Content
0
Former Member
Mar 20, 2009 at 02:47 PM

read master data variable values in fox before executing the layout

151 Views

Hello,

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.

Thanks,

-


Code is below------

DATA CUSTOMER TYPE 0CUSTOMER.

DATA ACCOUNTGRP TYPE ZKATR3.

CUSTOMER =VARV(CUSTOMER).

ACCOUNTGRP =ATRV(ZKATR3,CUSTOMER).

DO.

IF ACCOUNTGRP = #.

MESSAGE E003(/SEM/001) WITH '*** CUSTOMER NOT PLANNABLE:*'.

EXIT.

ENDIF.

ENDDO.