Want to combine  the data different coloumn of table into single coloumn.

HI All ,
Requirement : I want to create an application which will display  diffrent coloumn(data) of a table into single coloumn  in web-dynpro abap .
For ex:
Table : employee
coloumn : PERSON , PAYMENT , STATUS ,  SUBMISSION .
RETURN  = PAYMENT + STATUS + SUBMISSION
(return coloumn will contain the data of other coloumn )
Thanks in advance .
Rahul

In your context, create a node 'Employee'. It should have the attributes person, payment, status, submission, return. Let return be of type string. I assume you have a ztable or some ddic structure employee, which does not have the return field.
You code will be on these lines - change it to your requirements anyway. Place the code in a method depending on your requirement of when the data should be displayed.
data: node_emp type ref to if_wd_context_node,
        itab_emp type table of employee,
        wa_emp  type employee,
        itab_node_emp type if_main=>elements_employee,
        wa_node_emp type if_main=>element_employee.
node_emp = wd_context->get_child_node( name = 'EMPLOYEE' ).
<i>* Get data from your API here into itab_emp *</i>
loop at itab_emp into wa_emp.
  move-corresponding wa_emp to wa_node_emp.
  concatenate wa_emp-payment wa_emp-status wa_emp-submission separated by space into wa_node_emp-return.
  append wa_node_emp to itab_node_emp.
endloop.
node_emp->bind_elements( itab_node_emp ).
Here, before the loop, you need to fetch the data into itab_emp using your APIs. Since you have said you want to display the data of multiple columns as is, I have just concatenated them.
In your view layout, have a table and bind the data source to be the context node Employee.
<b>The data types of itab_node_emp, wa_node_emp will differ based on your view name and node name. Use the code wizard to generate your code according to your design time.</b>
Hope this helps.
Regards,
Nithya

