IDoc segment issue

Hi,
I have file to Idoc scenario, where my input file structure like below and need to create Idoc segments in SAP.
Input Structure:
Record (1--Unbounded)
Header (1-1)
Item_Details (1- Unbounded)
Child_ItemsInfo (1 -Unbounded)
Item_1 (1--1)
abc
def
Item_2 (1--1)
abc
def
Item_3 (1--1)
abc
def
Now..I need to generate an Idoc segment "Z1ABCD", as many as child Item segments(Item_1,Item_2,Item_3) occurs in my input structure. I have used duplicate subtree on Idoc segment "Z1ABCD" and copied 2 more times.Now I have 3 "Z1ABCD" segments in my IDoc.
Lets say, if my input structure have 2 Child_ItemsInfo, then I need to generate 6 "Z1ABCD" segments in Idoc. I'm able generate these segments.
My code generating all the Item_1 segments then Item_2 segments like that...But I'm expecting a "Z1ABCD" segment at Item_details node level...like Item1,2,3 and then Item1,2,3....Please help me out!
Note: My mapping looks like this;
Item_1 ->remove context>Split by value(each) ->CollapseContext->Z1ABCD
Item_2 ->remove context>Split by value(each) ->CollapseContext->Z1ABCD
Item_3 ->remove context>Split by value(each) ->CollapseContext->Z1ABCD
the target structure which I'm lookin for like below...(for 2 Child_ItemsInfo from my input structure)
1.Z1ABCD (Item_1 info)
2.Z1ABCD (Item_2 info)
3.Z1ABCD (Item_3 info)
4.Z1ABCD (Item_1 info)
5.Z1ABCD (Item_2 info)
6.Z1ABCD (Item_3 info)
But my code generating the segments like below;
1.Z1ABCD (Item_1 info)
2.Z1ABCD (Item_1 info)
3.Z1ABCD (Item_2 info)
4.Z1ABCD (Item_2 info)
5.Z1ABCD (Item_3 info)
6.Z1ABCD (Item_3 info)
Esha
Edited by: esha nadh on Mar 9, 2011 9:14 PM

I am bit confused .
Why are you using this ...
remove context-->Split by value(each) --->CollapseContext
Do Direct assignment like below
even the context should not change . it shoule be default .,
Item_1 - > Z1ABCD
Item_2 - > Z1ABCD
Item_3 - > Z1ABCD
isnt it working fine ??????
actually it should ..
In your case .
IZ1ABCD for Item_1 coming together because . you Used removeContext So Both  Item_1 comest together .. and then you doing transformation .. so the result are coming together...
Try Like Direct assignment . I hoping it should work fine
regds
PS

