Print view of multiple tables (WAD)

Hi gurus,
Im currently working on a web template including two tables "TABLE_1" and "TABLE_2". These are based on two different data providers/queries.
A print function is set up for the report, spawning a printer-friendly version of the report. The following code is used for this purpose, where 'land' stands for landscape mode and 'port' stands for portrait mode:
<script>
//This function prints the query.
function printing(ty){
url=SAP_BW_URL_Get();
if( ty == "land" )
{ window.alert("This report runs best on landscape. Make sure to change you printer orientation.");
wnd=window.open(url+"&cmd=PROCESS_HELP_WINDOW&help_service=ZPRINTING&item=TABLE_1&P_DATA_AREA_PADDING_TOP=0&P_STYLESHEET=/sap/bw/Mime/BEx/StyleSheets/BWReports_smallfont_print.css &P_PAGE_WIDTH=25.5&P_PAGE_HEIGHT=17&P_DATA_AREA_ROWS=27&P_DATA_AREA_COLUMNS=6&P_DATA_AREA_INDENT_RIGHT=-1&P_PREVIEW_MODE=");  wnd.print(); }
if( ty == "port" )
{ wnd=window.open(url+"&cmd=PROCESS_HELP_WINDOW&help_service=ZPRINTING&item=TABLE_1&P_DATA_AREA_PADDING_TOP=0&P_STYLESHEET=/sap/bw/Mime/BEx/StyleSheets/BWReports_smallfont_print.css &P_PAGE_WIDTH=17&P_PAGE_HEIGHT=25.5&P_DATA_AREA_ROWS=45&P_DATA_AREA_COLUMNS=3&P_DATA_AREA_INDENT_RIGHT=-1&P_PREVIEW_MODE= "); wnd.print(); }
}</script>
As you can see, the function is currently set to only include TABLE_1, however i wish to include TABLE_2 as well. How is this table included in the above code?
Thanks in advance,
BR
Morten

Hi Morten,
You should have the code below:
<td nowrap span class="SAPBEXBtnStd" ><A  title="Printer Friendly Version" href="<SAP_BW_URL CMD='RELEASE_DATA_PROVIDER' DATA_PROVIDER_1='DATAPROVIDER_1' TEMPLATE_ID="ZMKT_BP_ACTFCST_WBTMP2">" target =_blank>
Print Preview</A>         
And then define the table for printing friendly version:
<TD align="left" width="334" bgColor="#9dbbd7" colSpan="2"
     ><object>
         <param name="OWNER" value="SAP_BW"/>
         <param name="CMD" value="GET_ITEM"/>
         <param name="NAME" value="TABLE_2"/>
         <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_GRID"/>
         <param name="DATA_PROVIDER" value="DATAPROVIDER_1"/>
         <param name="CAPTION" value="Give Caption here "/>
         <param name="HIDDEN" value="X"/>
         <param name="WIDTH" value="692"/>
         <param name="HELP_SERVICE" value="ZPRINTING"/>
         <param name="HELP_SERVICE_CLASS" value="Z_PRINT_HELP_SERVICE"/>
         ITEM:            TABLE_2
</object></TD></TR>
</P>

