Select 1 column in Presentation Layer, but display 2
Is it possible to have a column in the presentation layer as a combination of two columns? Something like a dimensional key - but so that it doesn't come like 2004-1 (year+qtr), but like 2004 / 1 (2 columns) - thanks
Like this...
SQL> ed
Wrote file afiedt.buf
1 select max(decode(rn, 1, empno)) as emp1
2 ,max(decode(rn, 2, empno)) as emp2
3 ,max(decode(rn, 3, empno)) as emp3
4 ,max(decode(rn, 4, empno)) as emp4
5 ,max(decode(rn, 5, empno)) as emp5
6 ,max(decode(rn, 6, empno)) as emp6
7 ,max(decode(rn, 7, empno)) as emp7
8 ,max(decode(rn, 8, empno)) as emp8
9 ,max(decode(rn, 9, empno)) as emp9
10 ,max(decode(rn, 10, empno)) as emp10
11 ,max(decode(rn, 11, empno)) as emp11
12 ,max(decode(rn, 12, empno)) as emp12
13 ,max(decode(rn, 13, empno)) as emp13
14 ,max(decode(rn, 14, empno)) as emp14
15 ,max(decode(rn, 15, empno)) as emp15
16 ,max(decode(rn, 16, empno)) as emp16
17 ,max(decode(rn, 17, empno)) as emp17
18 ,max(decode(rn, 18, empno)) as emp18
19 ,max(decode(rn, 19, empno)) as emp19
20 ,max(decode(rn, 20, empno)) as emp20
21 from (
22 select empno, row_number() over (order by empno) as rn from emp
23* )
SQL> /
EMP1 EMP2 EMP3 EMP4 EMP5 EMP6 EMP7 EMP8 EMP9 EMP10 EMP11 EMP12 EMP13 EMP14 EMP15 EMP16 EMP17 EMP18 EMP19 EMP20
7369 7499 7521 7566 7654 7698 7782 7788 7839 7844 7876 7900 7902 7934
SQL>
Similar Messages
-
Hiding columns in Presentation Layer, but still accessible in a report.
Hi BI Devs,
I have a question on how to hide certain columns in the presenation layer but still make them available in a dashboard/report.
We have 3 sections in our Presenatation Layer...section_a, section_b, section_c. We have two groups created, group_max and group_lite. Group_max will have access to all the sections in the presentation layer but group_lite will only have access to section_a and section_b
We have a report in a dashboard (lets call it full_dashboard) that contains columns from section_a, section_b and section_c. We want all users (group_max and group_lite) to have access to the report, run the report and return data.
Our requirement is that the group_lite will not have access to the section_c in "Answers".
When we set the permissions in the RPD for the different sections, the permissions work correctly in hiding the section_c from group_lite, but when they run the report full_dashboard, the report errors out for group_lite users.
Is there a way to grant access to the group_lite users so that they can run full_dashboard but still deny them access to the columns in Answers?Here is my thinking about duplicationg the section_c
1. If i duplicate section_c, it will still be visible to group_lite in the presenation layer.
2. If i duplicate section_c, i will have to change the dashboard (a very complex one too) to point to the duplicated section. How will I be able to hide the duplicated section?
I am just not sure how to hide section_c from the group_lite users and still have the reports in the dashboard access the columns, without having to change the report.
Edited by: empyre on Mar 16, 2011 8:21 AM -
Merging Patch,after that not able to see column in Presentation layer
Hi,
I am using rpd 11.1.1.5.0 and created patch done for modifications,after merging to original repository not able to see new derived columns in Presentation layer,able to see in BMM and Physical layer.
Little bit urgent as client need to see reports.
Thanks
KarthikThank you.... so much.
Solution: clear preferences in home library ~/Library
Preferences> com.apple.Safari.plist -
Rename columns in Presentation layer
Hi Experts,
I Have one BMM layer table with 2 groups columns like
BMM Table
Sales
Revenue
Sum
Sales_ B Group
Revenue_ B Group
Sum_ B Group
Now I want to show these columns in two tables i.e. A table and B table with same column names in presentation layer as below:
Presentation A table Presentation B table
Sales Sales
Revenue Revenue
Sum Sum
In BMM layer it should be Sales_ B Group but in presentation table it should show as Sales as vice verse for other 2 columns for B group columns
If I rename Sales_ B Group as Sales in BMM layer it won’t accept because already sales column is there my requirement is in BMM layer in should as Sales_ B Group but in presentation layer the same column it should show as Sales .
Regards,
Rafi
Edited by: Rafi.BI on Jan 31, 2013 11:28 PMHi Rafi,
Can you right click on your presenatation layer and create a new presentation table (EG: Table A) -- and then move the columns from bmm layer and rename them as per your req.
Now right click again.. create one more Pres. table (EG: Table B) -- and then move the columns from bmm simply drag and drop and rename as per your req.
Thank you. -
How to add the values of all selected columns in a table and display it ?
Hi all,
I am using jdeveloper 11.1.1.6.0
Page:
my page jsff page contains one ADF table and one textbox
DB:
i have two database tables A & B ,
i need 2 columns from each table . say (A.product_no ,A.product_name,B.prodeuct_price ,B.confirm)
here product_no is primary key and present in both tables.
i need to create a VO combining these two tables and put it as ADF table in a jspx page
Functionality :
my 'confirm' field is a checkbox field in table . whenever the checkbox is selected,
the corresponding price will be getting added and display it in a textbox.
Eg:
if my first 4 price values are 3000 , 2000 ,4000,2000
and if i select first 3 values , then the text box should contain 9000 value.
i need help ...
Problem:
i need help in creating VO and functionality partHi,
it is easy: create an entity object for every table and one view object where you select your both entity objects and join them in your select statement.
Your desired 'confirm' functionality could be achieved with helpp of view object transient attributes - for more information see: http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcquerying.htm#CHDHJHBI
Regards
Pavol -
Presentation Layer - Custom Display Name
We use Oracle Datamarts as Data Source thus in our Repository a lot of information is just routed through. Of course we configured the joins in the physical layer and added some hierarchies, joins and calculated measures to the business model.
The question is now where to set the right column names which the end users will see (translation from technical column names to business column names). Normally I read that the naming should be done in the business model and then can be copied to the presentation model.
Is there any reason why not to leave alle the technical column names through to the presentation model and just to do the naming with the Custom Display Names? This had the advantage that we could rename the column display names and the reports never had to be modified.
Thank you for your thoughts and inputThe main reason could be this:
If the attribute has been used in multiple subject areas, there is no need to go each subject areas and rename them, instead a one time rename in Business Modeling layer will do the work. Eg. Suppose there is a common dimension, say, Supplier/Customer/Time which are used in multiple subject areas. Renaming in Business modeling layer will be easier than going to each subject areas and rename them in presentation.
Hope this helps..
Thanks,
Anilesh -
OBIEE presentation layer agregate values are not acurate
hi,
i have a simple BMM where for the given fact year wise i want to show summation of values and %.
here is the query generated by the OBIEE
WITH
SAWITH0 AS (select sum(T5779.SLA_NOT_MET) as c1,
sum(T5779.SLA_MET) as c2,
count(T5779.APP_ID) as c3,
T5801.CALENDAR_YEAR as c4,
T5801.TIME_ID as c5
from
SQA_CAS_TIMES T5801,
SQA_CAS_FCT T5779
where ( T5779.TIME_ID = T5801.TIME_ID )
group by T5801.TIME_ID, T5801.CALENDAR_YEAR),
SAWITH1 AS (select distinct SAWITH0.c4 as c1,
SAWITH0.c3 as c2,
SAWITH0.c2 as c3,
SAWITH0.c1 as c4,
SAWITH0.c2 / nullif( SAWITH0.c3, 0) * 100 as c5,
SAWITH0.c1 / nullif( SAWITH0.c3, 0) * 100 as c6,
SAWITH0.c5 as c7
from
SAWITH0)
select SAWITH1.c1 as c1,
SAWITH1.c2 as c2,
SAWITH1.c3 as c3,
SAWITH1.c4 as c4,
SAWITH1.c5 as c5,
SAWITH1.c6 as c6
from
SAWITH1
order by c1
the results are comming wrong when i am doing piviot in presentation layer but this query when i check if i remove the group by time_id then the results are correct
WITH
SAWITH0 AS (select sum(T5779.SLA_NOT_MET) as c1,
sum(T5779.SLA_MET) as c2,
count(T5779.APP_ID) as c3,
T5801.CALENDAR_YEAR as c4
from
SQA_CAS_TIMES T5801,
SQA_CAS_FCT T5779
where ( T5779.TIME_ID = T5801.TIME_ID )
group by T5801.CALENDAR_YEAR),
SAWITH1 AS (select distinct SAWITH0.c4 as c1,
SAWITH0.c3 as c2,
SAWITH0.c2 as c3,
SAWITH0.c1 as c4,
SAWITH0.c2 / nullif( SAWITH0.c3, 0) * 100 as c5,
SAWITH0.c1 / nullif( SAWITH0.c3, 0) * 100 as c6
from
SAWITH0)
select SAWITH1.c1 as c1,
SAWITH1.c2 as c2,
SAWITH1.c3 as c3,
SAWITH1.c4 as c4,
SAWITH1.c5 as c5,
SAWITH1.c6 as c6
from
SAWITH1
order by c1
The above one is without time_id in group by.
can some one suggest as to what is wrong with the pivot for the above query.why are u bringing TIME_ID column in the first Query... just remove it from the Criteria TAB.
-
Hi experts,
In administratrion tool for obiee 10g, there are some property,such as export logical keys ,impilict fact column, in presentation layer. Can anybody tell me what it is and how to use it?
Thank you.Refer to documentation, you can find the following on pg 300, E10540-02.
Exporting Logical Keys in the Subject Area
For each subject area in the Presentation layer, you can decide whether to export any logical keys as key columns to tools that access it. Exporting logical keys is irrelevant to users of Oracle BI Presentation Services, but it may be advantageous for some query and reporting tools. If you decide to export logical keys, make sure that the logical key columns exist in the table folders. In this situation, your business model should use logical key/foreign key joins. When you select the option Export logical keys in the Subject Area dialog, any columns in the Presentation layer that are key columns in the Business Model and Mapping layer are listed as key columns to any ODBC client. This is the default selection. In most situations, this option should be selected.
Setting an Implicit Fact Column in the Subject Area
For each subject area in the Presentation layer, you can set an implicit fact column. The implicit fact column is added to a query when it contains columns from two or more dimension tables and no measures. The column is not visible in the results. It is used to specify a default join path between dimension tables when there are several possible alternatives or contexts. -
Rename columns in Presentaion Layer
Hi,
I need to change the column names in the Presentaion Layer. I need only the beginning of the word to be uppercase. Do I have to go to BMM layer and use the rename wizard and get all the columns again to presentation layer. We have a lot of columns so manually doing it would be very time consuming. I am trying to do in Presenation Layer itself using Rename wizard but somehow the 'next' field is not highlighted to go to the next step. Any suggestions? Also if I change any column name in presentation layer manually do I also have to chnage the name in BMM layer as well.Hi,
Keeping the column names consistent in BMM and presntation layer is best suggested as diffrent names in both the layers can lead to confusion .As Aliastair suggested if you rename in presentation layer then it will create aliases to Old names,If someone delete that alias then you will get view display error in report.So follow a simple approach and keep names consistent in both the layesr unless and until its very urgent to rename columns in presentation layer.
Thanks
Sandeep
Edited by: Sandeep Saini on 23-Jul-2010 08:34 -
Hi,
can we do ytd at presentation layer? bcz i dont have an access to the admin tool right now.
thanks,
mani.Thanks very much john,
yes, by doing the RSum we can acheive ytd in the presentation layer. but, i need as follows:
month cname sales rsum
2010.1 c001 1 1
2010.1 c002 3 4
2010.2 c001 5 9
rsum sums up all the way in that column. but my request is not to continue the rsum in the 2010.2...needs to calculate again from 2010.2: follows
2010.2 c001 5 5
thanks,
Mani.
Edited by: abc on 08-Mar-2010 09:09
Edited by: abc on 08-Mar-2010 12:58 -
Columns are not displaying in a Dimension in the presentation layer
Hi All,
I have a Dimension in one of the subject area which has 3 columns. It was working fine but yesterday, we have an issue about this. These columns are not displaying anymore in the dimension.
I have checked in the Repository and from the Presentation services for the permissions and they look fine. Is there anything else am missing. If so, where I need to check.
Kindly help me on this.
Thanks,
Imtiaz.Hi,
Check three things.
1. Try to login Admin user and check whether those columns are present or not.
2. Try to login different browser.
3. Cross check privileges for login user (what role has assigned ).
Note: Clear the browser cache and all Bi server cache and check.
Hope this help's
Thanks,
Satya Ranki redddy -
How can I import db column comments into the OBIEE presentation layer?
We have a very well designed data mart - it is a star schema and all the fact and dimension table columns have comments in them with their definition and use. There is virtually no change required in the physical or business layer. The only modifications done in the presentation layer was to hide the Pk/Fk columns.
Is there a way to import these column comments into the presentation layer so that the business user can see this comment in the tool tip while hovering over the presentation column in Answers?
Thanks for your help!Hi,
I assume the comments you mean are stored in user_tab_comments and user_col_comments.
When this is the case you should do the following:
Go to your subject area in your presentation layer. For now I assume the name of this subject area is "Subject Area".
Then right click on this subject area and check "Externalize Descriptions".
Then create an initialization block (session) using this query:
(select 'CD_Subject_Area_' || table_name, comments from user_tab_comments)
union all
(select 'CD_Subject_Area_' || table_name || '_' || column_name, comments from user_col_comments)
Use "Row-wise initialization" for this initialization block.
Two comments:
1) Like I said, I assume Subject Area is the name of your subject area in your presentation layer, so I guess you need to replace this with the name of your Subject Area.
But be sure that you replace each space ' ' with an underscore '_'.
2) Maybe you need to refine above querys by filtering on table_name for those table_names you are using.
Good luck.
Regards,
Stijn -
Issue adding a new column to OBIEE presentation layer
Hi,
I am pretty new to OBIEE so this may be a silly question. I am facing some problems trying to add a new column from a physical table the OBIEE presentation layer.
Below are the steps I followed:
Task: add a product category set to the presentation layer.
Steps:
1) First verified that the product category set is being populated in the W_PROD_CAT_DH table in the datawarehouse. this was done by running the following sql
SELECT W_PROD_CAT_DH.TOP_LVL_PRODCAT_NAME
FROM W_PROD_CAT_DH, W_INVENTORY_PRODUCT_D
WHERE W_PROD_CAT_DH.integration_id = W_INVENTORY_PRODUCT_D.INV_PROD_CAT1
This sql gave the right category value.
2) created a "Alias" of the table W_PROD_CAT_DH in the OBIEE Admin tool physical layer. (done by right clicking W_PROD_CAT_DH >>New Object>> Alias)
3) named the Alias of W_PROD_CAT_DH as "Dim_W_INV_MKT_CAT" and created a key of the alias named "integration id" on the column "integration_id"
4) opened the pre-existing alias of W_INVENTORY_PRODUCT_D the alias was called "Dim_W_INVENTORY_PRODUCT_D" and added a key called "MKT_CAT" on the column "INV_PROD_CAT1" in this alias (Dim_W_INVENTORY_PRODUCT_D of the table W_INVENTORY_PRODUCT_D)
5) in the alias of the "W_INVENTORY_PRODUCT_D" called "Dim_W_INVENTORY_PRODUCT_D" added a "Foreign Keys" the expression of the key is following: ("Oracle Data Warehouse"."Catalog"."dbo"."Dim_W_INV_MKT_CAT"."INTEGRATION_ID" = "Oracle Data Warehouse"."Catalog"."dbo"."Dim_W_INVENTORY_PRODUCT_D"."INV_PROD_CAT1")
Logical layer
6) Opened the existing logical folder called "Dim - Inventory Product" and clicked on "Sources" tab then double clicked the source "Dim_W_INVENTORY_PRODUCT_D" and added a new mapping under "Map to these tables" under "General" tab. The column that was added was the physical alias "Dim_W_INV_MKT_CAT"
7) added a new column mapping to the same logical table source (Dim_W_Inventory_PRODUCT_D) this new mapping was a column from the alias "Dim_W_INV_MKT_CAT" (column name "TOP_LVL_PRODCAT_NAME")
Presentation Layer
8) dragged the newly added column (TOP_LVL_PRODCAT_NAME) from the logical layer "Dim - Inventory Product" to the presentation layer "Product" folder.
ISSUE
after adding everything and checking global consistency and save and checking-in my work when i login from the front end presentation services. I see the newly added column is showing under the "Product" folder. on dragging the column by itself to the Ad-Hoc analysis I can see the different values of the category. On adding a second column from the same logical folder (Dim - Inventory Product in logical layer) i still see the right product name and corresponding category. BUT when I drag any other column from any other folder (such as "Day" from "Time" or any fact values) the result does not fetch any data (message: The specified criteria didn't result in any data.)
I am not sure if I am missing any step but I know I am mapping the new table alias to the inventory_product_d since i see right results on creating analysis of columns in those two folders. but no other folders give me any data.
I also know that the logical folder "Dim - Inventory Product" is joined with other tables as I can see results when i do not add the newly added catagory column but other folder and other columns of "Dim - Inventory Product"
I would really appreciate any insight to this very much. we are using OBIEE 11.1.1.6 with the Oracle 11.5.10 Adaptor (SDE_ORA11510_Adopter)
I will try to upload some screenshots if needed but presently not sure if its something really simple.Hi Prassu,
thanks for the responce. and Apologies for the delay in getting back to you.
1) 1.First of all set the logging level to 3 in the admin tool save it.
You can get the SQL query from here
settings(Answers right top)-->Administration-->manage sessions-->view log
When I try to do this I get the following message. and no log files.
Error
Log Could Not Be Retrieved
Odbc driver returned an error (SQLExecDirectW).
Error Details
Error Codes: OPR4ONWY:U9IM8TAC
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 27002] Near <3790667783>: Syntax error [nQSError: 26012] . (HY000) -
Changes to selected columns to display in Details tab in Task Manager are not saved during a reboot
I use Task Manager on Server 2008 R2 to monitor performance. I have added several columns to the Processes tab using View..Select Columns. I have added CPU time, I/O read/write/other bytes, etc.
The equivalent in Server 2012 is the Details tab. I figured out how to add these same columns - right click on the column headers, and choose "Select columns". This is not obvious by the way.
However these selections are not persistent across a reboot. So every time I reboot, I need to add the columns back to the display. That is not the case with Server 2008 R2 - they are persistent.
I am using a domain administrator userid, but not using roaming profiles.
This is a retrogression vs. Server 2008 R2. Can it be fixed?Hi,
I meant that both the added columns of Windows Server 2008 R2 and Windows Serve r2012 RC are persistent.
You may install a new Windows Serve r2012 RC to check the symptom.
Currently, you may perform a System File Checker (SFC /Scannow) to check the result.
Regards,
Arthur Li
TechNet Community Support
Arthur, I have the exact same problem as David Trounce. The problem exists, as he described it, and I don't think you are understanding it. Please pass this problem/bug/defect report to someone else so that it can be logged and fixed before
RTM. Thanks! -Kent -
Select columns from table for display in alvgrid.
Hi all,
i have the following:
i do select a tablename and pass it as a parameter. then this table is loaded into an internal table and displayed in an alv-grid.
what i now want to do is a step between the both:
after the internal table with its structure is loaded, i want to display the field columns and i want them to be selectable so that in the next step the alv - grid is selected only with the selected columns ( just now it allways runs with all columns - even the not needed ).
Any ideas for that would be appreciated. Is there some tutorial on that or some sample ?hi
chk this sample code:
*REPORT zdemo_alvgrid .
TABLES: ekko.
type-pools: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform build_events.
perform build_print_params.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for when double
"click(press f2)
gd_layout-zebra = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into table it_ekko.
endform. " DATA_RETRIEVAL
Form TOP-OF-PAGE *
ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform.
FORM USER_COMMAND *
--> R_UCOMM *
--> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
Check field clicked on within ALVgrid report
IF rs_selfield-fieldname = 'EBELN'.
Read data table, using index of row user clicked on
READ TABLE it_ekko INTO wa_ekko INDEX rs_selfield-tabindex.
Set parameter ID for transaction screen field
SET PARAMETER ID 'BES' FIELD wa_ekko-ebeln.
Sxecute transaction ME23N, and skip initial data entry screen
CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
ENDIF.
ENDCASE.
ENDFORM.
*& Form BUILD_EVENTS
Build events table
form build_events.
data: ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gt_events[].
read table gt_events with key name = slis_ev_end_of_page
into ls_event.
if sy-subrc = 0.
move 'END_OF_PAGE' to ls_event-form.
append ls_event to gt_events.
endif.
read table gt_events with key name = slis_ev_end_of_list
into ls_event.
if sy-subrc = 0.
move 'END_OF_LIST' to ls_event-form.
append ls_event to gt_events.
endif.
endform. " BUILD_EVENTS
*& Form BUILD_PRINT_PARAMS
Setup print parameters
form build_print_params.
gd_prntparams-reserve_lines = '3'. "Lines reserved for footer
gd_prntparams-no_coverpage = 'X'.
endform. " BUILD_PRINT_PARAMS
*& Form END_OF_PAGE
form END_OF_PAGE.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
write: sy-uline(50).
skip.
write:/40 'Page:', sy-pagno .
endform.
*& Form END_OF_LIST
form END_OF_LIST.
data: listwidth type i,
ld_pagepos(10) type c,
ld_page(10) type c.
skip.
write:/40 'Page:', sy-pagno .
endform.
**reward if helpful
regards,
madhu
Maybe you are looking for
-
Menu bar not always appearing (dropping down) in Safari
Hello everyone, I was just wandering if someone could help me out with this small problem - or perhaps its a bug others have experienced. Basically, since upgrading to Mavericks I have this annoying problem whereby when I drag my cursor to the top of
-
Windows Server 2008 Service pack 2 - Oracle 10g release2 (10.0.4.0)
I got a question about the installation of oracle 10g release2. Is there any issues installing oracle 10g release2 on a windows server 2008 with Service pack 2? here the release http://www.oracle.com/technology/software/products/database/oracle10g/ht
-
Satellite view not working in Maps
Just got my iPhone 6 plus yesterday, but satellite view does not work in Maps. Oddly, there are several Chinese characters on the bottom right corner of the map screen, and on the bottom of the menu, it says "Data from AutoNavi, others" whereas on m
-
I'm trying to Mail Merge from Numbers into Pages to generate mailing envelopes. I've built the columns in my Numbers spreadsheet to correspond to individual merge fields (street, city, state, zip), and I can build my merge template in Pages. When I t
-
HELP !!! system language
While trying to clear up space on my MPB Pro, I somehow ended up with my computer system in Dutch (I think) How do i get it back to speaking english???? When I go to System preferences>language and text> the only language listed is "Dansk". I used