I have a requirement where i have to put a check on infotype 0102 - greivence NA through user exit EXIT_SAPFP50M_002 .
The check is that if the user enters a personnel number , grievence number and a stage for which the record alreday exist in the table for the same personnel number , then system should pp up an error message.
I wrote the below code in EXIT_SAPFP50M_002 :-
data : i0102 like p0102 occurs 3 with header line,
begin of fs2,
pernr like p0102-pernr, grnum like p0102-grnum, grstg like p0102-grstg,
end of fs2.
MOVE INNNN TO I0102.
LOOP AT SCREEN.
SELECT PERNR GRNUM GRSTG FROM PA0102 INTO corresponding fields of fs2 WHERE PERNR = I0102-PERNR.
IF fs2-GRNUM = I0102-GRNUM ANd fs2-GRSTG = I0102-GRSTG.
MESSAGE 'A record already exist for selected combination of Grievence Number and Stage' type 'e'.
Here system is throwing an error as " i0102 and innnn are not mutually convertible".
Please advice me where i am wrong. Its urgent!
Thanks & Reagrds,