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: 

smartforms

Former Member
0 Kudos

i want to have the smartform work for the multiple po how can we do it and also the each po has multiple line items

2 REPLIES 2

Former Member
0 Kudos

hi ,

we can loop the table or template , here write the po number in the table main or in the template.

then loop it .

or do like this....this is a good example which is working,

here i had put every thing in the template.i created texts for the template and i had given the parameters .

no loop is needed inside the smartform for this example.

LOOP AT it_final.

*---Function module to display the smart form

CALL FUNCTION '/1BCDWB/SF00000052'

EXPORTING

pernr = it_final-pernr

vorna = it_final-vorna

nachn = it_final-nachn

cname = it_final-cname

ansal = it_final-ansal

dat01 = it_final-dat01

pct01 = it_final-pct01

bet01 = it_final-bet01

pkt01 = it_final-pkt01

finyr = it_final-finyr

name2 = it_final-name2

ansal1 = it_final-ansal1

pm_rating = it_final-pm_rating

v_finyr1 = v_finyr1

v_ansal2 = it_final-ansal2.

ENDLOOP.

regards,

venkat.

Former Member
0 Kudos

Hi,

In that print program u can write code like below..

loop at itab into wa.. " each po comes into wa now

Loop at itab into wa where ponumber = wa-ponumber.

(*" this loop will repeat and call that smartform that many items for same PO number.*)

CALL THE SMARTFORM FUNCTION MODULE

endloop.

endloop. " second loop gives another PO number

Another thing is that for your smartform inputs should be PO number and Item number.. write u r logic inside the smartform based on inputs... Then it will work definately.

Regards,

Surya