How to print one record in differnt row in ALVGrid

Hi,
I have request in ALV report development.
Ex: i have a row in that 10 field. so i want to print 5 fields in one row, 3 fields in one row and 2 fields 3 row.. like that it shold print all the records.
Please suggest me, what is the logic ALV Grid.
thanks and records,
JP reddy.

Hi,
Herewith i am  sending the sample code for the report.
*& Report  YMS_SUBHEADINGALV2                                          *
REPORT  YMS_SUBHEADINGALV2.
TYPE-POOLS : SLIS.
TYPES : BEGIN OF YVBRK_LIST,
VBELN LIKE VBRK-VBELN,
FKART LIKE VBRK-FKART,
BELNR LIKE VBRK-BELNR,
END OF YVBRK_LIST.
TYPES : BEGIN OF YVBRP_LIST,
VBELN LIKE VBRP-VBELN,
POSNR LIKE VBRP-POSNR,
NETWR LIKE VBRP-NETWR,
END OF YVBRP_LIST.
DATA: I_VBRK TYPE STANDARD TABLE OF YVBRK_LIST
INITIAL SIZE 0 WITH HEADER LINE.
DATA: I_VBRP TYPE STANDARD TABLE OF YVBRP_LIST
INITIAL SIZE 0 WITH HEADER LINE.
DATA: KEY_INFO TYPE SLIS_KEYINFO_ALV,
REPORT_ID LIKE SY-REPID,
TABLE_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
GT_EVENTS TYPE SLIS_T_EVENT,
GT_SORT TYPE SLIS_T_SORTINFO_ALV WITH HEADER LINE,
GS_LAYOUT TYPE SLIS_LAYOUT_ALV,
GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
G_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
G_TOP_OF_LIST TYPE SLIS_FORMNAME VALUE 'TOP_OF_LIST'.
INITIALIZATION.
REPORT_ID = SY-REPID.
KEY_INFO-HEADER01 = 'VBELN'.
KEY_INFO-ITEM01 = 'VBELN'.
KEY_INFO-HEADER02 = SPACE.
KEY_INFO-ITEM02 = 'NETWR'.
GS_LAYOUT-GROUP_CHANGE_EDIT = 'X'.
GT_SORT-FIELDNAME = 'VBELN'.
GT_SORT-TABNAME = '1'.
GT_SORT-SPOS = 1.
GT_SORT-UP = 'X'.
GT_SORT-SUBTOT = 'X'.
GT_SORT-GROUP = '*'.
APPEND GT_SORT.
GT_SORT-FIELDNAME = 'POSNR'.
GT_SORT-TABNAME = '2'.
GT_SORT-SPOS = 2.
GT_SORT-UP = 'X'.
GT_SORT-SUBTOT = 'X'.
GT_SORT-GROUP = ''.
APPEND GT_SORT.
TABLE_FIELDCAT-FIELDNAME = 'VBELN'.
TABLE_FIELDCAT-seltext_m = 'Sales Document'.
TABLE_FIELDCAT-TABNAME = '1'.
TABLE_FIELDCAT-COL_POS = '1'.
TABLE_FIELDCAT-OUTPUTLEN = 17.
TABLE_FIELDCAT-DO_SUM = ' '.
APPEND TABLE_FIELDCAT.
TABLE_FIELDCAT-FIELDNAME = 'POSNR'.
TABLE_FIELDCAT-seltext_m = 'Sales Document Item'.
TABLE_FIELDCAT-TABNAME = '2'.
TABLE_FIELDCAT-COL_POS = '1'.
TABLE_FIELDCAT-OUTPUTLEN = 14.
TABLE_FIELDCAT-DO_SUM = ' '.
APPEND TABLE_FIELDCAT.
TABLE_FIELDCAT-FIELDNAME = 'NETWR'.
TABLE_FIELDCAT-seltext_m = 'Net value'.
TABLE_FIELDCAT-TABNAME = '2'.
TABLE_FIELDCAT-COL_POS = '2'.
TABLE_FIELDCAT-OUTPUTLEN = 15.
TABLE_FIELDCAT-DO_SUM = 'X'.
APPEND TABLE_FIELDCAT.
PERFORM EVENTTAB_BUILD USING GT_EVENTS[].
START-OF-SELECTION.
SELECT VBELN
FKART
BELNR
INTO CORRESPONDING FIELDS OF TABLE I_VBRK
FROM VBRK
WHERE VBELN > '0090000121' AND VBELN < '0090000135'.
SELECT VBELN
POSNR
NETWR
INTO CORRESPONDING FIELDS OF TABLE I_VBRP
FROM VBRP
FOR ALL ENTRIES IN I_VBRK
WHERE VBELN = I_VBRK-VBELN.
PERFORM WRITE_REPORT.
*& Form EVENTTAB_BUILD
text
-->RT_EVENTS text
FORM EVENTTAB_BUILD USING RT_EVENTS TYPE SLIS_T_EVENT.
"Registration of events to happen during list display
DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = RT_EVENTS.
READ TABLE RT_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE G_TOP_OF_PAGE TO LS_EVENT-FORM.
APPEND LS_EVENT TO RT_EVENTS.
ENDIF.
ENDFORM. "EVENTTAB_BUILD
*& Form TOP_OF_PAGE
text
FORM TOP_OF_PAGE.
DATA: LS_LINE TYPE SLIS_LISTHEADER.
Header Data
REFRESH GT_LIST_TOP_OF_PAGE.
CLEAR LS_LINE.
LS_LINE-TYP = 'H'.
LS_LINE-INFO = 'Hierarchical Lists'.
APPEND LS_LINE TO GT_LIST_TOP_OF_PAGE.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = GT_LIST_TOP_OF_PAGE.
ENDFORM. "TOP_OF_PAGE
*& Form write_report
text
FORM WRITE_REPORT.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = REPORT_ID
IS_LAYOUT = GS_LAYOUT
IT_FIELDCAT = TABLE_FIELDCAT[]
IT_SORT = GT_SORT[]
IT_EVENTS = GT_EVENTS[]
I_TABNAME_HEADER = '1'
I_TABNAME_ITEM = '2'
I_STRUCTURE_NAME_HEADER = 'YVBRK_LIST'
I_STRUCTURE_NAME_ITEM = 'YVBRP_LIST'
IS_KEYINFO = KEY_INFO
TABLES
T_OUTTAB_HEADER = I_VBRK
T_OUTTAB_ITEM = I_VBRP.
ENDFORM. "write_report
Thanks,
Shankar

