2011 Apr 13 10:32 AM
Hello all,
We have a requirement to send out spool files generated out of invoices to a 3rd party printing house (who prefer to get the file in a CSV,TXT,XLS format, not PDF). The bespoke ABAP program writes invoice data from individual spools into a text file and adds a Header line for each invoice.
This passes through the SAP standard module RSPO_RETURN_SPOOLJOB, where the RAW format is converted. There are OSS notes on this FM as some formats like EXT and BCS give a dump - none of the notes can help with the issue.
However, I am not able to get the correct formatting of the invoice data when the spool is saved as a text file - the alignment of columns is lost, and it looks more 'compressed' than what you see via SP01.
We use SAP Script to format data, and tried to tweak it to work, but it does not help.
Any help to resolve this gratefully received.
Thanks,
Pramod
Edited by: pgokhale on Apr 13, 2011 11:39 AM
2011 Apr 13 1:00 PM
Which program/transaction are you using to generate the output ?
2011 Apr 13 1:14 PM
Hi Anup,
Thanks for getting back.
We are using a bespoke print program (with SAP script) and output type to generate the output. The spool request gets generated automatically once the invoice is saved to the database.
Thanks,
Pramod
2011 Apr 13 1:29 PM
I encountered a similar situation while creating the output from F.27 / Program RFKORD11. The solution that was found was
that the standard report was copied as a custom and output ( Which was T_PDF_TAB )
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'ASCII'
TABLES
OTF = I_OTF
LINES = T_PDF_TAB
was formatted as per the requirement and FM 'GUI DOWNLOAD ' was called to download the formatted output in text format.
2011 Apr 13 1:58 PM
Hi Anup,
Many thanks for the prompt reply.
Please note that we are already using FM CONVERT_OTF already as part of RSPO_RETURN_SPOOLJOB. It picks up spool data in layout form, converts it to OTF with spacing as required etc, and then converted data is passed to CONVERT_OTF. But the text file that gets generated is NOT an exact replica of the spool file and that's where the problem is.
Thanks,
Pramod
2011 Apr 14 1:10 PM
That is what exactly i am trying to say. If your spool output doesn't match your text field output in terms of spacing and all
then you have to format the text output.
2011 Apr 15 10:18 AM
Thanks Rudolf and Anuj, the developers are currently investigating...
2012 Jan 10 9:41 AM
Hi Pgokhale!!!
Searching information in SDN forums I've found exactly the problem I have in your thread, please, can you help me if you solve the issue with the formatting text when you transfer a spool order into txt file? I'm having the same problem, the file I get and sent by attachment is not equal to the one that is in the spool order.
Please, help me, I'm getting crazy with this issue...
Thanks a lot, have nice day and happy new year.
Rebeca
2011 Apr 13 5:09 PM
Hi,
Try to have a look at report: RSPO0047 . You can use this report to save spool data to a local file.
You can check the code and see how it is done which might be helpfull for you.
Cheers,
Roelof