cancel
Showing results for 
Search instead for 
Did you mean: 

CAN SOMEONE PLEASE HELP ME IN CREATING A TEXT VARIABLE???

Former Member
0 Kudos

Hello Friends,

I want to display the Key and Text for 0CALYEAR in a report. I searched the forum and it seems that for doing this I need to create a text variable. In the query designer I tried creating a text variable for 0CALYEAR, but in the variable wizard, the "Type of characteristic" drop-down is greyed out. Please guide me in creating a text variable and on a larger scale in getting the Key and Text for 0CALYEAR. Thanks!

Regards,

Prem.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Premanand,

Text Variables : Text variables represent a text and can be used in descriptions of queries, calculated key figures and structural components.

Text variables for text in headings.

If you want to display Calyear key and text, in workbook right click on Calyear and choose display as Key and Text. for this Calday should contain text. or it displays key as text.

More info @ http://help.sap.com/saphelp_sem40bw/helpdata/en/85/e0c73cccbdd45be10000000a114084/content.htm

Hope it Helps

Former Member
0 Kudos

Hello Prem,

We can create text variables for column headings in a query.

suppose you have a report for example sales figures with respect to months in a Calendar year.

So the report heading displays the sales figures for jan 2001, feb 2001, mar 2001 etc.

for this to have we have to create text variables with processing type as replacing path.In this case create atext variable with replacement path as processing type,

in the report you might have used customer exit variable to calculate the sales figures for every month,

so this variable replaces the value of that customer exit variable.

while creating the text variable you have the option such as replace variable with , in that option you can give as external characteristic key or text in which ever way you want.

if you select replace variable with text then jan 2001 will otherwise if key is selected 01/2001 will be displayed.

similarly we can also create text variable with customer exit as processing type , in that case you have to code

hope it is clear

assign points if useful

Former Member
0 Kudos

Hello Friends,

Thanks a lot for your replies!!! I am really delighted to see the helping spirit of the forum. I have assigned points to all of you. Thanks again!

Now coming to the issue. Let me reply individually. (Friends, reply may be a bit lengthy. Please read atleast your part fully).

Venkat, you said that we can display the key and text for 0CALYEAR if the texts are mainted for it. However, in the display option for 0CALYEAR there is no option for text. Moreover, since 0CALYEAR is provided by SAP itself, I did not find any option for maintaining texts for it. Infact in 0CALYEAR, under the master data tab the "With texts" option is unchecked. Please share some info on this one.

Srini, your suggessted solution was not possible as there was no option for displying text in the context menu for 0CALYEAR.

Karthik, I tried your solution. In my KeyFigures structure I have only two key figures and the 0CALYEAR is in rows. What I did was I right-clicked on "Key Figures" and clicked on New Selection. In the popup screen there is a button for variables. Clicking on it and then clicking on the "New" opton in the subsequent window brought me to the variable creation wizard. Interestingly this is a text variable creation wizard. Happily I created a text variable with replacement path and selected 0CALYEAR as the characteristic. Then I selected "Name(text)" for "Replace variable with" option. Everything went fine. Under key figures, I got an icon which is having a green triangle with a matrix cube (Apologies for explaning the situation like this :-). This is essentially the icon for characteristics. The description reads "&ZTXTVAR& New Selection". Now when I try to run the report I get an error saying "Use a Key Figure everywhere in the structure 'Keyfigures' ". I think the text variable is not getting created, instead a New selection is getting created. Please assist. Thanks!

Regards,

Prem.

Former Member
0 Kudos

Prem,

Thats true...you cant maintain text for 0CALYEAR. Maintaining texts is not meaningful thing. Because a year cant have any name but can have only numeric name like 2007......And still if you want to maintain text for the values you can create a char IO and map the 0CALYEAR to that and maintain texts manually.

Answers (1)

Answers (1)

Former Member
0 Kudos

Prem,

You need not create a text variable to display key and text for 0CALYEAR. It is the property to display as per the requirement. If texts for 0CALYEAR is maintained it will display both key and text when you select the display property as key and text. Using text variable you can't display text for respective key value of 0CALYEAR.

If what is understood is wrong regarding ur requirement, please state the requirement more clearly.