0

I got the task to front- and backend code a web interface for an overview about all the invoices from a specific customer in our SAP Business One system. So far so good, but now I also need to call these invoices as a PDF file and display them in a new browser tab, as it gets generated on-the-fly in our system I guess. I found this page from SAP: https://help.sap.com/viewer/284ff5baa45f4057a251ff4266d4fcd1/2011.500/en-US/fae9de62113646cf843291a38210b94e.html

But I doesn't really get the point of it. It's also says "SAP S/4HANA Cloud" but I'm not sure if it's integrated in B1 in some way, or something way different, I'm just looking for a proper REST-API to get invoices as PDF files with a specific identifier.

So I don't know, maybe you guys can help me out. I'm using PHP btw and till now I only used SAP libraries to build CURL calls for our local system like this in the end:

https://sys-sap/b1s/v1/Invoices?$select=DocEntry,DocNum,DocType,CardCode&$filter=CardCode eq 30088

and it returns the desired data of invoices I want. Now I need the PDF's. Thanks in advance!

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • I do not believe there's an endpoint in B1 Service Layer for getting a PDF (of anything). Instead the common solution is to load the Crystal Report runtime and have that render a PDF. This means you'll need a Crystal template that takes the invoice ID as a parameter. – Daz Dec 31 '20 at 08:28
  • We're generating PDF documents in B1if (Business One Integration Services) scenarios with http inbound, so that applications can call report PDFs by http call, without having to utilize the CR SDK on their own. – mweber Jan 03 '21 at 11:50
  • @mweber how do you do that? Is there a specified service in the Service Layer API Reference document? – MyNameIsLinuxx Jan 05 '21 at 12:00
  • @MyNameIsLinuxx No, it's not in Service Layer, but a custom built scenario within B1if which renders the report and returns the PDF. – mweber Jan 05 '21 at 12:15
  • @mweber could you send a link where this is explained? I can't find any useful or comprehensible information at all. – MyNameIsLinuxx Jan 05 '21 at 13:05
  • @MyNameIsLinuxx I only know the official documentation, that can be opened from the B1if web interface. There are also some problem threads in answers.sap.com, e.g. https://answers.sap.com/questions/13071617/b1if-how-to-use-crystal-report-atom-for-downloadin.html. – mweber Jan 05 '21 at 14:21

0 Answers0