Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

table output

rnb86
Participant
0 Likes
825

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
763

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.

5 REPLIES 5
Read only

Former Member
0 Likes
763

Hi Raghu,

Try like this...

write: / (132) sy-uline.

Write: / sy-vline,

field1,

sy-vline,

field2,

sy-vline,

....

....

write: / (132) sy-uline.

Regards,

Satya

Read only

0 Likes
763

Hi Satya,

thany you for your help and congrats on scoring your first points on SDN.

Read only

Former Member
0 Likes
764

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.

Read only

Former Member
0 Likes
763

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.

Read only

Former Member
0 Likes
763

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.