cancel
Showing results for 
Search instead for 
Did you mean: 

How to print a table on a form?

Former Member
0 Kudos

I need to print all the items of a form in a table format,with borders and lines.If items are not fit in this page ,they have to print on another page(continuous).

If anybody knows,Kindly give the solution.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

If u r working on smartforms then right click on the main window go for create table. u can even use the standard templates avaliable.select the tables tab, in that select the tool resembling pencil just drag on the layout below for as many columns u want, that many cells appear in the table.and for table outline select the type of outline present on the top of this tab.

if u r working on sap scripts use box and line commands.

Thanks,

Satya.

Former Member
0 Kudos

Hello,

Create a TABLE node (in the main window, or any window). In this table, you have to specify the internal table and work area in the 'DATA' tab of the table node. This is equivalent to the abap code ,

LOOP at itab into wa.

There will be a 'Details' button in the 'Table' tab of the table node. Click it and here you specify the no of yur columns(along with their height and wifth). If yur table is sumthing lyke,

HEADER 1  HEADER 2
      ROW1-A    ROW1-B

then u have to create two separate line type, one for the header and the second for the row items(keep in mind that internal table is dynamic)

There are sub 3 sections of the table node, Header - Main Area - Footer

Right click on the 'Header' arrow and create a table line and assign the Line Type(you created for the Header).Similarly, right click on the 'MainArea' - create a table line and assign the line type(u created for the row items). Name yur columns(in the Header section) and place yur data(from the work area) into the respective cells of the 'Main Area'. 'Footer' section is usually for totals, sums and etc.

Hope i am comprehendable.

Regards,

Shehryar

Former Member
0 Kudos

Hi adiseshi,

1. table format,with borders and lines

In sapscript, thats not possible, exactly like a matrix.

2. For printing line items,

we have to write the logic in driver program.

3.

a) first create a element in the layout,

and below it, write the line item.

/E MYELEMENT

/ &ITAB-FIELD1&

b) in the driver program call this element,

in a loop.

LOOP AT ITAB.

CALL FUNCTION WRITE_FORM (SEE F1 HELP ON THIS FM)

ENDLOOP.

regards,

amit m.

raguraman_c
Active Contributor
0 Kudos

Hi,

If you are using SMARTFORM your life is easier.

SAP Smart Forms consists of Table Painter for creating templates and tables.

You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.

Check this link, for tables in SMARTFORMS

http://help.sap.com/saphelp_nw04s/helpdata/en/fa/0c1453d30111d3b568006094192fe3/content.htm

Feel free to revert back.

--Ragu

Former Member
0 Kudos

hi reddy,

Check the below <b>link</b>

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/47fe4fef-0d01-0010-6f87-ed8...

Reward with point if it is helpful

Regards

Alfred