on 10-08-2009 4:02 AM
Hi Experts,
How can I map these lines into my target using java mapping uml??
can you guys provide some code using java? coz I have no idea using java code.
<A_06>0</A_06>
<AB_07>256</AB_07>
<A_08>0</A_08>
<AB_09>257</AB_09>
<A_10>0</A_10>
<AB_11>259</AB_11>
<A_12>0</A_12>
<AB_13>260</AB_13>
<A_14>0</A_14>
<AB_15>262</AB_15>
<A_16>-1</A_16>
Thanks.
here it goes..
source message...
\Identification_Code_Qualifier_02>92</Identification_Code_Qualifier_02>
\ Identification_Code_03>117</Identification_Code_03>
\ Quantity_04>0</Quantity_04>
\Identification_Code_05>119</Identification_Code_05>
\ Quantity_06>0</Quantity_06>
\ Identification_Code_07>120</Identification_Code_07>
\ Quantity_08>0</Quantity_08>
\ Identification_Code_09>121</Identification_Code_09>
\ Quantity_10>0</Quantity_10>
\ Identification_Code_11>122</Identification_Code_11>
\ Quantity_12>0</Quantity_12>
\ Identification_Code_13>123</Identification_Code_13>
\ Quantity_14>0</Quantity_14>
\ Identification_Code_15>124</Identification_Code_15>
\ Quantity_16>0</Quantity_16>
\ Identification_Code_17>125</Identification_Code_17>
\ Quantity_18>0</Quantity_18>
\ Identification_Code_19>126</Identification_Code_19>
\ Quantity_20>0</Quantity_20>
\ Identification_Code_21>127</Identification_Code_21>
\ Quantity_22>0</Quantity_22>
\ /Destination_Quantity>
\- Destination_Quantity>
\ Identification_Code_Qualifier_02>92</Identification_Code_Qualifier_02>
\ Identification_Code_03>128</Identification_Code_03>
\ Quantity_04>0</Quantity_04>
\ Identification_Code_05>129</Identification_Code_05>
\ Quantity_06>0</Quantity_06>
\ Identification_Code_07>130</Identification_Code_07>
\ Quantity_08>0</Quantity_08>
\ Identification_Code_09>132</Identification_Code_09>
\ Quantity_10>0</Quantity_10>
\ Identification_Code_11>133</Identification_Code_11>
\ Quantity_12>0</Quantity_12>
\ Identification_Code_13>134</Identification_Code_13>
\ Quantity_14>0</Quantity_14>
\ Identification_Code_15>135</Identification_Code_15>
\ Quantity_16>0</Quantity_16>
\ Identification_Code_17>136</Identification_Code_17>
\ Quantity_18>0</Quantity_18>
\ Identification_Code_19>137</Identification_Code_19>
\ Quantity_20>0</Quantity_20>
\ Identification_Code_21>138</Identification_Code_21>
\ Quantity_22>0</Quantity_22>
\ /Destination_Quantity>
VDestination_Quantity>
\ Unit_or_Basis_for_Measurement_Code_01>EA</Unit_or_Basis_for_Measurement_Code_01>
\ Identification_Code_Qualifier_02>92</Identification_Code_Qualifier_02>
\ Identification_Code_03>139</Identification_Code_03>
\ Quantity_04>0</Quantity_04>
\ Identification_Code_05>140</Identification_Code_05>
\ Quantity_06>0</Quantity_06>
\ Identification_Code_07>141</Identification_Code_07>
\ Quantity_08>0</Quantity_08>
\ Identification_Code_09>142</Identification_Code_09>
\ Quantity_10>0</Quantity_10>
\ Identification_Code_11>143</Identification_Code_11>
\ Quantity_12>0</Quantity_12>
\ Identification_Code_13>144</Identification_Code_13>
\ Quantity_14>0</Quantity_14>
\ Identification_Code_15>145</Identification_Code_15>
\ Quantity_16>0</Quantity_16>
\ Identification_Code_17>146</Identification_Code_17>
\ Quantity_18>0</Quantity_18>
\ Identification_Code_19>147</Identification_Code_19>
\ Quantity_20>0</Quantity_20>
\ Identification_Code_21>148</Identification_Code_21>
\ Quantity_22>0</Quantity_22>
\ /Destination_Quantity>
\ - Destination_Quantity>
target it should result into this...
identification number = store number
quantity = qty
- Store No Qty
-117 0
-119 0
-120 0
-121 0
-122 0
-123 0
-124 0
-125 0
-126 0
-127 0
-128 0
-129 0
-130 0
-132 0
-133 0
-134 0
-135 0
-136 0
-137 0
-138 0
-139 0
-140 0
-141 0
-142 0
-143 0
-144 0
-145 0
-146 0
-147 0
-148 0
Thanks
Edited by: Devilbatz on Oct 8, 2009 8:17 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Source should be
<root>
<Destination_Quantity>
<Unit_or_Basis_for_Measurement_Code_01>EA</Unit_or_Basis_for_Measurement_Code_01>
<Identification_Code_Qualifier_02>92</Identification_Code_Qualifier_02>
<Identification_Code_03>117</Identification_Code_03>
<Quantity_04>0</Quantity_04>
<Identification_Code_05>119</Identification_Code_05>
<Quantity_06>0</Quantity_06>
<Identification_Code_07>120</Identification_Code_07>
<Quantity_08>0</Quantity_08>
<Identification_Code_09>121</Identification_Code_09>
<Quantity_10>0</Quantity_10>
<Identification_Code_11>122</Identification_Code_11>
<Quantity_12>0</Quantity_12>
<Identification_Code_13>123</Identification_Code_13>
<Quantity_14>0</Quantity_14>
<Identification_Code_15>124</Identification_Code_15>
<Quantity_16>0</Quantity_16>
<Identification_Code_17>125</Identification_Code_17>
<Quantity_18>0</Quantity_18>
<Identification_Code_19>126</Identification_Code_19>
<Quantity_20>0</Quantity_20>
<Identification_Code_21>127</Identification_Code_21>
<Quantity_22>0</Quantity_22>
</Destination_Quantity>
</root>
Target structure should be
<root>
<Destination_Quantity>
<Store_No_03></Store_No_03>
<Quantity_04></Quantity_04>
<Store_No_05></Store_No_05>
<Quantity_06></Quantity_06>
<Store_No_07></Store_No_07>
<Quantity_08></Quantity_08>
<Store_No_09></Store_No_09>
<Quantity_10></Quantity_10>
<Store_No_11></Store_No_11>
<Quantity_12></Quantity_12>
<Store_No_13></Store_No_13>
<Quantity_14></Quantity_14>
<Store_No_15></Store_No_15>
<Quantity_16></Quantity_16>
<Store_No_17></Store_No_17>
<Quantity_18></Quantity_18>
<Store_No_19></Store_No_19>
<Quantity_20></Quantity_20>
<Store_No_21></Store_No_21>
<Quantity_22></Quantity_22>
</Destination_Quantity>
</root>
Mapping logic shoudl be
Destination_Quantity (Source) --> Destination_Quantity(Target)
Identification_Code_n (Source)-->Store_No_0n (Target) (You need to repeat this for all values of n)
Qauntity_m(Source) --> Quantity_m(Target) (You need to repeat this for all values of m)
where n = 3,5,7,9,11,13,15,17,19,21
where m =4,6,8,10,12,14,16,18,20,22
Later use content conversion in Receiver to get flat file
Regards
Suraj
Thanks for the help guys, I'll work on it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Direct mapping wont work on this one as I Tried before. All 'A' segment has one target as well as segment 'AB'.
For now still reading the information on the links above..
Thanks for the replies.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As it is already said that you can use simple graphical mapping and do just the direct assignment between correponding source and target field but if you want to learn Java mapping then refer [this link|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414800)ID0535285650DB02814053936764865635End?blog=/pub/wlg/10421](a very good link for the starters).After reading you yourself can write the java code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This requirements looks very simple,Why you want to go for JAVA Mapping,simple GUI Mapping enough..
But you want to achive using JAVA Mapping,first you have to kow about some methods in JAVA Mpaping,and know about DOM/SAP Parcer methods how to parse the XML.
Use NWDS/Eclipse to develop JAVA Maping,add aii.map jar file to you package, use execute method which contains two methods one is to read one is to write.
find the below it will help you how to write Java Mapping.,search in sdn you wil find some good docs
http://www.riyaz.net/blog/xipi-java-mapping-demystified/
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.