cancel
Showing results for 
Search instead for 
Did you mean: 

reg smartforms - creating a new page for each customer

Former Member
0 Kudos

Hai friends,

i have selection option for customer(kunnr) in the selection crieria..

Now i am getting the output in the smartfroms related to the customer details..

But i am getting details for only one customer...

suppose there are 10 customers.. i want the details of the 10 cusotmers in 10 different pages...

PLs help me.

Rgds,

Vinod

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

First assigned to structure to internal table i_final

declare L_LINES in global declaration

right click on main window create program lines in that

Input parameters: I_FINAL

In CODE option

SORT I_FINAL BY KUNNR.

DESCRIBE TABLE I_FINAL LINES L_LINES.

After you create LOOP IN data tab give chek the check box

I_FINAL INTO WA_FINAL

WA_FINAL declare in global declaration

Under loop create node alternative(CONDITON)

double click CONDITION in conditions tab

Field name: L_LINES

Relational operator:>

Comparison value:0

in that CONDITION ---> TRUE & FALSE is available

in TRUE option create program lines, in that give like

L_LINES = L_LINES - 1.

Under TRUE option create COMMAND node

in General attributes tab: check the chek box go to new page

in conditions : maintain as

Field name: L_LINES

Relational operator:>

Comparison value:0

Regards

Bhupal

Former Member
0 Kudos

loop at itab containing customer(kunnr)

that is creata a loop node.

inside the loop u display all of your customer details

check the chek box event on sort begin for the loop node and add the kunnr field under field section.

you will see an event node being created in the loop.

inside the event node create a command node and check the check box goto new page.

Former Member
0 Kudos

Hi,

In your loop node... sort criteria... give the fieldname kunnr and select the check box event on sort begin

you get event node ... under that create command node for triggering new page.. and set the condition not on first page

then you can go with your display of text elements

regards

padma

Former Member
0 Kudos

my customer (kunnr) is a secondary window and details are displayed in secondary window.

When i sorted....created a command node ...

errror message is displayed stating that "no page is allowed in secondary window".

pls help me.

Former Member
0 Kudos

Hi,

page break can be given in main window...

If you are displaying it in secondary window... then it would be obviously single record for that customer that you would be displaying... so create program lines node and write the read statement on the internal table

read table itab with key kunnr = <value>.

then display the details.

regards

padma

Former Member
0 Kudos

still i am not getting..

under the loop of the customer...created prog lines and given the read statement..

still details are not displayed for each customer in different page.

Former Member
0 Kudos

Hi,

Program code node should be created under the secondary window which consists of the read statement.

regards

padma