SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

EA60 Spool download per Invoice

Former Member
0 Kudos


Hello Team,

I am working on EA60(Invoice printing) of ISU. Here If I am running the prinitng based on protion Wise , system will create a single spool request containg all the document .  Now I am writing an enhancement wherein to convert the spool into PDF. It works fine converting the spool to PDF. But as system generate a single spool corresponding to all the invoices so my converted PDF contains multiple pages.

If there any way I can make multiple spool corresponding to every invoice by running the report based on proting.

The Idea is to download the PDF corresponding to every Invoice.

I tries the external mail option in print parameters given in EA60 but it will great n mail corresponding to N invoices within the group & it is very diffcult to download every invoice from mail & make a repository .

Also suggest if I use external mail option while running EA60 portion wise can I have mail header linked with Invoice no or Consumer no so that looking at mail I can say that this invoice belongs to this consumer.

Regards,

Pankaj

14 REPLIES 14

former_member316975
Discoverer
0 Kudos

Hi,

I convert invoices to pdf with ISU_GET_PDF_FILE function. It's work fine.

Regards,

KPG

0 Kudos

Hi Peter,

Can you please elaborate How you have used above said FM to create PDF .

Regards,

0 Kudos

Hi Fox,

Here is a small sample code for you:

REPORT ZTEST.

PARAMETERS:

     P_OBEL LIKE ERDK-OPBEL.

DATA:

     L_PDF  TYPE W3MIMETABTYPE,

     L_SIZE TYPE I.

START-OF-SELECTION.

     CALL FUNCTION 'ISU_GET_PDF_FILE'

          EXPORTING

               X_OPBEL         = P_OPBEL

          IMPORTING

               Y_PDF_FILE_SIM  = L_PDF

               Y_SIZE          = L_SIZE.


     CALL FUNCTION 'GUI_DOWNLOAD'

          EXPORTING

               BIN_FILESIZE  = L_SIZE

               FILENAME      = 'C:\TEMP\BILL.PDF'

               FILETYPE      = 'BIN'

          TABLES

               DATA_TAB      = L_PDF.

Regards,

KPG

0 Kudos

Hi Peter,

Could you please help me to understand that we have a customized Invoice print form . I have uploaded the image of preprinted stationary as a background image . Now once I am printing the invoice via EA22 transaction, I am getting the invoice with background but when printing the same invoice via EA60 its not picking the layout.

Even while trying to convert PDF via FM suggested by you , this will also not pick the background image .

Regards

0 Kudos

Hi Fox,

In our practice we create e-invoices with this FM. We put for all e-invoces a print lock into ERDK (We don't need to mass print this invoces ). In this situtation the FM create PDF data with background images.

I suggest to try this:

     1. Put a brake-point in FM at the second CALL FUNCTION 'EFG_PRINT' at the line 307.

     2. Start my small sample code

     3. In the debug put a 'X' in L_PRINTPARAMS-TDPREVIEW

     4. Execute the code.

In my case it works fine, I get a PDF file with background images.

I suggest you to create a copy from ISU_GET_PDF_FILE. Edit the code, insert a line before line 307 (L_PRINTPARAMS-TDPREVIEW = 'X'.)

Regards,

KPG

0 Kudos

Hi Peter,

Thank you so much I manage to get in a different way but your FM helps me a lot.

Regards,

0 Kudos

Hi Peter,

When I am running EA60 for say a portiton 'GP01' it creates a spool of around say for example 450 pages wherein total print documents in that portion is 463 . Now it misses few documents.

Analyzing the cases I found system left for those cases where the amount is in negative.

But when again I run those missing documents vai EA60(remaining documents) its prints this time.

So can you please suggest why it misses few print documents when running collectively.

Regards,

Pankaj

0 Kudos

Hi Fox,

I don't know. In my company document was never missed in mass printing.

Maybe the negative amount invoices were outsorted. Did you checked it (EA05)? Was all documents enabled before first times the EA60 was running?

Regards,

KPG

0 Kudos

Okie thanks Peter.

Regards

former_member230926
Active Participant
0 Kudos

HI

0 Kudos

Hi Manoj, I have already the tried the option you have suggested wherein I wrote a BDC a passing the the invoices one by one to EA60 but still system creates only one spool .

Please suggest.

Regards,

0 Kudos

Hi Fox ,

Check you print-parameter settings .


Click on print-parameters --> Specify the print-parameter settings --> Click on button side ways to "OutputDevice" ---> in the spool control check or tick on "New spool request" .


By doing this you will have new spool request every time . 

Private_Member_7726
Active Contributor
0 Kudos

Hi,

Marking "New Spool Request" (TDNEWID) in the extended Print Parameters should do the trick, I believe (I don't think SAP standard logic has mandatory spool cumulation per Portion programmed anywhere).

If it does not work, there should be some custom logic somewhere forcing the cumulation, or perhaps the PWB Form has the set Open/Close Optimization active...

If everything else does not lead to the desired result, you should be able to override print parameters in FQEVENT R392. If there has been no custom logic controlling print parameters in the system until now, however, I'd use that exit as a last resort only, because, once introduced, these user exit logics tend to over time become "not particularly transparent" to the "uninitiated"...

cheers

Janis

Edit in: yes, there is just "Spool per Job" control possible via TE564 in Standard, I believe, and no other logic (at least in 6.05)... TE564 Customizing also permits to globally disable Open/Close Optimization.

Message was edited by: Jānis B

Former Member
0 Kudos

Hi Fox,

Our requirement is to create a single PDF for said some 50 customers of a group through EA60 transaction and need to mail in a single PDF. Actually we are trying to create single pdf file but unable to create the same.

Can you please share the input parameters (like other then portion) you were passing in EA60 where single pdf was generating?

Regards,

Akhil