Skip to Content
0
Apr 19, 2011 at 12:23 PM

How to trigger a proxy in SAP PI 7.1

20 Views

Dear friends

How are you? I am not able to calla proxy in my system, it throws the dump error like

The reason for the exception is:

You attempted to use a 'NULL' object reference (points to 'nothing')

access a component.

An object reference must point to an object (an instance of a class)

before it can be used to access components.

Either the reference was never set or it was set to 'NULL' using the

CLEAR statement.

I have one function module in that I am calling method to execute proxy.

this is the way.

data: proxy_create_acc type ref to ZCL_SI_ACCOUNT_CRT,
      lv_param_t type standard table of ZMT_ACCOUNT_CR_T,
      lv_param_l type ZMT_ACCOUNT_CR_T,
      im_account type ZDT_ACCOUNT_CRT.

      im_account-account_name = 'BABINS'.
      im_account-value = im_param.
      lv_param_l-MT_ACCOUNT_CR_T = im_account. ,

      APPEND lv_param_l to lv_param_t . <- this has the data
TRY.
CALL METHOD proxy_create_acc->ZII_SI_ACCOUNT_CRT~si_account_crt  <-- error is here
  EXPORTING
    input  = lv_param_l. <-this has the data
 commit work.

 CATCH zcx_ft_fault_acr .
    DATA fault TYPE REF TO ZCX_FT_FAULT_ACR .
    data textid type SOTR_CONC.
    data message type STRING.
    CREATE OBJECT fault.

    return-id  = '001'.
    textid = fault->TEXTID.

 ENDTRY.

Am I writing wrong. please help me to currect this error, your any help will be appreciated. thank you so much.