Download PDF from adobe form in local system from SAP ODATA backend code in SEGW

The bottom code is working fine in SE38 include program but it failing in segw OData backend code with

sy-subrc = 21[control_flush_error] 

CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            filename                lv_filename
            filetype                  ‘BIN’
          CHANGING
            data_tab                lt_pdf
          EXCEPTIONS
            control_flush_error          21
            not_supported_by_gui    22
            error_no_gui                    23
            OTHERS                          24.

how can we download the adobe form output pdf in local system in odata backend code via SEGW.

Scroll to Top