cancel
Showing results for 
Search instead for 
Did you mean: 

Text Variable Using User Prompt Input

Former Member
0 Kudos

I have a query that prompts the user to enter a "From Date" and "To Date" before the report is run. On the column of the report, I have a "Year to Date" heading that populates the current month/year. I want this heading populated by the "To Date" that the user entered instead of the current month/year. Does anyone know how this would work? I'm assuming I have to use a text variable but i don't see any text variables that utilizes the user entered "to date".

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi martha Gonzalez,

If the Column is restricted by the user entry variable "To Date".You can easily get the "To Date" in the column heading by the replcement path text variable on 0calday.

Still I did not understand completely your requirement .Can you elabrate this.

With rgds,

Anil Kumar Sharma .P

Former Member
0 Kudos

Hi Anil

I attempted the solution that you wrote out but for some reason its still not replacing the column name with the user entered month/year. The characteristic that I'm using in my report is 0CALMONTH restricted to the variable "Cummulated to current month" 0CYTCM. I created a text variable replacement path using 0CALMONTH and selected the "To Value" for intervals.

When this query is executed, ths user is presented with a From Date and a To Date which must be filled in. Lets say I entered 01/2004 to 05/2005. Once I submit this, the report shows up but on my column heading it is showing up as 11/2005 instead of 05/2005.

0 Kudos

hi martha,

i assume you have variable created for 'from date-todate' - ZVDTFRTO and 'year to date' - ZVYEARDT and you have your user exit variable ZXRSRU01 created, then try following code in ZXRSRU01

DATA: L_S_RANGE TYPE RSR_S_RANGESID.

DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.

.....

when 'ZVDTFRTO'.

if i_step = 2.

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE

WHERE VNAM = 'ZVYEARDT'.

CLEAR L_S_RANGE.

L_S_RANGE-LOW = LOC_VAR_RANGE-HIGH.

APPEND L_S_RANGE TO E_T_RANGE.

ENDLOOP.

endif.