Page 1 of 1

IDOC Segment Complexity

Posted: Thu Jul 26, 2007 5:53 pm
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.

Re: IDOC Segment Complexity

Posted: Thu Feb 28, 2008 3:01 am
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

Posted: Mon Mar 24, 2008 3:30 pm
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