cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Query Parameter Alias Name

Former Member
0 Kudos

Hi Experts,

I want to ask, is it possible to set query parameter alias name so it can be set to more familiar name?

For example, I have a query that needs input of document number, so in the input dialogue box will appear Doc. Num., while I want the label's caption 'Delivery Order No.'.

There's an option said that it can be manipulated through a UDF but I guess it's really inefficient if I have a lot of queries with each different parameter. Any suggestion please?

Thank you very much

Accepted Solutions (0)

Answers (3)

Answers (3)

leon_laikan
Participant
0 Kudos

Hi Willy,

I have myself been working on this annoying problem for some time.

Just a few hours ago, I found a solution.

See this post:

Nobody has yet replied to my thread, but I am on the verge of finding the solution myself.

I fact, I already found it, but must do some tests first.

My trick will permit you to use whatever name you wish, and is very easy to implement.

The only problem is that there is no way to select from the list of existing values, i.e lookup arrow disappears

from the Selection Criteria window.

Regards,

Leon Lai

former_member204969
Active Contributor
0 Kudos

The system always asks with the description of the field you refer to with the parameter variable in the select statement.

I sometimes defined a UDT only for getting the appropriate title in the parameter entering window. The table has no data; I used it only for its field names.

(The parameter request can be placed inside a comment and the entered value is used setting an SQL variable like this:

declare @d datetime
/*select t.createdate from ordr t where t.createdate=[%0]*/
set @d=[%0]

This SQL variable can be used later in the real query.)

(But then you loose the possibility to choose from the u2018List of existing valuesu2019

Former Member
0 Kudos

Hi Willy......

Inside SAP when you create any query and gives parameter using Query generator unfortunately its not possible to give the alias name but it is always possible in Crystal Report where you can give the prompt text.......

Regards,

Rahul

Former Member
0 Kudos

Hai Rahul and Istvan,

@Rahul

Unfortunately I've to use sap query editor to create that. But thank you for your suggestion anyway

@Istvan

UDT is an option also but I consider it really ineffective since it will be just used to create parameter description, means no any operational or transactional function. So unfortunately I can't take it as the solution.

If anyone know, where does sap keep its field description? I think the description appear on the dialogue box comes from the description of the field. For example when you ask for a docdate input, then in the dialogue box will appear Posting Date. If only I can know where does SAP keep it? So maybe a little update can solve this prob. I've search for it through SQL system and object column query but still no result.

Thank you for your replies.

former_member204969
Active Contributor
0 Kudos

There are strict rules forbidding any update on system tables, so even if you could find the descriptions, you can lose SAP maintenance updating them. So you should remain with the even uncomfortable but legal methods.

Former Member
0 Kudos

Hi Istvan,

I guess I find no way out for this issue. You're right about the legal rules that forbid any database direct transaction. But if there is any available solution, I will still wait and let this thread remain unanswered. We never know how technology works!

Thank you for your reply, Istvan

Former Member
0 Kudos

experts,

Still there's no any solution for this question?

Former Member
0 Kudos

Hi,

It cant be done. What you can do is manually determine each parameters even the alias names are not what you expect.

Regards,

Clint

Former Member
0 Kudos

Hi Willy,

There are so many people tried everything possible like you. However, it is not possible. There is no miracle here. Technology is clear. Those descriptions are hard coded. Do not try to change them even if you can find one. Period.

Thanks,

Gordon

former_member204969
Active Contributor
0 Kudos

1. I don't understand your disapproval about using an UDT with queries. You can use one UDT for a lot of queries. One field definition is needed only for one parameter name.And the UDT need not contain any data.

2. Otherwise in Crystal report you can freely define the parameter requesting prompt text.