Similar Messages

  • HOW TO PRINT ONE RECORD PER ONE PAGE

    Hi I have report , with two queries. Each query has one group with the same data. lets say the queries are Q1 and Q2. The Groups are with column DeptNo, and DeptNo1 both pointing to the same column DEPTNO. Now I want to design it in such a manner that it shoudl print each group , one record per page, but same group on the same page. For Example
    ON PAGE 1
    DpetNo 10
    Emp1
    Emp2
    Emp3
    DeptNo1 10
    Emp1
    EMp2
    Emp3
    ON PAGE 2
    DeptNo 20
    Emp4
    Emp5
    DeptNo1 20
    Emp4
    Emp5
    ON PAGE 3
    DeptNo 30
    Emp6
    Emp7
    Emp8
    DeptNo1 30
    Emp6
    Emp7
    Emp8
    How the lay our will be ? What will be the conditions. I can set the property in each group to print one record per page. But how to make it so that it will print like above.
    Thanks
    FEROZ

    Hi Feroz,
    You can create a query Q0 to return DeptNo 10, DeptNo 20..... and make it as the parent of Q1 and Q2. Then you can print one dept per page.
    Regards,
    George

  • How to print all records in database ?

    Hello,
    I am developing a small Database System. Which is used to store some information about student and then print that record, which I want to print. I have used JPanel for Printing single record. As like When I insert student id in TextBox. which is unique. then Click on Search button that is use for searching Record from database. After that the information shown in belowing JPanel. Then using one button for printing this record. It is printing only one record that I have searched. Now what is the problem, I want to print All record from database(can be 500 or 5000) without mentioning any student id in textbox.
    Any type of help Appreciated.
    Thanks in advance.
    Manveer

    Hello Manveer,
    your problem is neither Swing-related or in any other way java specific.
    If you manage to get the data of one student, excellent. Now modify your db-query in the way that the result set returns all students. Loop over the result set and print as usual.

  • How to delete one record at a time

    hi all,
    Please tell me how i do delete only one record at a time.After deleting the record the jsp page should show only the remining items to be deleted.

    Where do u want to delete the record - database?
    If so use the rpimary Screen identifying each record and use that to delet that record

  • HOW TO PRINT ONE PAGE OR "TILE" OF A MULTI TILE DOC??

    I'm looking to print just one page or tile of a large document. I want to print the pdf at full size, yet only print one of the tiles (preferably the one I choose!). In InDesign you can set the rulers and it will print from where that ruler is and then you don't tile it to get a full size print of a portion of the file. How do you do that in Acrobat?? Thanks.

    I'd recommend the crop tool.

  • Wanted to catch more than one record in selected rows

    Hi all,
    I am using the following function to catch the selected rows.
    CALL METHOD w_grid->get_selected_rows
            IMPORTING
              et_index_rows = i_selected_rows.
    it is catching only one row.
    but i want to catch more than one record.
    for example i will select more than one record from the grid and press the approve button. so that the status will change in the database.
    but what is happening is if i select 2 or more records it is approving only first record. because in the i_selected_rows only first row is catching. what i have to do to catch other select rows also.
    thanking u.
    regards,
    giri.

    Hi,
    CALL METHOD w_grid->get_selected_rows
    IMPORTING
    et_index_rows = i_selected_rows[] ."<<<< try to put these into []
    please not open multiple threads

  • How find just one record on the table

    Hi,
    I've this table TAB_DV:
    COD_ID.........DV_ID
    001............A
    002............A
    002............B
    002............C
    002.............
    003............
    004............GG
    004............DD
    004............FF
    004............MM
    004............TT
    008.............BB
    0022..............
    0033..............
    0044............A
    0044............
    0055............FF
    0066............
    I'd like to find only the COD_ID that have one record (in the table TAB_DV) without dv_id:
    In my case:
    COD_ID.........DV_ID
    003............
    0022..............
    0033..............
    0066............
    If I run:
    SELECT COD_ID, DV_ID
    FROM TAB_DV
    WHERE DV_ID IS NULL
    GROUP BY COD_ID, DV_ID;
    I get also COD_ID with more records.
    How can I write this query?
    Thanks in advance.

    try this
    select cod_id
      from tab_dv
    where dv_id is null
    having count(cod_id) = 1
    group by cod_id
    or
    select t1.cod_id, t1.dv_id
      from tab_dv t1
    where t1.cod1 in (select cod_id
                         from tab_dv t2
                       having count(t2.cod_id) = 1
                       group by t2.cod_id)
       and t1.dv_id is null

  • How to Print multiple Records under one level in Etext templates.

    Hi,
    I am working on the Etext templates and customizing the standard template “US NACHA PPD FORMAT”.
    This standard template don’t have a addenda record.. I have modified and it is working for single Addenda records. But when I have multiple ADDENDA records to be printed in one particular *<outboundpayment>* level, it is not printing.
    How do I modify the template so that Multiple Addenda records get printed?
    Note:     I have multiple *<MyPayables>* tags under *<OutboundPayment>* tags.
    Please help me in understanding this…
    Regards
    Pradeep G

    What you probably need to do is generate each bio
    individually with the
    <cfdocument...> tag just the way you want them. And
    then use some of
    the advanced <cfpdf...> functionality that allows you
    to append two or
    more individual PDF's into a single large PDF.
    Here are some resources that describe some of the
    <cfpdf...> functionality.
    http://www.coldfusionjedi.com/index.cfm/2007/7/9/ColdFusion-8-Working-with-PDFs-Part-1
    http://www.coldfusionjedi.com/index.cfm/2007/7/10/ColdFusion-8-Working-with-PDFs-Part-2
    http://cfpdf.blogspot.com/
    http://cfpdf.blogspot.com/2007/06/cfpdf-action-merge_27.html
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=cfpdf_02.html

  • How to print blank records after the detail records in a masterdetail report

    Hi,
    Developing a report for time and attendance record. In this report I am printing all the employees in a department, limiting the no. of records per page to 10.
    I need to insert blank lines at the end of all of the detail records in a page that has less than 10 employee records so that the no. of records displayed on a page can always be 10(these blank lines will facilitate the management to note down the temporary employees who worked for the department but are not part of the department).
    I am using a tabular form with group above layout.
    The report layout is as follows:
    Department : FINANCE & ADMINISTRATION
    Employee Name | Employee Number |
    1 Jim | 1234 | _________________
    2 John | 5678 |__________________
    3 blank
    4 blank
    5
    6
    7
    8
    9
    10 balnk
    Supervisor's Sign:______________________
    Note: the no. of blank lines should be inserted dynamically based on the no. of emp. records being printed on the page.
    Any help is greatly appreciated.
    Thanks in advance.
    Kavita.

    Your solution works when I am not limiting the no. of records per page for a department to 10 records and when I want to print blanks lines for the depts that has fewer than 10 employees in it.
    Exactly in my report I have several dept's that has more than 10 emp's. In such cases I'll be printing first 10 in one page and the rest in the next page. Now I want to dynamically print the blank lines in the second page depending on the no. of emp's on that page. I tried to acheive this by using a CS column that reset's at page level but, REPORTS is not letting me use CS column that reset's at page level in a format trigger. I also tried to copy the CS value into a parameter and or to a Place holder column and did not help.
    Any more work around ideas to acheive this?? please help.
    Thanks alot
    Kavita.
    Hi
    Create a column called Serial_No in ur emloyee query like this
    select 1 , empno ,ename from emp;
    Create a summary column on the serial column with the function SUM
    and resetting it to Page
    Display the column in the report by using the text color as white
    so it doesn't display in the report
    I think this should help u i believe
    Sri
    Hi,
    Developing a report for time and attendance record. In this report I am printing all the employees in a department, limiting the no. of records per page to 10.
    I need to insert blank lines at the end of all of the detail records in a page that has less than 10 employee records so that the no. of records displayed on a page can always be 10(these blank lines will facilitate the management to note down the temporary employees who worked for the department but are not part of the department).
    I am using a tabular form with group above layout.
    The report layout is as follows:
    Department : FINANCE & ADMINISTRATION
    Employee Name | Employee Number |
    1 Jim | 1234 | _________________
    2 John | 5678 |__________________
    3 blank
    4 blank
    5
    6
    7
    8
    9
    10 balnk
    Supervisor's Sign:______________________
    Note: the no. of blank lines should be inserted dynamically based on the no. of emp. records being printed on the page.
    Any help is greatly appreciated.
    Thanks in advance.
    Kavita.

  • How to print one line item per page?

    Hi,
    I have to develop a smartform for printing tags (labels) and i am stuck. My problem is:
    If more than one materials are available in one document, one material will be printed per one page. So if three line items are there, three pages of print are there.
    Can someone please tell me how to go about it?

    Hello Richa,
    it all depends if you are printing the Header data or not.
    In your case I can recommend a Loop over the items in the Form processing and in each loop step you craete an entire page print out, this should be possible.
    If you need to print the header, this could be done prior to entering the loop.
    I hope this helps you in finding a solution
    Regards
    Isabelle

  • How to print one (or more) page only from multipages report?

    Citations from Report Builder Help:
    To print a report from the Runtime Previewer:
    1. In the Runtime Previewer, click <Page Setup> in the toolbar to verify your printer setup.
    2. Click <Print> in the toolbar.
    3. In the dialog box, type the number of pages and copies you want to print.
    If you ran the report with a DESTYPE of Screen, a warning appears that you should run the report with a DESTYPE of Preview before printing. Preview creates PostScript output, which is typically more desirable for printing bit-mapped reports.
    4. Click OK.
    When I click <Print>, the dialog box is not dispaying and all report pages are sending to printer.

    Hi Al,
    Check out this thread: Sort within Break? I was looking to preserve a basic sort for break purposes, but the same solution should work for keeping one row at the bottom.
    Let me know if you'd like more details.
    --Jennifer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to Print one PDF document (with several documents inside) at once?

    When I select several emails and convert them into one single PDF file, I would like to know how can I print (hardcopy print) all emails at once, instead of having to select each one at a time to prit it.
    I have ADOBE Acrobat X Pro V10.
    Can anyone help me with this? It would save a lot of time.
    Thank you

    I am using XI and it has a better print dialog for portfolios, but I think this Adobe blog link explains what you need for X:
    http://blogs.adobe.com/acrolaw/2011/11/batch-printing-an-email-portfolio/
    Not sure why the link I posted above looks like is has spaces, but there are no spaces in the link.
    Message was edited by: Anna Nmty

  • How to get last Record ior Total rows in For Loop Cursor ?

    Hi Friends
    I would like to know , the last record in for loop cursor, i have the code in following format
    cursor c1 is
    select * from emp;
    begin
    for r1 in c1 loop
    v_total_rec := ? ( i would like to know total rows in the cursor , say for example if cursor has 10 rows, i want10 into this variable )
    v_count := v_count +1;
    dbms_output.put_line(r1.emp_name);
    end loop;
    end;
    Hope i am clear
    Any suggestions?
    Thanks
    Ravi

    Even though cursor loops are generally a Bad Idea ^tm^ as Dan says, here's an example of how you can get the information you wanted within the query itself...
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    cursor c1 is
      3      select emp.*
      4            ,count(*) over (order by empno) as cnt
      5            ,count(*) over () as total_cnt
      6      from emp
      7      order by empno;
      8  begin
      9    for r1 in c1 loop
    10      dbms_output.put_line(r1.ename||' - row: '||r1.cnt||' of '||r1.total_cnt);
    11    end loop;
    12* end;
    SQL> /
    SMITH - row: 1 of 14
    ALLEN - row: 2 of 14
    WARD - row: 3 of 14
    JONES - row: 4 of 14
    MARTIN - row: 5 of 14
    BLAKE - row: 6 of 14
    CLARK - row: 7 of 14
    SCOTT - row: 8 of 14
    KING - row: 9 of 14
    TURNER - row: 10 of 14
    ADAMS - row: 11 of 14
    JAMES - row: 12 of 14
    FORD - row: 13 of 14
    MILLER - row: 14 of 14
    PL/SQL procedure successfully completed.
    SQL>

  • How to print column wise istead of row wise

    Hi,
    please help on this..
    i want to print coloumn wise Employee data instead of row wise.
    Keeping Employee name constant i want to print month wise salary..
    Like this..
    Employee name|Jan-2010-Wages paid|Feb-2010-Wages paid
    soon...
    Plez help me..
    Edited by: user651567 on Feb 28, 2010 5:30 AM

    Please post CREATE TABLE and a few INSERT statements as well as your desired output and your database version.
    Always put the tag before and after your examples to keep it formatted.
    See the FAQ regarding tags: http://forums.oracle.com/forums/help.jspa (scroll a bit down).
    You might want to search this forum first (search box is on right side of screen), since your question has been asked and explained before.
    Also, regarding string aggregation. see this link explaining various techniques (depending on database version):
    http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to print one sheet from a Numbers spreadsheet on an iPad?

    I know this has been asked before and there are some work arounds...
    On my iPad, I have a spreadsheet (it would be called a Workbook in Excel) comprised of a template that I duplicate and use as a data entry sheet for each individual component that I test in my shop.  The spreadsheet is therefore comprised of a template and ten separate sheets, one for each component tested.  I want to be able to email only sheet #6 to a client from my iPad.
    Is there an efficient way to do this without coming back to my Mac and using the Print > Save as .pdf fucntionality available on the Mac

    Generally, you are more likely to get an answer if you post in the iWork for iOS forum at
    https://discussions.apple.com/community/app_store/iwork_for_ios
     Cheers, Tom 

