Skip to Content
author's profile photo Former Member
Former Member

File-XI-IDOC : error in sxmb_moni because of empty idoc

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 09:07 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 10:04 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2007 at 02:07 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 16, 2007 at 07:40 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • Posted on Jan 16, 2007 at 02:15 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2007 at 06:34 PM

    Hi Himadri !!

    It worked fine !

    Thank you !

    Thanks everyone !

    Points were rewarded.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.