cancel
Showing results for 
Search instead for 
Did you mean: 

problem in smart form

Former Member
0 Kudos

Hello All,

i have a requirement in my smart form i have so many windows and one main window in one of the secondary windows i want to display plant code and its address of purchase order in the particular window i worte logic and it is working fine and is displaying in the smart form.but if my purchase order contain 2 or 3 plants . i want to display this plants in seperate pages of the smart form(say each plant in each page). now my logic is working for only one plant that to it is displaying the last plant and its details (which ever plant is there last in the work area.

Thanks & Regards.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Don't post your problem again with another headline.

both earlier replies where the correct answer to your problem, so if you don't understand them please say so. If we were wrong in understanding your problem then explain further but I'm not going to repeat my answer each day.

Regards,

Guido

Former Member
0 Kudos

Really i don't understand what to u.

Former Member
0 Kudos

Hi Dear Gudio,

Can u give ur email-id so that i forward the downloaded smartform to u this issue i have to solve urgently.

Thanks & Regards.

Former Member
0 Kudos

I'm sorry but i only now and then check this forum and have only little time to answer, I want to answer because i also ask questions and want them to be answered but do not program for you.

INTITIALISATION

my solution:

loop for your normal internal table with item.no and plant and append itab.

itab-field1 = plant

itab-filed2 = item.no

sort itab

solution of Naseer:

loop for your normal internal table with item.no and plant and append itab.

itab-field1 = plant

sort itab

delete records of itab with same info so you ultimately have left only table with different plants

MAIN

my solution:

table node with itab using workarea

and enter plant in the area with sort-criteria and mark end.

within the end-node of plant give COMMAND page-break.

solution Naseer:

loop (table) node for itab using workarea

within this loop create another loop for your normal internal table and only make use of items with same plant-id

after endloop of inner-loop create COMMAND page-break

WINDOW PLANT

read and display data of plant with use of workarea

Former Member
0 Kudos

Hi,

This may help you.

take plants for all items in an itab.

sort by plant ad delete adjesent duplicated.

in smartforms.

loop at itab.

second loop on header-table where werks = itab-plant.

endloop.

page -break.

endloop.

if itab contain only one plant it means all items is of same plant.

else the second loop withh loop at items where plat = itab-plants.

then page break occurs.

for second plant again same process in different.

Former Member
0 Kudos

give next page as ur first page.

now in the loop of plants or main window loop create commnad line -> goto next page -> next.

put condition for trigger -> on change of 'plant-no'.

try out this .

regards