‎2006 Aug 31 11:05 AM
Dear friends,
FIELD-SYMBOLS: <t_ptp00> LIKE ptp00.
I have the field symbol like above, I need to code the below 5,6 and 7 points.can anyone show me how to code it
5) Check if <t_ptp00>-pernr exist in table t_tblreport_val.
6) if yes then exit.
7) If no then produce message " Field Exit: - Error: you have no authorization to this employee number" (Note that the message is already there)
thanks in advance
‎2006 Aug 31 11:22 AM
Read table t_tblreport_val with key pernr = <t_ptp00>-pernr.
if sy-subrc = 0.
exit.
else.
message E100(AS) with 'Field...'
endif.
‎2006 Aug 31 11:22 AM
Read table t_tblreport_val with key pernr = <t_ptp00>-pernr.
if sy-subrc = 0.
exit.
else.
message E100(AS) with 'Field...'
endif.
‎2006 Aug 31 11:23 AM
hi,
READ TABLE T_TBLREPORT_VAL WITH KEY PERNR = <T_PTP00>-PERNR.
IF SY-SUBRC = 0.
EXIT.
ELSE.
MESSAGE I000(ZZ) WITH ' Field Exit: - Error: you have no'
'authorization to this employee number'.
ENDIF.Regards,
Sailaja.
‎2006 Aug 31 11:43 AM
Hi,
use below logic
sort t_tblreport_val by pernr.
read table t_tblreport_val with key
pernr = <t_ptp00> binary search.
if sy-subrc q 0.
exit.
else.
message e219(assuming this message no)
endif.
Regards
Amole