Hi Arpit,
Check out the below example, Here one document number from BKPF has mu;tiple line items in BSEG which i has to display in multiple smartforms(Each document on single page with correcponding line items on same page).
Check The screen shot for each step.
Steps
1. Define a loop with event sort begin(Here you can use your internal table which contains the line
item and use the part No. in event as i have used BELNR here).
2.Put the validation for table in a loop to have the relation between BKPF and BSEG(In you case the internal table at loop and at main table is same i,e. internal which contains line items partno = wa_itab-partno).
3.And the final step is to call new page(By using Command) when all the corresponding lines are printed on one page.
Let me know if you have any doubts.
Regards,
Shadab.