Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to redirect SM30 on table to its main maintenance view

Sandra_Rossi
Active Contributor

Hello,

For information, I'm posting this question along with my answer but you're free to add your own one, I'll accept the best one (according to me).

I have a ZMYTAB table for which I have defined a maintenance view ZMYVIEW (join of ZMYTAB with some text tables to show texts of ZMYTAB values), users should select this maintenance view to maintain the ZMYTAB table.

I'd like to be kind with users, if they do SM30 on the Z table, they should be redirected automatically to the maintenance view.

What is the best way to do this? (apart not doing code and telling the users to use SM30 with the maintenance view)

Thanks for reading me.

Sandra

NB: my system is ECC 6 EHP 7 / ABAP 7.40 SP 23 but you're free to post answers concerning other versions, provided that you indicate the version 😉

1 ACCEPTED SOLUTION

Sandra_Rossi
Active Contributor
0 Kudos

I created both

1) a maintenance dialog for ZMYTAB (which in fact will never open) - not sure whether it's required or not.

2) and an implicit enhancement option at the beginning of function module VIEW_MAINTENANCE_CALL and I did this code:

  view_name = SWITCH #( view_name
      WHEN 'ZMYTAB' THEN 'ZMYVIEW'
      ELSE view_name ).

3 REPLIES 3

Sandra_Rossi
Active Contributor
0 Kudos

I created both

1) a maintenance dialog for ZMYTAB (which in fact will never open) - not sure whether it's required or not.

2) and an implicit enhancement option at the beginning of function module VIEW_MAINTENANCE_CALL and I did this code:

  view_name = SWITCH #( view_name
      WHEN 'ZMYTAB' THEN 'ZMYVIEW'
      ELSE view_name ).

matt
Active Contributor
view_name = z_view_mapper_factory=>get_instance( )->map( view_name ).

🙂

matthew.billingham yes, I know! LOL