‎2007 Feb 05 11:37 AM
Hi,
can anyone tell me the syntax to manually create a table [ using uline and vline ] in the output of a report. i need to enclose a group of fields in that table structure.
fld1:________ fld3:_______ |
fld2:________ fld4:_______ |
fld5:______ |
|----
|
it involves mentioning the position in the screen, and using uline and vline.
‎2007 Feb 05 12:19 PM
u can do this way...
write:/1 sy-vline, 132 sy-uline, 133 sy-vline.
write:/1 sy-vline, 2 'fld1:', 8 field1, 30 'fld2:', 40 field2, 133 sy-vline,
write:/1 sy-vline, 2 'fld3:', 8 field3, 30 'fld4:', 40 field4, 133 sy-vline.
write:/1 sy-vline, 132 sy-uline, 133 sy-vline.
‎2007 Feb 05 11:55 AM
Hi Raghu,
Try like this...
write: / (132) sy-uline.
Write: / sy-vline,
field1,
sy-vline,
field2,
sy-vline,
....
....
write: / (132) sy-uline.
Regards,
Satya
‎2007 Feb 05 12:15 PM
Hi Satya,
thany you for your help and congrats on scoring your first points on SDN.
‎2007 Feb 05 12:19 PM
u can do this way...
write:/1 sy-vline, 132 sy-uline, 133 sy-vline.
write:/1 sy-vline, 2 'fld1:', 8 field1, 30 'fld2:', 40 field2, 133 sy-vline,
write:/1 sy-vline, 2 'fld3:', 8 field3, 30 'fld4:', 40 field4, 133 sy-vline.
write:/1 sy-vline, 132 sy-uline, 133 sy-vline.
‎2007 Feb 05 12:28 PM
Go thru the below example, U need to use the back statement as exampled below,
BACK. Effect:
Returns output position to the first line of the current page after the TOP-OF-PAGE processing.
When used in connection with RESERVE x LINES, the statement returns the output position to the first output line after RESERVE.
Example
DATA: TOWN(10) VALUE 'New York',
CUSTOMER1(10) VALUE 'Charly',
CUSTOMER2(10) VALUE 'Sam',
SALES1 TYPE I VALUE 1100,
SALES2 TYPE I VALUE 2200.
RESERVE 2 LINES.
WRITE: TOWN, CUSTOMER1,
/ CUSTOMER2 UNDER CUSTOMER1.
BACK.
WRITE: 50 SALES1,
/ SALES2 UNDER SALES1.
Using the positioning in WRITE in column 50, data not yet output is not overwritten, but the sales volume is output after the customer names.
Notes
If you use a '/' with the first WRITE after the BACK statement, this starts a (usually unwanted) new line.
BACK in the TOP-OF-PAGE processing positions the cursor after the standard header. Subsequent WRITE statements also overwrite the lines output under TOP-OF-PAGE.
Performance:
The runtime required to execute a BACK statement is about 1 msn (standardized microseconds).
Cheers.
‎2007 Feb 05 12:40 PM
REPORT demo_list_grid LINE-SIZE 60 NO STANDARD PAGE HEADING.
TABLES spfli.
DATA: x TYPE i, y TYPE i, l TYPE i.
TOP-OF-PAGE.
WRITE 3 'List of Flights in a Dynamic Grid'
COLOR COL_HEADING.
ULINE.
START-OF-SELECTION.
DEFINE new_grid.
y = sy-linno. y = y + 2. skip to line y.
x = sy-colno. position x. write '|'.
END-OF-DEFINITION.
DEFINE write_grid.
x = sy-colno. y = sy-linno. position x.
write: &1, '|'.
l = sy-colno - x + 1.
x = x - 2. y = y + 1. skip to line y. position x.
uline at x(l).
y = y - 1. x = sy-colno. skip to line y. position x.
END-OF-DEFINITION.
GET spfli.
new_grid.
write_grid: spfli-carrid,
spfli-connid,
spfli-cityfrom,
spfli-cityto.