‎2012 Dec 20 5:00 AM
Hello Guru's
My requirement is : If I have line item details with different Vendor then need to print each vendor with its specific line items should have seperate pages also with vendor address at the address window.
I searched SCN and got the below solution :
and managed to print by creating an Event on Sort Begin for customer in my main window by sorting the customer field ( table looping in SF ) but I am getting first as blank page with other window details printed on the first page....more over if I use Event on Sort End I get last page as blank with other window details in it.
Also I want to display Vendor address specific to line items in address window of each page.
Please suggest if you have any valuble solution.
Note: Please don't suggest loop of SF FM as my one more requirement (each page should have 4 copies like 1,1,1,1 : 2,2,2,2 etc )
which cannot be achieved by looping.
‎2012 Dec 20 5:17 AM
Hi Srikanth,
Based on my view of your requirement, I'll explain how to solve your problem with a small example.
For say if you are having 3 line items in item related internal table
Header_tab
rec1
rec2
rec3
Item_tab
rec1_item1
rec2_item1_v1
rec2_item2_v2
rec3_item1_v1
rec3_item2_v1
rec3_item3_v2
as you see there are 6 records in the item table. Look at last 3 records, here 2 records belong to vendor v1 and one record belong to vendor v2.
I think you will pass these three records information to smartform using the interface.
Inside the smartform there is no technique to dynamic .
So here dont pass the three records to samrtform. Better take the 3 records into other internal table say some dummy_item_tab .
dummy_item_tab
rec3_item1_v1
rec3_item2_v1
rec3_item3_v2
Sort according to header, item and vendor number.
Process these to the smartform then .
Hope this will helps.
‎2012 Dec 20 5:23 AM
I mean loop the dummy table in report and process them based on your requirement
say
loop at item_tab.
loop at dummy into local_dummy.
at end of vendor.
call function ssf_open.
call smartform
endloop.
call function ssf_close.
endloop.
‎2012 Dec 20 5:25 AM
Hello Sudheer,
Thanks for your comments,
I already tried this way;
But this one does not satisfy my other requirement ie: I want to print first page 4 times , 2nd page 4 times and so on..this is not achievable by this method as it considers all pages as one and its prints like 1,2,3... / 1,2,3.. instead of 1,1,1 / 2,2,2 / 3,3,3 ...
please advice if this is continous printing way is achievalble by this method...
‎2012 Dec 20 6:16 AM
Here you can do it by
loop at item_tab.
loop at dummy into local_dummy.
at end of vendor.
call function ssf_open.
do n times.
call smartform
enddo.
endloop.
call function ssf_close.
endloop.
say you have n = 3 and you have the records as
rec3_item1_v1
rec3_item2_v1
rec3_item3_v2
here you will get docs as v1v1v1 and v2v2v2.
Message was edited by: S M SUDHEER KUMAR CHUNDURU