Call the test for the format PDF/A-1 before the function module FP_JOB_OPEN is called, as follows:
TRY.
IF cl_fp_feature_test=>is_available(
iv_feature = cl_fp_feature_test=>gc_render_pdfa1 )
= abap_true.
* PDF/A-1 can be generated
ELSE.
* PDF/A-1 can not be generated
ENDIF.
CATCH cx_fp_runtime.
* Add error handling
ENDTRY.
or:
Use the following test for PDF/A-1b, PDF/A-2b, and PDF/A-3b:
TRY.
IF cl_fp_feature_test=>is_available(
iv_connection = p_conn
iv_feature = cl_fp_feature_test=>gc_pdfa_ext )
= abap_true.
* PDF/A-1b, 2b, 3b can be generated
ELSE.
* PDF/A-1b, 2b, 3b can not be generated
ENDIF.
CATCH cx_fp_runtime.
* Add error handling
ENDTRY.