01-21-2015 2:57 PM
Hello Experts,
While checking SLG1 log I am getting few errors like
Error retrieving InvoicePDF: InvoiceDoc 03******1 URL for object 084******380 (CA_DOC)
Error retrieving Invoice for user C*****23, BP 0*****1 (return code 0, response 0)
Assume these stars are any alphanumeric value.
Could you please tell me what is the root cause of error and any solution.
Thanks & Regards
Amit
01-21-2015 5:47 PM
Amit:
Look at the message details - and also at the process which is being executed.
regards,
bill.
01-26-2015 12:23 AM
Hi Amit, i guess you are working with OData entity InvoicePDF from Multichannel foundation.
To make it work, you need to read this help documentation:
Standard implementation will take a look at archive for pdfs. If it is not setup and you want to simulate PDFs in real time , then you can overwrite the Badi. Mentioned here:
In this API, BAdI FIS_INVOICEDETAIL is used. This BAdI has several SAP-delivered implementations. One of them is specifically for IS-U: ISU_INVOICEDETAIL.
Sample code (should not be used productively) for method GET_INVOICE_DETAIL could look like this:
DATA lv_empty TYPE string.
DATA lv_invoice_id TYPE opbel_kk.
DATA:
l_pdf TYPE xstring,
lt_pdf_sim TYPE w3mimetabtype,
l_pdf_sim LIKE LINE OF lt_pdf_sim,
lt_pdf_arc TYPE ebc_t_raw_data,
l_pdf_arc LIKE LINE OF lt_pdf_arc.
DATA: lt_pdf TYPE fis_inv_docdetail_raw_t,
ls_pdf TYPE tbl1024.
* First try to retrieve simulated PDF bill
IF i_billing_doc CN 'ISU'.
SPLIT i_billing_doc AT 'ISU' INTO lv_empty lv_invoice_id.
CALL FUNCTION 'ISU_GET_PDF_FILE'
EXPORTING
x_opbel = lv_invoice_id
x_no_dialog = 'X'
IMPORTING
y_pdf_file_sim = lt_pdf_sim
y_pdf_file_archiv = lt_pdf_arc
EXCEPTIONS
not_found = 1
general_fault = 2
OTHERS = 3.
IF sy-subrc = 0.
IF lt_pdf_sim[] IS NOT INITIAL.
* converting lines of pdf table into one string
LOOP AT lt_pdf_sim INTO l_pdf_sim.
CONCATENATE l_pdf l_pdf_sim-line INTO l_pdf IN BYTE MODE.
ENDLOOP.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = l_pdf
TABLES
binary_tab = t_pdf.
ENDIF.
ENDIF.
"t_pdf = lt_pdf.
ENDIF.
I hope this helps.
Yevgen