Skip to Content
Former Member
Nov 18, 2011 at 10:47 AM

2 structures in the column,structure not displaying in the output(RSRT)


Hello BI Folks,

I have a requirement where the user enters the input(text variable)

say 03/2011 then the report output should be Jan,Feb,Mar.

say 05/2011 then the output should be Jan,Feb,Mar,Apr,May,likewise.

The report output should be:(if the text variable is---02/2011)

Brand Jan Feb Mar April May June July Aug Sept Oct Nov Dec

Sales Foc Sales Foc Sales Foc Sales Foc Sales Foc Sales Foc Sales Foc Sales Foc Sales Foc Sales Foc Sales Foc

A 455 56 38

B 03 32


D 90 2 75 69

I am acheievin this by using creating 2 structures in the columns.

1 structure is for jan-dec & another structure for the KPIs(sales,FOC).

I am writing customer exit to read the text variable & get the data for the variable read.

lo_year = sy-datum+0(4).

lmon =sy-datum+4(2).

READ TABLE i_t_var_range INTO loc_var_range WITH KEY vnam = 'text_variable'.

l_s_range-low = loc_var_range-low.

ln_value = l_s_range-low+4(2).

DO ln_value TIMES.

l_counter = l_counter + 1.

CONCATENATE 'customer_exit_mons' l_counter INTO lv_text.

CASE i_vnam.

WHEN lv_text.

IF i_step = 2.

CONCATENATE lo_year lmon '01' INTO lv_startdate.

  • ** Call a function module to arrive the enddate.



day_in = lv_startdate


last_day_of_month = lv_enddate.

l_s_range-low = lv_startdate.

l_s_range-high = lv_enddate.

l_s_range-sign = 'I'.

l_s_range-opt = 'EQ'.

APPEND l_s_range TO e_t_range.

CLEAR l_s_range.


ENDCASE. " End Case

lmon = lmon + 1.

ENDDO. " End of Do loop

CLEAR: ln_value , lv_text .

The problem is i am not getting the query ouput atleast not the query structure.Is there any other way to achieve this type of output.

Note:--The text variable wil be based on 0calmonth.

The custmer exit variables Jan-dec is based on 0calday.

Edited by: shreyaJ on Nov 18, 2011 11:49 AM