Similar Messages

  • Data Federator:  Unioning Multiple Tables into single view possible?

    Hi,
    I have three different databases with tables containing a portion of the same kind of data and I want to union the three different tables together in Data Federator to present a single logical view that has the complete set of data.  Is this possible in Data Federator?  How would I go about doing that?
    Note: I do not have keys to join the tables together on since it's not simply extending the data in one table with additional data in another table and doing an inner join on a unique key.  Instead, for example, there's a customer table for Finance, a customer table for Operations and a customer table for Sales and they all contain the same columns (with maybe slightly different names) and same type of data.  I want to effectively union Finance, Operations and Sales together in a federated/virtualized view so applications can just query from that view to get all the customers from the three different databases.
    I have been unable to do this so far since Data Federator requires each table in a mapping to have a relationship with the other tables in the mapping.
    Thanks for the help.
    Kerby

    I figured out the original question using one mapping for each table but have a new question now. 
    Is it possible for an application to use the combined view from Data Federator to write back into the databases?
    e.g. have an application use the target table in Data Federator and view the results, and based on that update the data in the underlying database that provides the data for the target table?
    Thanks for the help.
    Kerby

  • How I load all the data in a database table into a cache?

    Hi
    Lets assume I have a lookup table I want to load it upfront into the cache so that the application can use this data from cache. One way is to write code to create a map from the database and call putALL. Is there any better approach to this?
    Another thing is if the data is more than 1 GB and if I construct a map of one GB before putting it into the cache the JVM might crash. The question is how do I distribute upront loading of the cache to multiple JVMs. Do I have to use invocation service or is there any thing out of box.

    I only use one JVMs and I use a distributed cache, the configuration XML file like this:
    <p> <distributed-scheme>
    <scheme-name>default-distributed</scheme-name>
    <service-name>DistributedCachestore</service-name>
    <backing-map-scheme>
    <read-write-backing-map-scheme>
    <scheme-ref>example-read-write</scheme-ref>
    </read-write-backing-map-scheme>
    </backing-map-scheme>
         <listener-scheme> </listener-scheme> 
         <autostart>true</autostart>
    </distributed-scheme>
    <read-write-backing-map-scheme>
    <scheme-name>example-read-write</scheme-name>
    <internal-cache-scheme>
    <local-scheme>
    <scheme-ref>default-eviction</scheme-ref>
    <high-units>50050</high-units>
    <low-units>40000</low-units>
    <expiry-delay>3600</expiry-delay> 
    </local-scheme>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <scheme-ref>example-cachestore</scheme-ref>
    </class-scheme>
    </cachestore-scheme>
    <read-only>false</read-only>
    <write-delay-seconds>0</write-delay-seconds>
    </read-write-backing-map-scheme>
    <!-- 
    CacheStore test definition 
    -->
    <class-scheme>
    <scheme-name>example-cachestore</scheme-name>
    <class-name>com.tangosol.examples.coherence.DBCrudStore</class-name>
    <init-params>
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>cachec</param-value>
    </init-param>
    </init-params>
    </class-scheme></p>
    The data in my table will reach about 1000000+ and I want to load about 50000 into cache.
    Thanks.

  • Moving the data from multiple internal tables into a single one

    Hello everyone,
    I am creating a classical report which uses the following tables.
    tables : ekko, ekpo, mara, makt,lfa1.
    my input parameter is 
    Select-options Purchase Order number
    Following fields are getting used.
    Doc no                  EKKO-EBELN
    Material              EKPO-MATNR
    Item number          EKPO-EBELP
    Quantity             EKPO-MENGE
    Material Group          MARA-MATKL
    Vendor                  EKKO-LIFNR
    Old Material code   MARA-BISMT
    Material Desc.           MAKT-MAKTX
    Vendor name         LFA1-NAME1
    Now i need to do the following task.
    1 Select record from EKKO Using document number.
    2 Select record from EKPO using EKKO record using Document no as key.
    3 Find out Old Material code of each and every material from Material master.
    4 Find out Material description for each and every material from MAKT.
    5 Sort record on Vendor, Purchase Order number and Material.
    I have defined seperate internal tables for these operation.
    Once i have fetched records into these individual internal tables  from the corresponding DB tables i need to move these values into a new internal tables which has all the above fields mentioned
    I need to move these values into a new internal table because to display the values on the report.
    Any idea for the above ? Plz help with a sample example or some relevant.
    Regards,
    Ranjith Nambiar

    Hi
    1 Select record from EKKO Using document number.
    2 Select record from EKPO using EKKO record using Document no as key.
    Use inner join and retrive data into one internal table.for Ex ITAB1
    3 Find out Old Material code of each and every material from Material master.
    Use ITAB1 with for allentries in MARA table to get the onl materil number populate in to one table.
    4 Find out Material description for each and every material from MAKT.
    Get the Material desc with the same manner as above,
    5 Sort record on Vendor, Purchase Order number and Material.
    now sort the ITAB1 as you req.
    now Loop on the ITAB1.
    and read above 2 tables for old matnr and matner deac and append into another table as you want.
    Hope this will help.
    Regards,
    Hiren Patel

  • Can we get the data from two internal tables in ALV.

    hi friends i would like to display the data using two internal tables using alv grid.please guide me.

    Hi,
    ALV would be having a specific layout say :
    MATNR
    MAKTX
    QTY
    Now, if you have two internal tables, then do they have a different structure. If they have different structures, then what kind of ALV layout you expect. The ALV output should be as per the structure of 1st or 2nd internal table.
    If both internal table have same layout, then populate the data from 2nd internal table into 1st internal table and pass the 1st internal table ( it will have data of both internal tables) to ALV.
    Best regards,
    Prashant

  • When insert my lexar USB flash drive I get the message that the disk was not readable by this computer.  It has worked previous to this and I do not want to lose the data by reformatting the drive.  How can I reformat this drive and not lose my data?

    When insert my lexar USB flash drive I get the message that the disk was not readable by this computer.  It has worked previous to this and I do not want to lose the data by reformatting the drive.  How can I reformat this drive and not lose my data?

    You can't reformat it and not wipe everything on it.
    Have you tried a different USB port?
    Only other option, back it up on a different computer.

  • How do I take two separate non numeric fields in a acrobat form and combine the data to display in a third separate field?

    How do I take two separate non numeric fields in a acrobat form and combine the data to display in a third separate field?

    You have to use custom JavScripting to concatenate the first 2 fields. You cannot use the first 2 calculation options because they force the values of the fields to a numeric value or ignore string values.
    Possible scripts for the 3rd field are:
    event.value = this.getField("Text1").valueAsString + " " + this.getField("Text2").valueAsString;
    or
    event.value = this.getField("Text1").valueAsString.concat( " ",  this.getField("Text2").valueAsString);
    If you do not want change the separator or not show the separator when on or the other field is empty, you will need to add more code to adjust for change.
    The above scripts will also concatenate number because the field values are read as strings and not numbers.
    There is also a generalized user written function to concatenate up to 3 fields with a separator that adjust for missing data.

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • HT1382 how can I restore my back up files from my laptop? i want to see the dates and time that I backed up  my files. is it posssible?

    how can I restore my back up files from my laptop? i want to see the dates and time that I backed up  my files. is it posssible?

    What backed up files?
    Available backups for an iOS device can be found in Edit > Preferences > Devices.

  • I want to use the SQL Toolkit of NI and SQL Server as my databasis on a server. Do I need to install a client in each computer I want to handle the data into SQL tables or I need only a ODBC driver?

    I want to use the SQL Toolkit of NI and SQL Server as my databasis on a server. Do I need to install a client in each computer I want to handle the data into SQL tables or I need only a ODBC driver?

    You only need the ODBC driver on each computer. If you are distributing the SQL Toolkit app as an executable and do not install the whole toolkit on each computer, you'll need the SQL Toolkit support files. This is about a dozen files. You can get the list at http://digital.ni.com/public.nsf/websearch/b814be005f9da9258625658700550c75?OpenDocument.

  • I want to get the data of a table inside the Form but it is not passed

    I want to get the data of a table inside the Form but it is not passed to the form by tables parameters.
    How can I do this.
    Regards

    If there is a problem with defining it globaly, you can define a field symbol globably and point to it. For example.  It would probably be better to define your table globably.
    report zrich_0003 .
    field-symbols: <imarc> type marc_upl_tt.
    start-of-selection.
      perform get_data.
    *       FORM get_data                                                 *
    form get_data.
      data: imarc type table of marc with header line.
      select * from marc into table imarc up to 10 rows.
      assign imarc[] to <imarc>.
      perform write_data.
    endform.
    *       FORM write_data                                               *
    form write_data.
      data: xmarc type marc.
      loop at <imarc> into xmarc.
        write: / xmarc-matnr, xmarc-werks.
      endloop.
    endform.
    Regards,
    Rich Heilman

  • I want to load the data afterbeing data loaded

    after the data is being loaded into the cube,i want to load the data for the particular
    infoobject(e.g.0equipment),is it possible,how ?

    hi
    this is srinivas.thanx for giving me the helpful answer.
    bye..bye

  • I want to display the 3 different counts in one table

    Hi,
    I have three different counts , now I want to display the 3 counts in one table. Is it possible,
    For example :
    1. Select count(*) from table1 ;
    Ans : 10
    2. Select count(*) from table2;
    Ans : 20
    3. Select count(*) from table3;
    Ans : 30
    Now I want to display like this
    A 10
    B 20
    C 30
    Thanks

    Nihar,
    You can write a pl/sql block to achieve this
    CREATE TABLE new_table (table_name VARCHAR2 (30), COUNT     NUMBER);
    DECLARE
       CURSOR mcur
       IS
          SELECT   table_name
            FROM   user_tables
           WHERE   table_name IN ('A', 'B', 'C');
       v_sql   VARCHAR2 (100);
       v_count number;
    BEGIN
       FOR x IN mcur
       LOOP
          v_sql := 'select count(*) from ' || x.table_name;
          EXECUTE IMMEDIATE v_sql INTO   v_count;
          INSERT INTO new_table
            VALUES   (x.table_name, v_count);
       END LOOP;
       COMMIT;
    END;
    select * from new_table;Regards

  • Want to find the Data type of a variable at runtime ?

    Hi,
    I Want to find the Data type of a variable at runtime ?
    I think there is a function module... But i forgot ..... Can you please help me out.
    Points are rewarded immediately.

    hi,
    do this way
    REPORT ysantest LINE-SIZE 350.
    DATA : v_num TYPE n,
    v_type(2).
    DESCRIBE FIELD v_num TYPE v_type.
    WRITE : v_type.

  • I have data in Notepad,i want to upload the data to FB01 through the FM POS

    i have data in ITAB,i want to Transfer  the data to FB01 through the FM  POSTING_INTERFACE_DOCUMENT,How we pass the header data and Line item data.Can anyone suggest.

    Yes, first read the documentation of the following function modules
    - POSTING_INTERFACE_START
    - POSTING_INTERFACE_DOCUMENT
    - POSTING_INTERFACE_END
    important field is ftpost-stype with K for header fields and P for item fields
    You can easily find some samples via [sdn search|http://forums.sdn.sap.com/search.jspa?threadID=&q=POSTING_INTERFACE_DOCUMENT&objID=&dateRange=all&numResults=30&rankBy=10001] or google like [ABAP Custom Program into Batch Input Session.|http://www.sapfans.com/forums/viewtopic.php?f=13&t=25465#p75639]
    Regards,
    Raymond

Maybe you are looking for

  • How much will a macbook bottom case be from Apple?

    Hi THERE, How much will a replacement bottom case be from Apple because I have ordered a relacment one and only about 5% of it on one corner is coming off, and I dont think that was from the heat, so how much will Apple charge me? P.S Do you think ap

  • R12 AP Invoice Validation Issues

    Has anyone gone live on R12.0.0 and not had issues with invoice validation?

  • Configuring fbdev to use only one tty for display.

    Hi Friends. I use the  following command for playing videos at tty(I don't use X due to very low specs of my old pc): mplayer -vo fbdev2 -fs FILE but the problem is that the linux framebuffer displays the video on all the tty's. so, how can i confine

  • Proxy keeps turning off

    In iPad2 the proxy settings keeps turning off eventhough i entered the settings couple of times and turned  on the authentication, i cannot conect to the internet with safari. Could you please advise a solution for this problem. Thanks Sam

  • How to make free size in undotablespace

    how to make free size in undotablespace how to remove expiried values in undotablespace?? Edited by: user10896195 on Mar 4, 2011 11:23 AM