2013 Jun 14 8:25 AM
Dear SAP All,
I am working to Purchase Order Mass Printing through Z program in which i am using 3 Smart forms . these smart forms will be processed one by one for single PO No. and after again repeat for next PO No.
The reason is that i can't create multiple main window in a single smart form and i needed three main window to display PO printout as per client requirement so i am using three smart forms in z program.
smart form 1 for tax related data ( Summary )
smart form 2 for PO line item
smart form 3 for Header Text, terms of delivery and some term of condition
Now my z program is able to print more than one purchase order at single spool number.
But problem is that
when i can pass multipal po for printing then for first po no. showing only pages of smartform3 and for second PO showing pages of smartforms1 and smartforms3.
and i did debug this, i found that data will pass properly through Zprogram to all smartforms.
but i can't understand that why pages are not showing.
Guide me ........
2013 Jun 14 1:16 PM
Hello,
Check following code............
LOOP AT it_tab.
control_parameters-no_dialog = 'X'.
control_parameters-no_open = 'X'.
control_parameters-no_close = 'X'.
AT FIRST.
control_parameters-no_dialog = ' '.
control_parameters-no_open = ' '.
ENDAT.
AT LAST.
control_parameters-no_close = ' '.
ENDAT.
CALL FUNCTION fm_sform
EXPORTING
control_parameters = control_parameters
TABLES
po_item = it_ekpo.
ENDLOOP.
Regards,
Vj
2013 Jun 14 1:21 PM
Hi Saurabh,
you could have nested loops in your smartform main window instead of creating 3 smartforms.
if you need further details let me know
Regards,
Yakub Shah
2013 Jun 14 1:35 PM
Hi,
Please check sy-pagno while debugging of each smartform.
keep your page no in some local variable inside the form and display that variable as page no.
Thanks.
2013 Jun 14 2:35 PM
Hi,
First you design is a bit complex unnecessarily. You can have all the data in single smartform I think. But as you have done this suggestions from vijay would help. Learn a bit more on spool control parameters before you get on. Should help you.
Cheers,
Arindam