on 03-02-2011 10:41 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
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.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.