cancel
Showing results for 
Search instead for 
Did you mean: 

RFC error communication exception

Former Member
0 Kudos

Hi all,

My scenario is Jdbc -- XI -- RFC(Z_BAPISALESORDER with two BAPI's 1.BAPI_SALESORDER_CREATEFROMDAT 2.BAPI_TRANSACTION COMMIT).

I am using RFC reciever adapter.While configuring the RFC adapter I have two options.

1.SAP system 2.External RFC server

If i select SAP system , I did not get any errors.It is showing successful message in SXMB_MONI and also in RWB. But Sales order is not created.

Message in RWB ...

.>RFC adapter received an asynchronous message. Attempting to send tRFC for Z_SALESORDERCREATEFROMDAT_XI with TID XIWVaSqBlY4TccBW0GtFmRhW

.>The message status set to DLVD.

.>The message was successfully delivered to the application using connection AFW.

But If i use External RFC system, I am getting excepion.In RWB it is showing following excetion.

...>Exception caught by adapter framework: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: CPIC-CALL: CMRCV LOCATION CPIC (TCP/IP) on host sapx

...>Delivery of the message to the application using connection AFW failed, due to: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: CPIC-CALL: CMRCV LOCATION CPIC (TCP/IP) on host sapx.

which option is used for calling the BAPI to create the sales order?

Could anybody help me out...?

Thanks,

sekhar.

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi Sekhar,

1.SAP system -> RFC adapter

2. have you tried debugging your FM Z_BAPISALESORDER ?

in SE37? if not, do it and check if the order with the same data that comes from XI create that sales order

Regards,

michal

Former Member
0 Kudos

Hi michal,

Thanks for the reply.

I tried debugging my Z_BAPISALESORDER already.

I used only the following fields.

1.Document type 2.DalesOrganization 3.Ship-To-Party 4.Sold-to-party 5.Material.

With the above fields i created sales order succefully and i am able to see the sales order in se16.

But from XI it did not create.

Shall we do any SAP settings in R/3 side.

Thanks,

sekhar.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

What about authorizations?

your user that is specified in XI RFC channel

has authorization to create it (in R/3)?

Regards,

michal

Former Member
0 Kudos

Hi michal,

yes , my user(sapuser)specified in XI RFC Channel has authorization to create it.I have set all the user profiles ,roles to this sapuser.

Do u have any sample doc or steps related to BAPI please send me. I have been trying for this scenario since long time.

mail: sdachepalli@miraclesoft.com

Thanks,

sekhar.

MichalKrawczyk
Active Contributor
0 Kudos

and you're sure that your rfc channel is working?

http://server:port/mdt/amtServlet

I haven't got any documents like this:|

>I have been trying for this scenario since long time.

this is realy a very easy scenario so don't give up:)

you must be very close:)

Regards,

michal

Message was edited by: Michal Krawczyk

Former Member
0 Kudos

Hi michal,

Thanks for the reply.

I am sure about RFC channel is working.It is showing Current Poll size 1.

I did only simple scenario in asynchronous mode.I am sending the data to SAP only.I am not using any BPM.I did not do any response mapping.

I did map with only 5 fields.Shall i add any other default fileds?

Thnaks,

sekhar.

MichalKrawczyk
Active Contributor
0 Kudos

no you don't have to

if your mapping works during the test (in repository)

and you've tried the rfc in se37 with the same values

it should work anyway

are you sure your configuration in directory is ok?

