on 06-04-2015 6:18 PM
We have a trouble, we are automating the PDF creation but.... how SAP knows which layout have to use and where are the native RPT.
Someone know the path from this files ?
Hi,
It is stored as Hex stream in RDOC table, Field 'Template'.
What you can do is download the required CR Template into a temp file
And call the CR object to open this file.
You can use below code to download the CR file from the table
Public Sub GetCrystalReportFile(ByVal RDOCCode As String, ByVal outFileName As String)
Try
Dim oBlobParams As SAPbobsCOM.BlobParams = oCompany.GetCompanyService().GetDataInterface(SAPbobsCOM.CompanyServiceDataInterfaces.csdiBlobParams)
oBlobParams.Table = "RDOC"
oBlobParams.Field = "Template"
Dim oKeySegment As SAPbobsCOM.BlobTableKeySegment = oBlobParams.BlobTableKeySegments.Add()
oKeySegment.Name = "DocCode"
oKeySegment.Value = RDOCCode '"INV20004" '
Dim oBlob As SAPbobsCOM.Blob = oCompany.GetCompanyService().GetBlob(oBlobParams)
Dim sContent As String = oBlob.Content
Dim buf() As Byte = Convert.FromBase64String(sContent)
Using oFile As New System.IO.FileStream(outFileName, System.IO.FileMode.Create)
oFile.Write(buf, 0, buf.Length)
oFile.Close()
End Using
Catch ex As Exception
Throw ex
End Try
End Sub
Regards
Edy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I believe it is stored in SAP DB not a external file in SAP server folder. When you editing the layout in SAP, after you click save button I guess SAP stores it in DB. If you want you can do full file search in SAP program folder and see if you can find any .rpt file.
Lan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.