Receiving IDocs from SAPR3

Hi!

I´m using Business Connector 4.6 to integrate a portal to a SAP / R3.

I had success using RFCs and BAPI but I´m not so luck with Idocs.

As matter of fact I can send Idocs to a SAP instance but I can´t get the IDocs wich SAP is supposed send to me.

We can see it in SAP logs but it doesn´t trigger nothing in BC.

It seems it have to do with SAP configuration but if you guys has some tip to me it would be great.

Thank you,
Fabiano.

Fabiano,

Check out the “Partner Manager” and “Routing Idocs and XML messages to the partner manager” chapters in the SAPBCSapAdapterGuide documentation. It describes the steps needed to send Idocs via ALE to BC.

Basically, Idocs are sent from SAP to BC via a RFC listener that is setup on both systems. Once the listener is enabled, Idocs are automatically sent to the Partner Manager. There, using specific information from the EDI_DC40, Routing Rules, it determines where to route the Idoc.

The documentaion should help you setup this process but let us know if you continue to have difficulties.

HTH,

ajandja

Hi ajandja.

We have carefully followed the guide instructions wich you have suggested . But, until now, nothing happens on BC when an Idoc is created inside the SAP.

No logs, no errors, no connections, no disabled routing rules, nothing at all.

The only thing I can see it´s a calling to IDOC_DATE_TIME_GET when inside the SAP I try to see the Idoc status on BC.

Thanks by your reply,
Fabiano

HI,

Are you sure that the IDOC is sent from SAP ???
try transaction SM58 for detecting any problem !!!

If you want more help you should send me more information:
Which IDOC you are sending ?
In which status your sent IDOC is ???
Did you define a Logic system for the SAP BC ?
Did you create an RFC destination ??
Did you create a listener in you SAP BC for SAP R/3 ??

you can contact me on ssii2812@noos.fr
SSII

If you have not set up a routing rule, then the IDoc will fail (in SAP) with the error message about the “Unknown Partner Rule”. You may need to enable the routing rule.

Check the routing rule in the partner manager. Check the IDoc entry in the transaction RFC queue SM58.

More informations:

>Which IDOC you are sending ?
We´re trying to send ORDERS03 out.

>In which status your sent IDOC is ???
In the SAP message queue it has 03 status

>Did you define a Logic system for the SAP BC ?
Yes, I did. I defined Logical System, Partner Profile and Distribution Model.

>Did you create an RFC destination ??
Yes, I did. The RFC calls are doing great. I can call RFCs from SAP BC and the SAP can call my B2B Services .

>Did you create a listener in you SAP BC for SAP R/3 ??
Yes, I did. We have set up a listener on SAP BC.

Thank you,
Fabiano

Fabiano,

Check the Port on your SAP Partner Profile. Make sure you are using the correct RFC Port (connected to to right RFC Destintation). Have you done a communications test from the RFC Destintation to your SAP Business Connector.

Regards,
Simon

Simon,
We have checked it out a lot of times. So, do it one more time will not be a big problem. I´ll do it.
Yes, I have done the communication test. It says to me that connection works fine.
A question : If I don´t have a routing rule the Partner Manager will create it automatically, won´t ? I just have to enable it after.
Thank you,
Fabiano

Fabiano,

When a new IDoc hits the Partner Manager it will create a disabled routing rule. You then need to finish the routing rule off and enable it.

I have had a SBC server not create routing rule in the past. The only soultion was to reinstall the SBC server.

If this fails, try creating the routing rule by hand.

Have you got the latest patches from SAP
Core Fix 2 and SAPAdapter SR3a ?

Regards,
Simon

I have installed both Core Fix 2 and SAPAdapter SR3a.

Do you think could be some support package to SAP to do it works? We have a SAP 4.6C with support package 17.

Another question: inside the SAP are you using the MASTER_IDOC_DISTRIBUTE to send the IDoc out?

Best regards,
Fabiano

Fabiano,

If you are sending Master IDoc from SAP then they will use the Function Module MASTER_IDOC_DISTRIBUTE.

This is not your problem, as you have created IDoc reaching status 03. Have a look at the message with the status of 03.
Does it give you a TID or a filename ?
If it gives you a tid, then look in SM58 to see if there is a entry. Have you changed any of the basic SAP Business Connector parameters?

Regards,
Simon

