Need help with Customer Exit
I am trying to create a Customer Exit in Bex on employee number (zempno) and the technical name of my Customer Exit is Zempnum.
What i am trying do is, who ever logs in and executes the query, he should get his relavant data, meaning if the employee login he should get his own data, or if the supervisor logs in he should get all the employess under him.
When i am trying to execute the query i am getting the below error.
Error: Error for variable in customer enhancement ZEMPNUM
This internal error is a deliberate termination, since a program status has arisen, that is not allowed to occur.
The error has arisen for variable ZEMPNUM in the customer enhancement .
Please check your customer enhancement.
Procedure for System Administration
Notification Number BRAIN 649
Below is my code
*& Include ZXRSRU01
data : itab like /BIC/AZHRPE00100 occurs 0 with header line .
data : zuid like /BIC/AZHRPE00100-/bic/zempno.
data region type /BIC/OIZCDOTREG1.
DATA: L_S_RANGE TYPE RSR_S_RANGESID.
DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.
IF I_STEP = 2. "before the popup
DATA username(20) type c.
username = sy-uname.
select single /bic/zempno from /BIC/AZHRPE00100 INTO zuid where /bic/zuserid = username.
if sy-subrc = 0 .
select * from /bic/azhrpe00100 into table itab where /bic/zempno = zuid.
L_S_RANGE-LOW = ZUID."low value, e.g.200001
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'eq'.
APPEND L_S_RANGE TO E_T_RANGE.