Call SM30 or SM34 from a function module
2023-06-05
![images/thumbnail.jpg - Thumbnail](/en/2023/06/funcoes-para-sm30/images/thumbnail_hueca3c2b560369f230ceb2205b8c311cb_35104_300x0_resize_q75_box.jpg)
If you want to call the SM30 from a program you can use CALL TRANSACTION
but there is a simpler way.
SAP provides some functions to make this easier:
VIEW_MAINTENANCE_CALL
VIEW_MAINTENANCE_SINGLE_ENTRY
VIEWCLUSTER_MAINTENANCE_CALL
(for SM34)
Here’s an example:
DATA(v_t001w) = VALUE v_t001w(
mandt = sy-mandt
werks = '0001' ).
CALL FUNCTION 'VIEW_MAINTENANCE_SINGLE_ENTRY'.
EXPORTING
action = 'SHOW'.
view_name = 'V_T001W'
CHANGING
entry = v_t001w.
Nice?
Thank you Luís Rocha for the tip.
Greetings from Abapinho.