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: 

Trigger smartform multiple times from nace

0 Kudos
239

Dear Expert,

I m working for T.Code ML83 (Service Sheet).....

Previously, for this T.Code SAPSCRIPT was using.... But now, I have developed a smartform and configured Smartform name in NACE and using Z Report which is already using same for PO Print. Its working fine. But when along with same parameters

I am calling my new smartform(ML83) using parameters EBELN , smartforms triggering again an again. I mean, if i have 10 line item

i need to press 10 times on print preview and it comes on first select query of smartform. I need, it finish all the queries of smartform once, it should display output . I m not getting, what is the problem now.... Pl help me .

Thanks & Reards,

Swapnika

5 REPLIES 5

mithun_shetty4
Contributor
0 Kudos
127

U probably have used in the driver program

1.

Loop on ekpo / Item .

Call Smartform FM

Endlloop.

2. may have used TDCOPIES = 10.

Check the 2 things

Former Member
0 Kudos
127

Hi Swapnika,

I think you might have used the below logic,

LOOP AT <item table> into <work area>.

CALL smartform FM.

ENDLOOP.

in this case you will have to give print preview many times (number of entries in your item table). consider using the below logic,

(previously you were using a script. hence there you would have looped the item table and called the main window inside the loop, because you cannot handle a table inside a script. But in case of smartform, you should not loop the item table and call the smartform, because you have an option to handle the tables inside the smartform)

instead of calling the FM inside a item table loop, since this is only for one EBELN, call the FM directly, dont call it inside a loop.

Now the importing parameter of the FM pass your item table and handle the item table inside your SMARTFORM by using a TABLE in the main window.

It means that instead of looping the item table you are going to pass it to the smartform and process it in there.

Please let me know for more details.

Regards,

Praveenkumar T.

Former Member
0 Kudos
127

Hello Swapnika,

1.If you want the the smartform to get generated for each line item .Place the FM "SSF_*" in the loop of item table EKPO.

2.If you want the smartform to get generated after comeplete calulation of item values.Place the FM 'SSF_*" outside item table.

Regards,

Varun

Jelena_Perfiljeva
Active Contributor
0 Kudos
127

Why don't you just pass all the line items to the form and have a line break before each line item? In this way it'll be just one form call but you'll get as many pages as there are line items.

Former Member
0 Kudos
127

Hi,

As praveen and mithun said you can loop the item table and write a where condition based on the "SSF_" FM which will help you in triggering your item data multiple times in the NCAE.

Regards,

Goutam Kolluru.