How to retrieve internaltable column wise data in rowwise

hi  all,
My question is Suppose I  have intenal table with 3 cols and 4 rows of data.Now i want to display table first col data as first row and so on...
input data :
eg: c1    c2     c3
r1 1     2       3
r2 4     5       6
r3 7     8       9
r4 10    11      12.
outputdata should be like this:
    1  4  7  10
    2  5  8  11
    3  6  9  12.
please help me out ,
Thanks in advance,
Santhosh.E

Santhosh,
If you want to have some flexibility for extending to multiple columns --
  WA_DATA-COLUMN1 = '1'.
  WA_DATA-COLUMN2 = 'a'.
  WA_DATA-COLUMN3 = 'x'.
  APPEND WA_DATA TO T_DATA.
  WA_DATA-COLUMN1 = '2'.
  WA_DATA-COLUMN2 = 'b'.
  WA_DATA-COLUMN3 = 'y'.
  APPEND WA_DATA TO T_DATA.
  WA_DATA-COLUMN1 = '3'.
  WA_DATA-COLUMN2 = 'c'.
  WA_DATA-COLUMN3 = 'z'.
  APPEND WA_DATA TO T_DATA.
  LOOP AT T_DATA INTO WA_DATA.
    WRITE :/ WA_DATA-COLUMN1, WA_DATA-COLUMN2, WA_DATA-COLUMN3.
  ENDLOOP.
  NEW-LINE.
  FIELD-SYMBOLS : <FS_ANY> TYPE ANY.
  DATA : COL_NO TYPE I VALUE 1.
  DATA : ROW_NO TYPE I VALUE 1.
  DATA : TOTAL_LINES TYPE I.
  DATA : TOTAL_ROWS TYPE I.
  DESCRIBE TABLE T_DATA LINES TOTAL_ROWS.
  WHILE SY-INDEX <= TOTAL_ROWS.
    DO.
      READ TABLE T_DATA INTO WA_DATA INDEX ROW_NO.
      IF SY-SUBRC = 0.
        ASSIGN COMPONENT COL_NO OF STRUCTURE WA_DATA TO <FS_ANY>.
        WRITE: <FS_ANY>.
      ELSE.
        EXIT.
      ENDIF.
      ROW_NO = ROW_NO + 1.
    ENDDO.
    COL_NO = COL_NO + 1.
    ROW_NO = 1.
    NEW-LINE.
  ENDWHILE.
Regards,
Ravi
Note : Please close the thread and mark the helpful answers
Message was edited by: Ravikumar Allampallam

