cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed in customer exit code to exclude a value

Former Member
0 Kudos

Hi Gurus,

I need to use a Customer Exit Variable to read the values for a characteristic. Based on one indicator I have to include or exclude a value. I am trying to use the code as below. But, it is saying "AError for variable in customer enhancement ...".

Code

the variable is a multiple single values customer exit variable

zl_s_range-low = z_placc.

CLEAR zl_s_range-high.

if z_pl_ind = '1'.

zl_s_range-sign = 'I'.

elseif z_pl_ind = '2'.

zl_s_range-sign = 'E'.

endif.

zl_s_range-opt = 'EQ'.

APPEND zl_s_range TO e_t_range.

Please help me to solve the issue,

Thanks in advance,

Regards,

aarthi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Aarthi,

The code you have given seems to be fine.

There can be some error in the code other than what you have displayed here.

What is z_placc.? is it a variable? if so what type of variable it is?

If its multiple single values and not just a single value then you need to use

LOOP and END LOOP to cover all the multiple single values.

Either copy the entire code in Customer exit here to help us understand.

or

Debug the code by setting a break point in the customer exit. and executing the query using transaction RSRT.

Assign points if helpful,

Regads, Uday

Former Member
0 Kudos

Hi Uday,

Thanks for your response.

Below is the complete code.

WHEN 'ZV_CSS11'.

IF I_STEP = 1. "Before Pop-up

select * into table i_tp_tab_pl from /BIC/QZ_TP_PLAC

where /BIC/Z_TP_PLAC = '11' and

DATEFROM <= sy-datum and DATETO >= sy-datum.

if sy-subrc = 0.

LOOP AT i_tp_tab_pl.

clear zl_s_range.

z_placc = i_tp_tab_pl-/BIC/Z_PLACC.

z_pl_ind = i_tp_tab_pl-/BIC/Z_PGLA_IND.

zl_s_range-low = z_placc.

if z_pl_ind = '1'.

zl_s_range-sign = 'I'.

else.

zl_s_range-sign = 'E'.

endif.

zl_s_range-opt = 'EQ'.

APPEND zl_s_range TO e_t_range.

clear z_placc.

clear z_pl_ind.

ENDLOOP.

endif.

endif.

Thanks in advance,

Regards,

aarthi

Former Member
0 Kudos

Aarthi, I am sorry. I don't see any error in this code.

You may have to debug the routine yourself by setting a break point in the routine and

executing the query using transaction RSRT.

Regards, Uday

Former Member
0 Kudos

Hi Uday,

Is there anything related to the defintion of the Customer Exit Variable. Like for Exclude operation is there any restriction like we have to use only single value variable or range variable or something like that.

Thanks,

Regards,

Aarthi