how to create BRF application via code
生活随笔
收集整理的這篇文章主要介紹了
how to create BRF application via code
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
使用如下代碼自動創建新的BRF application:
REPORT zceate_application.DEFINE write_errors.IF &1 IS NOT INITIAL.LOOP AT &1 ASSIGNING <ls_message>.WRITE: <ls_message>-text.ENDLOOP.RETURN.ENDIF. END-OF-DEFINITION.START-OF-SELECTION.DATA: lo_factory TYPE REF TO if_fdt_factory,lo_application TYPE REF TO if_fdt_application,lt_message TYPE if_fdt_types=>t_message,lv_boolean TYPE abap_bool.FIELD-SYMBOLS: <ls_message> TYPE if_fdt_types=>s_message.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_development_package( '$TMP' ).lo_application->if_fdt_admin_data~set_name( 'PRICING' ).lo_application->if_fdt_admin_data~set_texts(iv_short_text = 'Pricing' ).lo_application->if_fdt_transaction~activate(IMPORTING et_message = lt_messageev_activation_failed = lv_boolean ).write_errors lt_message.lo_application->if_fdt_transaction~save( ).lo_application->if_fdt_transaction~dequeue( ).lo_factory = cl_fdt_factory=>if_fdt_factory~get_instance(iv_application_id = lo_application->mv_id ).BREAK-POINT.WRITE:/ lo_application->mv_id.記下輸出的application id: FA163E8EAB031EE48B80D14409724BFF
使用BRF+ tcode打開BRF work bench:
利用如下搜索條件查找剛剛創建好的application:
找到匹配的application. 點擊expand button查看header信息:
ID和report里輸出一致,證明這就是report里剛剛創建的application:
總結
以上是生活随笔為你收集整理的how to create BRF application via code的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c# 创建excel表头及内容
- 下一篇: CRM One order里user s