Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problem while enhancing the customer Exit

Hello experts,

I am having 2 ODS on which i need to restrict the data based on who logs in. Here my problem is On One ODS i am able to get the get the right data, i mean if someone employee number isnt present it is displaying as Null.

But for the other ODS, it is displaying all the records that dosent have employee numbers.

Below is my code can some one let me know what am i missing in this code.

ZEMPNUM1 IS WORKING FINE.

ZEMPNUM (PROBLEM-- Getting all the records that dosent have employee numbers).

DATA: L_S_RANGE TYPE RSR_S_RANGESID,

LOC_VAR_RANGE LIKE RRRANGEEXIT. " This is Global

  • Declaration for Transcript ODS

data : itab1 like /BIC/AZHRPEO0100 occurs 0 with header line.

data : temp_zempno1 like /BIC/AZHRPEO0100-/BIC/ZEMPNO.

*Internal Table is assigned to Temporary Table - Transcript ODS

data : itab_empno1 like standard table of temp_zempno1.

  • Declaration for Transcript ODS

data : itab like /BIC/AZHRPAO0100 occurs 0 with header line.

data : temp_zempno like /BIC/AZHRPAO0100-PERSON.

*Internal Table is assigned to Temporary Table - Transcript ODS

data : itab_empno like standard table of temp_zempno.

break-point.

case I_VNAM.

WHEN 'ZEMPNUM1'.

WHEN 'ZEMPNUM'.

IF I_STEP = 2. "After the popup

break-point.

select single /BIC/ZEMPNO from /BIC/AZHRPEO0100 INTO temp_zempno1

where /BIC/ZUSERID = sy-uname.

select single PERSON from /BIC/AZHRPAO0100 INTO temp_zempno

where USERNAME = sy-uname.

IF temp_zempno1 <> '00000000'.

select /BIC/ZEMPNO from /BIC/AZHRPEO0100 into table itab_empno1 where /BIC/ZSUPRNO = temp_zempno1.

endif.

IF temp_zempno <> '00000000'.

select PERSON from /BIC/AZHRPAO0100 into table itab_empno where /BIC/ZPERSNSP = temp_zempno.

endif.

Append temp_zempno1 to itab_empno1.

Append temp_zempno to itab_empno.

CLEAR L_S_RANGE.

loop at itab_empno1 into temp_zempno1.

loop at itab_empno into temp_zempno.

L_S_Range-LOW = temp_zempno1.

L_S_Range-LOW = temp_zempno.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'EQ'.

APPEND L_S_RANGE TO E_T_RANGE.

ENDLOOP.

ENDLOOP.

ENDIF.

*ENDIF.

endcase.

Former Member
Not what you were looking for? View more on this topic or Ask a question