Syntax Error in Invoice IDOC

I have created an extension for idoc INVOIC02. I added a segment ZDISC to E1EDK18(qualf 002). In my test system, everything is working fine. But in production, it is giving a syntax error. Following is the error.
EDI: Syntax error in IDoc (segment cannot be identified)
Message no. E0078
Diagnosis
The segment ZDISC does not occur at the current level of the basic type INVOIC02 (extension INVOICEX).
This error can have several reasons:
The segment ZDISC is assigned to a group whose header segment does not occur.
The segment ZDISC does not exist in the syntax description of the basic type INVOIC02 (extension INVOICEX).
The sequence of segments in the group in which the segment appears is incorrect.
Previous errors ('mandatory' segment or group missing) may be due to this error.
Procedure
Please check the IDoc or the syntax description of the basic type INVOIC02 (extension INVOICEX).
Though , the segment E1EDK18 with qualifier is being created in the IDOC but zdisc created at zero level and not attching to the E1EDK18.
Same thing is working fine in the test system.
All the helpful answers will be rewarded.
Thanks

Hi,
I think you have selected ZDISC as mandatory segment . this is added to optional segment : E1EDK18, if segment E1EDK18 is missing in the idoc , you will get the above error.
remove the mandatory option for the Z segment ZDISC.
Check this link , if you miss something it will give details:
http://www.intelligententerprise.com/channels/applications/feature/archive/kasturi.jhtml
Regards
Appana

