cancel
Showing results for 
Search instead for 
Did you mean: 

printing 2 table contents in same page /Different content areas

Former Member
0 Kudos

Hi,

I need to print header and item details on a single page for a single document.

for this I have 2 tables .

I have created 2 content areas C_header(1/2 page) & c_item( 1/2 page)

I am trying to print multiple documents..I have mapped these tables to respective content areas and in pagination I made sure to use respective content areas.

I am getting output but they are not in order.

present output:

Header1 in new page 1
header2 in new page 2
header3 in new page  3

item1 in new page 4
item2 in new page5
item3 in new page6

header4c& item4  in page 7

but basacilly i requried only 4 pages of output

Header1 & Item1 should be in page 1
Header2 & Item2 should be in page 2
Header3 & Item3 should be in page 3
Header4 & Item4 should be in page 4

What could be my issue?

rgds

Vara

Accepted Solutions (0)

Answers (1)

Answers (1)

NoJo
Active Participant
0 Kudos

hi, are you working from abap? why don't you use nested tables and use conditions in the context to separate the data?

Former Member
0 Kudos

This message was moderated.

NoJo
Active Participant
0 Kudos

hi vara,

in the interface i would use to tables --> header, items

in the context insert the item table into the header table and fill the WHERE condition! So only the corresponding items for the header will be displayed.

for example in the interface

Header table named

VBAK with fields

-VBELN

-ERDAT

-ERZET

-ERNAM

Item Table

VBAP with fields

-VBELN

-POSNR

-MATNR

in the context:

VBAK (Table)

-DATA (Structure, repeating node)

--VBELN

--ERDAT

--ERZET

--ERNAM

--VBAP (Table --> WHERE Condition VBELN = VBAK-VBELN)

---DATA (repeating node)

-


VBELN (deactivated!)

-


POSNR

-


MATNR

in the LAYOUT

I would drag and drop the complete VBAK node from the data view into a previous created subform (Main?) and the do a conditional break just for the HEADER on the change of VBELN

Former Member
0 Kudos

Norbert,

I am confused at Context.

How can we use where condition here? VBAP (Table --> WHERE Condition VBELN = VBAK-VBELN)

I never used in context.

I am doing an ABAP webdynpro context.

rgds

vara

NoJo
Active Participant
0 Kudos

sorry, this has been for a ddic interface! I've to think how to realize with xml interface!

norbert

NoJo
Active Participant
0 Kudos

in webdynpro VBAK is your paren node and ITEMS is a subnode, then it will work!

Former Member
0 Kudos

Norbert,

It is not simple as you said i tried this by inserting.it did not work for me.

Challenge is how do you connect Header & Items ???

also how do you maintain the cardinality? is it 1.n for both header and items?? if so it may not display because

we definetly need 1.1 cardinatilty for binding.

I have serached this forum for this kind of requirement but nobody has good solution.

If you come up with something that will be really helpfull to all ..

Rgds

vara

Former Member
0 Kudos

Hi,

I've done a similar kind of requirement. Please check the link below:

[url] [url]

The link isn't the requirement which you are facing but gives an idea on how top capture row index which helped me to crack this kind of requirment.

Here, ive suggested the main logic i've used to identify table rows and how these can be manipulated around. Whatever you do, either combine the header and item table or a single table, through some coding and scripting, this functionality can be achieved.

Cheers,

SV

Edited by: Santosh Verma on Oct 23, 2009 10:41 PM

NoJo
Active Participant
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.