cancel
Showing results for 
Search instead for 
Did you mean: 

smartforms

Former Member
0 Kudos

hi all,

I am working with smartforms. I hav two tables, header table and item table.

I need to display the details of header table follwee with corresponding item details. and i retrive multiple records like this. I want to display one header details per one page. I used tables and loop concepts. But its not working. Everything is displaying in a single page. and also i dont know how to give page break in tables..

Can any one help me.......

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Do as follows.

->In driver program select all header details into one internal table and all item details into another internal table.

-> Pass that two internal tables to the smartforms by definining them in the tables tab .

-> In the global definition tab define a variables like below.

G_cnt type sy-index.

g_tcnt type sy-tabix.

-> In the smartform in the initialization tab do as

g_tcnt = lines( header table ).

-> In the smartform window where you are displaying the header details create a program lines write the code as follows by passing the header table as input parameter and get the header wa in the out parameters.

g_cnt = g_cnt + 1.

read table header table index g_cnt.

-> Now in the window where you are displaying the item details do as follows.

-> loop the item table in the where condition put the relation between two tables (ex:vendor and vendor bank details as lifnr = vendor wa- lifnr.)

-> after the loop create the command node and select the go to next page check box and select the same page as next page .

Thanks,

NN.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Swathi,

If that is the case copy and paste the main window in second page without modifying it...

For header in second page under 'events' tab for table check the two checkboxes...

Former Member
0 Kudos

i tried.still not getting answer.

g_tcnt = lines. (not clear).

if i use this variable in initialization table, am getting error.

former_member181995
Active Contributor
0 Kudos

Swati,

You can't give page break in tables.

table it-self maintain page protect.

Amit.

valter_oliveira
Active Contributor
0 Kudos

Hello.

To insert a page-break in a smartform table, do like this (in table):

Create->Flow logic->COMMAND, and use command "go to page next" ie, mark the flag that will apper on top.

EDIT: of course you can insert a page break in tables !!!

Regards.

Valter Oliveira.

Edited by: Valter Oliveira on Jun 9, 2008 12:58 PM