cancel
Showing results for 
Search instead for 
Did you mean: 

Message No. BRAIN 649 Error for variable in customer enhancement Zxx - Perform not working in BADI

0 Kudos
278

Hello Experts,

I am using BADI for Customer Exit variables - Enhancement spot - RSROA_VARIABLES_EXIT.

I am facing Error --> Error for variable in customer enhancement ZIC_FPER_ACT

I have implemented BADI method

I have created defined Perform statement in BADI Method [IF_RSROA_VARIABLES_EXIT_BADI~PROCESS]

and implemented the Perform [FORM ] in external program. Following are details and logic

Enhancement Implementation

Implementing class : ZBIRSROA_VARIABLES_EXIT_BADI

Method

METHOD if_rsroa_variables_exit_badi~process.

DATA : l_s_var_range TYPE rrrangeexit,

l_s_range TYPE rrrangesid,

lv_period TYPE numc3, "numc,

lv_year TYPE /bi0/oifiscyear,

lv_prv_year TYPE /bi0/oifiscyear.

CLEAR : l_s_var_range, lv_period, lv_year, lv_prv_year.

DATA : lv_cyear TYPE t009b-bdatj,

lv_cperiod TYPE t009b-poper,

lv_bperiod TYPE t009b-poper,

lv_fyp TYPE rstxtsh. " /bi0/oifiscper.

CLEAR : lv_cyear,

lv_cperiod,

lv_bperiod,

lv_fyp.

DATA: pname TYPE trdir-name VALUE 'ZBIVAR_',

rname(80) TYPE c VALUE 'FORM_',

msg(80) TYPE c,

incount TYPE i,

outcount TYPE i.

CASE : i_vnam.

WHEN 'ZIC_FPER_ACT'.

CONCATENATE pname i_vnam INTO pname.

SELECT SINGLE name INTO pname

FROM trdir

WHERE name = pname.

IF sy-subrc = 0.

CONCATENATE rname i_vnam INTO rname.

PERFORM (rname) IN PROGRAM (pname)

TABLES c_t_range " E_T_RANGE

USING i_vartyp

i_iobjnm

i_s_rkb1d

i_periv

i_step

i_s_cob_pro

i_t_var_range.

ENDIF.

ENDCASE.

ENDMETHOD.

Program [perform is implemented in this program]

REPORT zbivar_zic_fper_act.


TYPE-POOLS: rsr, rrs0, rro01.

*perform FORM_ZIC_FPER_ACT.
*&---------------------------------------------------------------------*
*& Form FORM_ZIC_FPER_ACT
*&---------------------------------------------------------------------*
FORM form_zic_fper_act TABLES c_t_range TYPE rsr_t_rangesid
USING i_vartyp TYPE rszglobv-vartyp
i_iobjnm TYPE rszglobv-iobjnm
i_s_rkb1d TYPE rsr_s_rkb1d
i_periv TYPE rro01_s_rkb1f-periv
i_step TYPE i
i_s_cob_pro TYPE rsd_s_cob_pro
i_t_var_range TYPE rrs0_t_var_range.


DATA : l_s_var_range TYPE rrrangeexit,
l_s_range TYPE rrrangesid,
lv_period TYPE numc3, "numc,
lv_year TYPE /bi0/oifiscyear,
lv_prv_year TYPE /bi0/oifiscyear.

CLEAR : l_s_var_range, lv_period, lv_year, lv_prv_year.

DATA : lv_cyear TYPE t009b-bdatj,
lv_cperiod TYPE t009b-poper,
lv_bperiod TYPE t009b-poper,
lv_fyp TYPE rstxtsh. " /bi0/oifiscper. " Fiscal period [replaced due to type mismatch]

CLEAR : lv_cyear,
lv_cperiod,
lv_bperiod,
lv_fyp.

IF i_step = 2.
* READ TABLE i_t_var_range INTO l_s_var_range WITH KEY vnam = '0P_FPER'.
LOOP AT i_t_var_range INTO l_s_var_range
WHERE vnam = '0P_FPER'.

IF sy-subrc = 0.
l_s_range-sign = 'I'.
l_s_range-opt = 'EQ'.

lv_year = l_s_var_range-low+0(4).

lv_period = '001'.
lv_year = lv_year.

CONCATENATE lv_year lv_period INTO l_s_range-low.
APPEND l_s_range TO c_t_range.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM.

Please suggest.

Thanks,

Vijay

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Resolved myself..