Odd/Even pages with data from two tables

Hi Forum,
Can you please extend help/suggest with the following scenario:
I have two data tables and one table records needs to be printed on odd pages (Front page) and the other table records need to be printed on even pages (Back page). I need alternating front and back pages based on data records in the tables. Also second table will be having lesser records when compared with first table.
I'm able to get the alternating Odd/Even master pages. But the first table is being printed in both the odd/even pages first and then the second table is being printed in both the odd/even pages. How can I restrict the printing of the first table on odd page and second table on even page?
Thanks for your help/suggestions.
~Madan

You can play with pagination tab in your LCD tab, but I have never learnt enough to be able to use it effectively.
If I were in your shoes, I would alter the DDIC structures in the backend so you will only display it in the form, without any suicidal actions through the pagination, scripting or similar stuff.
How: If you need to alter pages, you can do that in your backend, right?
Like you can have a structure page with attributes:
- up/ front: data for the front page
- down/back: data for the back page
and you will alter the data in the table with this structure as a line in your ABAP program and will use to form to display the trnaformated data only.
Well... I don´t tell it is clear/right/ proper solution and cannot tell if there are any obstacles which will not let you use this scenario in your case, but you could consider this as an option...
Regards Otto

Similar Messages

  • Cartesian of data from two tables with no matching columns

    Hello,
    I was wondering – what’s the best way to create a Cartesian of data from two tables with no matching columns in such a way, so that there will be only a single SQL query generated?
    I am thinking about something like:
    for $COUNTRY in ns0: COUNTRY ()
    for $PROD in ns1:PROD()
    return <Results>
         <COUNTRY> {fn:data($COUNTRY/COUNTRY_NAME)} </COUNTRY>
         <PROD> {fn:data($PROD/PROD_NAME)} </PROD>
    </Results>
    And the expected result is combination of all COUNTRY_NAMEs with all PROD_NAMEs.
    What I’ve noticed when checking query plan is that DSP will execute two queries to have the results – one for COUNTRY_NAME and another one for PROD_NAME. Which in general results in not the best performance ;-)
    What I’ve noticed also is that when I add something like:
    where COUNTRY_NAME != PROD_NAME
    everything is ok and there is only one query created (it's red in the Query plan, but still it's ok from my pov). Still it looks to me more like a workaround, not a real best approach. I may be wrong though...
    So the question is – what’s the suggested approach for such queries?
    Thanks,
    Leszek
    Edited by xnts at 11/19/2007 10:54 AM

    Which in general results in not the best performanceI disagree. Only for two tables with very few rows, would a single sql statement give better performance.
    Suppose there are 10,000 rows in each table - the cross-product will result in 100 million rows. Sounds like a bad idea. For this reason, DSP will not push a cross-product to a database. It will get the rows from each table in separate sql statements (retrieving only 20,000 rows) and then produce the cross-product itself.
    If you want to execute sql with cross-products, you can create a sql-statement based dataservice. I recommend against doing so.

  • To Select the data from two table one is transp table and onther is cluster

    Hi All,
    I want to select the data from two tables
    Here i am giving with an example.
    Fileds: kunnr belnr from bseg.  table bseg
    fields: adrnr from kna1     table: kna1.
    Know i want to put these into one internal table based on kunnr and belnr.
    Thanks in advance.
    Ramesh

    Hi,
       U cant use joins on cluster table and BSEG is a cluster table so use FOR  ALL ENTRIES for taht
    refer this code
    *&      Form  sub_read_bsak
          text
    -->  p1        text
    <--  p2        text
    FORM sub_read_bsak.
    *--Select data from BSAK Table
      SELECT lifnr
             augdt
             augbl
             gjahr
             belnr
             xblnr
             blart
             dmbtr
             mwskz
             mwsts
             sgtxt
             FROM bsak
             INTO CORRESPONDING FIELDS OF TABLE it_bsak
             WHERE belnr IN s_belnr
             AND   augdt IN s_augdt.
      IF sy-subrc EQ 0.
    *--Sort table by accounting document and vendor number
        SORT it_bsak BY belnr lifnr.
      ENDIF.
    ENDFORM.                    " sub_read_bsak
    *&      Form  sub_read_bseg
          text
    -->  p1        text
    <--  p2        text
    FORM sub_read_bseg.
      IF NOT it_bsak[] IS INITIAL.
    *--Select data from BSEG table
        SELECT belnr
               gjahr
               shkzg
               kostl
               hkont
               ebeln
               ebelp
               FROM bseg
               INTO CORRESPONDING FIELDS OF TABLE it_bseg
               FOR ALL ENTRIES IN it_bsak
               WHERE belnr EQ it_bsak-belnr
               AND   gjahr EQ it_bsak-gjahr
               AND   shkzg EQ 'S'.
        IF sy-subrc EQ 0.
    *--Sort table by accounting document
          SORT it_bseg BY belnr.
        ENDIF.
      ENDIF.
    ENDFORM.                    " sub_read_bseg

  • Select data from two tables...!

    HI Experts...!
    i m a beginner user and i want to select data from two tables proj and prps.....using joins.....and internal tables i have written a code...
    SELECT prps~pspnr
           prps~objnr
           prps~psphi
           proj~ernam
           proj~erdat
           proj~pspnr
    INTO  table itab   -
    itab is internal table
    FROM prps inner join proj
    WHERE pspnr in p_no and prpspsphi = projpspnr.
    but there is error in from clause ..please help me....
    Advance thanx....

    Hi,
    check the sample code bellow above two reply will solve out your problem but one more extra line in your code pointed out bellow.
    TABLES: prps, proj.
    TYPES:  BEGIN OF ty_test,
            pspnr LIKE prps-pspnr,
            objnr LIKE prps-objnr,
            psphi LIKE prps-psphi,
            ernam LIKE proj-ernam,
            erdat LIKE proj-erdat,
            END OF ty_test.
    DATA: itab TYPE STANDARD TABLE OF ty_test WITH HEADER LINE.
    SELECT-OPTIONS: p_no FOR prps-pspnr.
    SELECT  prps~pspnr
            prps~objnr
            prps~psphi
            proj~ernam
            proj~erdat
    *        proj~pspnr " No need for this you have selected this in
    *     the first line because it is commone so you only need to select from any one
            INTO TABLE itab
    FROM prps INNER JOIN proj ON ( prps~pspnr = proj~pspnr  )
    WHERE prps~pspnr IN p_no.
    Best Regards,
    Faisal
    Edited by: Rob Burbank on Dec 24, 2009 12:24 PM

  • Work with data from a table of another SAP R/3 system

    Hi,
    I want to work with data from a table of another system. I know there's a function called 'RFC_READ_TABLE' but I don't know really how it works. What I want to do is to get data from that system and pass it to the one where I'm working in order I can continue working with this data in the report.
    Besides, I'd like to select only the records that have some conditions.
    I'd appreciate if someone could tell how to do it, whether with FM 'RFC_READ_TABLE' or in another way.
    Thanks in advance,
    Gerard
    P.S: The systems are already connected in SM59

    Yes, you can use RFC_read_table .You can pass the number of columns but I recommend you to  bring all results in your internal table after that you can filter the records. Most of the time I have notice when you make RFC call with this FM to another system it works but it may also happen that other system controlling authorization and then it might give you nothing. As I face this problem on my last Project.
    Hope this’ll give you idea!!
    <b>P.S award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • Creating a external content type for Read and Update data from two tables in sqlserver using sharepoint designer

    Hi
    how to create a external content type for  Read and Update data from two tables in  sqlserver using sharepoint designer 2010
    i created a bcs service using centraladministration site
    i have two tables in sqlserver
    1)Employee
    -empno
    -firstname
    -lastname
    2)EmpDepartment
    -empno
    -deptno
    -location
    i want to just create a list to display employee details from two tables
    empid firstname deptno location
    and same time update  in two tables
    adil

    When I try to create an external content type based on a view (AdventureWorks2012.vSalesPerson) - I can display the data in an external list.  When I attempt to edit it, I get an error:
    External List fails when attached to a SQL view        
    Sorry, something went wrong
    Failed to update a list item for this external list based on the Entity (External Content Type) 'SalesForce' in EntityNamespace 'http://xxxxxxxx'. Details: The query against the database caused an error.
    I can edit the view in SQL Manager, so it seems strange that it fails.
    Any advice would be greatly GREATLY appreciated. 
    Thanks,
    Randy

  • Retrive data from two tables into one internal table.

    Hi SDN,
    I am downloading the Assets data from two tables ANLA,ANLZ.
    there is a common field ANL1in both tables and i have to retrive the data by using anl1 into the internal table.
    can you please send me the SELECT Syntax for this probl.....
    Thank you & Regards,
    Manoj

    Hi manoj,
    Please see the following sample code. But kindly don't use join as it may hamper ur performance. No trouble in using two select query.
    data: begin of itab occurs 0,
            BUKRS like anla-BUKRS,
            ANLN1 like anla-ANLN1,
           BDATU like anlz-BDATU,
            end of itab.
    select anlabukrs anlaANLN1 anlzBDATU  into corresponding fields of table itab from anla inner join anlz on anlaanl1 eq anlz~anl1 where (logexp).
    Please come back for any clarification.
    Thanks and Regards,
    saurabh

  • Selecting data from two tables

    I am trying to select data from two tables.  The only problem that I am running into, is that i am only seeing results from my 'uploads' table.  there is also a record in documents where user = 1 that should show up.  here is my sql:
    $userIDNum = 1;
    $sql="Select *
    from uploads, documents
    WHERE uploads.user = documents.user AND uploads.user = $userIDNum
    ORDER BY uploads.title ASC, documents.title ASC";

    You'll need to explain a little more about your data and what you are trying to accomplish. Your current sql will select all columns from both the uploads and documents tables but only rows where the user id in both tables match, AND the user id equals 1. Is that not what you are seeing? Where's the code that outputs the results?

  • Fetch the data from two tables

    hell all
    i want to fetch the data from two tables, one is from internal table and another one is data base table. what syntax i have to use either FOR ALL ENTRIES or INNER JOIN?

    hi
    Use FOR ALL ENTRIES.
    see the sample code
      select * into table tvbrk from vbrk
                                where fkart in ('F2', 'F3', 'RE',
                                           'ZVEC' , 'ZVEM' , 'ZVED',
                                           'S1')
                                and erdat in so_erdat
                                and kunag in s_kunag. 
                                      erdat in so_erdat
                               and   fkart in ('F2', 'F3', 'RE',
                                                 'ZVEC' , 'ZVEM').
    if not tvbrk is initial.
        select * into table t_zregion from zregion
                      for all entries in tvbrk
                       where country = tvbrk-land1
                       and   region = s_regio.
      endif.
    thanks
    sitaram

  • Populate ADF Rich Table taking data from two tables of database

    Hi,
    Can anyone please guide me as to how I can populate ADF Rich Table taking data from two tables A and B of a database.
    The condition is
    I want to fetch row 1 from table A and populate into ADF Rich Table at row 1
    then
    I want to fetch row 1 from table B and populate into ADF Rich Table at row 2
    and so on....
    Many thanks for your help..
    Regards,
    Rohit

    The better place where you will learn:
    http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcquerying.htm

  • Drop Down list in table with data from database table

    Hi,
    I have created an interactive form in WD ABAP.
    In Context tab I have created the nodes as follows:
    ZSOHEADER node with cardinality 1..1
    |-> MATERIAL node with cardinality 0..n. Under MATERIAL node there are 2 attrib. MAKTX and MATNR.
    I am fetching data from MARA table into an internal table IT_MARA.
    The node MATERIAL is bound to internal table IT_MARA.
    I have created a table with property ' Body rows vary depending on data ' .
    I have only one row in table. The first cell of the row is a drop down field.
    I have bind the field to the node MATERIAL->DATA->MAKTX.
    Now the issue is even though I have created only one row in my table, in preview it is creating as many rows in the table as the no.of records in the internal table.
    I want only one row with the drop down list containing all values of the internal table.
    Kindly suggest what to do.
    Regards,
    Vinod

    Hi,
    In the WebDynpro Context, in the main node create another node like A1 with cardinality 0..n and in this node create attributes TEXT and VALUE.
    Now goto method and in that method using code wizard read the node A1.
    And use the below code snippet sample in your program, i.e. code this under respective method of the webdynpro.
    *Declare the TYPES
    TYPES : BEGIN OF TY_TABLE,
    TEXT TYPE SOMETYPE,
    VALUE TYPE SOMETYPE,
    END OF TY_UOM.
    *Define Internal Table and work area.
    DATA : IT_TABLE TYPE STANDARD TABLE OF TY_TABLE INITIAL SIZE 0,
    WA_TABLE TYPE TY_TABLE.
    SELECT TEXT VALUE FROM TABLENAME INTO TABLE IT_TABLE.
    lr_node_info->bind_table( IT_TABLE ).
    And in the Adobe Form Layout
    Go to Menu of the Adobe LiveCycle Designer:
    Tools>Options..>DataBinding
    In that window you just check the Show Dynamic properties Check Box.
    Now for the Drop Down go the binding tab in object palette and click on the list items and there specify the Internal Table and specify the text as the internal table text field and value as internal table value field.
    OR
    From the WebDynpro Native Library Palette use the Value Help Drop Down and in object pallette goto binding tab and provide the form interface binding. Before this in the WebDynpro goto Context and for the particular field under the properties provide the search help as dictionary search help and specify the name of the dictionary search help.
    OR
    We have another method of setting the Text and Value to the DDL directly in the WebDynpro by coding in the methods, I dont have much knowledge on this.
    Regards
    Pradeep Goli

  • Extracting cost center data from two tables

    Hi Everyone,
    I'm trying to extract cost center data from two different tables in SAP and pull it into one InfoObject.  I'm using 0costcenter and it's already extracting data from one of the tables I need.  Could someone explain how to add the second table? Thank you.

    You can create a Generic Extractor , Create a view on 2 tables with proper join condition n use this to load 0COSTCENTER.

  • Question about retrieving data from two tables

    Hi everyone.
    I've been working on this and was wondering what the correct way of handling this would be.
    I have two tables, a Billing Table that contains invoices and related information, and a Payments Table that contains payments and related information to that.
    Both tables contain a Date Column for the date that the Invoice was generated or the Payment was made.
    I want to get a list of all Invoices and the respective payments if the invoice was generated between two dates OR the payment was made between these two dates.
    I can get a list of the invoices and their payments if the invoice was generated between those dates.  I can get a list of the payments if they were made between those dates.  But I can't seem to figure out how to do both.
    How do I Join two tables and have it return the data from both tables if either meets the required Date Period?
    Here is the SQL that I have so far.  This SQL returns all of the Invoices and Payments IF the Invoice was generated between these two dates (Or updated). 
    SELECT Billing.ID AS [BID], Billing.AttachmentName, Billing.BillingType, Billing.Invoice, Billing.Description, Billing.Amount, Billing.DateCreated AS [BillingDate],
    Payments.ID AS [PID], Payments.Type AS PaymentType, Payments.Payment, Payments.PaymentNote, Payments.Reason AS [BillReason], Payments.DateCreated AS [PaymentDate],
    Customers.ID AS [CID], COALESCE(NULLIF(Customers.Company,'') + ' - ','') + Customers.LName + ', ' + Customers.FName AS [Name],
    Jobs.ID AS [JID], Jobs.JobType, Jobs.JobStatus, Jobs.JobStatusDate
    FROM Billing LEFT OUTER JOIN Payments ON Payments.BillingID = Billing.ID
    RIGHT OUTER JOIN Customers ON Customers.ID = Billing.CustomerID
    RIGHT OUTER JOIN Jobs ON Jobs.ID = Billing.JobID
    WHERE
    Billing.BillingType = 'Invoice' AND Billing.PaidInFull = 'No' AND Billing.Collections = 'No' AND Billing.ChargeOff = 'No' AND Billing.Lien = 'No' AND Billing.InvoiceCanceled = 'No'
    AND (Billing.DateCreated >= '1/1/2014' AND Billing.DateCreated <= '8/13/14') OR (Billing.DateUpdated >= '1/1/14' AND Billing.DateUpdated <= '8/13/14')
    ORDER BY Name Asc, Billing.Invoice, PID
    Thanks for your help, I really appreciate it.
    -Matt-

    I don't quite follow your query, but your description leads me to think that you need the set of Billing IDs for bills that were created as defined or that have payments that were created as defined.  From that set of IDs you then simply want all Bills
    and their associated payments.  So how do you get that set of IDS?  One way is the union operator: 
    with allbill (billID) as (
    select ID from dbo.Billings where DateCreated between ...
    union 
    select BillingID from dbo.Payments where DateCreated between ... )
    select ...
    from allbill inner join dbo.Billings as bill on allbill.billID = bill.ID inner join dbo.Payments as pay 
    on bill.ID = pay.BillingID 
    order by ... ;
    Your description leads me to believe that you query is much more complicated, but the basic idea is the union in the CTE - generate one combined set of bill IDs that identify all your bills of interest.  Note that I assumed that a payment cannot exist
    with an associated billing.  

  • SSAS Tabular - Merge data from two tables to one

    Hi,
    I have two ReportServer databases in two different instances of SQL Server. I want to extract the ExecutionLog3 data to a Tabular model. Now, I have two separate tables in Tabular with duplicated measures but I want to have the data from two ReportServer in
    the same table.
    Any idea?
    Regards.

    Hi Numero4,
    According to your description, there are two Reporting Services databases, and you want to merge the data in a tabular model, right? 
    As per my understanding, you can create a link server on one of the server, and then merge the data in database lever other than in tabular mode. In this case, import the merged data into the tabular model. Here are some useful links for you reference.
    http://msdn.microsoft.com/en-IN/library/ff772782.aspx
    http://support.flexquarters.com/esupport/index.php?/Default/Knowledgebase/Article/View/2458/52/how-to-create-link-server-with-ms-sql-200520082012-64-bit-using-qodbcqremote
    Regards,
    Charlie Liao
    TechNet Community Support

  • Data from two tables in the same row in XML transformation

    Hi,
        I am using XML transformation for generating excel file which is to besent as email attachment.
        Here  I want to display the data from two internal tables in the same row in the excel. .I am using   <tt:loop ref=".<table name>"> ...  </tt:loop> for looping through the table. Can I loop two table simultaneously ? In that case how will I specify the fields in each table . Some of the fields in two tables are of same name and type.
    Please help...
    Thanks,
    Jissa

    Hello Brian,
    Thank you for your answer. It is approach I will use, I think. However let me ask: Would it be possible to have a Version in this layout, too? I mean to see, which value comes from Version A and which comes from Version B? Something like this:
    Calendar Month Version Sales Amount
    2011.01  B  200
    2011.02  B  300
    2011.03  A  260
    2011.04  A  230
    2011.05  A  200
    A

Maybe you are looking for

  • Install latest Flash Player

    Trying to install latest Flash Player...get 50% thru and tells me to close browser   do that and retry and get same msg HAve Explorer 9  and Windows 64 bit PC

  • Procedure one condition is not working

    Hi I need to implement a stored procedure. I have some conditions where I implemented in my procedure. Please help me..!! My table : person_master create table PERSON_MASTER   WEB_LOGIN        VARCHAR2(50),   WEB_PASSWORD     VARCHAR2(40),   PWD_EXP_

  • Website Login Needed to Download Photos? Stop! Make it seamless!

    OK, I understand why Microsoft wanted to end point-to-point transfers, and push our photo exchanges into the cloud.  I think it was kinda arrogant to just to do it, without giving users the option, but so be it. So now, when we upload photos, they fi

  • Does Unlocked iPhone 4S Have Full Functionality ?

    If I purchase anFactory Unlocked iPhone 4S, will it have full functionality (i.e. Siri, iTunes, FaceTime, Apps) even if I do not activate it with a cell carrier?

  • How to identify Site Owner in Sharepoint 2010 ?

     I have a site, but i have a confusion about how to identify Site Owner. I know Site Collection Administrator, but i dont understand how to identify SIte Owner.