Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Build Smartform based on Header and detail item in one page.

jandrivay
Participant
0 Kudos

Hi All,
i have requirement to create smartforms based on data header and item material like in the below screenshot.

please give me advice how to build smartform hierarchy. it's possible to create it ?

any suggestion really helped me!
Thank you all.

1 ACCEPTED SOLUTION

FredericGirod
Active Contributor

It seems you have two loops:

- One with Header data & material number

- One with items date of the corresponding material number

Do it simple:

1. In the initialization of your smartforms, create & populate the first table based on header & items.

In the main, create two loops.

--> Loop on Materials_Header_Data

--> Create a template based on header data

--> Create a table with condition WHERE => Items_Data-Material = Materials_Header_Data-material

5 REPLIES 5

FredericGirod
Active Contributor

It seems you have two loops:

- One with Header data & material number

- One with items date of the corresponding material number

Do it simple:

1. In the initialization of your smartforms, create & populate the first table based on header & items.

In the main, create two loops.

--> Loop on Materials_Header_Data

--> Create a template based on header data

--> Create a table with condition WHERE => Items_Data-Material = Materials_Header_Data-material

0 Kudos

CMIIW,
so in hierarcy smartform like that ?

Main Windows
  Loop material ( from itab header )
TABLES
loop item ( from itab item ) TABLES

0 Kudos

Not really

1. you have to create a new header table with material info Po_Header + Material (no duplicate)

In the Material_Header table, it is not a table, it is a Template. It is more or less like a table with only one entry. As you create a loop in the smartforms, you didn't need a table

2. In the Item level, you don't need a loop because you have a table. The table make the loop.You just need to specify a where conditio

Please check this smartforms.

is it like this ?

0 Kudos

Yep it looks good