cancel
Showing results for 
Search instead for 
Did you mean: 

BRF+ Application Through ABAP Report.

fathimawajiha
Explorer
0 Kudos
435

Hi,

I wrote the below code in report to create a Application in BRF+. I am able to get the Application Id after the execution of report, but the same is not reflecting in the BRF+.

Can someone please correct me where I'm wrong.

Code-

TRY.
lo_factory = cl_fdt_factory=>if_fdt_factory~get_instance( ).
lo_application = lo_factory->get_application( ).
lo_application->if_fdt_transaction~enqueue( ).
lo_application->set_software_component( iv_software_component = 'Z101_SF_CMP' ).
lo_application->set_application_component( iv_application_component = 'Z101_APP_CMP' ).
lo_application->set_development_package( 'Z101_PACKAGE' ).
lo_application->if_fdt_admin_data~set_name( 'Z101_BRF_APP' ).
lo_application->if_fdt_admin_data~set_texts( iv_short_text = 'Z101_BRF_DEMO' ).
lo_application->create_system_application( ).
CATCH cx_fdt_invalid_call. " FDT: Invalid Call.
lo_application->if_fdt_transaction~activate(
IMPORTING
et_message = lt_message " Messages
ev_activation_failed = lv_boolean " ABAP_TRUE: activation not successful
).
lo_application->if_fdt_transaction~save(
EXPORTING
iv_deep = abap_true
iv_transport_request = 'S4X*******'
).
lo_application->if_fdt_transaction~dequeue( ).
CATCH cx_fdt_input.
ENDTRY.
lv_demo_appl_id = lo_application->mv_id.
WRITE: 'The ID of the application created is: ', lv_demo_appl_id.

Thanks in Advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

markus_greutter
Participant
0 Kudos

I would say lo_application->if_fdt_transaction~activate() and lo_application->if_fdt_transaction~save() should be called in the try and not in the catch block.

Best regards,
Markus