Similar Messages

  • IDoc segment version issue in ECC upgrade from 5.0 to 6.0

    Hi experts,
    we are in the process of upgrading our ECC environment from 5.0 to 6.0. We have quite a few interfaces which use ORDERS/Invoice Idocs in customised form. In ECC5.0 environment, we had developed a Z segment in the ORDERS Idoc and the segment release was set as 640. Everything worked fine in ECC5.0.
    In upgraded environment, SAP has released new version of some segments. one of those is E1EDP01. This segment has 2 new versions in ECC6.0 environment - 007 and 008. This change in the version changes the data in the IDoc and hence interface goes in error at the EDI provider.
    We have tried to use 640 as the IDoc segment release in the partner profile of the IDocs. This still gives us an issue because the 007 version of the segment E1EDP01 has release 620 and hence the Idoc picks up 007 version instead of 006 version as desired. When we change the partner profile with Segment release in the IDoc type as 46C, it gives us an issue in the Z segment saying that the IDoc segment is not released in 46C and the Idoc goes in error.
    has any one faces such situation in the past? if yes, please throw some light.
    Thanks in advance.

    Please let me know if your issue was resolved. I have similar issue now.
    Thanks,
    Sailaja

  • Issue of grouping IDOC segments in huge loads

    Hi All,
    My Scenario is File to IDoc. No problem in posting IDoc in R3. But when i see the Idoc structure in R3, all the data records are grouped in different segements as seen below:-
    This is how i see in we05.
    IDoc No (00000000001234)
    - Control Rec.
    - Segments 000001 to 001000
    - S01 Segment 000001 (Actual records)
    - S02 Segment 000002
    - S03 Segment 000003
    - Segments 001001 to 001001
    - S04 Segment 000004
    - S05 Segment 000005
    - S06 Segment 000006
    - Status Rec.
    I dont want the grouping of Idoc segments to take place. It should be under same data segment.
    Please provide me your valuable solutions to resolve the same.
    Note: This problem occurs only when processing huge records.
    Thanks in advance,

    Hi Sriram,
    It is the standard program flow of  transaction WE02 which checks the number of segments.if the count is more than 1000,it creates a another group and displays it for the sake of readability.
    Anyway it does not affect the inbound processing of the IDOC.
    Thank you.
    Regards,
    Karun.M

  • Issue with IDOC segment creation..

    hi,
    i created an idoc  segment thru we31. when i was saving it, and when the transport request was asked, i cancelled it. it so happend that the underlying structure was created (i was able to see that in se11) but in we31, the segment definition did not appear and i got the message "segment does not exist yet".
    so in se11, i deleted the associated structure and tried to recreate the segment, i am not able to !! while saving, i get the error "you do not have authorization for delete for function idoc segment"
    when i performed a segment check (ctrl + F1), i got the message,
    Repository structure missing for segment ZZZ                                                                                |
    Inconsistent overall length in segment version 000
    Segment version 000 not released
    Entries exist in table of Segments for segment ZZZ
    Entries exist in table of Segment definitions for segment ZZZ
    Entries exist in table of Segment structures for segment ZZZ
           |   Segment ZZZ is inconsistent                             
    what shud i do ?
    thks

    resolved. seems some authorization was missing. thks

  • Replaced value is not getting relected in IDOC segment field

    Hi,
    Need your help for the below issue.
    I am replacing the PO # with Delivery Doc # . But the replaced value is not getting reflected in the IDOC segment field(e1bp2017_gm_item_create-po_number.).
    Function Module  which I am using is IDOC_INPUT_MBGMCR as a copy.
    Here is my code given below:
    SELECT
                SINGLE vbeln
                  INTO lx_vbeln
                  FROM lips
                 WHERE vgbel EQ e1bp2017_gm_item_create-po_number.
    Move lx_vbeln TO e1bp2017_gm_item_create-po_number.
    MOVE-CORRESPONDING e1bp2017_gm_item_create
                   TO goodsmvt_item.
    Then this is passed as  TABLE in "BAPI_GOODSMVT_CREATE".
    Please do the needful.

    Hi Dheepa,
    Check it in debug whether the filed is empty or having po#, when ur code is executed for the replacement. if it is empty, po# is populated after ur code. in this case you need to write the code in suitable place.
    Reddy

  • IDOC-Segment Created a idoc document against Billing document

    Dear All,
    Thanks in  advance.
    Already created a idoc document against Billing document and one of the IDOC segment is not in the IDOC document output segments(WE05) actually it missed the segment.
    so i want to add the segment which it was missed during generation of IDOC document against billing document.
    Example:
    a) IDOC document misses one segment let suppose "Seg1".
    b) In "Seg1" it have only one field let suppose "Field1".
    c) But "Field1" does not have any value while generation of IDOC document so it doesn't create the respective segment in IDOC document.
    d) so here, i want to edit the IDOC document to add the "Seg1" in the IDOC document and reprocessing the IDOC document.
    Please help on this issue.
    Regards,
    Sridhar.

    Hello,
              If your requirement is to have the Segment even with only 1 Field, you'll have to create an Idoc Extension in WE30.
             In order to populate the Custom Segment, Use the Customer Function '002' in the IDOC_OUTPUT_INVOIC which is EXIT_SAPLVEDF_002 where you can actually insert the Segment as a Child Segment of an Appropriate Segment.
            You can go for Custom segment with the IDoc Extension so that you dont have to manually insert the Segment again and again while reprocessing it.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • Idoc segment release

    Hi,
    I wish to change one of the field's length in an idoc segment. It doesn't allow me to change it as the version is already released.
    However, I cannot  cancel the release too, as the released version belongs to an earlier version of SAP (4.7).
    The current/existing version of the segment is of release 620.  The current release is 710, so no change seems to be possible.
    I can't create another version too, as it doesn't allow change of the earlier field definitions.
    Could someone pls help.
    Thanks!
    Arthi

    Hi,
    We have similar issue. In the ORDERS05 IDOC, we had made changes to the segment E1EDP19 to repeat 99 times. Then IDOC extension ZORDERS05 was created. Due to new enhancement pack, the attributes of E1EDP19 were changed to repeat 5 times as per standard SAP.
    This did not work for us because segment E1EDP19 should repeat 99 times. So we ran program to update the attributes of this segment. Now E1EDP19 can repeat 99 times.
    But when we are processing ZORDERS05, the chagnes are not reflected. The reason could be, even though E1EDP19 was changed, it will not reflect in IDOC extension. For this to reflect, we are trying to cancel release ZORDERS05 once and release again.
    I am not able to do this activity. Any pointers to this will be helpful. My requirement is to just cancel release once and release it again. Also while doing so, SAP message pointed me to 844899.
    Regards,
    Shahu

  • 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

  • Chanding the content in an IDOC segment at runtime

    Hi Experts,
    I have funny issue with modification of the data in an IDOC segment. Below is the description of the issue:
         I am using the IDoc type FIDCC2.FIDCCP02. I have to populate the value for field 'KTOSL' of the
         segment E1FISEG. I wrote the logic in user exit EXIT_SAPLF050_006. It is getting triggered and the
         logic is updating the values in the IDOC_DATA internal table properly.
         When the IDoc is generated, I observed that the value for this field is not updated in IDoc Segment.
    Could you please suggest where I went wrong.
    Ramana

    Hi Neha,
    Thank you for the responce.
    We need not to fill all the 21 fields before the field KTOSL. Because I was using the work area to modify the internal table based on the index.
    One thing I can conclude is that we cannot change the values in the standard segments of a stanrd Idoc type. By the time you enter in the processing Functinal Module, the Idoc number would have been generated. So the modification we carry out are just updating the internal table which of no effect. The right way is that find the place where the values getting updated to the data base and change values as required. These changed values can be founf in the data base but not in the IDoc generated.
    Neha one more query for the clarification,could you ever delt with the down payment requests through IDocs. If so please share the details.
    Ramana

  • IDOC segment fields prefixing blank space with values

    Hi Experts,
    I am sending data through custom IDOC from SAP to XML which generates successfully but getting 2 problems in the data.
    its having 3 level idoc segments:
    SEGMENT1 with 1 field (field_name(20))
    SEGMENT2 with 3 fields, (code_g(20), field_name(20), value(20))
    SEGMENT3 with 4 fields, (code(20), field_name(20), Language(2) & text(20))
    When i check the idoc in WE02,
    1. i found that segment2-value field is prefixing some space along with the values.
        Eg: if the output is "0111" whihc is plant, in the output (WE02) it is giving "       0111"
    2. Segment3-language is no where in the output and text which should come as "011" is coming like "       EN011" means it is concatinating language field value and displaying it with the text field value with prefixing space.
    This is happening in PRD not in QA & DEV. I also checked the transport req and everything, Its same everywhere.
    Can anyone please help me on this.
    Regards,
    Nik

    Hi,
    This issue happnes when u are moving the data to iDOC segement with offset.
    to aviod this improper move instead of using offset statement use below mentioned code.
    decalare a structure as
    Data SEG1 type SEGMENT1 ,
            SEG2 type SEGMENT2,
           SEG3 type SEGMENT3.
    then while moving
    SEG2-code_g = 'XXXX'
    SEG2-field_name = 'YYYY'
    SEG3-value = 'ZZZZ'
    here u are moving the segment values to idoc data (SDATA) and then append it.
    move seg3 to idoc-sdata.
    then append it to idoc.
    hope this helps

  • 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

  • Idoc segment not apperaing for PO creation.

    Dear All.
    Sceanrio:
    Once PO is created , NEU ouptut gets triggered.On release of PO, it generates an outbound idoc.
    Issue.
    In this outbound idoc the segment E1EDKA1 WE is missing.This segment gives the Ship to address in the PO, ie normally the plant address to which the material is shipped.
    Analysis:
    This PO has 3 line items and these are created by reffering 3 different PR s.So my question here is , whether is this standarad SAP behaviour where Ship to address segment wont get populated into idocs for multiple line item POs.Why i am asking this is that, if suppose the PO has 10 different line items , with 10 different plants.Each plant has different address.Then how system will decide which ship to address will populate in E1EDKA1 WE segment.
    Or is there any other behaviours, when the PO has multiple line items.
    Please let me know your thoughts on this.
    Regards
    Shyam

    Hello Shyam ,
    The reason for this behavior could be that tthe items in the IDOC have a different delivery address maintained in the Ourchase Order. If the delivery address for all items is the same , the segment E1EDPA1 with qualifier WE will be not populated. Instead of generating E1EDPA1 , the system will create one E1EDKA1 segment with qualifier WE. This will prevent on receiving side the creation of the same delivery address for all items.
    I hope this information has been helpful.
    Best Regards,
    Frank Farinella

  • Inserting Orders05 Idoc segment

    Hi,
    I got an issue while appending the IDOC segments in the usex exit MM06E001 and the fm is EXIT_SAPLEINM_011 during changing of PO.
      Here my requirement was that i need to append the IDOC with missing segment like E1EDPT2 and E1EDPT1.
    After appending the missing segment to the internal DINT_EDIDD, it was showing the error status as 26.
      I found that error was due to irregular order of the strucutre.
    Could any one please help me out like how can i arrange the order of the table
    according to IDOC structure once we append the record?
    Thanks and Regards,
    Gopi.

    Hi  Abraham,
    Segment definition is changed whenever we add version , as you have upgraded to ECC6.0 segment definition might have change, observe the version number in we31 for segment definition and ask the other party to use that version for that segment.
    Also see new release (600 for ECC6.0) is is linked  with message type and basic type in we82
    Regards
    Vinod

  • Idoc segment numbers

    Can anyone tell me how idoc segment numbers/order are determined?  I have a rather large ORDERS05 idoc being used to send outbound EDI 850 documents.  This line sequence number is kept in segment E1EDP01, element POSEX).
    For smaller purchase orders (20 lines or so) the idoc segment sequence follows the same order as the purchase order line numbers (0010, 0020, 0030 and so on).   This means that E1EDP01, POSEX = 0010 followed by 0020 etc.
    But in one of my larger idocs POSEX is beginning with 00220, goes up consecutivelt to 00410, then goes to 00210, then to 0010 - 00200.  I can't find any obvious sort order in this.
    Any insights will be greatly appreciated.  Thanks.

    Ram,
    Create a File port in WE21 and assign this port to your IDoc in WE20. When the Idoc is triggered the corresponding IDoc is converted into IDoc Flat file with fixed lengths. Then you can read this fixed length Idoc and can convert into Idoc XML. or Check the section 3.2 which converts your flat file idoc into Idoc XML. This should solve your issue.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/46759682-0401-0010-1791-bd1972bc0b8a
    ---Satish

  • Unreleashed segment issue with SAP schema

    Hi All,
    We are trying to generate SAP schema in BizTalk 2010 and facing unreleased segment issue and discussed with SAP team whom suggested below ways. We were interacted with MSFT and no hotfix yet. Please guide me.
    The provider/external should call IDOCTYPE_READ_COMPLETE in the following way:
    - PI_RELEASE = ' ' => last existing segment version is returned
    - PI_RELEASE not available in the interface => last released version
    Which means: BizTalk needs to ensure the PI_RELEASE is not present in the call of the interface. This will allow pulling the last release version of the IDoc including not released segments.
    Thanks, Raja MCTS BizTalk Server 2010, MCC If this answers your question please mark it accordingly

    BizTalk does not support unreleased segments for Receive Operations.
    As far as I know SAP 'locks' the segment types that have not been released and the LOB adapter of BizTalk cannot properly read those segments.
    The SAP team should set a release on the IDOC types and segments you need.
    Glenn Colpaert - MCTS BizTalk Server - Blog : http://blog.codit.eu

Maybe you are looking for

  • Extra content not showing up in fcp

    hello, when i installed my final cut i installed the 50+ gigs of extra content (sounds, templates, etc) on my second internal hard drive while the final cut apps are on my main hard drive. in final cut, under the veiwer generator pop-up menu there is

  • Old previews bogging down hard drive backups

    When I backup my hard drive to another hard drive, using Vica-Versa software, there are often lots (thousands) of older LR preview files that need to be deleted off the backup drive.  With Vica-Versa the entire process just bogs down and can take for

  • Altering an ApEx Calendar page

    Hello, I was wondering if it was possible to alter an ApEx calendar page in order to make it into a resource scheduling page. Instead of the days listed across the top, it would have a list of resources (like shared meeting rooms), then times would b

  • Need Help with checking of 2 queries

    hi, I dunno how to check for query that needs 2 of the table component in order to display. I need to check for this: private void _init() throws Exception { weekly_datesDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{SessionB

  • Can't Delete a GPO

    I'm having problems with Group Policy Management. I made a new GPO in the Group Policy Objects folder and let it keep its default name which is 'New Group Policy Object' and kept source starter GPO to none. I have no other GPO's except for 'Deafault