Skip to Content
author's profile photo
Former Member

Display Error in setting Text variables Offset values

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Sep 28, 2007 at 04:10 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • author's profile photo
    Former Member
    Posted on Sep 29, 2007 at 10:08 AM

    Noviced,

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

    Regards

    Gill

    Add comment
    10|10000 characters needed characters exceeded