ALV - Multiple Rows into Single Row

I have a requirement to display the ALV output from CDHDR&CDPOS tables here in the output i have 15 columns( Fields ) any changes im displaying in report output ,but if there is same time multiple columns will change im displaying as individual record instead of that i need to show as single row.
in this output last three records have same time change but i have populated into three different columns i want to make it as SINGLE Row Record.
Thanks!!

We don't need script task for this. Use TSQL in the datasource. Refer below example
DECLARE @TEMP TABLE(ID INT, [VALUE] NVARCHAR(30))
INSERT INTO @TEMP VALUES(1 , 'MAZ')
INSERT INTO @TEMP VALUES(1 , 'HON')
INSERT INTO @TEMP VALUES(1 , 'FOR')
INSERT INTO @TEMP VALUES(2 , 'JEEP')
INSERT INTO @TEMP VALUES(2 , 'CHE')
INSERT INTO @TEMP VALUES(3 , 'NIS')
INSERT INTO @TEMP VALUES(4 , 'GMC')
INSERT INTO @TEMP VALUES(4 , 'ACC')
INSERT INTO @TEMP VALUES(4 , 'LEX')
SELECT [id],
Stuff((SELECT ',' + [VALUE]
FROM @TEMP
WHERE [id] = a.[id]
FOR xml path('')), 1, 1, '') [VALUE]
FROM @TEMP a
GROUP BY [id]
Regards, RSingh

