cancel
Showing results for 
Search instead for 
Did you mean: 

Fill BEx Variable with more than one value via Custom Exit

Former Member
0 Kudos
1,059

Dear SDN comunity,

I want to fill a BEx Variable via a custom exit. My problem is, I don't know how to fill this variable with more than one value.

I try to give you some background info based on an exaple:

<u><b>Variable-Details</b></u>

<b>Type of Variable:</b> Characteristic Value

<b>Variable Name:</b> ZCCD

<b>Description:</b> Company Code Selection

<b>Processing by:</b> Custom Exit

<b>Characteristic:</b> Company Code

<b>Variable Represents:</b> Multiple Single Values

...

<u><b>This is the used ABAP code:</b></u>

...
WHEN 'ZCCD'.
CLEAR l_s_range.
l_s_range-low = '2002;2004'.
l_s_range-sign = 'I'.
l_s_range-sign = 'EQ'.
APPEND l_s_range TO e_t_range.
...

<u><b>The system returns this message:</b></u>

Value "2002;2004" is too long for variable ZCCD

appreciate your help!

//michael

Accepted Solutions (1)

Accepted Solutions (1)

michael_koch9
Active Participant
0 Kudos

Hello,

try it with this code:

CLEAR l_s_range.

l_s_range-low = '2002'.

l_s_range-sign = 'I'.

l_s_range-sign = 'EQ'.

APPEND l_s_range TO e_t_range.

CLEAR l_s_range.

l_s_range-low = '2004'.

l_s_range-sign = 'I'.

l_s_range-sign = 'EQ'.

APPEND l_s_range TO e_t_range.

regards marcus

Former Member
0 Kudos

Eugene, Marcus

it works now, thx a lot!

Please find attached the final code:

CLEAR l_s_range.

l_s_range-low = '2002'.

l_s_range-sign = 'I'.

l_s_range-<b>opt</b> = 'EQ'.

APPEND l_s_range TO e_t_range.

CLEAR l_s_range.

l_s_range-low = '2004'.

l_s_range-sign = 'I'.

l_s_range-<b>opt</b> = 'EQ'.

APPEND l_s_range TO e_t_range.

(Delta to Marcus's code is bold)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Michael,

Just repeat assigning the individual values and APPENDing them to the structure.

Best regards,

Eugene