cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt in smartform

Former Member
0 Kudos

Hi All,

I have a requirement in my smartform i have main window and some secondary windows in first page .in one of the window i have to get plant code and the address of that plant of particular purchase order.if there is only one plant and it items they r displaying on the first page.

but if there are some more plants for the same purchase order then on first page first plant code and its address on the particular window and items on the main window of the first page should be displayed.next plant and its items must appear on the next page like wise my smart form should work.guide me with suggestions.

regards,

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

hi,

if u are having more than one plant take it in one internal table, and putting the loop on it in smarform

loping at internal table of plant

loop at you header table- with matching the condition it_header = it_plant-werks

upto all items covered

endloop.

page break.

endloop.

hope this wil b useful

Former Member
0 Kudos

hi,

This can be done like this:

if itab contain more than one plant take it in one internal table, and in smartforms put the loop on it.

in smartforms.

loop at it_plant.

loop at you header table- where plant = it_palnt-werks.

as you do for 1 plant and all items.

endloop.

page break.

endloop.

Former Member
0 Kudos

if i understand correct:

item 1, plant 1

item 2, plant 1

item 3, plant 2

item 4, plant 1.

you want on first page plant 1 with items 1,2,and 4

you want on sec. page plant 2 with item 3

in the INITIALISATION create itab with first plant and then item.

in the MAIN define a table using itab with wa-itab and print items.

at end of plant use COMMAND to go to next page

in the window with plant adress use info from wa-itab

Regards,

Guido

Former Member
0 Kudos

Hi

Create a second page...and have the same windows there also...

After that,in the first page attributes...give Next Page as Second Page..and in Second Page Attributes...give it as blank.

Do this..and revert back if it does not work.

Regards,

Vishwa.