Banner
Banner

Attention: open in a new window. PDFPrintE-mail

2008
17
Jan

Debugging adding a message to SAP EM from ECC

When you are call the mySAP SCM BAPI /SAPTRX/BAPI_EH_ADDEVENTMSG_02 to create an event in SAP Event Management you will need to run it through debugging if you are experiencing issues. This blog shows how to call the BAPI to run it in debug mode...

* To debug online:
* 1: Put break point in here
* 2: comment out 'IN BACKGROUND TASK' below

* 3: Switch on system debugging

* 4: set t_flag1 = 'X', t_flag2 = 'X' and t_flag3 = 'A'

* 5: Single step at BAPI call ensuring the flags are set

  LOOP AT lt_trxserv INTO lw_trxserv.
    
IF NOT lt_bapi_evm_header[] IS INITIAL.

      t_flag1 = space.
      t_flag2 = space.
      t_flag3 = 
'N'.

      
CALL FUNCTION '/SAPTRX/BAPI_EH_ADDEVENTMSG_02'
        
IN BACKGROUND TASK
        DESTINATION lw_trxserv-rfcdest
        
EXPORTING
          simulate           = t_flag1
          synchronous        = t_flag2
          eh_generation_mode = t_flag3
        
TABLES
          trackingheader     = lt_bapi_evm_header
          trackeemodify      = lt_trackeemodify
          trackparameters    = lt_trackparameters
          
return             = lt_bapireturn.

This allows you to jump into SAP SCM from ECC and continue in Simulation mode. 

 

Last Updated (Thursday, 17 January 2008 18:28)
Banner
Free software downloads