IDOC Segment Complexity

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kashif007
Premium Member
Premium Member
Posts: 216
Joined: Wed Jun 07, 2006 5:48 pm
Location: teaneck

IDOC Segment Complexity

Post by kashif007 »

Hi All

I am doing a job to load into SAP system using an IDOC. The logic is very complex. I am sending the data one to one into all the SAP IDOC's, I do not have any kind of error while loading also. But there is one SAP IDOC Segment which is suppose to store 4/5 values for each primary key column. It works like one column from legacy has many values in SAP. If I load each record seperately I end up overwriting the last one leaving only one record in SAP but actually should show up 4/5 records with that common column called CLASS. Please how do I load a data into SAP with one record with many values into the same segment without overwriting it.

Example:
If I load like the following, SAP overwrites the last record and I only get to see "MATCH" in SAP. But I need to have all three SET, GAME and MATCH in multiple fields.

CLASS | ATNAM
Abrasive | SET
Abrasive | GAME
Abrasive | MATCH

I am suppose to load like the following to the IDOC, to make the load properly

CLASS | ATNAM
Abrasive | SET
GAME
MATCH

Both the columns are coming from the same table. Please suggest how can this be done.
Regards
Kashif Khan
tomato
Participant
Posts: 15
Joined: Mon Feb 20, 2006 2:46 am

Re: IDOC Segment Complexity

Post by tomato »

Can you give the name of the IDOC message type?
As well as the segment name that u wish to map the value
gomez
Premium Member
Premium Member
Posts: 83
Joined: Tue Jun 22, 2004 6:11 am

Post by gomez »

I had created Stage variables to group the lines into an Idoc segment. I am not understanding your sample data very clearly. I would explain with how I have done on say a GL object, I create one Idoc for every Journal and every Journal will have many lines. In this case the header is assigned a StgVarHeader which increments for every Journal. The other Stage variable StgVarLine increments for every line in the Journal. It is reset to 1 for every new Journal. The Primary key of the Header is assigned the StgVarHeader value. The Primary key of the Child segment is assigned the StgVarLine. The Foreign key of the Child Segment is assigned StgVarHeader.
IHTH
Post Reply