Skip to Content
0

BEX F4 Selection restriction for Hierarchy data from 0GL_ACCOUNT

Sep 07, 2017 at 02:58 PM

29

avatar image
Former Member

Hi There,

Need some help to understand how to restrict the BEX F4 selection restriction for Hierarchy data from 0GL_ACCOUNT. Requirement is to restrict the GL Hierarchies to WHERE chrt_accts = 'XYZX' in BADI Enhancement.

We are using the BADI Definition "RSR_VARIABLE_F4_RESTRICT_BADI" and we did the similar enhancement to restrict the Company Code master data in BEX F4 selections and its working fine. Below is the code we used for Company Code and its working fine,

IF i_vnam EQ 'ZCOMPCODE'.
READ TABLE i_t_compid WITH TABLE KEY table_line = 'ZTEMP_REPORT_001' TRANSPORTING NO FIELDS.
IF sy-subrc = 0.

TYPES : BEGIN OF ls_temp,
CCODE type /BI0/OICOMP_CODE,
END OF ls_temp.

DATA : lt_temp TYPE STANDARD TABLE OF ls_temp,
wa_temp TYPE ls_temp.


SELECT comp_code FROM /bi0/pcomp_code INTO TABLE lt_temp WHERE
CHRT_ACCTS = 'XYZX'.

LOOP AT lt_temp INTO wa_temp.
l_s_range-iobjnm = i_iobjnm.
l_s_range-sign = 'I'.
l_s_range-option = 'EQ'.
l_s_range-low = wa_temp-CCODE.
APPEND l_s_range TO c_t_range.
CLEAR l_s_range.
ENDLOOP.

ENDIF.
ENDIF.

In BADI Definition "RSR_VARIABLE_F4_RESTRICT_BADI", we have FLAT, NODE and HIER and for company code we used the above code in FLAT and its working fine.

Please advise how to restrict GL Account Hierarchies with code and in which method we need to include the code. Thanks in advance for your help.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers