Idoc Segment Filtering error.

Hi,
I have a scenario of IDOC to IDOC Scenario, in which i have to filter some segments based on the field value.
Ex: DESADV09 is my input and output IDOC
Having segment as below:
Segment -
E1EDK08
Fields----
Field1
Fields----
Field2
Segment----
E1EDP07
Fields----
Field3
Fields----
Field4
Segment----
E1EDP08
Segment----
E1EDP09
Fields----
Field5
Fields----
Field6
Segment----
ZCODE
Segment----
ZQUALIFIER
Fields----
Field7
Fields----
Field8
Here using the qualifiter segment we need to filter the E1EDP09 segments,
The condition is If Field7 == Network, and Field8 == GSM, I need all the E1EDP09 segments.
The E1EDP09 segments has to filter with the above condition.
For example if 10 E1EDP09 segments comes in the input IDOC if i have only 6 satisfed with the above condition I need only those 6 E1EDP09 segments at the output.
I have tried with all the options but i couldn't fiter that, can anyone throw some light on this..
Thanks,
--Sai

Hello,
You can try using the mapping below:
For E1EDP09 mapping:
Field8 --> concat --> equalsS:GSMNetwork --> ifWithoutElse --> removeContext --> E1EDP09
Field7 --> /                                           /
E1EDP09 --------------------------------------------> /
The code above will pass the number of E1EDP09 that satisfies your condition.
For the E1EDP09 child nodes e.g /DESADV01/IDOC/E1EDK08/E1EDP07/E1EDP09/HLNUM:
Field8 --> concat --> equalsS:GSMNetwork -----------------> ifWithoutElse --> removeContext --> E1EDP09
Field7 --> /                                                        /
HLNUM --> MapWithDefault --> removeContext --> formatByExample --> /
E1EDP09 -------------------------------------------> /
The code above will pass all the E1EDP09 fields that satisfies your condition
Hope this helps,