Similar Messages

  • How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection

    How to retrieve the multiple rows data on PDF form in a web service method using WSDL DataConnection.
    I have a multiple rows on PDF form. All rows have 4 textfields. I want to submit the multiple rows data to a method defiened in webservice.
    Unable to retrieve the data in multiple rows within webservice method.

    Hi Paul,
    I'm now able to save the retrieved xml in a hidden text field and create dynamic table, and I'm able to fill this table from the XML, but the problem is that I could not find the correct way to loop on the xml, what I'm trying to say, the table will have number of rows with the data of the first row only, so can you tell me the right way to loop on the xml!
    this is my code
    TextField1.rawValue=xmlData.document.rawValue;
    xfa.datasets.data.loadXML(TextField1.rawValue, true, false);
    for(var i=0; i<count; i++)
    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Num").rawValue = xfa.datasets.data.record.num.value;
    xfa.form.resolveNode("form1.P1.Table1.Row1["+i+"].Name").rawValue = xfa.datasets.data.record.name.value;
    Table1.Row1.instanceManager.addInstance(true);
    Thanks
    Hussam

  • How to retrieve multiple columns using "returning" in the Insert query.

    hi,
    wanted to know how to retrieve multiple columns using "returning" in the Insert Query.
    For retrieving one column we write the query as follows:
    Insert into TABLE values(1,2,3,4) returning COLUMN1 into PARAMETER
    But can we retrive multiple columns in the same query?
    am using oracle 10g and coding in .NET

    Hi,
    You can definetely get multiple values from a single query using the 'returning' clause.
    Eg : insert into emp (empno, ename, job, deptno) values (7324,'ADAM','MARKETING',30) returning ename, deptno into var1, var2; PN : var1 & var2 to be declared as varchar2 & number respectively.
    More insight into the 'RETURNING' clause in this link.
    http://www.samoratech.com/PLSQL/swArtPLSQLReturn.htm
    Regards,
    Bhanu.

  • How to aggregate a column based date column (for weekly single row)?

    How to aggregate a column based date column (for weekly single row)?

    Hi,
    Consider the below statement for daily bases which is ok
    SELECT ID, DATE, SUM(AMOUNT) FROM TABLE_NAME GROUP BY ID, DATE ORDER BY ID, DATE
    The same like the above statement, I want output on weekly, fortnightly, and monthly bases, How to do this? Need your help...

  • How to retrieve start and end date values from sharepoint 2013

    Hi,
    How to retrieve start and end date values from new event form of calendar in SharePoint foundation2013
    Thanks
    Gowri Balaguru

    Hi Srini
    Yes i need to have parallel flow for both and in the cube where my reporting will be on monthly basis i need to read these 2 master data and get the required attributes ( considering last/first day of that month as per the requirement).......but i am just wondering this is common scenario....while there are so many threads written for populating 0employee from 0person......don't they have such requirement.....
    Thanks
    Tripple k

  • How 2 Change of column wise o/p  to row wise output in ABAP?

    Hi all,
    I am getting the output in column wise as normally but how can I get the ouput in row wise.in ABAP.
    its urgent. can any one help me how to change the output layout?
    thanks in advance,
    Sakthi.C

    if it is normal report  .then
    go through the write  statents  . one of that is below 
    Loop at itab .
    write  : itab  .
    endloop.
    if it is  ALV  then you have to  define an internal table which are the fieldds  you  want palce in the  Row .
    so  that  
    data  c type  i value    '1'.
    loop at  itab .
    fieldcatalog-fieldname   = itab-field.
    fieldcatalog-col_pos     = c.
    append fieldcatalog to fieldcatalog.
    clear  fieldcatalog
    c = c + 1.
    endloop.
    so that  the Col_pos  will be increased  and the  Column data will be moved into Row .
    reward  points if it is usefull...
    Girish

  • How to retrieve view column type?

    I know how to retrieve column names and comments from
    table all_col_comments.But I don't know retrieving view column type.If somebody know please help.

    ALL_TAB_COLUMNS
    ALL_TAB_COLUMNS describes the columns of the tables, views, and clusters accessible to the current user. To gather statistics for this view, use the SQL ANALYZE statement or the DBMS_STATS package.
    Related Views
    DBA_TAB_COLUMNS describes the columns of all tables, views, and clusters in the database.
    USER_TAB_COLUMNS describes the columns of the tables, views, and clusters owned by the current user. This view does not display the OWNER column.
    Column Datatype NULL Description
    OWNER
    VARCHAR2(30)
    NOT NULL
    Owner of the table, view, or cluster
    TABLE_NAME
    VARCHAR2(30)
    NOT NULL
    Name of the table, view, or cluster
    COLUMN_NAME
    VARCHAR2(30)
    NOT NULL
    Column name
    DATA_TYPE
    VARCHAR2(30)
    Datatype of the column
    DATA_TYPE_MOD
    VARCHAR2(3)
    Datatype modifier of the column
    DATA_TYPE_OWNER
    VARCHAR2(30)
    Owner of the datatype of the column
    DATA_LENGTH
    NUMBER
    NOT NULL
    Length of the column in bytes
    DATA_PRECISION
    NUMBER
    Decimal precision for NUMBER datatype; binary precision for FLOAT datatype, null for all other datatypes
    DATA_SCALE
    NUMBER
    Digits to right of decimal point in a number
    NULLABLE
    VARCHAR2(1)
    Specifies whether a column allows NULLs. Value is N if there is a NOT NULL constraint on the column or if the column is part of a PRIMARY KEY.
    COLUMN_ID
    NUMBER
    NOT NULL
    Sequence number of the column as created
    DEFAULT_LENGTH
    NUMBER
    Length of default value for the column
    DATA_DEFAULT
    LONG
    Default value for the column
    NUM_DISTINCT
    NUMBER
    These columns remain for backward compatibility with Oracle7. This information is now in the TAB_COL_STATISTICS views. This view now picks up these values from HIST_HEAD$ rather than COL$.
    LOW_VALUE
    RAW(32)
    HIGH_VALUE
    RAW(32)
    DENSITY
    NUMBER
    NUM_NULLS
    NUMBER
    Number of nulls in the column
    NUM_BUCKETS
    NUMBER
    The number of buckets in histogram for the column
    Note: The number of buckets in a histogram is specified in the SIZE parameter of the SQL statement ANALYZE. However, Oracle does not create a histogram with more buckets than the number of rows in the sample. Also, if the sample contains any values that are very repetitious, Oracle creates the specified number of buckets, but the value indicated by this column may be smaller because of an internal compression algorithm.
    LAST_ANALYZED
    DATE
    The date on which this column was most recently analyzed
    SAMPLE_SIZE
    The sample size used in analyzing this column
    CHARACTER_SET_NAME
    VARCHAR2(44)
    The name of the character set: CHAR_CS or NCHAR_CS
    CHAR_COL_DECL_LENGTH
    NUMBER
    The length
    GLOBAL_STATS
    VARCHAR2(3)
    For partitioned tables, indicates whether column statistics were collected for the table as a whole (YES) or were estimated from statistics on underlying partitions and subpartitions (NO).
    USER_STATS
    VARCHAR2(3)
    Were the statistics entered directly by the user?
    AVG_COL_LEN
    NUMBER
    Average length of the column (in bytes)
    CHAR_LENGTH
    NUMBER
    Displays the length of the column in characters. This value only applies to the following datatypes:
    CHAR
    VARCHAR2
    NCHAR
    NVARCHAR
    CHAR_USED
    VARCHAR2(1)
    B | C. B indicates that the column uses BYTE length semantics. C indicates that the column uses CHAR length semantics. NULL indicates the datatype is not any of the following:
    CHAR
    VARCHAR2
    NCHAR
    NVARCHAR2
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96536/ch2143.htm#1302694
    Joel P�rez

  • How to compare 2 columns with data like...

    Hi,
    I have to compare 2 columns from 2 different tables the columns contain data like
    SELECT CIRCLE FROM RATE_PLAN
    OUTPUT
    (AP,NAT)
    (AS,NAT)
    (BH,NAT).
    SELECT CIRCLE FROM subscriber_info
    (AP,NAT)
    (AS,NAT)
    (BH,NAT)
    but when i put a join on the tables on this column i get the ouput as -0 rows returned
    select col1,col2 from rate_plan,subscriber_info
    where
    rate_plan.CIRCLE=subscriber_info.CIRCLE
    HOW DO I COMPARE THE 2 COLUMNS SO THAT I GET MATCHING RECORDS??
    NOTE:-DATATYPE OF BOTH THE COLUMNS IS SAME.

    Hi,
    using SQL*Plus can you cut and paste the result of following commands :set tab off
    set trimout on
    set trimspool on
    desc rate_plan;
    SELECT '-'||CIRCLE||'-' c FROM RATE_PLAN ;
    desc subscriber_info;
    SELECT '-'||CIRCLE||'-' c FROM subscriber_info ;And be sure to use the tags {noformat}{noformat} before and after the pasted output.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to retrieve day between two dates?

    Hi all,
    Hope doing well,
    sir i am retrieving day between two dates in sql server like this.
    select datediff(day,'2012-10-03 00:00:00.000','2012-10-05 00:00:00.000')
    and getting result that is: 2
    but how this type of query i'll use in oracle?
    thanks,

    Just do minus
    diff := date_variable2-date_variable1;The difference sill be in days.
    If you want just the differences in days (Neglecting time part)
    diff := trunc(date2)-trunc(date1);

  • HT5624 I have an expired email account linked to icloud and don't know the password and can't reset the password due to not receiving emails anymore with the email account. Any ideas on how to retrieve the songs and data?

    I have an icloud account linked to an email address that is no longer in service.  I do not have the password for the account and am trying to retrieve the songs and data from the cloud to use on new apple device.  Any way to get a new password, able to open the expired account, without having that email account active?

    Hi there clarethasimmons,
    You may find the information in the article below helpful.
    Apple ID: Changing your Apple ID
    http://support.apple.com/kb/ht5621
    -Griff W.

  • How to retrieve GP process context data by GP API

    How can I retrivev the context data of GP process instance by using GP API, just like the funtionality in GP Monitor?

    Hi,
    Please check these links
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/01754e5ba20c4be10000000a11466f/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/bd/996642c4764454e10000000a1550b0/content.htm
    Thanks and Regards,
    Prabhakar Dharmala

  • How to retrieve 'long' column with 32K length in Java stored procedure

    For some reasons, we are not using CLOB, BLOB, or BFILE to store large objects and I have to live with LONG. So I wrote a Java stored procedure to insert, select and manipulate a LONG column by retrieving the LONG into a java.lang.String class (which happens to be the Java class mapped to the LONG SQL datatype). It all works fine as long as the length of the value being retrieved is less than the magic figure of 32767 bytes (which is the restriction on LONG and VARCHAR2 datatype in PL/SQL as well). So looks like Oracle's implementation of the JVM limits String values to a max of 32767 bytes. Suggestions on how to overcome this limitation (other classes that you suggest or do I have to move to files)?
    Thanks,
    Jeet
    null

    the jvm has nothing to do with it ...
    this is a pol/sql limitation on parameters in stored procedures.
    and java stored procedures require a clal spec that makes the j-s-p look like a pl/qsl stored proc.

  • How to retrieve/query composition association data

    Hi guys,
    I have requirement to query retrieve data from appointments Follow-Up table. What I see in UI designer Follow-Up data list is mapped to composition association
    By structure I see that actually it is BusinessTransactionDocumentReference association, but in Apportunity's TI there is no query or other visible configuration how these following records are filtred out.
    That why I have question - how can I access in my PDI coding to this FollowUp association so I could grab UUIDs and retrieve these appointments?
    Thanks,
    Uldis

    Hello Uldis,
    Composition associations are just a pointer from a parent node to a child node and vice versa (ref. documentation SDK1405 p.679). So accessing the data in the nodes should not be problematic.
    Perhaps with more information on your context's issue, somebody could help you.
    In which Business Object are you? A Custom one or a standard BO?
    What is the screen you are in for this Data List?
    Thanks,
    Regards,
    Jacques-Antoine

  • How to retrieve Xml column in a table using Oracle Answers

    Hi,
    I am using a table with column consisting of Xml file.
    I have to retrieve all the data's from the XML file in Oracle Answers and display it in a table format.
    Help me to resolve this issue.
    Thanks in advance.

    You could write a view over the table that has the XML column and use Oracle XML DB functions to extract and represent the data in a table format. You can then map this view in Oracle BI Administration.
    I think stuff like XML transformations and extraction etc. is no task for Oracle BI and is best left to the Oracle Database.
    Thanks,
    Nilanshu.

  • How to retrieve all my backup data after iphone 4 has been restored as new?

    did a factory restore on my iphone 4 today and set it up as a new phone in my itune, last time when i restored from backup, all my older data were synched to my phone... but now i'm clueless about how to get all that back, where are my data once the phone was set as new? ps. i'm not very tech savvy, please refrain from using terms i might not understand, lol...
    Message was edited by: cute0206

    This link provides the data that is included with your iPhone's backup.
    http://support.apple.com/kb/HT1766
    No iTunes content is included with your iPhone's backup - no music, movies, tv shows, and 3rd party apps. All iTunes content on your iPhone should be in your iTunes library on your computer.
    Although contacts are included with your iPhone's backup, contacts are designed to be synced with a supported address book application on your computer and should be available on your computer with or without an iPhone or any cell phone which can be lost or stolen.
    Photos transferred from your computer should remain on your computer.
    Photos and videos in the Camera Roll are also included with your iPhone's backup and can/should be imported by your computer as with any other digital camera. Any of the photos/videos imported from the Camera Roll that you want available on your iPhone can be transferred from your computer as with any other photos/videos. If you don't import from the Camera Roll and you don't restore your iPhone from your iPhone's backup, all previous Camera Roll items will not be restored.

Maybe you are looking for

  • Querying up AR Customer OA page in read-only mode for a Single Customer

    We are building a Custom Form in which associated Customer <defined in AR> would be queried up. Now we want to give an option to the User to view the complete details of the Customer. We would be giving a menu option in Tools 'View Customer' thru whi

  • How to hide the source code from the .class file

    Hi, By some jad tool we can recompile the .class files and get the java file corresponding to it. How to protect it? Anyone please help me.. Thanks & Regards, N.Ravasankar

  • No Configuration In Install base for procured Items

    No configuration is build in Install base for Configured Items procured thru PO. Problem Description: We created a PO for a Configured Item and received into an Org ( setup as serialized at receipt) for stocking purpose. The Entire Configuration is n

  • Multiple JPEGs Kills Ps CS5

    This is weird, and not just a little annoying...  I have over 3,000 .jpg files to edit from a recent cross-country trip. The files were originally shot in RAW format and edited in ACR6.x in CS5, and now I wish to crop/stitch/&c. in Photoshop.  Howeve

  • Regarding PO in XI

    Dear All , I have a scenario where I am sending PO IDOC from SAP to third party system using SAP XI . Here the requirement is like this : From one PO idoc multiple XML files should be sent to Third Party system from XI .Multiple files are required as