I got some advances. Now I can see in the server.log SAP calls to BC. But I have the following error:

000047 [B2B-SAP.0006.0008] Error in inbound call for IDOC_INBOUND_ASYNCHRONOUS from MC0: java.lang.RuntimeException: [B2BSERV.0084.9004] Access Denied

Fabiano

Please check the ACL for the service that you are sending.
Thanks

Solved!

The first problem, no receiving Idocs. We have solved it using the IDOC_INBOUND_ASYNCHRONOUS inside the SAP to dispatch the idoc out.

The second one, access denied. I´m not really sure about what have solved my problem but I did 3 things:

  1. Put the SAPUser in the Administrator group
  2. I have created a SAPUSER (all uppercase) inside the SAPUsers group
  3. I cleaned the DDI-Cache

Thanks to everyone.
Fabiano

Fabiano,

This is great news. I didn’t check back for a while but I am very happy that many have helped your issue along.

We have been using the IDOC_INBOUND_ASYNCHRONOUS program to handle IDOCs from day one so we did not encounter your issue.

As far as permissions, I suspect that by putting SAPUser into the Administrator group fixed it. Check the permissions for Partner Manager.
To do this, in Administrator, under the packages tab, select management and SAP. Select browse services and look for “wm.PartnerMgr.gateway.transport.ALE:InboundProcess”. Check the ACL set for this. We have ours set as SAPUsers.

Thanks,

ajandja

am using BI for a fairly simple process
I have 2 process

One that gets the Doc, another is to insert the Doc in the
SQL server DB.

I generate this using the BI the Components are created in
EI.

I use the Doc Tracker to run the Process, and the values are
inserted in the SQL DB.
Perfect works fine till here.

But when i want to see the Process Monitor in the
administrator page.
i deploy the procee.
i checkall the permissions.
then i click on the Diagnostics this is what i see.
Database Config URL:
jdbc:datadirect:sqlserver://xxxx:1433;databaseName=xxxx,
USER: xxx, PASSWORD: *******
Database Connection Connected
Repository Config File
D:\webMethods\IntegrationServer4\config\repository3.cnf
Repository Config mode: remote, host: xxx, port: 7778
Repository Status Connected
Process Definition Table Rows 1
Process Table Rows 0
Step Definition Table Rows 2
Process Step Table Rows 0

then i click on the Summary
The page is Blank!!!

Process Monitor > Summary

Recently Failed Processes

There are no recently failed processes.

Recently Completed Processes

There are no recently completed processes.

Recently Created Processes

There are no recently created processes.

I AM NOT ABLE TO SEE THE PROCESS.

It would be of great help if somebody looks into this and
let me know if i am missing configurations or settings.

Thanks in Advance

It might be the DB connection or Repository config problem while procesMonitor retriving the data from (Process Audit log).Pls make sure the connection which (PRT) logs the data about processes to Process Audit log,since PRT is the major thing for the wM Monitor .

Did you checked the logs,for any error traces?

HTH.

Hi,

A more simple manner of get IDoc number from $tid is
using the RFC function: SREL_GET_NEXT_NEIGHBORS
You need to pass:

 
  OBJECT (record) 
          OBJKEY    $tid 
          OBJTYPE   "TRANSID" 
  MAX_HOPS int number (max. number of results) 

and you’ll get a record list: NEIGHBORS
with entries for the IDoc or even the order
created form the IDoc.

You can get more information of the IDoc on
the SAP’s EDIDS table.

best regards,

Sebastián Miranda
Barcelona, Spain

We are trying to get an IDOC from SAP CRM. This used to work with an explicit sender / reciever defined. We now need to route this IDOC to a “publish” service regardless of sender / reciever. When I changed the routing rule (actually deleted the old rule and made a new one with wildcard for sender / reciever and the same message type as before), I now get “Unknown Partner and Message Type. Sender: CRM400LS Receiver: ORDERMAX MsgType: CRMXIF_ORDER_SAVE_M” in the transaction log. I have cleared the DDIC cache, to no effect. Since this used to work, I doubt that it is an ACL or permissions issue. I have verified (several times) that the message type is the exact same as it was before, but every time an IDOC is sent, we get this same message. Any help would be greatly appreciated!!!

Scott,

Could you tell us what you have setup in the Routing Rule? Where exactly do you have the wild card(s) ; sender, receiver, msgType?

Thanks,

ajandja