Maybe you are looking for

  • Adobe Portfolio creation in Acrobat 9.0 programatically

    How do I programatically create a Adobe Portfolio in Acrobat 9.0 I am using VB .NET I have a folder with PDF files only, that I need to add to a Portfolio using VB .NET Thanks a lot in advance for all your suggestions

  • Conversion of a timestamp

    Hello, I need to convert a UTC timestamp in the long form in the local version (CET) but if I use the CONVERT function I lose the decimal part (it becomes 0000000). Any idea? Thanks in advance. Angelo

  • An exception of class nilobjectexception was not handled (Photoreflect)

    Trying to download photos via Photoreflect.com photo publisher. As soon as I get ready to add photos to a gallery I get a pop up "An exception of class nilobjectexception was not handled. The application must shut down." Tried restart of the computer

  • Workload Redistribution 'ReportingWorkload' Link

    Has anyone been successful at activating the 'reporting workload' link on the Workload Redistribution (redistribute workload) transaction?  If so, can you provide information on what this provides the user?  Screen shots would be great too if possibl

  • Can't restore a library from vault of older version!

    I have accidentaly formated a hard disk with two libraries. They where 3.1 , and since I have ugrade to 3.2 , when i doble click on the vaults , I can open the libraries, but cant restore them in the hard disk! A mesage says I have to upgrade the vau