cancel
Showing results for 
Search instead for 
Did you mean: 

I_T_VAR_RANGE usage and is Text Variable I_STEP 2 ?

Former Member
0 Kudos

Dear Experts

May I know in Exit variables coding, does I_T_VAR_RANGE include Text variables?

Can we refer to more than 1 variable value in the coding for a exit variable?

eg. Deriving Text from 2 value variables .

If variable = 'ZVAR_TEXT'.

if I_STEP = 2.

Loop at I_T_VAR_RANGE into LOC_VAR_RANGE

where variable = 'ZVAR2_VALUE'.

clear L_S_RANGE.

IF LOC_VAR_RANGE-low = 100.

      • 2nd reference to the I_T_VAR_RANGE.

Clear LOC_VAR_RANGE.

Loop at I_T_VAR_RANGE into LOC_VAR_RANGE

where variable = 'ZVAR3_VALUE'.

IF LOC_VAR_RANGE-low < 100.

L_S_RANGE-low = 'A'.

ELSE.

L_S_RANGE-low = 'B'.

ENDIF.

L_S_RANGE-sign = 'I'.

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE to E_T_RANGE.

ENDLOOP.

ENDIF.

ENDIF.

ENDIF.

Thank you in advance for advising.

best regards

Bass

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

No need of two loop statements here. Insode the loop you can check for variable using if condition.

Please see the below code where I added if condition.

If variable = 'ZVAR_TEXT'.

if I_STEP = 2.

Loop at I_T_VAR_RANGE into LOC_VAR_RANGE.

If LOC_VAR_RANGE-Variable = 'ZVAR2_VALUE'

IF LOC_VAR_RANGE-low = 100.

*add your update based on above if condition example like below

L_S_RANGE-low = 'Z'.

ELSE.

L_S_RANGE-low = 'Y'.

ENDIF.

      • 2nd reference to the I_T_VAR_RANGE.

Clear LOC_VAR_RANGE.

If LOC_VAR_RANGE-Variable = 'ZVAR3_VALUE'

IF LOC_VAR_RANGE-low < 100.

L_S_RANGE-low = 'A'.

ELSE.

L_S_RANGE-low = 'B'.

ENDIF.

Endif.

L_S_RANGE-sign = 'I'.

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE to E_T_RANGE.

ENDLOOP.

ENDIF.

ENDIF.