Problem solve Get help with specific problems with your technologies, process and projects.

Processing which subroutine?

Have you ever asked how to find out in which order the userexits in a module (e.g. SAPMV45A) are processed?

Have you ever asked how to find out in which order the userexits in a module (e.g. SAPMV45A) are processed?

With a simple routine, which you have to implement in each routine, you will be able to find out.

PERFORM actual_subroutine.

Instead of writing the result you may insert the actual subroutine and a timestamp (and maybe okcode?) into your own table. The write will not work.

Set the parameter-id "TST" to "X" before you want to "debug" the processed userexits and clear it after having finished.


 FORM actual_subroutine.

  data testing.
  get parameter id 'TST' field testing.

*-- Process only if testing parameter 
*-- is active
  check testing = 'X'.

  TYPES: 
    begin of abap_call_stack_entry,
	  mainprogram like sy-repid,
	include like sy-repid,
          line	type i,
	  eventtype like abdbg-leventtype,
	  event like abdbg-levent,
	  flag_system,
    end of abap_call_stack_entry.
	
  DATA:	
    acse type abap_call_stack_entry,
    tab type table of   
        abap_call_stack_entry.


  CALL 'ABAP_CALLSTACK' 
    ID 'DEPTH'     FIELD 2
    ID 'CALLSTACK' FIELD tab.

  LOOP AT itab INTO acse FROM 2.
  
    WRITE: 
   	/ 'Mainprog:', cse-mainprog,
	/ 'Include: ', cse-include,
	/ 'Event:   ', cse-eventtype, 
                       cse-event.
****
****  INSERT struc INTO TABLE zxroutine.
****

  ENDLOOP.

ENDFORM.

Dig Deeper on SAP selection and implementation

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchContentManagement

SearchHRSoftware

Close