Similar Messages

  • Error in Invoic Idoc - Vendor, Company code not found

    Hi All,
    We are facing an issue with an Incoming Invoice Idoc (Mes type - Invoic). A third party system sends the Invoices which are received by the XI system and then as Idocs into SAP.
    The XI system is defined as a Logical system in R/3. We have created Partner Profile, Dist Model with XI as a LS.
    The error that we are encountering is -
    Customer , vendor <our LS> not known
    Message no. FD110
    A company code cannot be determined for LS
    Message no. FD006
    Are we missing out some data in the Idoc or are we missing some EDI configuration?
    Please advise as to how we need to proceed.
    Thanks in advance!
    Liz

    hi,
    Error : A company code cannot be determined for LS
    This means that SAP cannot match an appropriate company code with a partner profile :-  and hence, doesn't know where to post the invoice.
    Partner Type = "LS" (Logical System)
    Partner Name = ""
    I think what you've got is message FD006 - longtext for it can be found via transaction SE91 and sounds like this:
    The system cannot determine the relevant company code since the allocation of the data transferred in the invoice is missing in Financial Accounting customizing.
    The company code can be determined outside of the system and be put into the intermediate document (for example, from the EDI subsystem). Then the company code must be put into the E1EDK14 segment and ORGID field and the value "011" used as the qualifier.
    Determine the company code for & & & in Financial Accounting customizing.
    LS  is your Logical System. So you might want to have a look at transaction OBCA where you can assign a company code name in the invoice for your Logical System.
    In the E1EDKA1 segment. there are two fields PARVW (which is the qualifer or Partner function) PARTN (partner number). The information that is sent in the PARTN has to either match the information in SAP or has to be converted.
    If the later is the case try transaction VOED.

  • Errors in invoice idoc

    when im trying to test  invoice idoc with basic type invoic02 and process code invf  using we19, the following error are shown.
    1. customer/vendor could not be determined for intermediate document

    HI,
    Did you create partner profile and port?
    can you please be  more clear so that we can sort it out..
    regards,
    nazeer

  • XI Business content for MDM - Syntax error in IDOC adapter

    Hi mates,
    I'm trying out the Master Data Harmonization scenario for Vendor data with R/3 as the client system. I'm using SAP delivered XI Business content for MDM. The mapping program is generating ADRMAS and CREMAS IDocs but the IDOC adapter reports that there is a syntax error in ADRMAS IDOC. Find below the details.
    <i><SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_METADATA</SAP:Code>
      <SAP:P1>Segment 'E1BPAD1VL', segmentnumber '000001' not correct in structure ADRMAS02</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error: Segment 'E1BPAD1VL', segmentnumber '000001' not correct in structure ADRMAS02</SAP:Stack>
      <SAP:Retry>M</SAP:Retry></i>
    Generated ADRMAS IDOC is
    <i>  <?xml version="1.0" encoding="utf 8" ?>
      <ADRMAS02>
      <IDOC BEGIN="1">
      <EDI_DC40 SEGMENT="1" />
      <E1ADRMAS>
      <OBJ_TYPE>LFA1</OBJ_TYPE>
      <OBJ_ID>0000500140</OBJ_ID>
      <CONTEXT>0001</CONTEXT>
      <E1BPAD1VL SEGMENT="1">
      <FROM_DATE>00010101</FROM_DATE>
      <TO_DATE>99991231</TO_DATE>
      <NAME>Swift Transportation</NAME>
      <COUNTRY>US</COUNTRY>
      <COUNTRYISO>US</COUNTRYISO>
      <LANGU>E</LANGU>
      <LANGU_ISO>EN</LANGU_ISO>
      <SORT1>SWIFT TRANSPORTATION</SORT1>
      <TIME_ZONE>CST</TIME_ZONE>
      <E1BPAD1VL1 SEGMENT="1">
      <LANGU_CR>E</LANGU_CR>
      <LANGUCRISO>EN</LANGUCRISO>
      <ADDR_GROUP>BP</ADDR_GROUP>
      </E1BPAD1VL1>
      </E1BPAD1VL>
      </E1ADRMAS>
      </IDOC>
      </ADRMAS02></i>
    Strangely, the control record is blank. I looked at the XSLT program, it is coded that way. I do not understand the reason. Is the error pointing to the control record?
    Look at the code sample from XSLT mapping program
      <xsl:for-each select="IDOC/*/E1ADRMAS">
           <IDOC BEGIN="1">
           <!-- The header data of each single ADRMAS-IDoc needs to be there but does not require specific data -->
                <EDI_DC40 SEGMENT="1"/>
                <xsl:apply-templates select="."/>
           </IDOC> 
      </xsl:for-each>
    How can an IDOC w/o control record be posted?
    Did anyone come across this error? Whats wrong/missing?
    I appreciate ur inputs.
    thx in adv
    praveen

    Moorthy,
    I tried reloading the IDOC metadata from IDX2. Still I get the same error.
    Regd, IDOC w/o control record, can u elaborate on "dynamic value while posting IDOCs". From where, XI message SOAP header with Business System replaced by corresponding logical system names?
    Thanks
    Praveen

  • Syntax error in IDOC process

    Hi,
    We are getting syntax error in ORDERS01 IDOC. I have checked the E1EDP19 segment's maximum occurence is 5 which is a child segment of   E1EDP01.
    But the my outbound IDOC had more than 5 occurences in the segment E1EDP19.
    It look to me that because of this we are getting syntax error. Please correct me If I'm wrong.
    How can I change the maximum occurence value in an standared segment.
    Thanks,
    Dharmendra

    Hi,
    change names while creatingwork are for that.
    maintain order of the segments in order as for idoc.
    check whether you are maintaining orderly or not.

  • Extend Idoc  INVOIC02 - E1EDKA1 - Syntax error

    Hi All,
    I have extended Basic idoc “INVOIC02” and using exit “EXIT_SAPLVEDF_002” to extend custom segment. I am trying to add a custom segment under “E1EDKA1”. In program I am inserting ‘Z1’ segment after parent segment “E1EDKA1”. I am passing Parent segment reference (INT_EDIDD-PSGNUM) and hierarchy level of custom (INT_EDIDD-HLEVEL) segment. Problem is custom segment still placed under root segment after “E1EDKA1” segment, which is incorrect.  Idoc error with status ‘26’ – Syntax error. Can any one tell me what I am doing wrong or how do I manage to get custom segment under parent segment “E1EDKA1”, so that I don’t get this error. Below code for your reference. Thanks in advance.
    Regards,
    Tim
    Program -
    "ZXEDFU02" -
    describe table INT_EDIDD lines gv_indes.
    read table INT_EDIDD index gv_indes.
    if sy-subrc eq 0.
      if INT_EDIDD-segnam eq co_e1edka1 and
         INT_EDIDD-sdata+0(3) eq 'ZM'.
    Now INSERT segment Idoc value and custom extend field
        if not gv_email is initial.
                INT_EDIDD-PSGNUM = gv_indes.
                INT_EDIDD-HLEVEL = '03'.
          move: co_z1edka1        to INT_EDIDD-SEGNAM,
                'email address'   to INT_EDIDD-SDATA.
          append INT_EDIDD.
        endif.
      endif.
    endif.

    Your logic looks ok.  I would remove the code to populate the parent segment number and hierarchy level.  SAP will determine those on its own.
    As for the result you are seeing, if there is a syntax error on an IDoc, the entire hierarchy will be lost so the fact that the custom segment is showing up at the same level as its parent doesn't mean that is actually causing the syntax error.
    Did you add your extension in the partner profile?
    Program -
    "ZXEDFU02" -
    describe table INT_EDIDD lines gv_indes.
    read table INT_EDIDD index gv_indes.
    if sy-subrc eq 0.
    if INT_EDIDD-segnam eq co_e1edka1 and
    INT_EDIDD-sdata+0(3) eq 'ZM'.
    Now INSERT segment Idoc value and custom extend field
    if not gv_email is initial.
    INT_EDIDD-PSGNUM = gv_indes.
    INT_EDIDD-HLEVEL = '03'.
    move: co_z1edka1 to INT_EDIDD-SEGNAM,
    'email address' to INT_EDIDD-SDATA.
    append INT_EDIDD.
    endif.
    endif.
    endif.

  • Idoc in status syntax error check

    Hi,
    Outbound invoice idoc ended in status 7 (error during syntax check). I check the alloted segment numbers in WE30 and the maximum number alloted segment is not exceeded. Any possible reasons why this scenario is happening?
    Thanks for the feedback.

    Hi,
    Did you check if the segments in the Data Record are in a hierarchial order (ie) Parent segment followed by the Child segments, the Parent segment should alway be mandatory.
    I have faced a similar error of this kind and the reason was because of the ordering of the segments.
    Thanks
    Krithika

  • Regarding EDI: Syntax error in IDoc (segment cannot be identified)

    Hi,
    My requirement is that I was adding two diffrent field values under two diffrent segments as "E1EDKA1" and "E1EDK02" in outbound invoice IDOCS, INVOIC02 (process code: SD09 - IDOC_OUTPUT_INVOIC).
    I am getting the IDOC number through Tcode "VF02". Can any body give me idea how to check that syntax error in debug mode.
    Please find the following error details using TCODE "WE02".
    *EDI: Syntax error in IDoc (segment cannot be identified)*
    *Message no. E0 078*
    *Diagnosis*
    *The segment E1EDKA1 does not occur at the current level of the basic type INVOIC02 (extension ).*
    *This error can have several reasons:*
    *The segment E1EDKA1 is assigned to a group whose header segment does not occur.*
    *The segment E1EDKA1 does not exist in the syntax description of the basic type INVOIC02 (extension ).*
    *The sequence of segments in the group in which the segment appears is incorrect.*
    *Previous errors ('mandatory' segment or group missing) may be due to this error.*
    Please help me to resolve this problem. <REMOVED BY MODERATOR>
    Regards,
    Skumar.
    Edited by: Alvaro Tejada Galindo on Apr 28, 2008 1:09 PM

    It seems that you added segment E1EDKA1 at a place where it is not supposed to be. That's where this error is coming from. The structure of every IDOC is definded by SAP standard and you cannot change the sequence or the level of standard segments. If you require a certain field at a certain level you have to add that field to a Z-segment and then add that Z-segment where appropriate in your extension.
    Hope that helps,
    Michael

  • Error 'No tax code found for difference' in Posting Vendor Invoice IDOC

    Hi All,
    I am getting error message 'No tax code found for difference' while posting Vendor Invoice IDOC into SAP. IDOC type is INVOIC02. There is no difference in PO price, Invoice price and even Standard price. then why this  error message? Other Vendor EDI settings are done ( OBCA, OBCD, OBCE etc). Is there any thing specific to be done in the config for this error?
    IDOC has PO  as reference document.
    I looked into several threads in SDN forum but could not find proper solution
    Can any ine help me with this issue?
    Thanks in advance
    Hari

    Hi
    You might be  missing the tax code for uploding through IDOC
    so you can use the t.code we02 and give the doc and find the error
    go to the WE19 to edit the tax  code
    and USE the t.code  BD87  to select the doc and process it
    thanks
    Madhu

  • When we post Inbound Invoice IDocs, we are getting an error message "Enter a tax jurisdiction code".

    Hi Experts,
    When we post Inbound Invoice IDocs, we are getting an error message "Enter a tax jurisdiction code". As checked, we have configured OBCD and OBCA for the vendor and we are passing the Tax Jurisdiction code in E1EDP04 SAL segment. Can anybody give us some idea to resolve this issue.
    Regards,
    Sameek

    Hi Sameek,
    Please refer the below link. Hope it helps.
    http://scn.sap.com/thread/1435286
    Regards,
    Chandan.

  • IDOC Syntax Error E0072 with status 26 after upgrade to ECC6.0

    Hi
    We have upgraded SAP R/3 from 4.6C to ECC6.0. After upgrade, when we create PO and output EDI, we are seeing this IDOC syntax error E0072 for Mandatory Segment E1EDK01. In 4.6C it was working fine with no issues, only after upgrade this problem started. It says E1EDK01 is missing which is mandatory. We are using basic type ORDERS01 with no extensions. When we see WE30 it looks fine, WE20 settings looks fine.
    Order of the segments got scrambled in upgraded version. First segment is E1EDP19001, this is supposed to be under E1EDP01 segment. There are two E1EDP19001 segments created but there were no sub segments to E1EDP01.
    Any help in this regard is highly appreciated.
    Thanks
    Pandiri

    User Exit activation and fixing the issue in user exit fixed this issue.

  • Syntax error in IDoc (too many repetitions of a segment)

    Hi,
    I tried to load master data from R/3 into BW system. The load is not ending and the IDoc error message is displaying,
    The error message is " EDI: Syntax error in IDoc (too many repetitions of a segment) with status 26"  .
    I tried to analise the issue and checked in the Idoc List Outbox of BW system. I found Red status message with number 26 stating " Error during Syntax check of IDoc (Outbound) and the message type is RSRQST.
    Could any one help me out in solving this problem. Reply to the message if any more information needed.
    Thanks in Advance.
    Regards
    Koushik

    I'm getting the same error. I think it is because I have a InfoPackage selection routine, that selects more than 1000 select conditions. I guess it is a parameter that needs to be changed somewhere. Any help on this one?
    BR
    Øyvind

  • Idoc syntax errors

    Hi all,
    Im developing a interface for purchase/sales orders. i populated the fields into segments and am running the function module. it is creating an idoc with status 60
    EDI: Syntax error in IDoc (segment cannot be identified).
    I dont know which segment its not identifying..
    mesage type ZXXXXXX
    process code used orde
    fm idoc_input_orders.
    can somebody help me with this in trouble shooting
    thanks,
    Kiran

    Hi Vijay,
    this is the structure of edidc when i c it in we19..dont know how to clear this error.
    EDIDC   2000000000000404101620 60        2SAPSD1    LSSD1CLNT200                                                                               
    E1EDK01                                                           
           E1EDK14                     0081800                               
           E1EDK14                     00710                                 
           E1EDK14                     00610                                 
           E1EDK14                     012ZOR                                
           E1EDK14                     019OMY                                
           E1EDK03                     00220040809                           
           E1EDK03                     02200000000                           
           E1EDK03                     02300000000                           
           E1EDKA1                     AG 0002200253                         
           E1EDKA1                     VE 00000096                           
           E1EDK02                     001CUSTPONOTEST1                      
           E1EDK02                     044J0000000143                        
        4  E1EDKT1                     Z004I    VBBK                         
        4  E1EDKT1                     Z002I    VBBK                         
        4  E1EDP01                     000001     0000000010     PCE         
           E1EDL44                     1                                     
    this is the erro message im getting..
    The segment E1EDL44 does not occur at the current level of the basic type ORDERS05 (extension ).
    This error can have several reasons:
    The segment E1EDL44 is assigned to a group whose header segment does not occur.
    The segment E1EDL44 does not exist in the syntax description of the basic type ORDERS05 (extension ).
    The sequence of segments in the group in which the segment appears is incorrect.
    Previous errors ('mandatory' segment or group missing) may be due to this error.
    Procedure
    Please check the IDoc or the syntax description of the basic type ORDERS05 (extension ).
    thanks..

  • Idoc Error - EDI: Syntax error in IDoc (segment cannot be identified)

    Hi All,
    have created a new reduced message type for our new vendor A/C group through BD53. Also done reqd config for sending the vendor master through this message type. .
    I have created couple of vendors for testing with X01 with withholding tax functionality and when try to send these vendors , Idocs are getting failed .
    When I create vendor without withholding tax functionality , idoc is getting posted succesfully . If create vendor with entries in the feild whih are related to withholding tax  . Idocs are getting failed .
    If I see the status in WE05 ,Idocs which are posted succefully are showing the basic type as CREMAS03 . For idocs which are getting failed have the basic type as CREMAS04 and also the extension  as Z1CREMAS . I don`t understand why the system is defaulting CREMA04 & Z1CREMAS when I send the vendor master with withholding tax feild entries.
    I am not much familiar with ALE /Idoc set up. Please can any body help me to resolve the issue.
    The error message in we05 as below
    EDI: Syntax error in IDoc (segment cannot be identified)
    Message no. E0078
    Diagnosis
    The segment Z1LFA1M does not occur at the current level of the basic type CREMAS04 (extension Z1CREMAS).
    This error can have several reasons:
    The segment Z1LFA1M is assigned to a group whose header segment does not occur.
    The segment Z1LFA1M does not exist in the syntax description of the basic type CREMAS04 (extension Z1CREMAS).
    The sequence of segments in the group in which the segment appears is incorrect.
    Previous errors ('mandatory' segment or group missing) may be due to this error.
    Procedure
    Please check the IDoc or the syntax description of the basic type CREMAS04 (extension Z1CREMAS).
    Thanks

    Hi,
    I don`t understand what do you mean release after adding segment.
    Message type works i.e. Idoc get posted if I send with the  vendor w/o withholding tax field entries. Idoc fails when send vendor with withholding tax field entry.
    Regards

  • IDOC Status 26: EDI: Syntax error in IDoc (segment cannot be identified).

    Hi All,
    I have created IDOC extension for IDOC Basic type "PROACT01" and have followed all required necessary steps but getting IDOC
    Status 26. EDI: Syntax error in IDoc (segment cannot be identified). The exact error is:
    Please check Error Details and the details of the steps I followed for Setting up IDOC Extension:
    Error Detail :
    EDI: Syntax error in IDoc (segment cannot be identified)
    Message no. E0078
    Diagnosis
    The segment ZPROSEG does not occur at the current level of the basic type PROACT01 (extension PROACTEX).
    This error can have several reasons:
    The segment ZPROSEG is assigned to a group whose header segment does not occur.
    The segment ZPROSEG does not exist in the syntax description of the basic type PROACT01 (extension PROACTEX).
    The sequence of segments in the group in which the segment appears is incorrect.
    Previous errors ('mandatory' segment or group missing) may be due to this error.
    Procedure
    Please check the IDoc or the syntax description of the basic type PROACT01 (extension PROACTEX).
    Can you please look at this problem and suggest what is wrong with IDOC Extension/Custome Segment?
    Below is the Details of the Steps which I have followed:
    1. Tcode WE31 - Created new custom Segment ZPROSEG with 4 fields. Released segment.
    2. TCode WE30 - Created IDOC Extension PROACTEX for Basic Type PROACT01. Released IDOC extension.
         Here when I run syntax check warning appears "No predecessors exist".  I am not sure if its okay!!
    3. TCode WE82 - Added Extension PROACTEX in the Message Type PROACT with BASIC Type PROACT01.
    4. TCode WE20 - Added IDOC Extension PROACTEX in the predefined partner profile in WE20 transaction.
    5. Added the following code in the Customer Exit EXIT_SAPLWVMI_001 include ZXWVMIU01 .
    DATA segnam(27).
    READ TABLE dedidd WITH KEY segnam = 'ZPROSEG'.
    IF sy-subrc NE 0.
    LOOP AT dedidd WHERE segnam = 'E1EDP31'.
    CLEAR dedidd.
    dedidd-segnam = 'ZPROSEG'.
    zproseg-matnr = 'Mat1'.
    zproseg-lgort = '001'.
    zproseg-gernr = 'SNo1'.
    zproseg-labst = 2.
    dedidd-sdata = zproseg.
    APPEND dedidd.
    ENDLOOP.
    ENDIF.
    Finally ran  transaction WVM2 (Transfer of Stock & Sales Data) to generate IDOC, its creating IDOC but when checked IDOC in WE05 its getting Status Error "26".
    Looking forward for your reply.
    Many thanks in advance.

    Hello,
    Actually you are appending the Z segment instead of inserting into the correct position. So the segment is added at the last, so hierarchy of segments is collapsed.
    So get the index of the previous segment E1EDP31 and increase the index by 1 and INSERT the Z segment with that new index as below.
    LOOP AT dedidd WHERE segnam = 'E1EDP31'.
    lv_index = sy-tabix. " <<--
    ADD 1 TO lv_index. " <<--
    CLEAR dedidd.
    dedidd-segnam = 'ZPROSEG'.
    zproseg-matnr = 'Mat1'.
    zproseg-lgort = '001'.
    zproseg-gernr = 'SNo1'.
    zproseg-labst = 2.
    dedidd-sdata = zproseg.
    *APPEND dedidd.
    INSERT dedidd INDEX lv_index. " <<---
    ENDLOOP.
    Here actually we are insering the record inside the LOOP and it regenerates the index again. It is not actually a good practice.
    So the best practice is get the index and generate the segment inside the loop, store them into another internal table, come out the loop and insert the Z segments into DEDIDD by looping the new internal table.

Maybe you are looking for