Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

while calling ZRFC , getting SY-subrc = 2

Former Member
0 Kudos

Hi All,

in below piece of code i m getting SY-SUBRC = 2. , but 'ADW200_F' is working fine in Development (SM59 connection test is ok)

ELSEIF nast-nacha EQ 2.

IF sy-sysid = 'TDW'.

l_dest = 'ADW200_F'.

ELSEIF sy-sysid = 'TCW'.

l_dest = 'ACW100_F'.

ELSEIF sy-sysid = 'TPW'.

l_dest = 'APW100_F'.

ELSEIF sy-sysid = 'TD2'.

l_dest = 'ADW200'.

ENDIF.

l_wa_control_parameters-preview = ' '.

l_wa_output_options-tdnoprint = ' '.

CALL FUNCTION 'ZRFC_EBP_PO_PRINTING'

DESTINATION l_dest

EXPORTING

t_ekko = l_doc-xekko

t_nast = l_nast

t_lfa1 = w_lfa1

t_adrc = t_adrc

wa_control_parameters = l_wa_control_parameters

wa_tddest = l_wa_output_options-tddest

wa_tdimmed = l_wa_output_options-tdimmed

wa_tdtelenum = l_wa_output_options-tdtelenum

wa_bcs_commit = l_wa_output_options-bcs_commit

wa_tdteleland = l_wa_output_options-tdteleland

wa_tdnoprint = l_wa_output_options-tdnoprint

wa_tdcopies = l_wa_output_options-tdcopies

w_remark = w_remark

w_attn = w_attn

w_text = w_text

w_pay_text = w_pay_text

l_shp_adrnr = l_shp_adrnr

w_desc = w_desc

w_line2 = w_line2

w_line = w_line

w_ebelp1 = w_ebelp1

w_key_tabkey = w_key_tabkey

w_chtxt = w_chtxt

w_batch = w_batch

w_kurztext = w_kurztext

w_zgtyp = w_zgtyp

w_werks = w_werks

w_index = w_index

w_ven_tel = w_ven_tel

w_ven_email = w_ven_email

w_sy_date = w_sy_date

w_po_date = w_po_date

w_eknam = w_eknam

w_ektel = w_ektel

w_telfxt = w_telfxt

w_tel_extens = w_tel_extens

w_smtp_addr = w_smtp_addr

*MOD02{

  • w_dly_date = w_dly_date

  • w_date = w_date

*}MOD02

w_maktx = w_maktx

w_ctr = w_ctr

w_mfrpn = w_mfrpn

*MOD01{

w_wempf = w_wempf

l_cons_kbetr = l_cons_kbetr

l_cons_kpein = l_cons_kpein

w_land = w_land

w_kalsm = w_kalsm

w_mwskz_text1 = w_mwskz_text1

w_adrnr = w_adrnr

*}MOD01

TABLES

t_ekpo = l_doc-xekpo

t1_tline = t1_tline

t_item_text = t_tline

t_xaend = t_xaend

*MOD01{

  • lfa1 = t_lfa1

t_kna1_ad = t_kna1_ad

t_lfa1_ad = t_lfa1_ad

t_t001w_ad = t_t001w_ad

t_address_details = t_address_details

t_t005t = t_t005t

t_text_lines = t_text_lines

*}MOD01

*MOD02{

t_eket_date = t_eket_date

*}MOD02

EXCEPTIONS

communication_failure = 1

system_failure = 2.

IF sy-subrc EQ 0.

ENDIF.

3 REPLIES 3

Former Member
0 Kudos

D,

Set an external breakpoint inside at the beginning of 'ZRFC_EBP_PO_PRINTING' in the remote system... do you reach the b/p ?

0 Kudos

Hi Dhananjay,

ELSEIF nast-nacha EQ 2.

Have you tried executing the RFC from SE37 does it run successfully? Or does it throw any screens/messages at you?

Seems like(by the above ELSEIF) you are calling the RFC in a routine attached to a sub routine? If this is so and the processing time is "Process Immediately" you cannot have the RFC throwing any message/screens at you.

Check ST22/SM21 is the remote system for more information, in case something went wrong in the target system.

@John

Set an external breakpoint inside at the beginning of 'ZRFC_EBP_PO_PRINTING' in the remote system

John, he won't be able to do this, if the scenario is as above.

Regards,

Chen

Edited by: Chen K V on Jun 16, 2011 9:05 AM

martin_voros
Active Contributor
0 Kudos

Hi,

you can add MESSAGE smess after system_failure exception where smess is a flat structure. You will get the first line of corresponding short dump. So it might help you to figure out what the issue is. You can also go to target system and check transaction ST22 for dumps.

Cheers