Skip to Content
-2

Wrong PDF attachment sent to the customer

Hi Experts,

We have a custom program to create the spool form invoice SAPSCRIPT and convert the spool to pdf and send as email.While sending the emails sometimes program is picking the previous spool and converting to PDF and sending to customer.We got complaints from users like wrong invoices sent to customer.We have included the commit work and wait statement still we are getting the same problem.Kindly anyone advise how solve this issue.

Thanks & Regards,

Anu

Add comment
10|10000 characters needed characters exceeded

  • So, you have a wrong logic to determine the number of the generated spool. The next thing is to tell us how the whole thing works. If you don't know then you must first investigate by yourself how it works, then tell us.

Further commenting has been locked.
  • Get RSS Feed

2 Answers

  • Aug 14, 2017 at 02:22 PM

    The question for me is: why do you create a spool request in the first place? You could tell SAPscript API to return OTF data and convert OTF to PDF using CONVERT_OTF module.

    If you have to create spool request - the SAPscript API returns you the spool id of the created request. There should not be a possibility for error if that spool ID is taken and converted to PDF and then sent via email...

    Pls clarify

    Regards,

    Alex

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Anu,

      you should search for 'rqident' in you custom program (and includes) because your symptoms are that it requests last entry in the spools table. That can explain why, when several requests are done at the same times, the last entry is not corresponding to your run.

      If there is request to table rqident then you have to replace it by Alexander's suggestion.

      Best regards

      Bertrand

  • Aug 14, 2017 at 10:51 AM

    Hi,

    You already know the problem, namely that in some cases it is picking the previous spool number. So try to replicate it on a QA environment and debug to see how this is caused. Alternatively enforce a wait statement after the creation of the spool.

    Kind regards, Rob Dielemans

    Add comment
    10|10000 characters needed characters exceeded