on ‎2008 May 30 10:36 AM
Hi all,
I am working on a report in that report i have 6 charactics and 4 key figure.
charactics : material number
demand type,vendor,date.
here requirment is that before displaying data on the BEX client wants to sort the data on the basic of following logic first material number then demand type then date and then vendor . I can do this on BEX but problem is Demand type
Demand type variable contaning following values PO,PR,PL so sorting can not done at BEX leven on character type basic .So i have to write a routine where i have added one more field zsort and assigned the value 1 for PO ,2 for PR and 3 for PL . I am getting all assigned values for Zsort at BEX but as per client's requirement I dun have to show the variable at BEx but shorting has to be done on the basis of this variable only. I wont take this variable neither in dimension nor in keyfigures and will write a routine by taking this variable in my code. Folowing code I had written in R/3 FM to write in routine:
Sort IT by matnr zsort date.
I want to write same code in routine so where and what code I will have to write? Main problem is we don't have any internal table available here so inplace of IT(internal table) what I will have to write that is the main problem for me. Second where the code would be written in start routine or field level routine??
Thanks
Ankit modi
Request clarification before answering.
Hi Ankit,
Can we do it like this? Take the ZSORT field in the Query Design in BEx, Use sort functionality on it and set this field to NO DISPLAY.
This will ensure the sorting of data for Demand Type and you need not show ZSORT in the final report.
Regards,
Yogesh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankit,
when you design the query you can define what the default sorting procedure will be. Check the properties of each characteristic and adjust the sorting behaviour according to your needs.
For example, for characteristic material you might choose in the properties something like sort characteristic 'Material', sort by 'key' or 'text' and sort direction 'Ascending' or 'Descending'.
The same should hold for the rest of the characteristics.
Best Regards,
Theodoros
Hi Ankit,
To answer your question regarding preferences in sorting, the order in which you place your characteristics in the rows of BEx query, sorting will be done in that order only.
For example, if you enables sorting for YEAR, MONTH and DAY, and you put YEAR as a first row, MONTH as second row and DAY as third row, the records will be sorted first on YEAR, then on MONTH and finally on DAY.
Hope it clears everything.
Regards,
Yogesh.
Hi Ankit,
in general it is not a good idea to keep your data in an infoprovider (e.g., an ODS) sorted. Try to include the zsort field in your report but with display option 'no display'. With this way, even though it won't be displayed in your report, it will sort your results.
Regards,
Theodoros
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.