cancel
Showing results for 
Search instead for 
Did you mean: 

Grouping two records from flat source file into one based on key fields

former_member195202
Participant
0 Kudos

Hi All,

I am working on a file to idoc scenario, where the source file structure contains matnr, quantity, movement type and batch status.

The requirement is if matnr, quantity are same and batch status is 'A' and directions are opposite (say one is having inbound

and other is having outbound), then they need to be mapped to a single record in target side (target is an idoc).

The file structure is as below.

Header RECTYP

Header TRANDATE

Header TRANTIM

Header IFTYP

Header IFSEQNO

Detail RECTYP

Detail MVT_DATE

Detail REF_NBR

Detail MVT_DIR

Detail MVT_REASON

Detail MATNR

Detail PLANT

Detail BATCH

Detail STG_LOC

Detail BOND_FLG

Detail BATCHST

Detail STK_RC

Detail QTY

Detail MATNR_TO

Detail PLANT_TO

Detail BATCH_TO

Detail STG_LOC_TO

Detail BOND_FLG_TO

Detail BATCHST_TO

Detail STK_RC_TO

Detail DELNOTE

Detail DELNITEM

Trailer

Trailer RECTYP

Trailer TRANDATE

Trailer TRANTIM

Trailer RECCOUNT

I thought of doing it by XSLT mapping- first group the records through xslt mapping in the same structure and then map the structure to target idoc i.e. through two mappings, but seems will have to go for java mapping. Please suggest.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Use logical routing in your receiver determination.

Regards

Ivan