Invoices to be received
The following example shows invoices to be received, one interchange for each store.
ISA*00*ASCENTIAL *00*00 *01*ME *ZZ*WALLY *180822*1142*^*00704*000000010*1*P*:
ISX*!
GS*IN*ME*WALLY*20180822*11422373*1*X*007040
ST*810*1
BIG*20180822**20180820*0037324138*
REF*DP*32
REF*IA*181305320
N1*ST*0100
IT1*003*12*EA*3.25*LE*UP*070135170312*CB*003257144*VC*1004
PO4*11*6*EA
IT1*004*12*EA*3.25*LE*UP*070135140315*CB*003257185*VC*1005
PO4*19*6*EA
TDS*2400
CTT*2
SE*12*1
ST*810*2
BIG*20180822**20180820*0037324913*
REF*DP*32
REF*IA*181305320
N1*ST*0100
IT1*001*12*EA*3.9*LE*UP*070135150611*CB*003234689*VC*1001
PO4*25*6*EA
IT1*005*12*EA*3.25*LE*UP*070135160313*CB*003257128*VC*1006
PO4*26*6*EA
TDS*2400
CTT*2
SE*12*2
GE*2*1
IEA*1*000000010
The store number is indicated by the IDCd element of the N1*ST*0100 segment. In the example shown here, the store number is N1*ST*0100. The object is to generate an interchange for each store indicated in the data from your trading partner Wally. For example, if there are a total of three different stores in the data from your trading partner, you want to generate three interchanges.
To map each output interchange, the functional map ByStore is used.
The UNIQUE and EXTRACT functions are used to generate one Interchange for each unique value of the IDCd Element within the SDQ Segment. The second argument of ByStore is the entire input transmission. To map just the data from your trading partner, the LOOKUP function is used to look up the information in the trading partner profile. The last argument of ByStore is the INDEX of the current interchange being produced, which are used to generate the new ISA control number.