Page 1 of 1

How to Design a job

Posted: Thu Oct 04, 2007 7:32 am
by sundrop
I'm new to DataStage and have a how to question. I need to post some Invoice information to SAP using IDOCs. I have two sequential files. One with Invoice header information and the other with Invoice line items, freight items and tax items for an invoice. I need to determine if the Invoice has a freight item or a tax item to determine how to value a field.
Is there a way to read all the line items for a particular invoice first to determine if that invoice has a tax record or a freight record? Can this be accomplished using stage variable?

Posted: Thu Oct 04, 2007 8:53 pm
by ArndW
Hello sundrop and welcome to DSXchange.

PX jobs allow a sequential file to be used as a lookup object. If you declare your Invoice Line items file as a lookup and use your invoice number and tax/freight record column value as lookup keys you can get your status and process the other data accordingly.