cancel
Showing results for 
Search instead for 
Did you mean: 

RFC reciever not working

Former Member
0 Kudos

Hi,

I am calling this RFc but i get an exception in the adapter.

Is it some thing with how the RFC is implemented?

FUNCTION Z_RECEIVE_FROM_NIPENDO.

*"----


""Local interface:

*" IMPORTING

*" VALUE(TYPE0) TYPE CHAR20

*" TABLES

*" DATA_TABLE STRUCTURE ZNIPENDO_TABLE

*"----


      • rfc communication from nipendo

data: begin of LT_DUMMY_LINE occurs 0. "30/08/05

include STRUCTURE tline.

data: end of LT_DUMMY_LINE.

DATA: BEGIN OF TEXT_KEY,

OBJECT LIKE THEAD-TDOBJECT,

NAME LIKE THEAD-TDNAME,

ID LIKE THEAD-TDID,

SPRAS LIKE THEAD-TDSPRAS,

END OF TEXT_KEY.

data:lv_voy type VSNMR_V.

  • Added Robin.M 23.02.06 - for conversion tables

constants: c_def_lifnr like zsdxi001-zlifnr value '1002945'.

data: l_lifnr like zsdxi001-zlifnr.

tables:ZNIPENDO_TABLE,ZSD_BOOKING.

if not DATA_TABLE[] is initial.

loop at DATA_TABLE.

  • Added Robin.M 23.02.06 - conversion of values from vendor to us

l_lifnr = c_def_lifnr. " Change when we have a field for vendor

SELECT SINGLE zbzirk FROM zsdxi001 INTO data_table-zvessel_n

WHERE zlifnr = l_lifnr

AND zvalue = data_table-zvessel_n.

SELECT SINGLE zknote FROM zsdxi002 INTO data_table-zport_fr

WHERE zlifnr = l_lifnr

AND zvalue = data_table-zport_fr.

SELECT SINGLE zknote FROM zsdxi002 INTO data_table-zport_to

WHERE zlifnr = l_lifnr

AND zvalue = data_table-zport_to.

SELECT SINGLE zmagrv FROM zsdxi003 INTO data_table-zmagrv

WHERE zlifnr = l_lifnr

AND zvalue = data_table-zmagrv.

SELECT SINGLE zmtart FROM zsdxi004 INTO data_table-zmatnr_ty

WHERE zlifnr = l_lifnr

AND zvalue = data_table-zmatnr_ty.

  • End Add Robin.M 23.02.06

move-corresponding DATA_TABLE to ZNIPENDO_TABLE.

ZNIPENDO_TABLE-zstatus = '1'.

insert ZNIPENDO_TABLE.

commit work.

*1)Automatically confirmation "30/08/05

lv_voy = ZNIPENDO_TABLE-ZVOYAGE.

CALL FUNCTION 'Z_BI_VA02_VESSEL_VOY'

EXPORTING

IM_VBELN = ZNIPENDO_TABLE-vbeln

IM_VESSEL = ZNIPENDO_TABLE-ZVESSEL_N

IM_VOYAGE = lv_VOY.

*2) set status in ZSD_BOOKING to -->2

move-corresponding ZNIPENDO_TABLE to ZSD_BOOKING.

ZSD_BOOKING-ZERDAT = sy-datum.

ZSD_BOOKING-ZENTRY_NUM = 999.

ZSD_BOOKING-zstatus = '2'.

INSERT INTO ZSD_BOOKING VALUES ZSD_BOOKING.

*3) set status in ZNIPENDO_TABLE to -->9

update ZNIPENDO_TABLE set ZSTATUS = '9'

where vbeln = ZSD_BOOKING-vbeln.

*4) set vessel name + voy also as text

        • perform update_vessel_txt. "28/08/05

LT_DUMMY_LINE-TDFORMAT = '*'.

clear LT_DUMMY_LINE-TDLINE.

select single bztxt into LT_DUMMY_LINE-TDLINE(20)

from t171t

where BZIRK = zsd_booking-zvessel_n.

if sy-subrc ne 0.

LT_DUMMY_LINE-TDLINE(20) = zsd_booking-zvessel_n.

endif.

LT_DUMMY_LINE-TDLINE+20 = ZSD_BOOKING-ZVOYAGE.

append LT_DUMMY_LINE.

TEXT_KEY-NAME = ZSD_BOOKING-vbeln.

*

CALL FUNCTION 'CREATE_TEXT'

EXPORTING

FID = '0006'

FLANGUAGE = 'E' "EN

FNAME = TEXT_KEY-NAME

FOBJECT = 'VBBK'

SAVE_DIRECT = 'X'

FFORMAT = '*'

TABLES

FLINES = LT_DUMMY_LINE

EXCEPTIONS

NO_INIT = 1

NO_SAVE = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

endloop.

endif.

ENDFUNCTION.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Udi,

The link below gives you the step by step procedure to congigure your receiver rfc adapter, pls go thru it and also compare it with your scenario.

http://help.sap.com/saphelp_nw04/helpdata/en/c8/e80440a832e369e10000000a155106/content.htm

Also go thru this blog for details:

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

I hope these links help you solve your problem.

Regards,

Abhy

udo_martens
Active Contributor
0 Kudos

Hi Udi,

the adapter ignores the source code of the function module. Most adapter exceptions raise when the XML code is not translateable. Plz control if all required parameter are filled. Look to the namespace of your message. It has to be: "urn:sap-com:document:sap:rfc:functions".

Regards,

Udo

Former Member
0 Kudos

If I call the RFC synch iget an application exception

However if i call the RFC in a Asynch mode i get an error in the adapter.

Y?

moorthy
Active Contributor
0 Kudos

Try to execute the RFC directly from the R/3 system .i.e SE37 and execute the same. If it works there , i think there is no problem with your RFC . And also try to connect the XI from SM59 transaction from R/3...i,e from RFC destination..

Hope this helps..

Regards,

Moorthy