Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
ccc_ccc
Active Contributor

Issue:

I have ZGL_ACCNT with two compounding object 1 Chart of accounts 2 Logical Source System.

Created variable and using in BEx Report.

As per my requirement I need restrict F4 values for G/L Account variable specific to Chart of accounts.

Ex

P Table

GGL Account     Chart of Accounts          Source System

123                    A                                   ABC

123                    B                                   ABC

As per my requirement I need to show F4 values for chart of accounts 'A'.

So, implemented BADI using RSR_VARIABLE_F4_RESTRICT_BADI enhancement and written SELECT statement pull only where Char of accounts equal to 'A' and filling C_T_RANGE.

In C_T_RANGE I am able see only 123 and A record.(In Debug)

If I execute report and press F4 I am able see 123 A and 123 B also, I am wondering how 123 B is coming since i filled C_T_RANGE table with 123 A.

Finally I am not able to meet customer requirement ,

Here is the solution , you may found number of documents how to create(http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/4009b0a8-7adc-2e10-48b3-a111c8f40...) RSR_VARIABLE_F4_RESTRICT_BADI along with that we need add below piece of code to work as expected like 123 A as per above example, while working with compounding objects.



LOOP AT t_zgl_accnt INTO w_zgl_accnt.

           l_s_range-iobjnm = i_iobjnm. "ZGL_ACCNT

           l_s_range-sign = 'I'.

           l_s_range-option = 'EQ'.

           l_s_range-low = w_zgl_accnt-zgl_accnt.

           APPEND l_s_range TO c_t_range.

           l_s_range-iobjnm = 'ZCHRT_ACC' ." Char of accounts.

           l_s_range-sign = 'I'.

           l_s_range-option = 'EQ'.

           l_s_range-low = w_zgl_accnt-zchrt_acc.

           APPEND l_s_range TO c_t_range.

           l_s_range-iobjnm = 'ZSOSYS' ." Logical source system

           l_s_range-sign = 'I'.

           l_s_range-option = 'EQ'.

           l_s_range-low = w_zgl_accnt-ZSOSYS.

           APPEND l_s_range TO c_t_range.

          ENDLOOP.

Note: Need to add all compounding objects for C_T_RANGE, here chart of accounts and logical source system, adding to C_T_RANGE even though not required for user then only data will restrict and display when you press F4 as expected.

Thank you,

Nanda




Labels in this area