on 06-27-2016 7:48 AM
Hello experts,
I have a requirement to get PDF payslips from sap and displaying it in .net web page.
Can some one suggest me the procedure to do this task.
What format of data should i request my ABAP team to consume it in the .net
Regards ,
siva
The way we do it is with an RFC that returns a Binary String. Then the .NET code simply writes the binary data to the HttpResponse.
Response.Clear()
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = String.Format("application/pdf; filename=""{0}.pdf""", docNumber)
Response.BinaryWrite(obj_pdf)
I will try and locate a sample of the ABAP-side, too
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Case Ahe,
I found a way to pass PDF file in SAP using SOLIX_TAB the pdf binary value in rows for IRFCtable and converted that into Data table. Concatenated all the rows
but it takes that Binary value as string or object data type.
When i convert that into Byte array and pass value to Response.BinaryWrite(<byte>) but still not generating PDF file.
please help me to solve this task.
Regards,
sivakumar.
The binary string needs to be converted from OTF, if you can manage it. I use the following function call to convert the OTF of the PDF into a string:
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = GV_BIN_FILESIZE
BIN_FILE = binstring
TABLES
OTF = GT_OTF
LINES = GT_PDF_TAB
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
The output should look something similar to "255044462D312E330D0A25E2E3CFD30D0A3... " etc.
My output type for "BINSTRING" by the way is "XSTRING"
Hope that helps.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.