(try using the wizzard if you're not sure)

maybe there's something wrong there

regards,

michal

Former Member
0 Kudos

Hi michal,

Thanks for the reply.

I did intigration directory using tool--->configuration wizard option.

With that configuration i am facing these problems.

Thanks,

sekhar.

MichalKrawczyk
Active Contributor
0 Kudos

you can try 2 more things:

1. RWB (runtime workbench): ent to end monitoring

and try to trace tour message in the graphical log

and check if everything is ok over there

2. go to the message monitoring (RWB)

adapter monitoring - choose your message and details -> audit log - maybe you'll see something there

Regards,

michal

Former Member
0 Kudos

Hi michal,

In audit log it is showing all steps are success.I already posted that messages(succesful messages) in the top message of the current post.

These r some of messages.

...>RFC adapter received an asynchronous message. Attempting to send tRFC for Z_SALESORDERCREATEFROMDAT_XI with TID XIkaomaBpU4TcsKW0GtFmRhW

...>The message status set to DLVD

....>The message was successfully delivered to the application using connection AFW.

Thanks,

sekhar.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

I know this may be a dumb question but Z_SALESORDERCREATEFROMDAT_XI is set as "remote enabled module" in the FM attributes isn't it?

BTW

try creating everything from the beggining (it's not a lot of work) maybe you'll find something more that you've forgotten in the first try

Regards,

michal

Former Member
0 Kudos

Hi michal,

Yes we are using remote enabled function in FM.We already tried this scenario 2 to 3 times with new software components.

We set the following parameters and profiles in user.

Parameters:

ATR S CATT - Procedure or test module type

POP 01 Plan Version (PD)

RFC TT2_800_RFC RFC destination

SCL G Upper and lower case in source code: 'X' lower, ' ' =upper

WLC X X XX X Workflow: User-specific settings

Profiles:

IDES_IDA_SUP IDES data repository/administration superuser

IDES_SWITCH IDES language switch all authorizations (Superuser)

R3_TRUSTED Use Trusted Systems

SAP_ALL All SAP System authorizations

SAP_NEW SAP_NEW

S_USER_AUTH For authorization management - zzuser_lock

Shall we add any more?

With Regards and Thanks,

sekhar.

MichalKrawczyk
Active Contributor
0 Kudos

try TCODE -> ST01 - activate trace

call rfc from xi and check it there aren't any authorizations missing

regards,

michal

Former Member
0 Kudos

Hi michal,

I called RFC from XI. It is executing successfully.

Thanks,

sekhar.

Former Member
0 Kudos

Hi michal,

I tried to get a response from RFC to JDBC in synchronous mode.For this one i did response map.I called request and response maps in Interface mapping.

Now If i am executing the scenario Adapters(Jdbc(Last message processed) and RFC)showing polling status 1(RFC). But I am not able to show any message in SXMB_MONI.

In Component monitoring it is showing success messages.I did not understand why this is happening?

One more thing: Shall I need reciver jdbc adapter for reciving response?

Thanks,

sekhar.

MichalKrawczyk
Active Contributor
0 Kudos

So the situation shout be the same as SE37 + test ...

I'm sorry but without a real look into the system I have no further recommendations:|

Regards,

michal

Former Member
0 Kudos

Hi michal,

Just one clarification. I have copied entire BAPI_SALESORDER_CREATEFROMDAT2 to Z_bapi and called

BAPI_TRANSACTION_COMMIT there .Import and export values of two BAPI's are same.

Can u please tell the need of calling the BAPI_SALESORDER_CREATEFROMDAT2 again.

Thanks,

sekhar.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

because this is the bapi that creates the sales order

otherwise you don't have to commit if you use another FM

(which is not a BAPI)

Regards,

michal

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

you may also take a look at my new weblog:

/people/michal.krawczyk2/blog/2005/05/09/how-to-call-a-bapi-asynchronously-from-xi--with-qrfc

this scenario is a little bit diffrent but it may be useful:)

Regards,

michal

Former Member
0 Kudos

Hi michal,

Thanks for the reply,

I saw your weblog.I followed the document and created Z_BAPI..... as per ur weblog.

While testing the BAPI in R/3 the document number is returned successfully.But the sales order is not created.

any ideas?

Thanks

sekhar.

MichalKrawczyk
Active Contributor
0 Kudos

1.are you testing BAPI or the bapi wrapper (Z_BAPI) ?

2.if this doesn't work from XI and it's not an authorization issue then maybe your message is not reaching r3... but I don't know why if you're getting successfull message in XI message monitoring and the RFC adapter is working fine

Regards,

michal

Former Member
0 Kudos

Hi michal,

I did not test from XI.

I just tested in R/3 (se37+test) like a sample test with wrapper BAPI.

Thanks,

sekhar

MichalKrawczyk
Active Contributor
0 Kudos

ok so try debugging the wrapper and see if it gets to the bapi_commit maybe it just doesn't get there

Regards,

michal

Former Member
0 Kudos

Hi michal,

Thanks for the reply.

I wrote the wrapper which internally call the ZBAPI..

I tested in SAP R/3(se37+test).It is successfully generating the sales document and returns the salesdocument number and sales order is created successfully(TCODE: se16 ).

But while triggering from XI it is not creating any salesdocument.RFC Adapter polling status is 1.

I saw the success message in monitoring messages (RWB).But salesorder is not being created.I did not understand the problem.It did not show any error at any place.

Please Try to resolve the problem.

Thanks,

sekhar.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

I realy can't help without any more data

I'd suggest writing a customer message to SAP and describe your problem or asking someone for help who can log on to the XI system and check all of the configuration of you process

BTW

the wrapper calls BAPI not ZBAPI right?

(ZBAPI is a wrapper)

Regards,

michal

Former Member
0 Kudos

Hi michal,

Yes .the wrapper calls BAPI.

Message in Message monitoring.

.....>The message was successfully received by the messaging system. Profile: XI URL: http://sapxi:50000/MessagingSystem/receive/AFW/XI

.....>Using connection AFW. Trying to put the message into the receive queue.

.....>The message was successfully retrieved from the receive queue.

.....>The message status set to DLNG.

.....>Delivering to channel: RFC_Reciever

.....>RFC adapter received an asynchronous message. Attempting to send tRFC for Z_BAPI_SORDER_WRAPPER with TID XIYMkyGC6K4TcPoW0GtFmRhW

.....>The message status set to DLVD.

.....>The message was successfully delivered to the application using connection AFW.

Thanks for all the replies .I'll try to do follow your suggestion.

Thanks,

sekhar.

Former Member
0 Kudos

Hi michal,

shall we add any lacale beans in RFC Reciever adapter?

Thanks,

sekhar.

Former Member
0 Kudos

Hi michal,

Thanks my problem was solved.

Thanks & Regards

sekhar.

Former Member
0 Kudos

Sekhar,

Can you pls. share the solution. I'm facing same problem from long time and struggling without much clues.

Will be great help.

Thanks in advance.

Best regards/ Sanjeev

bhaskar_ghandikota
Participant
0 Kudos

Try this code. This works perfectly for us:

CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'

EXPORTING

SALESDOCUMENTIN = SALESDOCUMENTIN

ORDER_HEADER_IN = ORDER_HEADER_IN

ORDER_HEADER_INX = ORDER_HEADER_INX

SENDER = SENDER

BINARY_RELATIONSHIPTYPE = BINARY_RELATIONSHIPTYPE

INT_NUMBER_ASSIGNMENT = INT_NUMBER_ASSIGNMENT

BEHAVE_WHEN_ERROR = BEHAVE_WHEN_ERROR

LOGIC_SWITCH = LOGIC_SWITCH

  • TESTRUN = TESTRUN

CONVERT = CONVERT

IMPORTING

SALESDOCUMENT = SALESDOCUMENT

TABLES

RETURN = RETURN

ORDER_ITEMS_IN = ORDER_ITEMS_IN

ORDER_ITEMS_INX = ORDER_ITEMS_INX

ORDER_PARTNERS = ORDER_PARTNERS

ORDER_SCHEDULES_IN = ORDER_SCHEDULES_IN

ORDER_SCHEDULES_INX = ORDER_SCHEDULES_INX

ORDER_CONDITIONS_IN = ORDER_CONDITIONS_IN

ORDER_CONDITIONS_INX = ORDER_CONDITIONS_INX

ORDER_CFGS_REF = ORDER_CFGS_REF

ORDER_CFGS_INST = ORDER_CFGS_INST

ORDER_CFGS_PART_OF = ORDER_CFGS_PART_OF

ORDER_CFGS_VALUE = ORDER_CFGS_VALUE

ORDER_CFGS_BLOB = ORDER_CFGS_BLOB

ORDER_CFGS_VK = ORDER_CFGS_VK

ORDER_CFGS_REFINST = ORDER_CFGS_REFINST

ORDER_CCARD = ORDER_CCARD

ORDER_TEXT = ORDER_TEXT

ORDER_KEYS = ORDER_KEYS

EXTENSIONIN = EXTENSIONIN

PARTNERADDRESSES = PARTNERADDRESSES

.

**************************************************

**checking if the BAPI returned some errors*****

**************************************************

LOOP AT return ASSIGNING <bapiret>.

IF <bapiret>-type = 'E' OR <bapiret>-type = 'A'.

success = space.

EXIT.

ENDIF.

ENDLOOP.

IF success = 'X'.

************************************************

****in case of success commit the BAPI*********

************************************************

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

wait = 'X'

IMPORTING

return = wa_bapiret.

ELSE.

ROLLBACK WORK.

ENDIF.

Also you need to pass on the information for "inx" structures. What I mean is , if you are sending data to field REF_1 in header_in, then ref_1 in header_inx needs to be passed witha value of 'X'.

The update flag in inx structure needs to be 'C' for create.

If have items in your sales order, then you have to pass the values for item_in and item_inx. Additionally you need to pass values for schedule lines also.

Hope this helps.

Thanks,

Bhaskar

Former Member
0 Kudos

Hello, can you share what you have done to solve the issue. Thanks and Regards,

Ariel

Answers (0)