Similar Messages

  • [ADF Help] How to create a view for multiple tables

    Hi,
    I am using Jdeveloper 11G and ADF framework, and trying to create a view to update multiple tables.
    ex:
    Table A has these fields: ID, Name
    Table B has these fields: ID, Address
    A.ID and B.ID are primary keys.
    B.ID has FK relationship with A.ID
    (basically, these tables have one-to-one relation)
    I want to create a view object, which contains these fields: B.ID (or A.ID), A.Name, B.Address.
    So I can execute C,R,U,D for both tables.
    I create these tables in DB, and create entity objects for these tables.
    So there are 2 entity objects and 1 association.
    Then I create a view object based on B and add fields of A into the view:
    If the association is not a "Composition Association",
    when I run the model ("Oracle Business Component Browser") and try to insert new data, fields of A can't edit.
    If the association is a "Composition Association", and click the insert button, I will get
    "oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity"
    If I create a view object based on A and add filed of B into the view:
    When I run the model and try to insert new data, fields of B can't edit, no matter the association is or is not a composition association.
    So... how can I create a view for multiple tables correctly?
    Thanks for any advices!
    Here are some pictures about my problem, if there is any unclear point, please let me know.
    http://leonjava.blogspot.com/2009_10_01_archive.html
    (A is Prod, B is CpuSocket)
    Edited by: user8093176 on Oct 25, 2009 12:29 AM

    Hi Branislav,
    Thanks, but the result is same ....
    In the step 2 of creating view object, I can select entity objects to be added in to the view.
    If I select A first, and then select B (the "Source Usage" of B is A), then finishing the wizards.
    When I try to create a new record in the view, I can't edit any properties of B (those files are disabled).
    If I select B first, and then select A in crating view object, the result is similar ...
    Thanks for any further suggestion.
    Leon

  • Creating a "Print View" of a Table on Another Sheet

    Hi-
    I would like to create a "print view" of a table on another sheet that already has reorganization filters applied to it.  There is a template in Numbers called "Employee Schedule" that has exactly this, where the "printable" table's cells simply reference every cell in the source table on the other sheet.
    I know there is a way to very quickly (i think with a dragging motion), create the references in each cell in one or two operations, as opposed to going to each individual cell and typing in the reference to the source table.  I saw a post about how to do this a while back but cannot seem to locate it again
    How do I do this?  Thanks again for everyones help ;-)
    Thanks
    Matt

    mattford1 wrote:
    Hi-
    Re-reading this, I don't think this answered my question.  I understand how to reference a single cell, but how do you reference an entire table easily without having to go to each cell.
    Thanks
    Matt
    Matt,
    Select the first cell by clicking once on it, such that the border is highlighted. Then grab the little circle in the lower right corner of the border and drag it to the end of your table, either right or down. You can use this method to fill down or to the right. Sometimes it can be fussy, and if it refuses to behave, then you can use the alternate method, Copy and Paste. Click once on the first cell and Command-C. Shift-click the last cell and Command-V.
    Jerry

  • Ability to query on all columns from a view with multiple tables

    I have view with 4 tables. view has about 50 columns.
    hypothetically, I want to build a form to give the user an ability to query on any of those 50 columns. user can search on one or more fields.
    what is the best way to write the query to retrieve the results without performance impact.
    please let me know if the question is not clear.

    If you want to permit them to query any of 10 fields with no restrictions, you could create 10 separate single-column indexes. The optimizer would have to try to pick the best of these indexes if you specified multiple search criteria. But since you have a view which presumably means that you've got multiple other indexes involved for the underlying join conditions, you'd probably want/need to combine the column lists of the indexes you're adding for searches with the indexes you've created for joins, which requires looking at the text of the view and figuring out the best way to optimize the 10 single-column searches. Of course, it is possible that the optimizer could chose to do something like a b-tree to bitmap conversion on multiple indexes which could allow it to use multiple independent indexes for your queries, but that's generally not ideal performance-wise.
    All this is a fancy way of saying that there probably isn't a cut and dried answer to your question. You need to figure out the queries you're trying to optimize (say, the 10 single-condition queries) and you need to figure out what set of indexes on the various underlying tables provides the best performance weighing those benefits against the cost on other side of maintenance during DML. Which is going to depend on the text of the view, the underlying tables, the existing indexes, etc.
    Justin

  • Problem in creating a view over multiple tables

    How do I create a View on top of the bCrelow tables. I have metioned the key fields of each table. How do i join the tables with common fields? I also need to create a Generic Extractor over the View later.
    Z3PVR ( Custom Z table ):
    Key Fields--> MANDT: Client; BUKRS: Company Code; WERKS: Plant; EBELN: Purchasing Document Number; ELNR: Accounting Document Number.
    BSEG ( Cluster Table ):
    Key Fields--> MANDT: Client; BUKRS: Company Code; BELNR: Accounting Document Number; GJAHR: Fiscal Year; BUZEI: Number of Line Item Within Accounting Document
    CKIS ( Transparent Table ):
    MANDT: Client; LEDNR: Ledger for Controlling objects; BZOBJ: Reference Object; KALNR: Cost Estimate Number for Cost Est. w/o Qty Structure; KALKA: Costing Type; KADKY: Costing Date (Key); TVERS: Costing Version; BWVAR: Valuation Variant in Costing; KKZMA: Costs Entered Manually in Additive or Automatic Cost Est.; POSNR: Unit Costing Line Item Number
    BKPF ( Transparent Table ):
    MANDT:Client; BUKRS: Company Code; BELNR: Accounting Document Number;
    GJAHR: Fiscal Year
    RV61A ( Structure ):
    No Key
    T001 ( Transparent Table ):
    MANDT:Client; BUKRS:Company Code

    Hi Chintai,
    To create a view you can use Tcode SE11.
    In the first screen of view creation you must introduce the tables for the view and the conditions of join, remember to introduce always the field MANDT.
    You are introducing too much tables in your view and if I am not wrong you can not introduce Structures in a view.
    As a suggestion start introducing in View only the tables that contain all char you need and also the tables with a reduced number of keys (as T001).
    You can then obtain other fields from other tables via CMOD.
    To built up a Generic extractor on this view you can use Tcode RSO2.
    You can find under www.service.sap.com/bi an How to doc on Generic DataSource creation.
    Ciao.
    Riccardo.

  • Create a view from multiple tables

    Hi all,
    I am a newbie, so sorry if this is a "basic" question.
    I had 3 tables TAB1, TAB2 and TAB3
    TAB1 has
    STU_ID(pk), NAME, GRADE, ADDRESS
    TAB2 has
    COURSE_ID(pk), STU_ID(fk), COURSE_NAME, ROOM_NUM, TIME, DAY
    TAB3 has
    MENTOR_NAME, TITLE, AVAILABLE_DAYS
    Now I want to create a view(or query) that returns STU_ID, COURSE_NAME, NAME, GRADE, MENTOR_NAME and TITLE.
    When I tried writing a query like
    SELECT a.STU_ID, b.COURSE_NAME, a.NAME, a.GRADE, c.MENTOR_NAME, a.TITLE
    FROM TAB1 a, TAB2 b, TAB3 c
    WHERE a.STU_ID=b.STU_ID
    I am getting multiple results..like I'm getting Mentor name 4 times, name 4 times like that.
    So can anybody help me in writing the query for this....a "VIEW" would be appreciated.
    Thanks In Advance
    Srra

    You query should return all the columns in the select list once for each and every row that meets the specified join condition, how does this differ from what you are getting?
    So if tableA is the student table with only one row per student you would expect to see the student data duplicated once for every matching course row found in tableB, and so on when tableC is added in.
    If you need help please post partial results and then explain what results you want.
    HTH -- Mark D Powell --
    PS as sb mention you forgot your join condition to tableC which would multiply tableC by the other tables.
    Edited by: Mark D Powell on Feb 3, 2010 9:18 AM

  • View from multiple tables

    Hi,
    I would like to create a view from 4 different tables. How do I do it?.
    Say for example, I need user_id from table A which has the trans_id in table B and C. and I need to get a admin_id from table D and show these related fields in one single row . I'm trying to create a view to achieve this.
    Pls help.
    Thanks,
    Ananth

    Are you asking how to write the SQL, or just how to define the view (which I guess is pretty much the same thing)?

  • Creat View from Multiple tables , Multiple Select

    Hello  Everyone ,
    I have a question and am not sure if this the correct forum to post it .
    I have two table studentTable and CourseTable which is each student  take more than one course . 1:M
    for example Student1 take 2 courses (C1 ,  C2).
    Student2 take 3 courses (C1,C2, C3).
    I need to create a table/View that contain student information plus all the courses and the score for each  course in one row.
    for example
    Row1= Student1_Id ,C1_code ,C1_name  ,C1_Score ,C2_code,C2_name ,C2_Score
    Row2=
    Student2_Id,C1_code,  C1_name,C1_Score,C2_code ,C2_name ,C2_Score ,  C3_code,C3_name,C3_Score
    and since Student 1 just took two courses  , I  should enter NULL in 'Course 3 fields'
    My Struggle is in the insert  statement
    I tried the following but it show an error
    Insert Into  Newtable
    ( St_ID, C1_code,c1_name, C1_Score ,C2_code  ,C2_name,C2_score,C3_code ,C3_name,C3_score)
    Select
    (Select St_ID from  StudentTable)
    (Select C_code,c_name,c_Score
    from  Coursetable,SudentTable
    where course.Stid =Studet.stid)
    (Select  C_code,c_name,c_Score
    from course ,student
    where course.Stid =Studet.stid  ),
    (Select C_code,c_name,c_Score
    from course ,student
    where  course.Stid =Studet.stid );
    I'm fully aware that the New table will break  the rules of normalization ,but I need it in this way for specifc purpose.
    I tried  also the PIVOT BY functionality but no luck with it .
    FYI , I'm not  expert in using SQL Syntax , I just know the basic.
    I will be great full for  any helpfull suggestions to try ,
    thank you very  much.

    First Table is Member table which Represent
    Students Information
    .The fields in this table are
    member_sk (PrimaryKey), full_or_part_time, gender, age_at_entry, age_band_at_entry, disability, ethnicity,
    widening_participation_level, nationality
    Second Table is Modules table which include
    the Courses' scores that Student took .
    The fields in this table are
    Module_result_k(Primary Key), member_sk(Foreign key to connect to Member table), member_stage_sk
    ,module_k(Foreign key to connect to Module table), module_confirmed_grade_src, credit_or_result
    Third Table is
    AllModuleInfo which is include
    general information for each course .The fields in this table are
    Module_k (Primary key), module_name ,module_code, Module_credit, Module stage.
    The New table
    that I will create has the following fields
    member_sk (PrimaryKey), full_or_part_time, gender, age_at_entry, age_band_at_entry, disability, ethnicity,
    widening_participation_level, nationality 
    " This will be retrieved from Member table"
    Also will include
    Module 1_name ,module1_code, Module1_credit, Module1_ stage, member1_stage_sk
    , module1_confirmed_grade_src, credit1_or_result
    Module 2_name ,module2_code, Module2_credit, Module2_ stage, member2_stage_sk
    , module2_confirmed_grade_src, credit2_or_result
    I will repeat this fields 14 times which is equal to Maximum courses number 
    that any of the students took.
    //// I hope now my questions become more clear

  • Crate view from multiple tables in mysql

    does anybody know what the correct syntax is?
    I need to do the following:
    create view myView as select * from tOne, tTwo, tThree;this does not work in mysql. How this can be done?
    thanks

    You need to be using a version of MySQl that supports views, 5.0 or greater. This SQL will tell you which version you are using:
    SELECT version();The tables also need to exist prior to the creation of the view.
    Otherwise, that syntax should work...
    http://dev.mysql.com/doc/refman/5.0/en/create-view.html

  • Insert into multiple table view

    I have a view with multiple table query and and INSTEAD OF trigger on the view that inserts into multiple tables. When I attempt to do a commit out of a ADF Creation Form, I get the following error: ORA-01779: cannot modify a column which maps to a non key-preserved table ORA-06512: at line 1.
    Has anyone had success inserting into multiple tables via a view that has more than one table?
    Thanks,
    Lisa

    Lisa,
    Sounds like your instead-of trigger may not be being called and you are trying to insert directly into the view.
    I did write a [url http://stegemanoracle.wordpress.com/2006/03/15/using-updatable-views-with-adf/]blog entry about using a view with instead-of triggers last year.
    John

  • Create view from multiple days tables

    Hi,
    I'm having existing oracle db with daily stat data, tables strangely named data_mon, data_tue, data_wed.. For my batch processing I plan to use view with multiple day data, let say for last 5 days.
    Not sure how better implement my sql statement, with those _mon suffixes to make it more or less dynamic.
    I also never create View from multiple tables, so probably I can do something that will add fresh daily data and delete 5 days old data?
    Will appreciate you comments on details and whole concept. I have prev sql server experience.
    Thanks
    T

    user12943718 wrote:
    Hi,
    I'm having existing oracle db with daily stat data, tables strangely named data_mon, data_tue, data_wed.. For my batch processing I plan to use view with multiple day data, let say for last 5 days.
    Not sure how better implement my sql statement, with those _mon suffixes to make it more or less dynamic.
    I also never create View from multiple tables, so probably I can do something that will add fresh daily data and delete 5 days old data?
    Will appreciate you comments on details and whole concept. I have prev sql server experience.
    Thanks
    TChange the data model so you don't have 1 table for a day.
    You just have a DATA table, and a column to denote the day of applicability.
    Then you don't need a view, don't need anything dynamic, don't need to smash your head against a wall for a simple query ... etc.

  • Want to update data in a view based on multiple tables

    Hi
    I am facing a problem i want to update data in tables using a view. As that view is based on multiple tables so i am unable to update data. i came to know we can update table from view only if view is based on single table. so if anyone knows any alternative please let me know.
    Thanx
    Devinder

    Devinder,
    The table can be updated through a view based on multiple tables, if and only if the table is a "key preserved" table. Rather than explaining myself, i avoided the burden of typing by finding the material in Oracle Docs and pasting it for you :-)
    If you want a join view to be updatable, all of the following conditions must be
    true:
    1. The DML statement must affect only one table underlying the join.
    2. For an INSERT statement, the view must not be created WITH CHECK
    OPTION, and all columns into which values are inserted must come from a
    key-preserved table. A key-preserved table in one for which every primary
    key or unique key value in the base table is also unique in the join view.
    3. For an UPDATE statement, all columns updated must be extracted from a
    key-preserved table. If the view was created WITH CHECK OPTION, join
    columns and columns taken from tables that are referenced more than once
    in the view must be shielded from UPDATE.
    4. For a DELETE statement, the join can have one and only one key-preserved
    table. That table can appear more than once in the join, unless the view was
    created WITH CHECK OPTION.
    HTH
    Naveen

  • How do I reference multiple tables in SSAS Data Source View Named Calculation functionality?

    Hi SSASers - 
    On the Data Source View node of SSAS Visual Studio Interface, I want to create a named calculation that references multiple tables. Something like: CASE WHEN tableA.Column1 = 'Y' Then tableB.Column1 ELSE tableB.Column2 End, but the compiler throws an error
    here "Deferred prepare could not be completed". 
    What is the syntax for referencing multiple tables on this node or how else can multiple tables be used to create a calculated value in SSAS? I'm new to SSAS and so far have been building big views and building calculations this way. Another option is the
    Calculation tab off the cube node but this calculation will need to be based off of dimensions AND measures so please provide a syntax example here also. 
    Thanks in advance!
    Carl

    Thanks Jiri! The named query functionality off the Data Source View node is exactly what I was looking for - it's just a view on the SSAS side of things instead of the relational dbase.
    Sorry for the delayed answer verification - got pulled into something else last week. Carl 
    Carl

  • Create View table with multiple table

    I want to create View table with relation with multiple tables.
    for ex
    table 1
    mrnno
    mrnqty
    table 2
    mrnno
    issqty
    table 3
    mrnno
    retqty
    want to create view table where i can see the sum (mrnqty), sum(issqty),sum(retqty) group by mrnno
    sandy

    Hi
    CREATE OR REPLACE FORCE VIEW my_view AS
    WITH t1 AS
    (SELECT mrnno,
                      SUM(mrnqty) sum1
    FROM table_1
    GROUP BY mrnno),
    t2 AS
    (SELECT mrnno,
                      SUM(issqty) sum2
    FROM table_2
    GROUP BY mrnno),
    t3AS
    (SELECT mrnno,
                      SUM(retqty) sum3
    FROM table_3
    GROUP BY mrnno)
    SELECT mrnno,
                    sum1,
                   sum2,
                   sum3
    FROM t1,t2,t3
    WHERE t1.mrnno = t2.mrnno
    AND       t1.mrnno = t3.mrnnoCheers
    Ben
    http://www.munkyben.wordpress.com
    Don't forget to mark replies helpful or correct ;)

  • Create opaque view in OBIEE with multiple tables

    Hi,
    I need some help with the opaque view since i have never created it in past. I want to create an opaque view which fetches data from multiple tables. Is it possible to do that ? Or is there any other alternate option available in OBIEE ? I read the following blog and other similar blogs on opaque views but could not find option to use it for query with multiple tables:
    Oracle Business Intelligence: Creating Opaque View in Physical Layer in OBIEE 10g
    Also can you please advice how to join two tables from different databases in OBIEE ?
    Kindly advice.
    Regards,
    Andy

    Hi Andy,
    As per my knowledge you can create Opaque View on one table at a time.Joining two tables from different databases yes we can create a report from multiple data sources.Check this
    Rittman Mead Consulting &amp;raquo; Blog Archive &amp;raquo; Reporting Against Multiple Datasources in OBIEE
    Mark if helps.
    Thanks,

