Tuesday, December 17, 2013

How to force sm30 to edit mode to change data in a production system

Hi folks,
from time to time it happens that you need to change data from sm30 on a closed systems.
A Transport is not an option and change the table to editable in se16 o to "application data" in se11 neither.

You need to be able to edit data in debug mode.
here the procedure:

1) Determine the name of the module pool that contains your view. (Se56 function group field


2) Put a break point into
- View module pool  ( for example SAPL0PX0 ) Include  LSVIMF21 line 297
the context is:
* CHECK X_HEADER-FLAG NE VIM_TRANSPORT_DENIED.          "240997
  IF x_header-flag NE vim_transport_denied AND
     vim_actopts-transp_off NE bc_transport_denied AND
     vim_client_state EQ vim_locked AND

- Program SAPLSTRD inclue LSTRDU50 line 816
the context is:
*** client_edit = 2 (closed-client): (DDIC-EXIT) =================> ****
    IF   system_client_edit  =    2
    AND ( ls_s-category        =    cat_cust
    OR   ls_s-category         =    cat_sys_cust )
    AND  ls_s-cli_dep          <>   space
    AND  ls_s-check_result          <>   'S'
    AND  ls_s-no_wbo_control             =    space.
      IF   ls_g-masterflag  <>   space.

3) Goto sm30 put in your view and press edit. When the debugger pops up in the first point set vim_client_state to '1' and in the second point set ls_g-masterflag to X
4) after each variable change press F8 to continue
5) sm30 shows the view as editable you can do changes
6) Press save and change the variables in the debugger again to the values i've told.

Caveat: doing so you disalign your production systems with development and quality. So if you do it at the same time you set up a transport to align the data. 

I imagine you will use this if transports are down or charm is down or it's late at night and you have no one to authorize the transport but the change is vital for your operations.

That's it.
Hope it help.
And Happy Holidays!


ps. this works an R/3 systems with this patch level.
SAP_BASIS    731    0007    SAPKB73107    
SAP_ABA    731    0007    SAPKA73107    
PI_BASIS    731    0007    SAPK-73107INPIBASIS    
ST-PI    2008_1_700    0008    SAPKITLRD8  
SAP_BW    731    0007    SAPKW73107   
MDG_FND    731    0007    SAPK-73107INMDGFND 
SAP_AP    700    0029    SAPKNA7029    
SAP_BS_FND    731    0007    SAPK-73107INSAPBSFND  
WEBCUIF    731    0007    SAPK-73107INWEBCUIF  
MDG_APPL    606    0007    SAPK-60607INMDGAPPL  
SAP_APPL    606    0007    SAPKH60607  
SAP_HR    604    0063    SAPKE60463    
no guarantee that it works on newer or older systems.