on ‎2023 Aug 22 12:57 PM
Request clarification before answering.
Hello Hüseyin,
https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abensaver_method_save.htm solved my issue,
thanks for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @mtunc The link doesn't work anymore. Can you please elaborate how exactly did you resolve this issue?
Hi @hdemirkale can you please share the updated link to the documentation? I am using an instance factory action in an unmanaged behavior implementation
and facing similar issue (Statement "INSERT " is not allowed with this status.).
I understand that one alternative is to use bgPF method which will create the print queue item in a separate background session (LUW) but curious to know if any other way as mentioned in this thread.
Best regards,
Sumit
Hello Mehmet,
Could you test with the below implementation ?
https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abensaver_check_before_save.htm ?
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Mehmet,
how are you getting IV_ITEMID ? with cl_print_queue_utils=>create_queue_itemid( )?
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Huseyin,
I forgot to add some details to my issue. Let me clarify the general situation;
We are using a CDS named ZDD_BARKOD with a unmanaged behaviour and v2 odata service.
We are using post method for sending necessary data to adobe service and using create method to send it.
We are parsing the returning binary data to iv_print_data,
name of queue to iv_qname,
and file name to iv_name_of_main_doc parameters.
But we are getting error as seen on the screenshot in the standard method named cl_print_queue_utils=>create_queue_itemid( )
in line 72 with "in update task" statement.
You can see the rest of the method ;
METHOD pdf_to_print.
TYPES: BEGIN OF ty_pdf,
fileName(120) ,
fileContent TYPE xstring,
qname(32),
END OF ty_pdf.
DATA ls_pdf TYPE ty_pdf.
DATA:lv_buffer TYPE xstring.
DATA(lo_client) = NEW zcl_fp_client(
iv_name = *********
).
DATA(lv_x_xml) = xco_cp=>string( iv_xml_raw )->as_xstring( io_conversion = xco_cp_character=>code_page->utf_8 )->value.
DATA(lv_xml_encode) = cl_web_http_utility=>encode_x_base64( lv_x_xml ).
DATA(lv_rendered_pdf) = lo_client->reder_pdf( iv_xml = lv_xml_encode
iv_form_name = iv_form_name
iv_template_name = iv_template_name ).
/ui2/cl_json=>deserialize(
EXPORTING
json = lv_rendered_pdf
CHANGING
data = ls_pdf
).
IF ls_pdf IS NOT INITIAL.
IF iv_pdf_name IS NOT INITIAL.
ls_pdf-filename = iv_pdf_name.
ENDIF.
DATA(lv_qitem_id) = cl_print_queue_utils=>create_queue_itemid( ).
cl_print_queue_utils=>create_queue_item_by_data(
EXPORTING
iv_qname = iv_printer_name
iv_print_data = ls_pdf-filecontent"
iv_name_of_main_doc = ls_pdf-filename
iv_itemid = lv_qitem_id
IMPORTING
ev_err_msg = rv_error
RECEIVING
rv_itemid = lv_qitem_id ).
ELSE.
rv_error = 'Adobe servisinin ' && iv_form_name && ' formunun ' && iv_template_name && ' templatinden PDF oluşturulamamıştır.' ##NO_TEXT .
ENDIF.
ENDMETHOD.
| User | Count |
|---|---|
| 14 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 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.