cancel
Showing results for 
Search instead for 
Did you mean: 

Display Error in setting Text variables Offset values

Former Member
0 Kudos

Hello gurus,

I am working on BI 7.0

I wanted to display the Interval entry of Period that is selected for Query output

for e.g.

if user want to see the report for duration Jan -May 2007

if he/she enters 01/2007-05/2007.

So i created 2 text variables and included in the Description of Keyfigure.

Well if i run the query it shows me as

2007001 to 2007005

so i figured it out that Offset setting needs to be done.

So i selected

offset start = 2 and offset length = 8 the output is 2007001

But what i desire is the output as 012007 or 0012007 atleast...

Please advise.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If offset start = 3 and offset length = 8 the output is 007001

If offset start = 4 and offset length = 8 the output is 07001

If offset start = 2 and offset length = 5 the output is 200700

If offset start = 2 and offset length = 6 the output is 2007001

If offset start = 2 and offset length = 7 the output is 2007001

Please advise as it is urgent

Former Member
0 Kudos

Any suggestions ?

Former Member
0 Kudos

That is how the Offset works ...as u ur using Fiscal Period or Calender Month which are of the Format YYYYMM ..offset settings will not let u show as MMYYYY

Message was edited by:

Jr Roberto

Former Member
0 Kudos

Hi,

create your text variable with processing type of customer exit and NOT ready for input.

In CMOD, code the following being given ZTEXT your text header showing the period and ZINPUT representing the variable input by the user


DATA: loc_var_range LIKE rrrangeexit.
  WHEN 'ZTEXT'.
    IF i_step = 2.
      LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'ZINPUT'.
        CLEAR l_s_range.
        "loc_var_range-low will be like 'yyyymm'
        CONCATENATE 
            loc_var_range-low+4(2) 
            loc_var_range-low(4)
        INTO  l_s_range-low.      

        l_s_range-sign     = 'I'.
        l_s_range-opt      = 'EQ'.
        APPEND l_s_range TO e_t_range.
        EXIT.
      ENDLOOP.
    ENDIF.

You can even make it nicer by doing something like mm.yyyy


        CONCATENATE 
            loc_var_range-low+4(2) 
            '.'
            loc_var_range-low(4)
        INTO  l_s_range-low.     

or anything else of your creativity

hope this helps...

Olivier.

Message was edited by:

Olivier Cora

Answers (1)

Answers (1)

Former Member
0 Kudos

Noviced,

If you edit the text variables, change their display to text rather that key.

Regards

Gill