Parent Child segment relationship error in IDOC
Posted: Tue Apr 05, 2016 3:33 am
I'm transmitting an IDOC with below segments in IDOC Type using IDOC Load Connector stage
CONTROLREC -- Control Record
HDRSEG -- Header
DATASEG1 -- Parent Data Segment
EXTDATASEG1 -- Child Segment
DATASEG2 -- Data Segment
ADM_SEGNUM is generated in Connector stage (It is not populated with data moved from datastage)
ADM_PSGNUM -- For parent segment '0' and For child segment it is passed with SEGNUM of its parent segment record as below
SAP_segment ADM_SEGNUM ADM_PSGNUM
HDRSEG ---------------1--------- 0
DATASEG1-------------2--------- 0
EXTDATASEG1--------3--------- 2
DATASEG2-------------4--------- 0
DATASEG1 -------------5--------- 0
EXTDATASEG1---------6--------- 5
DATASEG2--------------7--------- 0
DATASEG1 -------------8--------- 0
EXTDATASEG1---------9--------- 8
DATASEG2 -------------10--------- 0
Data Populated as below in IDOC
SAP_segment ADM_SEGNUM ADM_PSGNUM HLEVEL
HDRSEG------------1------------------------------1
DATASEG1---------2-------------------------------2
EXTDATASEG1-----3--------------2---------------3
DATASEG2----------4------------------------------2
DATASEG1----------5
EXTDATASEG1------6
DATASEG2----------7
DATASEG1----------8
EXTDATASEG1------9
DATASEG2----------10
IDOC Error: E0078 - EDI: Syntax error in IDoc (segment cannot be identified)
PSGNUM (moved from datastage) and HLEVEL (not moved from datastage) are populated from first record alone. So the Parent Child relationship is established for first record only. This needs to be populated for all the records. Please help me in getting the expected output
CONTROLREC -- Control Record
HDRSEG -- Header
DATASEG1 -- Parent Data Segment
EXTDATASEG1 -- Child Segment
DATASEG2 -- Data Segment
ADM_SEGNUM is generated in Connector stage (It is not populated with data moved from datastage)
ADM_PSGNUM -- For parent segment '0' and For child segment it is passed with SEGNUM of its parent segment record as below
SAP_segment ADM_SEGNUM ADM_PSGNUM
HDRSEG ---------------1--------- 0
DATASEG1-------------2--------- 0
EXTDATASEG1--------3--------- 2
DATASEG2-------------4--------- 0
DATASEG1 -------------5--------- 0
EXTDATASEG1---------6--------- 5
DATASEG2--------------7--------- 0
DATASEG1 -------------8--------- 0
EXTDATASEG1---------9--------- 8
DATASEG2 -------------10--------- 0
Data Populated as below in IDOC
SAP_segment ADM_SEGNUM ADM_PSGNUM HLEVEL
HDRSEG------------1------------------------------1
DATASEG1---------2-------------------------------2
EXTDATASEG1-----3--------------2---------------3
DATASEG2----------4------------------------------2
DATASEG1----------5
EXTDATASEG1------6
DATASEG2----------7
DATASEG1----------8
EXTDATASEG1------9
DATASEG2----------10
IDOC Error: E0078 - EDI: Syntax error in IDoc (segment cannot be identified)
PSGNUM (moved from datastage) and HLEVEL (not moved from datastage) are populated from first record alone. So the Parent Child relationship is established for first record only. This needs to be populated for all the records. Please help me in getting the expected output