cancel
Showing results for 
Search instead for 
Did you mean: 

How to print table multiline / 2 lines for capture and 2 for table line

Former Member

Hello,

I try to print out a table with 2 lines for the caption and 2 lines for each table line but it does not work.

But I have only 1 normal table itab with 9 fields.

The fields of my table itab in the ABAP-codes is like this:

ITEM_NO, MATNR, MAKTX, QTY, QTY_UNIT, BATCH, WEIGHT_NET, WEIGHT_GROSS, WEIGHT_UNIT

It should be printed like this:

Item Material Quantity Unit Grossweight Netweight Unit

Material decription Batch No.

-


10 100005 84 PC 19,2 18,5 kG

Screws M5 100 pieces 99000078

20 100008 57 PC 11,7 10,7 kG

Screws M8 60 pieces 99000145

30 100008 10 PC 17,0 16,0 kG

Screws M12 25 pieces 99000188

The table on the paper only has 7 columns because 2 fields (Material description and Batch No.) are under the

2nd and the 4th column.

How can I get this?

I have tried many things and I got some interesting results for example this:

Item Material Quantity Unit Grossweight Netweight Unit

Material decription Batch No.

-


10 100005 84 PC 19,2 18,5 kG

20 100008 57 PC 11,7 10,7 kG

30 100008 10 PC 17,0 16,0 kG

Screws M5 100 pieces 99000078

Screws M8 60 pieces 99000145

Screws M12 25 pieces 99000188

Is there anyone who can help me?

Thanks a lot

Norbert

(some words only to find this thread:

SAP Adobe forms table, caption, many lines, multiline, multilined,

SAP, Adobe forms, Tabelle, mehrzeilig, mehrzeilige, Ausgabe )

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi Norbert,

you can use "Subforms" instead of tables. You can bind a subform to a table and set it to "Repeatable". In this subform, you can output several data from the table and also include another subform (which can also be repeatable).

In general you can create a similar look and feel as in tables. So only in the technical view you work with subforms but it appears to the user like tables.

Best,

Thomas

Former Member

Hello Thomas,

thank you very much for your help.

I have solved the problem in the meantime in an other way.

But it is very nice to know problem can be solved with subforms.

Maybe other developers would like to know how I have done this with a normal table:

I have made a word document with screenshots but it is not possible to attach one in this forum, sorry.

So I have to write it without screenshots

You must have the table itab in the context. (For example 10 fields, 7 in the upper data line, 3 in the line after )

Per Drag&Drop move Icon "Table" from pallet "Object Library" to the Design View.

Open the assistent for creating a table.

Choose Header line, no footer, Header on every page. Number of column must be 7 (not 10)

To get a second header line: Goto Hierarchy.

Klick on the header line, right mouseclick and "Insert rows below"

Now you have a secon header line. You can fill it like the first one.

Do the same with the data line.

You can fill the fields also with drag&drop (take fields from tree "data view")

Now you have:

Header line 1

Header line 2

data line 1

data line 2

Mark both data lines with Shift and mouseclick.

Then right mouseclick and "Group as section".

A section appears between the header lines and the data lines.

Now you habe to change the attributes of 3 objects in the

pallet "Object" tabstrip "Binding"

Checkbox: "Repeat row for each data item"

Ckick on data line 1 / delete the checkbox

Ckick on data line 2 / delete the checkbox

Ckick on section / set checkbox

Ok, Thomas. That was my way. Of course it could be shorter for you but maybe

some beginners are reading this and are glad to see the details.

best regards / many thanks to you (vielen Dank)

Norbert

Former Member
0 Kudos

Hello Nobert,

This solution helped me to display a single table row in multiple lines. Thanks!

Answers (0)