cancel
Showing results for 
Search instead for 
Did you mean: 

RFC call Dumps with ***Ilegal reference***

Former Member
0 Kudos

Hello everyone.

We are trying to build a Web Dynpro for Leave Request similar to the one in ESS.

So, we have identified several RFC's to be able to get specific data concerning the owner and the Next Processor for the workflow that will generate the request.

Those RFC are:

PT_ARQ_APPLICATION_CREATE

PT_ARQ_REQUEST_PREPARE

I've made a sequence test by means of SE37 with these RFC and all works well ... as in i don't loose class references.

Calling these RFC from NW04 in the same order ... the second RFC Dump's with *** illegal reference *** when calling the following:

  • Get application initiator pernr

CALL METHOD application->if_pt_req_application~get_initiator

IMPORTING

ex_initiator = initiator.

Why do references are lost between calls of RFC's from NW04???

How can i fix the problem?

Help will be appreciated ...

Thanks,

Mário Semedo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hai Mario Semedo,

I have come across the same problem and after some testing I found that is I am calling both the RFC’s

PT_ARQ_APPLICATION_CREATE

PT_ARQ_REQUEST_PREPARE

In the same sequence from the same event itself, then it works for me.

In the mean time if we are calling it from two different events, then the second RFC gives the dump of “Illegal Reference”.

So I think the key here is to call the two RFC’s one after the other continuously from the same event itself, then your problem will be solved.

Here is the code which I have used, for your reference.

function zam_rfc_leave_application.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(I_USRID) TYPE P_PERNR

*" VALUE(I_MODUS) TYPE PT_ARQ_MODE DEFAULT 'R'

*" VALUE(I_COMMAND) TYPE STRING DEFAULT 'CREATE'

*" EXPORTING

*" VALUE(E_REQUEST) TYPE PTARQ_UIA_REQUEST

*" VALUE(E_LEAVE_APPLN_RETURN) TYPE PTREQ_MESSAGE_TAB

*"----


call function 'PT_ARQ_APPLICATION_CREATE'

exporting

im_pernr = i_usrid

im_modus = i_modus

im_profile = ''

importing

ex_messages = e_leave_appln_return

  • EX_ATTABS_CUSTOMIZING =

.

call function 'PT_ARQ_REQUEST_PREPARE'

exporting

im_request_id = ''

im_command = i_command

importing

ex_request = e_request

ex_messages = e_leave_appln_return

  • EX_DATA_CHANGE_PERMITTED =

  • EX_NOTICE_CHANGE_PERMITTED =

  • EX_COMMANDS =

.

endfunction.

Regards,

Ajith V

Former Member
0 Kudos

Thanks Ajith, that sure did the trick.

Thanks everyone for the help,

Mário

Answers (2)

Answers (2)

Former Member
0 Kudos

Please refer to thread

Cheers

Parry

former_member189631
Active Contributor
0 Kudos

Hi Mario,

CALL METHOD application->if_pt_req_application~get_initiator

IMPORTING

ex_initiator = initiator.

*I thik this method involves some dialoge Programming or screen processing.

*These are not displaced when you call the function module via models.

Regards,

Ram.