Similar Messages

  • Scanning multiple pages into single document

    Is there a way to scan multiple pages into single document?  I am using the following: HP pavilion laptop with windows 8,  HP photosmart C6380 all in one printer scanner copier.

    Hi,
    Please try
    Double click printer icon on desktop,
    Select Scan a Document or Photo,
    Put the first page on the glass (face down),
    Check options (size, dpi ...), and select Scan document to file,
    Click Scan - machine will scan the first page
    Remove the first page on the glass, put the second page,
    Click + (plus sign) It sits on the left hand side of a red x
    Machine will scan the second page, put 3rd page on the glass and click + again ..... to the end then click Save
    Click Done after Save
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How to Pass multiple parameter into single store procedure

    How to Pass multiple parameter into single store procedure
    like a one to many relationship.
    it is possible then reply me immediatly

    you mean like this .....
    CREATE OR REPLACE procedure display_me(in_param in varchar2,in_default in varchar2 := 'Default') is
    BEGIN
    DBMS_OUTPUT.put_line ('Values is .....'||in_param || '....'||in_default);
    END display_me;
    CREATE OR REPLACE procedure display_me_2 as
    cnt integer :=0;
    BEGIN
    For c1_rec In (SELECT empno,deptno FROM test_emp) Loop
         display_me(in_param => c1_rec.empno);
         cnt := cnt+1;
         end loop;
         DBMS_OUTPUT.put_line('Total record count is ....'||cnt);
    END display_me_2;
    SQL > exec display_me_2
    Values is .....9999....Default
    Values is .....4567....Default
    Values is .....2345....Default
    Values is .....7369....Default
    Values is .....7499....Default
    Values is .....7521....Default
    Values is .....7566....Default
    Values is .....7654....Default
    Values is .....7698....Default
    Values is .....7782....Default
    Values is .....7788....Default
    Values is .....7839....Default
    Values is .....7844....Default
    Values is .....7876....Default
    Values is .....7900....Default
    Values is .....7902....Default
    Values is .....7934....Default
    Values is .....1234....Default
    Total record count is ....18

  • How can i import the data from multiple sources into single rpd in obiee11g

    how can i import the data from multiple sources into single rpd in obiee11g

    Hi,
    to import from multiple data sources, first configure ODBC connections for respective data sources. then you can import data from multiple data sources. When you import the data, a connection pool will create automatically.
    tnx

  • To Combine Multiple STOu2019s into Single Delivery

    Hi,
    What are the configuration settings to be done to combine multiple STOu2019s into one single delivery in VL10B. 
    My requirement is to combine multiple STOu2019s contains different DELIVERY DATES and having SAME SUPPLYING AND RECEIVING PLANT into one single delivery.
    Thanks & Regards,
    Victor.

    Hi
    Delivery in STO is created for single order and for same delivery date, same delivery no. for different delivery date and  for multiple STO is not possible and its not logically correct,since after creation of delivery you will be doing picking and packing and Goods Issue.
    Please check
    Kishor

  • Multiple deliveries into single invoice

    Gurus,
    My business requirement is like this,
    Order is created and delivery process is done with PGI,but the material moves with manual invoice/DC,but the end of the week,all deliveries are compiled into a single invoice  for particular customer.Wheares the header condition,business item remains same.When i tried to put all deliveries for the customer X in vf01 and execute,the individual deliveries cannot be convereted into into single invoice.When split analysis is done it says header is different,but to my knowledge all header ,business items are unique.Kindly help me at this ase

    - Try using Tcode VF04. Opt for delivery related billing active.
    - Select the desired delivery in Billing due list. (Press Ctrl Key from keyboard to select multiple lines).
    - Then you have 2 option
    1. To click on Collective Billing button to do a collective invoice for the selected delv doc.
    2. To analysis whether you will be able to a collective billing or not. To analysis that
    - click on simulation button.
    - Billing Doc Simulate: Billing Doc Overview Screen
    - Select all lines.
    - There first go for Logs, by pressing Log button.
    - Then click on Split Analysis button to get split analysis.
    - If you find any split reason and modify/adjust your copying control accordingly to do combine billing
    - Finally, click on Collective Billing button to do a collective invoice for the selected delv doc.
    Regards
    JP

  • Add Internal Table Multiple Lines into Single Line

    Hi Gurus,
    Before post this thread, i hav searched SDN but i could not find the exact solution.
    I hav an internal table, i want to add the records of this internal table into single line (string variable), separated by tab operator.
    can any one give me suggestions to solve this?
    Thanks
    Meher

    Hi,
    Program should be some thing like below:
    REPORT  ZTEST36.
    *-- test program to concatenate internal table to string.
    DATA:STRING TYPE STRING.
    TYPES:BEGIN OF TY_ITAB,
          WEEK(15),
          END OF TY_ITAB.
    DATA:GT_ITAB TYPE STANDARD TABLE OF TY_ITAB WITH HEADER LINE.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'SUNDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'MONDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'TUESDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'WEDNESDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'THURSDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'FRIDAY'.
    APPEND GT_ITAB.
    CLEAR GT_ITAB.
    GT_ITAB-WEEK = 'SATURDAY'.
    APPEND GT_ITAB.
    CLEAR:GT_ITAB, STRING.
    LOOP AT GT_ITAB.
      CONCATENATE STRING '/' GT_ITAB INTO STRING.
    ENDLOOP.
    WRITE: / STRING.
    Regards
    Ramesh.
    Moderator message - Ramesh - please use code tags
    Edited by: Rob Burbank on Jul 3, 2009 12:26 PM

  • ALV multiple rows in single cell....

    Hi Experts,
    I am using ALV report, it is more than 132 coloms. I want to display balance columns on second line of same row.
    For e.g. :
    Sr.No.  O.A. No.
               Invoice No.
    1        12345
                 00001
    2       124567
                000002
    it is possible ?
    YAB
    Message was edited by:
            YUSUF BHORI

    Hi
    I think it is not possible in ALV reports.
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    13. Top-of-page in ALV
    selection-screen and top-of-page in ALV
    14.  ALV Group Heading
    http://www.sap-img.com/fu037.htm
    How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Concatenate Multiple Columns into Single

    Hi All,
    I am developing a report and there is a field called FUNDING_SOURCE.
    This field is being picked from class_code of PA_PROJECT_CLASSES table as shown below:
    (select distinct(class_code)
    from pa_project_classes ppc,
    pa_projects_all ppa
    where class_category = 'FUNDING SOURCE'
    and ppc.project_id = :project_id)
    But, the requirement is to have all values of Funding Source for a particular project ID concatenated into a single column.
    Eg: If I run the above code, the output would be in 3 rows,
    Intenal
    External
    Other
    I want the output concatenated and displayed as Internal, External, Other.
    Please help me ASAP. Need to finish this soon.
    Thanks!

                        SELECT substr(MAX(sys_connect_by_path(a,
                                                              '~')),
                                      2) --first character wil be ~ max is used because the query will return 3 rows and u need only one row with all values appended
                          FROM (SELECT a,
                                       row_number() over(ORDER BY t.b) AS curr, --order in which appending happens
                                       row_number() over(ORDER BY t.b) - 1 AS prev --order in which appending happens
                                  FROM (SELECT 'Internal' a,
                                               1 b
                                          FROM dual
                                        UNION ALL
                                        SELECT 'External' a,
                                               2 b
                                          FROM dual
                                        UNION ALL
                                        SELECT 'Other' a,
                                               3 b
                                          FROM dual) t --creating dummy table
                        CONNECT BY prev = PRIOR curr
                         START WITH curr = 1;

  • Merge multiple columns into single column?

    Hi,
    I need to execute queries dynamically and return the values. I need to fetch the values of the queries in single column only by concatenating the multiple columns. I cannot use PL/SQL in my scenario.
    is there any way to execute a query and the result will be fetched in single column (values of multiple columns needs to be concatenated)?
    Thanks,
    Raja.

    hi,
    do you mean this??
      1* select EMPNO||' '||ENAME||' '||JOB||' '||MGR||' '||HIREDATE||' '||SAL||' '||COMM||' '||DEPTNO||
    SQL> /
    MULTIPLE_COL
    100 JDF DIR  05-SEP-09 200 1000 10
    7497 MILLER CLERK 7782 23-JAN-82 25000 195 35
    7566 JONES MANAGER 7839 02-APR-81 3175 446.25 20
    7654 RAR SALESMAN 7698 28-SEP-81 1450 1587.5 30
    7698 BLAKE MANAGER 7839 01-MAY-81 3050 427.5 30
    7782 CLARK MANAGER 7839 09-JUN-81 2650 367.5 10
    7788 SCOTT ANALYST 7566 09-DEC-82 3200 450 20
    7839 KING PRESIDENT  17-NOV-81 5200 8250 10
    7844 TURNER SALESMAN 7698 08-SEP-81 1700 225 30
    7876 ADAMS CLERK 7788 12-JAN-83 1300 165 20
    7900 JAMES CLERK 7698 03-DEC-81 1150 85.5 30 [email protected]
    MULTIPLE_COL
    7902 FORD ANALYST 7566 03-DEC-81 3200 450 20
    8000 KINGBABA PRESIDENT  17-NOV-81 5200 8250 10
    8001 TURNER RAV SALESMAN 8000 08-SEP-81 1700 450 30
    1001 KITTU DOR  05-SEP-09 1200 100 40
    15 rows selected.Or
    Mean this??
    SQL> ed
    Wrote file afiedt.buf
      1  With T As
      2     ( Select Level col1 From dual Connect By Level<=10
      3     )
      4     Select Max(SYS_CONNECT_BY_PATH(COL1||',',' ')) Multi_col
      5       From
      6     ( Select COL1, Lag(COL1) Over (Order By COL1) As Lag
      7             From   T  )
      8      Start With Lag Is Null
      9        Connect By
    10*    Prior col1 = LAG
    SQL> /
    MULTI_COL
    1, 2, 3, 4, 5, 6, 7, 8, 9, 10,Edited by: user291283 on Sep 8, 2009 10:10 PM

  • Error message when trying to merge multiple files into single PDF file

    Greetings! I'm on windows 7 professional, adobe 9 pro and a 64 bit PC. When I try to merge several PDF files from the same folder into a single PDF file I get this error message "You can choose multiple items only if they are all located in the same folder" - Please help! Thx.

    The product is Acrobat, not Adobe. That being said, I suspect you may only be running AA 9.0 and that may be the issue. If you have not done the updates to the 9.5.5, you probably should. That may fix the issue you are having, particularly since you mentioned a 64-bit system.

  • Multiple pdfs into single pdf

    Hi All,
    I have a report which output some records. Each selected record will produces a PDF as output.
    When am selecting multiple records other one .... am getting the PDF output one after the other
    instead of getiing in a single PDF.
    Could you please tell me how to proceed with this.
    The LOGIC am using in the program
    Am appending each PDF data using the FM CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    Into an internal table.
    Now,am passing this internal table to the FM GUI_DOWNLOAD
    and again passing this to the FM WS_EXECUTE.
    But the output which am getting is only one PDF(i.e it is overlapping the one pdf data witht he another one).
    Thank you.
    Regards,
    Padmasri.

    Hi,
    Follow these steps,
    get the otf of each output and then append it to the same internal table ( with otf entries of all the pages )
    Then at last convert this otf into PDF.
    To get the OTF format and converting it into PDF there are many threads available in SDN, please search it.

  • Multiple objects into single emitter-possible??

    Is it possible to have multiple objects turned into a single emitter to set different ranges, life, scales, etc.? Specifically, I have about two dozen text words I'd like to be able to turn into a single emitter as opposed to doing a separate one for each...thanks for any help!
    ~Chris

    New Discussions ReponsesThe new system for discussions asks that after you mark your question as Answered, you take the time to mark any posts that have aided you with the tag and the post that provided your answer with the tag. This not only gives points to the posters, but points anyone searching for answers to similar problems to the proper posts.
    If we use the forums properly they will work well...
    Patrick

  • 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 to get the data from multiple tabes into single table

    hi all,
    here i am having 10 data base tables,how to get the data into a single table.
    regards,
    subba reddy

    hi,
    non XI/PI related
    Regards,
    Michal Krawczyk

Maybe you are looking for

  • Problem with apple installing with itunes.msi in windows 7

    At the beggining my computer showed an error with itunes.msi and I tried to fixed the error. Then I tried again to install the itunes but now itunes say that the program cant be installed. Can somebody help me??? Thanks

  • T430s + BIOS 2.02: Red Hat Enterprise Desktop 6.3 display problem

    Hi, Today I updated the BIOS on my T430s to 2.02 using the g7uj04uc.iso boot CD image from Lenovo's support site. After that the Red Hat Enterprise Linux Workstation 6.3 display is screwed up. It's shifted to the right and shows psychodelic false col

  • How can I define the possible entries for "invoicing process" at fkkinv_ma?

    At the transaction code fkkinv_ma, I fill in the fields "Date ID" and "Identification" but I have a problem with the field of "Invoicing Process". When I psh theF4 button, there comes no search help. What should I do? Should I define the possible ent

  • PR Release Error while using 'BAPI_REQUISITION_RELEASE_GEN'

    Hi Frdz, I am using BAPI_REQUISITION_RELEASE_GEN to release the Purchase Requisition and the parameter I am passing are, CALL FUNCTION 'BAPI_REQUISITION_RELEASE_GEN'   EXPORTING     number                  = x_gwa_filedata-prno     rel_code          

  • Superession with N to 1 and 1 to N for Planning

    Dear All,   Please let me whether SCM 7.0 (APO) supports Supersession with N to 1 and 1 to N cases for Heuristics,CTM,Optimizer and Deployment. And do let me know any link where I can get the detail information on it. Thanks, Siva.