View Full Version : IDocs are not reaching SAP BC
Hello all,
yet another weird problem !!! i'm sending INVOIC idoc to the sap bc.... i set up the rfc destination in SAP and listners in SAP BC and all working fine... even if i test from sap rfc destination it's successfull.... but when i send idoc it's not reaching SAP BC.... i'm able to see the idoc in the sap sytem (we02 transaction) but it's not reaching BC....
Could anyone throw some light on this ?
Thanks in advance
SK
Do try checking the following
SAP : Tx : BD87 will list any problems related to the RFC connectivity.
SAP BC : Does this message appears in the transaction log? Has the correct routing rule been picked up ?
HTH
Bhavani Shankar
Just want to add up something.
In case there was a SAP Connectivity problem, your IDoc would be in SAP and this will be listed in BD87 transaction.
If the IDoc has reached SAP BC, then the transaction log will list the message. However, depending on the availability of the Routing rule, will it be processed further.
HTH
Bhavani Shankar
Pat Sclafani (Unregistered Guest)
08-02-2004, 08:20
Check idoc status also thru sm58. You also need a routing rule within SAP BC to handle the idoc. First time send will create the routing rule. You will then need to update the rule to point to the processing flow. Also make sure that your idoc has a status of 30 meaning that it was sent to the partner port within SAP.
All,
statsu of idoc is 03 (sent to external system). When i initially sent first idoc it didn't reach SAP BC 'coz it didn't create any default routing rule.
Even in the transactions' log no messages are turning up....
i'm really stuck with this...
BD87 shows 03 status for the idocs means it's successfull....
any clues pls?
SK
Pat Sclafani (Unregistered Guest)
08-02-2004, 09:27
did u setup your partner and ports in SAP via WE20 and WE21 ?
Yes Pat. Idoc was sent from SAP successfully atlaest by it's status (03) i can make sure of it.... http://www.wmusers.com/wmusers/clipart/sad.gif
In SAP BC, dont you find the transaction log for this message !
If you dont find the log, then please confirm, whether you have sent it to the same SAP BC where you are checking the log?
The log will explain more on the status of the message !
one logical sequence i found - when i send the idoc through the program, it's not reaching ... but when i resend teh same sent idoc from WE19 transaction it's reaching SAP BC and it's creating a default routing rule as per expectation !!!!!!!! not able to comprehend why this is happening ...
btw in SAP i created partner profile of type 'KU' (customers).... and in ooutbound parameters only one message type is INVOIC....
Pat Sclafani (Unregistered Guest)
08-02-2004, 10:17
in order to verify this, go into We20 and select the partner for whom the idoc is being sent. Under outbound params, change the output mode of the idoc to collect idocs and send another idoc. Now goto WE05 and u should see that the idoc has a status of 30. If it does not have a status of 30 - then your partner profile is wrong or your output determiniation in SD is wrong.
hope that helps. -Pat
Pat thanks for the suggestion.. I did as u said, and as expected the idoc has 30 status(ready for dispatch).... http://www.wmusers.com/wmusers/clipart/sad.gif
Pat Sclafani (Unregistered Guest)
08-02-2004, 11:16
Sreedhar,
U should now be able to send the status 30 idoc to sap bc via we14. Just for kicks try this. I know you tested via we19 but the two transactions work slightly differently. Prior to sending delete the routing rule that was created via we19 so that the routing rule is then recreated. If the routing rule is then created, edit it so that it is setup to be a B2B service and then properly identify your folder and exact flow. remember case counts!! To test, create a one step flow that saves pilepline
Running out of suggestions here - but it has to be something silly
Pat
Sorry to say that it didn't work... I did exactly... after editing newly created rule to B2B and executing we14 and i changed we20 to 'Tranfer immediately' and shot one idoc but it didn't reach SAP BC.
as you said there's something silly in it....
http://www.wmusers.com/wmusers/clipart/sad.gif
Thanks
PAt Sclafani (Unregistered Guest)
08-02-2004, 13:02
Have u checked security at SAP BC level ? Make sure your access mode is set properly for the folder/flow and your http port. for testing set http port to allow by default Otherwise you will need to turn detail logging at the SAP BC level - silly i am sure.
keep me posted - i'll keep thinking
Is the IDOC still there in sm58, or gone?
If gone, you may have a second BC instance picking up IDOCs. Turn you SAP Listener off in BC, then check RFC Destination again from sm59. Is there still a connection?
Martin
brilliant.... loooks like still idocs are going SOMEWHERE even after rfc listeners are turned OFF...
sometihng dodgy about this - in we02 idoc status is 03 and in sm58 no entries and if i do rfc connection test IT'S FAILING ....!!!!
any clues here pls ?
Thanks
SK
which is the port you are sending the IDOCs to. Check this port is the same program id that is been defined in SAP BC !
HTH
I'm using the funciton module MASTER_IDOC_DISTRIBUTE with control record as follows :
g_control_rec-mestyp = 'INVOIC' .
g_control_rec-idoctp = 'INVOIC02'.
g_control_rec-rcvprt = 'KU' .
g_control_rec-rcvprn = '17' . "SAME AS IN WE20 Entry
g_control_rec-rcvpor = 'A000000016'.
Receiver port (A000000016) is not necessary to fill, but still i tried with it, still it's going as successfull idoc (status 03).
one thing i observed is when i resend the same idoc by WE19 or by program RSEOUT00(or tcode WE14) some how the system is validating the RFC Port(which is not operational as of now) and so the idoc is stuck in RFC Queues (SM58). But when the idoc is created from the program it's just passing through SM58 aswell (bit strange)... added to this i turned off all the RFC Listenres in SAP BC !!!!!
i'm really stuck with this...
any clues pls?
Thanks
SK
Hi All,
Thanks for all ur inputs. Presently we are thinking of setting up RSEOUT00 program in bakcground to kick idocs out of SAP and so the problem would be resolved in reaching SAP BC.
But another problem now http://www.wmusers.com/wmusers/clipart/sad.gif
idoc is of INVOIC02 idoc type and is reaching SAP BC.
created routing rule and and is triggering as per expected.
in the service in which i'm trying to convert idoc to XML , i'm using following services :
transformFlatToHierarchy
...
few mappings ...
...
recordToDocument
but to my surprise after the execution of transformFlatToHierarchy service the BOUND NODE seems to be empty, despite the idoc from SAP is FILLED with data so recordToDocument is raising an exception for empty node....
i'm pointing the BOUND NODE of transformFlatToHierarchy service to the INVOIC02 record which i created from interface repository
Any clues where i'm messing up pls ?
Thanks
SK
Hope the conformsTo is filled properly with the name space of the IDOC record definition.
Sometimes this causes problem too
I tried with that field with and without the correct path of the record still the problem exists .... http://www.wmusers.com/wmusers/clipart/sad.gif
please help me ....stuck here completely..........
Pat Sclafani (Unregistered Guest)
08-05-2004, 11:47
Try documenttorecord as the first step in the flow. Next step is transformflattohierarchy. in the second step define 2 recordlists within the boundnode input record:
IDOC_CONTROL_REC_40
IDOC_DATA_REC_40
and map these to the service in for the transform step.
Map the service out of the boundnode to your idoc document as defined in SAP BC. This is how I always get my inbound idocs.
Pat
Could you please explain further ? for documentToRecord service we need to input the XML and it outputs the IData Object....
Thanks
SK
Sreedhar,
Regarding using of documentToRecord service,
Before using this service use the stringToDocument service (set input xmldata)this gives output Node (object)
and then map this Node to documentToRecord service and also set inputs(recordName=folder.subfolder:recordName)and makeArrays=false (optional)this will parse the XML string and gives output boundNode (XML Document Structure (IDATA)with values)and map this boundNode to the record structure (use as recordReference).
The pub.sap.idoc:transformFlatToHierarchy service is for parsing an IDOC file the similar way we did above for XML.
For more information refer the documentation.
HTH,
RMG
Continuing the bove post:
The pub.sap.idoc:transformFlatToHierarchy service once after parsing the IDOC against the conformsTo (SAP IDOC Schema/recordType)gives output the boundNode document that contains (IDOC_CONTROL_REC_40,IDOC_DATA_REC_40 )structures.So using recordReference map the service out of the boundNode to your idoc record structure which you might hava created based on the SAP provided IDOc Schema defined in SAP BC.
Hope Pat and me are on same page.
HTH,
Pat Sclafani (Unregistered Guest)
08-05-2004, 15:42
To RMG - We are on the same page.
Shreedhar - I am using webmth 6.01 but came from sapbc and as I recall it worked the sameway. Documenttorecord as the first step in ur flow will take the input stream and store it as a boundnode. You need to add defintion to the boundnode in order to map to inputs within flattohierarchy. you cannot simply move the boundnode at the highest level as input the flatto... treat the boundnode as an input object that requires definition described in the earlier thread.
Pat
I'm sorry to say that i'm still not getting what you said ! input to my flow would be IDoc not XML....
RMG,
I'm doing just as you said... transformFlatToHierarchy is the first service in my flow for which 'conformsTo' field has 'Record.XMLSchemas:Invoice' value. I used the recordreference for the record created from SAP Schema for INVOIC for mapping the boundnode of this service. This recordreference structure is empty despite the presence of data in IDoc in SAP!!!!
PAT - if you don't could u pls list the services one by one which u suggest me to use? (idoc is the input to my service)....
Thanks
Sreedhar
RMG/Pat /All
I'm attaching the zip file for my package. If you could look into this and let me know wher ei'm messing i twould be very very helpful.
thanks
Sreedhar K
http://www.wmusers.com/wmusers/icons/mime_zip.gifZIP
ReceiveInvoice.zip (http://www.wmusers.com/wmusers/messages/117/ReceiveInvoice-36675.zip) (5.1 k)
Sreedhar,
Got your package,will update you if i have some sugesstions.
Regards,
Sreedhar,
I tried to install your package after activation i looked into the RecieveInvoice package it is totally empty with no folders/services,and it is loaded with no errors checked the logs.
Also i looked in to the Package filefolders (ns) folder nothing is showing under that.This means package export is not successfull.
If possible resend us the pacakge with correction.
HTH,
Pat Sclafani (Unregistered Guest)
08-06-2004, 10:09
Sample is attached
http://www.wmusers.com/wmusers/icons/mime_zip.gifSAMPLEIDOCPARSE
SAMPLEIDOCPARSE4WMUSERS.zip (http://www.wmusers.com/wmusers/messages/117/SAMPLEIDOCPARSE4WMUSERS-36680.zip) (11.3 k)
Bhavani shankar,
could you please let me know how to debug inbound idoc call to SAP BC... as of now i'm trying to log th edata through the service debugLog which logs to the server log....
sorry for the wrong zip file whic hisent.... i'm not able to send the zip for my package as it exceeds maximium limit... could you please prpovide me with ur email id so that i'd send u my package.... I tried not to drop both the record refrerence and bound node aswell... still the problem persists...!
PAT - thanks for the sample...as of now i don't have write access for the server to load this package.... i'm trying to get it now... as soon as i get it i'll chekc out urs...
thanks
Sreedhar K
sreedhar,
see my RMG profile you will see my emailid and send me your ReceiveInvoice package.
Hopefully Pat provided package solve your issue.
Thanks,
Pat/RMG/Bhavani Shankar,
Thanks for all ur inputs. It's working fine now. With the help of debugging i pointed out the problem and is working fine.
Another query from side (sorry....)
My Invoice IDoc contains multiple line items. My XML has got a node <lineitems> which is repititive. In BC Service i'm looping on /InvStruc/INVOIC02/IDOC[0]/E1EDP01 and when i try to assign it to XML node, step is failing saying that
[B2BCORE.0049.9019] More than one copy into the path with different common parent(s).
I tried mapping E1EDP01 segment separately into a reference record structure and from that record i tried mapping it to XML Node. Though system is popping error for step failure, but my XML is not filled with line item details!!!
Pls guide me thru this....
Many thanks
Sreedhar K
For this scenario use the appendToRecordList service and for doing this create a temporary record that contains only (lineitems fields)and do loop on In-Array /InvStruc/INVOIC02/IDOC[0]/E1EDP01 and inside this loop map the required IDOC fields to this temporary record structure and as a last step inside the loop use the appendToRecordList
and map the inputs fromItem(temp record)and toList (your actual recordReference XML (LineItems) and output toList map to(your actual recordReference XML (LineItems)and drop the fromItem,temp record at that point itself.
Finally come out of the loop and check the pipeline results,you should see the XML filled with <lineitem> Details.
HTH,
RMG,
I did as u said, but at the end of the loop i'm getting empty recordlist.... I'm attaching now my complete package. pls have a look at it and advise me....
Thanks
Sreedhar k
http://www.wmusers.com/wmusers/icons/mime_zip.gif
ElectronicInvoicing.zip (http://www.wmusers.com/wmusers/messages/117/ElectronicInvoicing-36698.zip) (49.3 k)
Sreedhar,
I installed your package and made some changes in the GFSInvoice:ReceiveInvoice service of Loop step and modified the mapping for appendToRecordList service.You can understand the changes.Download this attached package.
But i havent tested the flow since you didn't provided with any sample IDOC and also there is no SAP services,Adapter here on my system.i am on IS6.01 not on BC.
http://www.wmusers.com/wmusers/icons/mime_zip.gifModified the code
ElectronicInvoicing.zip (http://www.wmusers.com/wmusers/messages/117/ElectronicInvoicing-36702.zip) (56.4 k)
HTH,
RMG,
That worked like a charm. Thanks a ton.
Be back with more doubts sooon....;)
Thanks
Sreedhar K
Hi All,
I'm back with another question...
I built a service and is working fine.... now for filling sales office address i have to call a RFC in SAP.
As we know if we create a outbound map in BC and point this service , BC would delete all flow steps in the service and insert outbound map service..... in order to avoid this in the service i inserted the service sap.map:outbound manually. Untill this is fine....
but with this kind of operation all input and output parameters of the function module(RFC in sap) wouldn't be created automatically... so in a map i mapped required input parameters before this outbound map call. Output from RFC is a record list(LINES), though it's not in the PipelineOut , i'm looping at LINES after the oubound map assuming it would be in pipeline out.....but during debugging i'm not getting any output from that outbound map service though the RFC in SAP is returning 6 lines of data .....
i tried inserting the record list (LINES) in the pipeline out and pipeline in before service call, but as you know if we don't map any data to the created elements, it would be wiped out..
Please guide me where i'm doing wrong ....?
Thanks
Hi Sreedhar,
If I understand you, you have an output result table from your SAP RFC call. Is it so that you have this recordlist in you in and output parameters of you RFC cal service. I had once a problem that for example the bapi return table was not filled with a direct SAP rfc call from the business connector. What I did was yhe following: before I made the rfc call in the Business Connector I filled the recordlist with a empty line( a kind of initialisation) it worked out for me.
Is this your problem?
Regards Harrie
Harrie,
Thanks for the reply.... I did try that !!!!
structure of record list is
LINES
---TDFORMAT
---TDLINES
i tried inserting empty space into TDFORMAT via 'SetValue' button....
i'm not getting any result from SAP!!!
any clues pls ?
Did you check in SAP if the values are available? I advise you to insert the values for the exporting table in a Z* SAP table to see
when you are running the RFC from the business connector that the values are at that moment in the RFC function module. You can also activate the RFC tracing at the Business Connector. Under Adapters --> rfc tracing. The business connector generates a rfc trace file. In this file you can see the values for the exporting table and the function module!
Good luck.
Sreedhar,
You can also try testing the RFC directly using the SAP BC Admin screen
Adapters - SAP - Lookup - Function By Name
Enter the FM,
The output screen has an option to test the RFC. Then probably you can start checking the rfc trace as Harrie mentions
HTH
Bhavani Shankar
I did test from Lookup and it's successfull. even when i execute the service , created by BC by outboundmap is also successfull...but if i insert the outbooundmap service explicitly , it's not working...
even the RFC logs says almost same fetching <structure> <binary> success....
it's strange behaviour infact ....!!!
any one faced such problem??? inputs would be highly appreciated.....
Thanks in advance
Sreedhar K
did any one happen to think about this please ????
Hi Sreedhar,
Dit you try to download the data in the Z* table in the functionmodule when you are calling your service from the Business Connector? I asked this yesterday but get no reply on it.
This may help to check if the function module is really called and executed in SAP?
Regards Harrie
Sorry Harrie ....
this function module is a rfc wrappper for standard function module READ_TEXT.... it just reads data from standard function module ....
Could you please tell me further vat exactly you mean by downloading data from Z* table ?
thanks
Sreedhar K
You don't get data in your exporting table in the business connector,
so I am curious if in the functionmodule the data is in the exporting table just before it is giving the data back to the business connector.
You can insert the values in a customer made table like ZTEST and insert the values and for example and a time stamp. If there is no value at all in this table after you have processed the Business Connector, you can assume that the function module is not called. There for I also mentioned to look in the trace files and search for your Function Module and it exporting tables.
Have you also test to bring the business connector down and up?Sometimes the business connector has some data in it's cache(a kind of bug), it helps when you bring the server down and up. You can also try to rename your Function module and make an different service. This has also to do with corrupt cache.
Regards,
Harrie
Harrie..... your first suggestion worked... though i did that i was doing wrong...that is initializing the recordlist before calling outboundmap..... i was initializing at record level...
now some good sense prevailed now instead i initialized at top level and its working great....
thanks a ton to you and every one....
Sreedhar K
Hai All,
Iam working with SAPR/3 4.6 adapter,version webMethods6.1.I have no sample DTD for creating IDOC(MATMAS03) structure in developer.So If anyone have that DTD please send it.
With Regards,
venkat
Venkat,
You can get the DTD from SAP R/3 system.For the IDOC you need, you can export the DTD from SAP R/3(dont remember the transaction on top of head).and in SAP BC,you can import the same DTD to create the Document Structure.
ramesh.
WE60 is the Tx in SAP to download the DTD for a basic or an extension IDOC.
BS
Hello All,
I am working with SAP IDocs(MATMAS),version WM 6.1.I am sending the IDoc from the SAP System using we19 transaction and i have done the all configuration like partner,port,partner profile and RFC destination and distribution model in SAP System but i am getting this below error in SM58 transaction.
"RfcAbort: CheckTID fault: [ISS.0084.9004] Access Denied"
With Regards,
venkat
rtenkani
10-03-2005, 10:32
hai all,
I am working on SAP Adapter 4.6 on WM 6.1.
To set up an SAP system to send IDocs to the Integration Server, I used the SAP GUI to perform the following steps:
1) Create an RFC Destination on the SAP server
2) Define a logical port
3) Create a partner (also known as a logical system)
4) Create a partner profile
5) Create a distribution model for the partner and message type
While trying to send IDOC(MATMAS03) from SAP to Integration Server using we19 transaction , I am getting the following
ERROR: SenderPort in control record is invalid....
thanks in advance.
Rao
anilnatikar
01-17-2006, 11:01
Hi,
I am using SAP adapter running on WM 6.1 with Listener configured for SAP IDOCs.
I am getting the error 'Input values do not contain IDOC control and data tables' in transactions.
I have configured the routing rules also tried with SAP Mappings for 'IDOC_INBOUND_ASYNCHRONOUS ' and 'INBOUND_IDOC_PROCESS'... still I am getting the above error.
I checked at SAP side and they are sending proper control record information with the IDOCs. Here the IDOCs are being sent in flat formats.
I want clarificaiton : To listen for the IDOCs, if only listener working fine is enough ? Because, currently the SAP server configured is failing when I do 'Test Connection' with below error.. though it could get the IDOC hits and there is no error at SAP side for those IDOCs.
"Connect from SAP gateway to RFC server failed Connect_PM GWHOST=1<server>, GWSERV=sapgw61, ASHOST=<serverip>, SYSNR=61 LOCATION SAP-Gateway on host <host> / sapgw61 ERROR timeout during allocate TIME Tue Jan 17 11:56:18 2006 RELEASE 640 COMPONENT SAP-Gateway VERSION 2 RC 242 MODULE gwr3cpic.c LINE 1807 DETAIL no connect of TP sapdp61 from host <server> after 22 sec COUNTER "
Can you guys please give me some tips on where this could be failing and any fixes for this.
Thanks a lot