cancel
Showing results for 
Search instead for 
Did you mean: 

Nested table for PO Output (Item texts) - trying again.

Former Member
0 Kudos

Hi experts

I posted this question already, but the formatting disappeared, so trying again.

I have created a PDF version of the Purchase Order output. Everything works well, except for the last step - a nested table where I want to display Item texts from the PO for every item.

The steps I followed:

1. In the Interface, I read the item texts, and placed them in an internal table, where the table has a field EBELP (item number) and a field for the text. So, for a PO with 5 items, where 2 items have texts, the table might look like this:

00010 First line of text for item 10.

00010 Second line of text for item 10.

00040 Only line of text for item 40.

2. In the context of the form, I put this table 'under' the existing 'ITEM' entry. In other words, for every item, the texts must be displayed. Obviously I then put in an entry under the WHERE CONDITIONS to say that EBELP = ITEM-EBELP, otherwise it would repeat every line of text for every item.

The problem is that it does not behave quite as I expected. It currently prints:

Item 10 information

First line of text for item 10.

Second line of text for item 10.

Item 20 information

Only line of text for item 40.

Item 30 information

Item 40 information

Item 50 information

Where it should print:

Item 10 information

First line of text for item 10.

Second line of text for item 10.

Item 20 information

Item 30 information

+Item 40 information+

Only line of text for item 40.

Item 50 information

In other words, it simply 'breaks' on change of EBELP, and moves the text to the next line, as opposed to the correct line.

I tried debugging, and it does appear to be doing things in the right order, but it is still doing the output incorrectly. I also searched the forums for similar problems, but I could not find a solution to the problem I am experiencing.

I also put 'dummy' (empty) rows into the table - that fixes it, but then it messes with my layout and I get something like:

Item 10 information

First line of text for item 10.

Second line of text for item 10.

Item 20 information

Item 30 information

Item 40 information

Only line of text for item 40.

Item 50 information

In the above, I don't want the gaps where the empty rows are.

Please advise?

Thanks and kind regards

Casper

Accepted Solutions (0)

Answers (1)

Answers (1)

chintan_virani
Active Contributor
0 Kudos

Formatting is causing an issue. Just wrap the things inside the code tag and don't use the formatting.

Chintan

Former Member
0 Kudos

Reposted without formatting...

I have created a PDF version of the Purchase Order output. Everything works well, except for the last step - a nested table where I want to display Item texts from the PO for every item.

The steps I followed:

1. In the Interface, I read the item texts, and placed them in an internal table, where the table has a field EBELP (item number) and a field for the text. So, for a PO with 5 items, where 2 items have texts, the table might look like this:

00010 First line of text for item 10.

00010 Second line of text for item 10.

00040 Only line of text for item 40.

2. In the context of the form, I put this table 'under' the existing 'ITEM' entry. In other words, for every item, the texts must be displayed. Obviously I then put in an entry under the WHERE CONDITIONS to say that EBELP = ITEM-EBELP, otherwise it would repeat every line of text for every item.

The problem is that it does not behave quite as I expected. It currently prints:

Item 10 information

First line of text for item 10.

Second line of text for item 10.

Item 20 information

Only line of text for item 40.

Item 30 information

Item 40 information

Item 50 information

Where it should print:

Item 10 information

First line of text for item 10.

Second line of text for item 10.

Item 20 information

Item 30 information

Item 40 information

Only line of text for item 40.

Item 50 information

In other words, it simply 'breaks' on change of EBELP, and moves the text to the next line, as opposed to the correct line.

I tried debugging, and it does appear to be doing things in the right order, but it is still doing the output incorrectly. I also searched the forums for similar problems, but I could not find a solution to the problem I am experiencing.

I also put 'dummy' (empty) rows into the table - that fixes it, but then it messes with my layout and I get something like:

Item 10 information

First line of text for item 10.

Second line of text for item 10.

Item 20 information

Item 30 information

Item 40 information

Only line of text for item 40.

Item 50 information

In the above, I don't want the gaps where the empty rows are.

Please advise?

Thanks and kind regards

Casper

Former Member
0 Kudos

Feedback:

I eventually fixed this with scripting. I had to keep the dummy lines so that the form put the non-dummy lines in the right place, but then I hid the empty, dummy lines with Javascript.

Kind regards.

Casper