Maybe you are looking for

  • How to solve the monitor shuffle?  G4, G5, Cinema Display and 2 ViewSonics

    Here's a monitor puzzle I'm hoping to get some help with. I have two computers- a G4 and a G5. COMPUTERS G4- 1 VGA port, 1 ADC port - video card is ATI rage 128 pro. http://everymac.com/systems/apple/powermacg4/stats/powermac_g4450.html G5- 2 DVI por

  • Steps to upgrade WS-C6509-E with 720 supervisor

    Need steps to upgrade ios on WS-C6509-E  Dram size is 512 Mb current image is loaded on sup-bootflash: 65536000  Question: 1 step to load ios , do we need to update boot room image 2 difference between bootflash and sup-bootflash:

  • BP refernce number in outgoing payment's line detail

    Hi, When AP does an outgoing payment in SAP (Banking -> outgoing payment -> outgoing payment) on the line where we need to see which supplier invoices to pay and we need to see the vendor refernce number because all of our work revolves around the su

  • Oracle 8 pattern matching

    Hi all, I need to extract some data from a text field in an Oracle 8 database. I also need to do this within a stored procedure. The data in the text field is of variable length, and is unformatted, containing name value pairs and other items. Somewh

  • Join table to itself problem

    I have a problem with the query where I join a table to itself and the optimizer uses full table scan for this join. How I could optimize the query for better performance? SELECT aud.inv_id change_value_1, aud.inv_id change_value_2,audit_inventory_re