on 01-15-2007 8:54 PM
Hi !
I'm converting a CSV file to IDOC segments (CREMAS04).
XI uses a lookup table to convert CSV records to IDOC segments. It is normal that some records could not be converted. When I process a CSV file that has ALL non-convertable records, I get an error in sxmb_moni :
<SAP:Category>XIAdapter</SAP:Category>
<SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME</SAP:Code>
<SAP:P1>MSGGUID 99889D40A4D811DBAD4A0017A4510466: Tag found instead of tag IDOC BEGIN=</SAP:P1>
And the final payload is:
<?xml version="1.0" encoding="UTF-8" ?>
<CREMAS04 />
In the integration repository, the occurance of the complex type CREMAS04 is "1..1", I modified the xsd to minOccurs=0 , maxOccurs=1 , and imported it, but it keeps showing me "1..1"...
How do I deal with these case ?? I don't want error red flags in monitor because of empty idocs...
Thanks.
Hi,
Have you tried using mapping?
You can convert the CSV file into a simple XML using file adapter configuration. Then, you can use mapping to transform the simple XML into IDOC.
During mapping, you have much greater flexibility to examine the source XML for validity in creating the IDOC.
Regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi !
Thanks for your answer. That's what I'm doing. The problem is that the root node of the idoc is "1..1", and when there is no input data, the IDOC outputs with only this tag "</CREMAS04>" that causes an IDOC_ADAPTER error because of the "invalid" structure, however the case of no valid input data should be possible.
Thanks.
Hi,
When the Idoc is being sent out of XI using the Idoc adapter, the Idoc adapter will validate the data against the Idoc metadata stored in IDX2.
the Idoc adapter is going to convert the Idoc - XML into the corresponding Idoc format so that it can be sent to the SAP R3 system.
In your case, as the Idoc tag is 1..1 the validation is failing in the Idoc adapter as it does not find the payload to match with the Idoc metatdata.
What you can do isntead is use MAPWITHDEFAULT and map all the fieldds / segments which are mandatory with BLANK constansts so that an empty Idoc will be postd to the target SAP r3 system.
Regards
Bhavesh
Hi Bhavesh !
Thanks !
The problem is that because of mapping rules, the value of my target fields is SUPPRESS, not "empty".
For example, I have a file with this records:
A
A
B
A
"B" records should fill an IDOC segment, "A" not.
If I receive a file with only "A" records, for example 48 "A" records...then the IDOC segment, now, is receiving 48 SUPPRESS values...then the mapWithDefault doesn't work because they are SUPPRESS and not EMPTY.
Any ideas?
Thanks,
Matias.
Hi Himadri !!
It worked fine !
Thank you !
Thanks everyone !
Points were rewarded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to instantiate the idoc segment that many times 'A' occurs in the field name ex: Alphabet.
it is very simple set the context to root and write a simple udf that takes the entire queue.
for i=0 to a.length() i++
result.addValue(" ").
map Alphabet. to ur idoc segment and it should work. The above code is algo.You have to follow the syntax of the mapping.
How many ever elements are there that many empty spaces will be created. We really do not require to use java or xsl for this case
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Matias,
Where are you changing the occurance...
You need to do the following:
<b>1) export the idoc XSD in ur local machine and change the occurance in the XSD.
2) Import it directly in the target message in the mapping..... there is a option in the top right of the mapping where you can import directly...</b>
Cheers,
Himadri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Himadri !
I already changed the occurance in the XSD. The XML structure of the IDOC (CREMAS04) is :
CREMAS04 -> IDOC -> EDI_DC40 -> ....
-> E1LFA1M -> ....
I've changed the occurance of CREMAS04 from "1..1" to "0..1", and the one of IDOC, from "1.1" to "0..unbounded" to allow me multiple documents inside the same IDOC file.
BUT, after importing the changed XSD, the occurance of IDOC changed successfuly, but the ocurrance of CREMAS04 is still the same...
Thanks.
if you are using BPM, then before calling adapter, check whether it is empty IDOC or filled one, then call adapter based on that.
--Archana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you save it and activate those objects.. pls go to the activiation and activate all the objects once again..
this might help
thanks-Gopal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.