on 05-03-2005 4:42 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
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
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.
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
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
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.
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
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.
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.
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
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.
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
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.
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
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.