Similar Messages

  • EDI IDoc Segment Filtering Transactions

    Hi All,
    Is there any transaction for EDI IDoc segment filtering where partner profile is set up with partner type as 'customer' or 'vendor' (and not partner type as 'logical system' where ALE IDoc segment filtering transactions BD59 & BD64 can be used) ?
    Thanks !

    Thanks Lokeshwari.
    Actually, a perticular field in an IDoc segment needs to be filtered. e.g. I dont want to send idocs with a perticular item category for ORDERS05 IDoc.
    Is there any transaction to fulfill the same ?

  • Idoc Segment Cancel release error

    Hi all,
       I have problem in cancelling the release of an Idoc Segment. I have a requirement to add new fields to the segment. When I try to do Edit->Cancel Release it is throwing below error.
    "Error while resetting release of segment Z1PXXXX
    Message no. EA259"
    Could anyone tell me how to overcome this error or the root cause of this error?
    Many Thanks,
    Sri
    Edited by: Arunsri on Nov 10, 2009 8:37 AM

    Hello,
    The reason that you are getting these errors is that you cannot cancel
    the release of an extension made in previous version e.g. 4.6C. Instead you have to
    create a new extension.
    It is not possible to change a segment definition which is released in a
    lower release. This is a basic concept of our release strategy to
    guarantee compatibility between different releases.
    You must create a new segment definition for the new release e.g. 620 with a new segment
    field with the appropriate length. In transaction WE20, outbound parameters, you can specify
    the "segment release in IDoc type" for the communication. Please read the F1 help of this field for further
    information.
    For your own segments you can define a new version of the segment via
    transaction WE31 -> Add Version (Shift+F5).
    Please review your online help for more information on this and related topics.
    Hope this information helps.
    Regards,
    David

  • 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.

  • Error While Creating Custom IDOC Segment using WE31

    Could anyone please help me resolve this issue.
    I am getting following error when trying to create a custom IDOC segment type using WE31.
    "Name range violation: Name Z1WOHDR not permitted in SAP system"
    Segment type trying to create: Z1WOHDR
    Regards
    Venu

    Try changing the name , But i am not getting any such error with the name you are using.
    Just Try with some onther name

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

    Hi All,
    Im facing the below error EDI: Syntax error in IDoc (segment cannot be identified).
    And this error is coming only for few idocs rest are getting processed successfully.
    Message no. E0078
    Diagnosis
    The segment E1EDP03 does not occur at the current level of the basic type ORDERS05 (extension ).
    This error can have several reasons:
    The segment E1EDP03 is assigned to a group whose header segment does not occur.
    The segment E1EDP03 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 ).
    Please suugest.
    Thanks,
    Spandana

    Hi,
    Is this standard program or custom program?
    you might be appending the Z segment instead of inserting it. Always best practice is get the index of the segment and instert it.
    If all the data is not populated then segment position will change incase of appending. Please check your code and revert back.
    Refer the below link for detailed information.
    IDOC Status 26: EDI: Syntax error in IDoc (segment cannot be identified).
    Thank you

  • Syntax error in IDoc segment

    Hi,
    when I make a syntax check on my Idoc segment '/FIT/E1FISFIINV'  I get the error message:
    Entries for segment '/FIT/E1FISFIINV' missing in the 'Segment structures' table.
    I can't delete the segment type as I get the error message Segment /FIT/E1FISFIINV does not exist yet when I try it.
    But I also can't create the segment type as I get the error message Structure /FIT/E1FISFIINV already exists
    I already looke in the tables EDISDEF and EDISEGMENT to check that the entries for the segement /FIT/E1FISFIINV do exist in these tables.
    Does anybody have an idea how to solve this problem?
    Thank you.
    Martin

    I want to create a new idoc type '/FIT/xxxxx' and therefore I want to create new segment types  '/FIT/xxx' for this.
    I copied the segment types from another system (older release) to that system but there seems to be a data inconsistency. which I am trying to fix.

  • How to edit inbound idoc with data errors in multiple segments and reproces

    Hi friends,
    i have a requirement for error handling of inbound sales order(ORDERS04) without using WORKFLOW and WE19.
    i have seen some function modules like edic_* ..
    but my doubt is how to edit the error data(how can i identify the particular error fileds in the segments)and how to reprocess the same idoc.
    Please help me...
    Thanks in advance

    Hi Narasimh,
    Please find the following steps to edit IDOC segment after you find the error using WE02.
    The example codes can be found in website 
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    STEP 1 - Open document to edit
    CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
           EXPORTING
                document_number               = t_docnum
           IMPORTING
                idoc_control                  = itab_edidc
           TABLES
                idoc_data                     = itab_edidd
           EXCEPTIONS
                document_foreign_lock         = 1
                document_not_exist            = 2
                document_not_open             = 3
                status_is_unable_for_changing = 4
                OTHERS                        = 5.
    STEP 2 - Loop at itab_edidd and change data
    LOOP AT itab_edidd WHERE segnam = 'E1EDKA1'.
      e1edka1 = itab_edidd-sdata.
      IF e1edka1-parvw = 'LF'.
        e1edka1-partn = t_eikto.
        itab_edidd-sdata = e1edka1.
        MODIFY itab_edidd.
        EXIT.
      ENDIF.
    ENDLOOP.
    STEP 3 - Change data segments
    CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENTS'
               TABLES
                    idoc_changed_data_range = itab_edidd
               EXCEPTIONS
                    idoc_not_open           = 1
                    data_record_not_exist   = 2
                     OTHERS                  = 3.
    STEP 3a - Change control record
    CALL FUNCTION 'EDI_CHANGE_CONTROL_RECORD'
           EXPORTING
                idoc_changed_control         = itab_edidc
           EXCEPTIONS
                idoc_not_open                = 1
                direction_change_not_allowed = 2
                OTHERS                       = 3.
    STEP 4 - Close Idoc
    Update IDoc status
    CLEAR t_itab_edids40.
      t_itab_edids40-docnum      = t_docnum.
      t_itab_edids40-status      = '51'.
      t_itab_edids40-repid       = sy-repid.
      t_itab_edids40-tabnam      = 'EDI_DS'.
      t_itab_edids40-mandt       = sy-mandt.
      t_itab_edids40-stamqu      = 'SAP'.
      t_itab_edids40-stamid      = 'B1'.
      t_itab_edids40-stamno      = '999'.
      t_itab_edids40-stapa1      = 'Sold to changed to '.
      t_itab_edids40-stapa2      = t_new_kunnr.
      t_itab_edids40-logdat      = sy-datum.
      t_itab_edids40-logtim      = sy-uzeit.
      APPEND t_itab_edids40.
      CALL FUNCTION 'EDI_DOCUMENT_CLOSE_EDIT'
           EXPORTING
                document_number  = t_docnum
                do_commit        = 'X'
                do_update        = 'X'
                write_all_status = 'X'
           TABLES
                status_records   = t_itab_edids40
           EXCEPTIONS
                idoc_not_open    = 1
                db_error         = 2
                OTHERS           = 3.
    Hope this will help.
    Regards,
    Ferry Lianto

  • 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

  • What is Data filtering and Segment filtering in ALE/IDOCs

    Hi sap gurus
    what is Data filtering and Segment filtering in ALE/IDOCs

    Hi,
    Filtering at the IDoc Level
    Identify the filter object (BD59)
    Modify the distribution model
    Segment Filtering
    specify the segments to be filtered (BD56)
    The Reduced IDoc Type
    Analyze the data.
    Reduce the IDoc type (BD53)
    Thanks and regards.

  • How to identify/Highlight Idoc segment which is in error

    Hi All,
    We want that when the user looks at the IDoc which is in error, he should be able to find out the segment which is in arror. How to identify/Highlight Idoc segment which is in error.
    Prashant

    Hi kunyare,
    If you are receiving errors when trying to restore your iPad from Recovery Mode, you may find the following article helpful:
    Apple Support: Resolve specific iTunes update and restore errors
    http://support.apple.com/kb/TS3694
    Regards,
    - Brenden

  • Error when declaring IDOC segments in program

    I am getting error when declaring IDOC segments in my program.
    Below is how I declared.
    data: wa_e1vfkonk      like e1vfkonk.
    For the same syntax few segments are showing as properly declared and few are showing error that 'eqvfkonk' does not exist.
    How ever this structure does exist when i check it.
    Help appreciated.

    Hi Prasad,
    I think the segment that you are declaring in the program doesn't exist in SAP system as standard.
    Maybe you mean E1VFKONX, finishing with "X" instead "K"?
    Reward points if useful.
    Roger

  • Idoc filetering ,segment filtering

    hi ,
    can any one send me the document to create idoc filtering thru bd53,and segment filtering thru bd56.
    [email protected]
    points are assured!
    thanks
    Ganesh
    Message was edited by:
            ganesh ram

    Hai,
    Segment Filtering:
    Segment filtering can be achieved using T/Code BD56. Here you can suppress a whole segment irrespective of data inside it . You have to give Message Type / Sender Partner / Receiver Partner.
    Data Filtering:
    Data filtering can be done in distribution model where you can restrict whole IDOCS or partials IDOCS to be send based on data in fields inside IDOC depending on whether the segment in which you filter is at the highest level or at a lower level. For example in MATMAS if you put a filter of E1MARCM for a particular plant , only data for this plant will go and other plants will be ignored.
    Pls go thru this Link,
    http://help.sap.com/saphelp_nw04/helpdata/en/0b/2a611c507d11d18ee90000e8366fc2/frameset.htm

  • Unable to change the length of field in idoc segment

    Dear all,
    My requirement is to change the length of a field(Z field) in a segment (Z Segment). I tried the following but in vain
    1)Tried to  Cancel the release and then change the length of the domain. Unfortunately it is givin an error saying "Error while resetting release of segment ZC9DEMARA01".
    I also tried cancelling hte release of extension and then cancelled the release of segment
    2) Created a new version, but in new version the earlier fields are diabled. So I am unable to edit.
    I have gone through some of the links available in SDN but I could not solve as I am unable to cancel the release in the first step.
    [Idoc segment field length changes]
    Could you please help me.
    Thanks in advance!
    regards,
    Aravind

    Hello Aravind,
    I Have created one Segment type with some fields, changed the field length also its working.
    just try to cancel the release and change the length of the filed and do it set release again.
    Try it .
    Thanks,
    santhosh

Maybe you are looking for