cancel
Showing results for 
Search instead for 
Did you mean: 

Always Exclude value from variable input, ls_range-sign = 'E' not working

Former Member
0 Kudos
658

Hi, I'm trying to wrote a small abap code to always exclude values from variable input. The variable type I created is customer exit with selection option, Optional and Ready to input ticketed. And the varaible restriction is in the global filters.

The below is the code i worte in CMOD but it is working as Include not as exclude. Could anyone please help. Many Thanks

when 'ZRING_EXE_CE'.

if i_step = 2.

read table i_t_var_range into ls_var with key vnam = 'ZRING_EXE_CE'.

if ls_var-low NE ' '.

loop at i_t_var_range into ls_var where vnam = 'ZRING_EXE_CE'.

ls_range-low = ls_var-low.

ls_range-sign = 'E'.

ls_range-opt = 'EQ'.

append ls_range to e_t_range.

endloop.

endif.

clear ls_var.

endif.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks

Former Member
0 Kudos

The easy way to check a code of CMOD is set a break ponit befiore the append and run the query on RSRT this could help you to see what value the code is setting on variable....try that...

I hope this helps you.

Regards

Former Member
0 Kudos

Ya i checked it already and the code is alway Including 'I' rather than to exclude 'E'. I think the default would be Include always but i have coded it to work for 'E' but still not working. Any suggestions please ? thanks

Former Member
0 Kudos

Why dont you try with CODE = I and SIGN = NE (not equal) i believe that this should work...

Regards

former_member183777
Active Contributor
0 Kudos

Checkout the documentation on enhancement. It states that sign = E only works for type Interval.

SIGN I (inclusive) or E (exclusive)

E only makes sense with intervals, otherwise I is always

used

Are you using the correct i_step case. My understanding:

i_step = 1 - populate defualt value

i_step = 2 - only for variables of type customer exit, not ready for input

i_step = 3 - validate user input

Former Member
0 Kudos

Thanks Oscar, I have tried that aswell but didn't work. Actually the customer exit variable is in Global filters may be becuase of that it is playing, i have chnaged to default values but still the same...

Former Member
0 Kudos

Thanks for your reply Vineeth. Hope this should work...

Ya i too read the 'E' only works for Interval and always takes the defualt as I.

I have tried step 1 and on the variable screen I'm getting ' !# ' which is excluding not assigned, but if I change ls_var-low= '1111' this value is not read into the variable (This is a masterdata value which is available)

when 'ZRING_EXE_CE'.

if i_step = 1.

if ls_var-low NE ''.

ls_range-low = ls_var-low.

ls_range-sign = 'E'.

ls_range-opt = 'EQ'.

append ls_range to e_t_range.

endif.

clear ls_var.

endif.