Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *&---------------------------------------------------------------------*
- *& Report ZZ_TEST_CHANGE_PARAMETER
- *&---------------------------------------------------------------------*
- *& Change the interface of a function module programmatically
- *& See http://scn.sap.com/thread/3210360
- *& Doesn't regenerate the interface template in the implementation part
- *&---------------------------------------------------------------------*
- report zz_test_change_parameter.
- parameters: p_fnam type eu_lname default 'Z_TEST_FOR_CHANGE',
- p_para type rs38l_par_ default 'IV_PARAM',
- p_type type rs38l_typ default 'BOOLE_D'.
- start-of-selection.
- perform start.
- * ---
- form start.
- data: lo_fm type ref to cl_function_builder,
- lo_dark type ref to if_wb_dark_functionality,
- ls_import type rsfbpara,
- lv_line type i.
- create object lo_fm.
- lo_dark ?= lo_fm.
- lo_dark->read( im_name = p_fnam ).
- read table lo_fm->interface-import into ls_import
- with key parameter = p_para.
- check sy-subrc eq 0.
- lv_line = sy-tabix.
- ls_import-structure = p_type.
- call method lo_fm->update_parameter
- exporting
- parameter = ls_import
- line = lv_line
- parameter_type = 'I'
- changing
- param_table = lo_fm->interface-import
- param_docu = lo_fm->interface-paramtext
- modparam = lo_fm->interface-nparam
- moddocu = lo_fm->interface-npdocu
- exceptions
- error = 1
- others = 2.
- if sy-subrc <> 0.
- message id sy-msgid type 'I' number sy-msgno
- with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
- endif.
- lo_dark->save( ).
- lo_dark->activate( 'X' ).
- commit work.
- endform.. "start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement