问题描述
Hi ,
   我需要将N101和N102映射到ShipTo一次,并将BillTo映射到基于N101的值一次。
I need to Map N101 and N102 to ShipTo once and same for BillTo to once based on value of N101.
我的输入文件看起来像:
ISA> 00>          > 00>         > 01> 006906614GE >> 12> 2018040800   > 130722> 0313> U> 00401> 000000005> 1> P>:〜
GS> PO> 006906614GE> 2018040800> 20130722> 0313> 5> X> 004010~
ST> 850> 018669036~
BEG> 00> NE> 018669036>> 20130722~
DTM> 002> 20130805~
N1> BT> AmerisourceBergen~
N4> Thorofare> NJ> 08086~
N1> ST> ABC DC ROANOKE> 11> RA0316958~
N3> 501 PATRIOT PARKWAY~
N4> ROANOKE> TX> 76262-6336~
N1> SU> CEDARDALE DISTRIBUTORS LLC> 1> RC0282498~
ISA>00> >00> >01>006906614GE >12>2018040800 >130722>0313>U>00401>000000005>1>P>:~
GS>PO>006906614GE>2018040800>20130722>0313>5>X>004010~
ST>850>018669036~
BEG>00>NE>018669036>>20130722~
DTM>002>20130805~
N1>BT>AmerisourceBergen~
N4>Thorofare>NJ>08086~
N1>ST>ABC DC ROANOKE>11>RA0316958~
N3>501 PATRIOT PARKWAY~
N4>ROANOKE>TX>76262-6336~
N1>SU>CEDARDALE DISTRIBUTORS LLC>1>RC0282498~
如果N101是'BT'那么我需要映射到BillTo N101是'ST'然后我需要映射到ShipTo而N101是'BS'然后 我需要映射到BillTo和ShipTo。
If N101 is 'BT' then I need to Map to BillTo and N101 is 'ST' then I need to Map to ShipTo and N101 is 'BS' then I need to Map to BillTo and ShipTo.
为此我开发了一个xslt调用模板,看起来像:
For That I developed One xslt call-template which looks like :
然后,对于BillTo和Shipto,脚本的最终结果是相同的。
Then end result of the script is same for BillTo and Shipto.
Chittidi
推荐答案
您可以通过以下方式执行此操作步骤:
You can do this by following steps:
步骤1:从N1 Loop1拖动链接并将其连接到BillTo节点。
第2步:删除 Equal
functoid 在地图网格上。
步骤3:链接N101节点(它保存Party标识符值,BT)到Equal Functoid,这将是第一个输入。
步骤4:双击 Equal Functoid并将第二个输入参数的值设置为 BT 。
步骤5:将Equal functoid的输出链接到BillTo节点。
Step 1: Drag a link from N1 Loop1 and connect it to BillTo Node.
Step 2: Drop a Equal functoid on map grid.
Step 3: Link N101 node (it holds the Party identifier value , BT) to Equal Functoid , this will be the first input.
Step 4: Double click the Equal Functoid and set the value of second input parameter as BT.
Step 5: Link the output of Equal functoid to BillTo Node.
要应用于ShipTo的相同步骤,但第二个输入参数的值应为 be ST。
Same steps to be applied to ShipTo but value of second input parameter should be ST.
您可以参考以下文章:
这篇关于N1 LOOPING基于N101值映射到ShipTo和BillTo的段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!