on 01-06-2016 6:52 AM
Hi,
I am facing some issue in PI mapping where I want to generate the nodes twice at target structure based on condition.
At source, API_RESPONSE can come once or multiple times. If ratetype is Daily then one EXCHANGE_LIST will be generated. If ratetype is monthly, we need both EXCHANGE_LISTs.
In mapping, I created duplicate sub tree and did mapping giving condition but while testing, I am not getting two EXCHANGE_LIST.
We need both Daily and Monthly data differently in both structures. Please help.
Thanks,
Swapnashree
Hi Swapna,
There is no point in duplicating EXCHRATE_LIST if your BAPI is not going to accept it. Instead you can try below (Multimapping).
Change the occurrence of BAPI (to make it as multiple message)
Now duplicate the BAPI Message
For the first BAPI Message Node , map a constant(this is for DAILY, and I assume "DAILY" Rate type will definitely be there)
For the second BAPI Message Node , map as following (this is for MONTHLY, and I assume "MONTHLY" Rate type may or may not be there)
UDF for generating second BAPI node
That's it. .. But remember we have mapped only the message level. You need to take care of the context inside the mapping to map the corresponding DAILY and MONTHLY data to the corresponding target messages.
Let us know if this solves your purpose (I hope it definitely will), then we can take a look at the field level mapping to get this one going!
Thank you,
Justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Justin for your help. I already did the multi mapping and able to generate the second BAPI with out UDF. Facing issue with some field mapping of second BAPI.
There is a Date field coming in Daily node but that is not coming in Monthly API_RESPONSE. But in target Monthly BAPI , I have to sent date field.
I tried using context change, but field not coming, when I am using MapWithDefault it is giving blank value.
thanks Justin. I talked with client on Date field, they told that:
We should use the "end" field from the Fiscal Monthly under the required Handle for the current month.
we will only ever map one Fiscal Monthly set of exchange rates for the current month if and only if the daily "date" is the end of the month. Otherwise, we will not be mapping the Fiscal Monthly values at all. I have done the below mapping:
Date format: YYYY-MM-DD
in fixed value, I have given all month end dates like: 01-31,02-28,03-31..etc. For testing purpose , I have used constant here but I will use Current date. My mapping not working. I changed the context of date but no result.
sample file will be like:
Hi Swapna,
Can you give screenshot of the mapping you have done? If you don't mind can you attach the source XML you are using for testing in this thread as attachment? Also you told me earlier that you have generated the second mapping node without UDF. What logic you have used to generate it?
Thank you,
Justin.
In signature tab of mapping, I added same RFC again and gave logic:
source file:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns0:OANDA_ROOT xmlns:ns0="urn:matw.com:xi:tre:g_oandaexchangerates:100">
<API_RESPONSES>
<API_RESPONSE rate_type="Daily">
<API_HANDLE name="Today">
<response>
<base_currency>USD</base_currency>
<meta>
<effective_params>
<data_set>oanda</data_set>
<date>2015-12-19</date>
<decimal_places>5</decimal_places>
<fields>
<field>averages</field>
</fields>
<quote_currencies>
<currency>ARS</currency>
<currency>AUD</currency>
<currency>BRL</currency>
<currency>CAD</currency>
<currency>CHF</currency>
<currency>CLP</currency>
<currency>CNY</currency>
<currency>COP</currency>
<currency>DKK</currency>
<currency>DOP</currency>
<currency>EUR</currency>
<currency>GBP</currency>
<currency>GIP</currency>
<currency>HKD</currency>
<currency>IDR</currency>
<currency>INR</currency>
<currency>JPY</currency>
<currency>KRW</currency>
<currency>MXN</currency>
<currency>MYR</currency>
<currency>NOK</currency>
<currency>NZD</currency>
<currency>PHP</currency>
<currency>PLN</currency>
<currency>SAR</currency>
<currency>SGD</currency>
<currency>THB</currency>
<currency>TWD</currency>
<currency>ZAR</currency>
</quote_currencies>
</effective_params>
<request_time>2015-12-19T02:39:46+0000</request_time>
<skipped_currencies>
</skipped_currencies>
</meta>
<quotes>
<quote>
<ask>15.16050</ask>
<bid>15.12990</bid>
<currency>ZAR</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>1.49016</ask>
<bid>1.48965</bid>
<currency>NZD</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>14025.20000</ask>
<bid>13888.90000</bid>
<currency>IDR</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>7.75261</ask>
<bid>7.75220</bid>
<currency>HKD</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>1.39371</ask>
<bid>1.39347</bid>
<currency>CAD</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>3.90754</ask>
<bid>3.89997</bid>
<currency>BRL</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>6.88389</ask>
<bid>6.88209</bid>
<currency>DKK</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>1.41508</ask>
<bid>1.41456</bid>
<currency>SGD</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>32.94420</ask>
<bid>32.87210</bid>
<currency>TWD</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>3.75589</ask>
<bid>3.74986</bid>
<currency>SAR</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>1.39987</ask>
<bid>1.39954</bid>
<currency>AUD</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>3370.63000</ask>
<bid>3304.14000</bid>
<currency>COP</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>1183.99000</ask>
<bid>1181.06000</bid>
<currency>KRW</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>0.67064</ask>
<bid>0.67046</bid>
<currency>GIP</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>3.95557</ask>
<bid>3.95193</bid>
<currency>PLN</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>8.76687</ask>
<bid>8.75989</bid>
<currency>NOK</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>13.30890</ask>
<bid>13.30050</bid>
<currency>ARS</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>704.69600</ask>
<bid>703.83700</bid>
<currency>CLP</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>4.30057</ask>
<bid>4.28427</bid>
<currency>MYR</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>6.48173</ask>
<bid>6.48125</bid>
<currency>CNY</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>0.92273</ask>
<bid>0.92260</bid>
<currency>EUR</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>17.04140</ask>
<bid>17.03010</bid>
<currency>MXN</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>0.99490</ask>
<bid>0.99462</bid>
<currency>CHF</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>66.33690</ask>
<bid>66.18600</bid>
<currency>INR</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>0.67063</ask>
<bid>0.67053</bid>
<currency>GBP</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>36.20570</ask>
<bid>36.10360</bid>
<currency>THB</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
<quote>
<ask>47.46910</ask>
<bid>47.28540</bid>
<currency>PHP</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>46.08660</ask>
<bid>45.00660</bid>
<currency>DOP</currency>
<date>2015-12-18T19:00:00+0000</date>
</quote>
<quote>
<ask>121.86200</ask>
<bid>121.84400</bid>
<currency>JPY</currency>
<date>2015-12-18T21:00:00+0000</date>
</quote>
</quotes>
</response>
</API_HANDLE>
</API_RESPONSE>
<API_RESPONSE rate_type="Monthly">
<API_HANDLE name="October">
<response>
<base_currency>USD</base_currency>
<meta>
<effective_params>
<data_set>oanda</data_set>
<decimal_places>5</decimal_places>
<end>2015-10-31</end>
<fields>
<field>averages</field>
<field>highs</field>
<field>lows</field>
<field>midpoint</field>
</fields>
<quote_currencies>
<currency>ARS</currency>
<currency>AUD</currency>
<currency>BRL</currency>
<currency>CAD</currency>
<currency>CHF</currency>
<currency>CLP</currency>
<currency>CNY</currency>
<currency>COP</currency>
<currency>DKK</currency>
<currency>DOP</currency>
<currency>EUR</currency>
<currency>GBP</currency>
<currency>GIP</currency>
<currency>HKD</currency>
<currency>IDR</currency>
<currency>INR</currency>
<currency>JPY</currency>
<currency>KRW</currency>
<currency>MXN</currency>
<currency>MYR</currency>
<currency>NOK</currency>
<currency>NZD</currency>
<currency>PHP</currency>
<currency>PLN</currency>
<currency>SAR</currency>
<currency>SGD</currency>
<currency>THB</currency>
<currency>TWD</currency>
<currency>ZAR</currency>
</quote_currencies>
<start>2015-10-01</start>
</effective_params>
<request_time>2015-12-19T02:39:47+0000</request_time>
<skipped_currencies>
</skipped_currencies>
</meta>
<quotes>
<quote>
<ask>13.50750</ask>
<bid>13.48480</bid>
<currency>ZAR</currency>
<high_ask>14.02790</high_ask>
<high_bid>14.01390</high_bid>
<low_ask>13.01530</low_ask>
<low_bid>13.00620</low_bid>
<midpoint>13.49620</midpoint>
</quote>
<quote>
<ask>1.49718</ask>
<bid>1.49523</bid>
<currency>NZD</currency>
<high_ask>1.56683</high_ask>
<high_bid>1.56610</high_bid>
<low_ask>1.45014</low_ask>
<low_bid>1.44634</low_bid>
<midpoint>1.49621</midpoint>
</quote>
<quote>
<ask>13887.40000</ask>
<bid>13737.70000</bid>
<currency>IDR</currency>
<high_ask>14858.80000</high_ask>
<high_bid>14727.50000</high_bid>
<low_ask>13280.20000</low_ask>
<low_bid>12755.10000</low_bid>
<midpoint>13812.50000</midpoint>
</quote>
<quote>
<ask>7.75034</ask>
<bid>7.74984</bid>
<currency>HKD</currency>
<high_ask>7.75112</high_ask>
<high_bid>7.75059</high_bid>
<low_ask>7.75013</low_ask>
<low_bid>7.74915</low_bid>
<midpoint>7.75009</midpoint>
</quote>
<quote>
<ask>1.30684</ask>
<bid>1.30635</bid>
<currency>CAD</currency>
<high_ask>1.33388</high_ask>
<high_bid>1.33308</high_bid>
<low_ask>1.28332</low_ask>
<low_bid>1.28313</low_bid>
<midpoint>1.30659</midpoint>
</quote>
<quote>
<ask>3.88107</ask>
<bid>3.87344</bid>
<currency>BRL</currency>
<high_ask>4.04750</high_ask>
<high_bid>4.04040</high_bid>
<low_ask>3.72710</low_ask>
<low_bid>3.72010</low_bid>
<midpoint>3.87725</midpoint>
</quote>
<quote>
<ask>6.64961</ask>
<bid>6.64821</bid>
<currency>DKK</currency>
<high_ask>6.84625</high_ask>
<high_bid>6.84540</high_bid>
<low_ask>6.49107</low_ask>
<low_bid>6.49007</low_bid>
<midpoint>6.64891</midpoint>
</quote>
<quote>
<ask>1.40195</ask>
<bid>1.40084</bid>
<currency>SGD</currency>
<high_ask>1.43688</high_ask>
<high_bid>1.43631</high_bid>
<low_ask>1.37294</low_ask>
<low_bid>1.37259</low_bid>
<midpoint>1.40139</midpoint>
</quote>
<quote>
<ask>32.52830</ask>
<bid>32.44380</bid>
<currency>TWD</currency>
<high_ask>33.90900</high_ask>
<high_bid>33.14500</high_bid>
<low_ask>31.22250</low_ask>
<low_bid>31.03000</low_bid>
<midpoint>32.48610</midpoint>
</quote>
<quote>
<ask>3.75239</ask>
<bid>3.74790</bid>
<currency>SAR</currency>
<high_ask>3.75716</high_ask>
<high_bid>3.74955</high_bid>
<low_ask>3.75085</low_ask>
<low_bid>3.74295</low_bid>
<midpoint>3.75014</midpoint>
</quote>
<quote>
<ask>1.38835</ask>
<bid>1.38736</bid>
<currency>AUD</currency>
<high_ask>1.42912</high_ask>
<high_bid>1.42865</high_bid>
<low_ask>1.35479</low_ask>
<low_bid>1.35448</low_bid>
<midpoint>1.38786</midpoint>
</quote>
<quote>
<ask>2959.94000</ask>
<bid>2915.05000</bid>
<currency>COP</currency>
<high_ask>3165.50000</high_ask>
<high_bid>3076.00000</high_bid>
<low_ask>2867.00000</low_ask>
<low_bid>2819.80000</low_bid>
<midpoint>2937.49000</midpoint>
</quote>
<quote>
<ask>1147.06000</ask>
<bid>1144.40000</bid>
<currency>KRW</currency>
<high_ask>1187.23000</high_ask>
<high_bid>1184.55000</high_bid>
<low_ask>1120.82000</low_ask>
<low_bid>1118.19000</low_bid>
<midpoint>1145.73000</midpoint>
</quote>
<quote>
<ask>0.65257</ask>
<bid>0.65239</bid>
<currency>GIP</currency>
<high_ask>0.66190</high_ask>
<high_bid>0.66180</high_bid>
<low_ask>0.64487</low_ask>
<low_bid>0.64470</low_bid>
<midpoint>0.65248</midpoint>
</quote>
<quote>
<ask>3.78786</ask>
<bid>3.78305</bid>
<currency>PLN</currency>
<high_ask>3.93640</high_ask>
<high_bid>3.93476</high_bid>
<low_ask>3.67884</low_ask>
<low_bid>3.67640</low_bid>
<midpoint>3.78545</midpoint>
</quote>
<quote>
<ask>8.27708</ask>
<bid>8.26283</bid>
<currency>NOK</currency>
<high_ask>8.60194</high_ask>
<high_bid>8.59768</high_bid>
<low_ask>8.04133</low_ask>
<low_bid>8.02568</low_bid>
<midpoint>8.26995</midpoint>
</quote>
<quote>
<ask>9.47604</ask>
<bid>9.46788</bid>
<currency>ARS</currency>
<high_ask>9.60130</high_ask>
<high_bid>9.54380</high_bid>
<low_ask>9.33370</low_ask>
<low_bid>9.31510</low_bid>
<midpoint>9.47196</midpoint>
</quote>
<quote>
<ask>684.28300</ask>
<bid>683.55500</bid>
<currency>CLP</currency>
<high_ask>698.30000</high_ask>
<high_bid>697.90000</high_bid>
<low_ask>671.25000</low_ask>
<low_bid>670.85000</low_bid>
<midpoint>683.91900</midpoint>
</quote>
<quote>
<ask>4.26425</ask>
<bid>4.24502</bid>
<currency>MYR</currency>
<high_ask>4.46750</high_ask>
<high_bid>4.44930</high_bid>
<low_ask>4.07540</low_ask>
<low_bid>4.06860</low_bid>
<midpoint>4.25464</midpoint>
</quote>
<quote>
<ask>6.35904</ask>
<bid>6.34162</bid>
<currency>CNY</currency>
<high_ask>6.37850</high_ask>
<high_bid>6.35850</high_bid>
<low_ask>6.12470</low_ask>
<low_bid>6.08470</low_bid>
<midpoint>6.35033</midpoint>
</quote>
<quote>
<ask>0.89118</ask>
<bid>0.89093</bid>
<currency>EUR</currency>
<high_ask>0.91776</high_ask>
<high_bid>0.91760</high_bid>
<low_ask>0.86997</low_ask>
<low_bid>0.86985</low_bid>
<midpoint>0.89106</midpoint>
</quote>
<quote>
<ask>16.57750</ask>
<bid>16.56630</bid>
<currency>MXN</currency>
<high_ask>17.02630</high_ask>
<high_bid>17.01690</high_bid>
<low_ask>16.32920</low_ask>
<low_bid>16.32160</low_bid>
<midpoint>16.57190</midpoint>
</quote>
<quote>
<ask>0.96908</ask>
<bid>0.96856</bid>
<currency>CHF</currency>
<high_ask>0.99596</high_ask>
<high_bid>0.99561</high_bid>
<low_ask>0.94777</low_ask>
<low_bid>0.94750</low_bid>
<midpoint>0.96882</midpoint>
</quote>
<quote>
<ask>65.09820</ask>
<bid>64.91310</bid>
<currency>INR</currency>
<high_ask>65.84000</high_ask>
<high_bid>65.65600</high_bid>
<low_ask>64.62600</low_ask>
<low_bid>64.46800</low_bid>
<midpoint>65.00570</midpoint>
</quote>
<quote>
<ask>0.65247</ask>
<bid>0.65221</bid>
<currency>GBP</currency>
<high_ask>0.66197</high_ask>
<high_bid>0.66188</high_bid>
<low_ask>0.64483</low_ask>
<low_bid>0.64416</low_bid>
<midpoint>0.65234</midpoint>
</quote>
<quote>
<ask>35.77210</ask>
<bid>35.60900</bid>
<currency>THB</currency>
<high_ask>36.79000</high_ask>
<high_bid>36.63500</high_bid>
<low_ask>35.18100</low_ask>
<low_bid>35.01200</low_bid>
<midpoint>35.69060</midpoint>
</quote>
<quote>
<ask>46.42470</ask>
<bid>46.24390</bid>
<currency>PHP</currency>
<high_ask>47.24100</high_ask>
<high_bid>47.06000</high_bid>
<low_ask>45.67800</low_ask>
<low_bid>45.50500</low_bid>
<midpoint>46.33430</midpoint>
</quote>
<quote>
<ask>45.67840</ask>
<bid>44.83050</bid>
<currency>DOP</currency>
<high_ask>46.69100</high_ask>
<high_bid>45.36000</high_bid>
<low_ask>45.00000</low_ask>
<low_bid>42.24000</low_bid>
<midpoint>45.25450</midpoint>
</quote>
<quote>
<ask>120.15100</ask>
<bid>120.11000</bid>
<currency>JPY</currency>
<high_ask>121.54700</high_ask>
<high_bid>121.49000</high_bid>
<low_ask>118.07300</low_ask>
<low_bid>118.05600</low_bid>
<midpoint>120.13000</midpoint>
</quote>
</quotes>
</response>
</API_HANDLE>
</API_RESPONSE>
<API_RESPONSE rate_type="Fiscal Monthly">
<API_HANDLE name="October">
<response>
<base_currency>USD</base_currency>
<meta>
<effective_params>
<data_set>oanda</data_set>
<decimal_places>5</decimal_places>
<end>2015-10-31</end>
<fields>
<field>averages</field>
<field>highs</field>
<field>lows</field>
<field>midpoint</field>
</fields>
<quote_currencies>
<currency>ARS</currency>
<currency>AUD</currency>
<currency>BRL</currency>
<currency>CAD</currency>
<currency>CHF</currency>
<currency>CLP</currency>
<currency>CNY</currency>
<currency>COP</currency>
<currency>DKK</currency>
<currency>DOP</currency>
<currency>EUR</currency>
<currency>GBP</currency>
<currency>GIP</currency>
<currency>HKD</currency>
<currency>IDR</currency>
<currency>INR</currency>
<currency>JPY</currency>
<currency>KRW</currency>
<currency>MXN</currency>
<currency>MYR</currency>
<currency>NOK</currency>
<currency>NZD</currency>
<currency>PHP</currency>
<currency>PLN</currency>
<currency>SAR</currency>
<currency>SGD</currency>
<currency>THB</currency>
<currency>TWD</currency>
<currency>ZAR</currency>
</quote_currencies>
<start>2015-10-01</start>
</effective_params>
<request_time>2015-12-19T02:39:47+0000</request_time>
<skipped_currencies>
</skipped_currencies>
</meta>
<quotes>
<quote>
<ask>13.50750</ask>
<bid>13.48480</bid>
<currency>ZAR</currency>
<high_ask>14.02790</high_ask>
<high_bid>14.01390</high_bid>
<low_ask>13.01530</low_ask>
<low_bid>13.00620</low_bid>
<midpoint>13.49620</midpoint>
</quote>
<quote>
<ask>1.49718</ask>
<bid>1.49523</bid>
<currency>NZD</currency>
<high_ask>1.56683</high_ask>
<high_bid>1.56610</high_bid>
<low_ask>1.45014</low_ask>
<low_bid>1.44634</low_bid>
<midpoint>1.49621</midpoint>
</quote>
<quote>
<ask>13887.40000</ask>
<bid>13737.70000</bid>
<currency>IDR</currency>
<high_ask>14858.80000</high_ask>
<high_bid>14727.50000</high_bid>
<low_ask>13280.20000</low_ask>
<low_bid>12755.10000</low_bid>
<midpoint>13812.50000</midpoint>
</quote>
<quote>
<ask>7.75034</ask>
<bid>7.74984</bid>
<currency>HKD</currency>
<high_ask>7.75112</high_ask>
<high_bid>7.75059</high_bid>
<low_ask>7.75013</low_ask>
<low_bid>7.74915</low_bid>
<midpoint>7.75009</midpoint>
</quote>
<quote>
<ask>1.30684</ask>
<bid>1.30635</bid>
<currency>CAD</currency>
<high_ask>1.33388</high_ask>
<high_bid>1.33308</high_bid>
<low_ask>1.28332</low_ask>
<low_bid>1.28313</low_bid>
<midpoint>1.30659</midpoint>
</quote>
<quote>
<ask>3.88107</ask>
<bid>3.87344</bid>
<currency>BRL</currency>
<high_ask>4.04750</high_ask>
<high_bid>4.04040</high_bid>
<low_ask>3.72710</low_ask>
<low_bid>3.72010</low_bid>
<midpoint>3.87725</midpoint>
</quote>
<quote>
<ask>6.64961</ask>
<bid>6.64821</bid>
<currency>DKK</currency>
<high_ask>6.84625</high_ask>
<high_bid>6.84540</high_bid>
<low_ask>6.49107</low_ask>
<low_bid>6.49007</low_bid>
<midpoint>6.64891</midpoint>
</quote>
<quote>
<ask>1.40195</ask>
<bid>1.40084</bid>
<currency>SGD</currency>
<high_ask>1.43688</high_ask>
<high_bid>1.43631</high_bid>
<low_ask>1.37294</low_ask>
<low_bid>1.37259</low_bid>
<midpoint>1.40139</midpoint>
</quote>
<quote>
<ask>32.52830</ask>
<bid>32.44380</bid>
<currency>TWD</currency>
<high_ask>33.90900</high_ask>
<high_bid>33.14500</high_bid>
<low_ask>31.22250</low_ask>
<low_bid>31.03000</low_bid>
<midpoint>32.48610</midpoint>
</quote>
<quote>
<ask>3.75239</ask>
<bid>3.74790</bid>
<currency>SAR</currency>
<high_ask>3.75716</high_ask>
<high_bid>3.74955</high_bid>
<low_ask>3.75085</low_ask>
<low_bid>3.74295</low_bid>
<midpoint>3.75014</midpoint>
</quote>
<quote>
<ask>1.38835</ask>
<bid>1.38736</bid>
<currency>AUD</currency>
<high_ask>1.42912</high_ask>
<high_bid>1.42865</high_bid>
<low_ask>1.35479</low_ask>
<low_bid>1.35448</low_bid>
<midpoint>1.38786</midpoint>
</quote>
<quote>
<ask>2959.94000</ask>
<bid>2915.05000</bid>
<currency>COP</currency>
<high_ask>3165.50000</high_ask>
<high_bid>3076.00000</high_bid>
<low_ask>2867.00000</low_ask>
<low_bid>2819.80000</low_bid>
<midpoint>2937.49000</midpoint>
</quote>
<quote>
<ask>1147.06000</ask>
<bid>1144.40000</bid>
<currency>KRW</currency>
<high_ask>1187.23000</high_ask>
<high_bid>1184.55000</high_bid>
<low_ask>1120.82000</low_ask>
<low_bid>1118.19000</low_bid>
<midpoint>1145.73000</midpoint>
</quote>
<quote>
<ask>0.65257</ask>
<bid>0.65239</bid>
<currency>GIP</currency>
<high_ask>0.66190</high_ask>
<high_bid>0.66180</high_bid>
<low_ask>0.64487</low_ask>
<low_bid>0.64470</low_bid>
<midpoint>0.65248</midpoint>
</quote>
<quote>
<ask>3.78786</ask>
<bid>3.78305</bid>
<currency>PLN</currency>
<high_ask>3.93640</high_ask>
<high_bid>3.93476</high_bid>
<low_ask>3.67884</low_ask>
<low_bid>3.67640</low_bid>
<midpoint>3.78545</midpoint>
</quote>
<quote>
<ask>8.27708</ask>
<bid>8.26283</bid>
<currency>NOK</currency>
<high_ask>8.60194</high_ask>
<high_bid>8.59768</high_bid>
<low_ask>8.04133</low_ask>
<low_bid>8.02568</low_bid>
<midpoint>8.26995</midpoint>
</quote>
<quote>
<ask>9.47604</ask>
<bid>9.46788</bid>
<currency>ARS</currency>
<high_ask>9.60130</high_ask>
<high_bid>9.54380</high_bid>
<low_ask>9.33370</low_ask>
<low_bid>9.31510</low_bid>
<midpoint>9.47196</midpoint>
</quote>
<quote>
<ask>684.28300</ask>
<bid>683.55500</bid>
<currency>CLP</currency>
<high_ask>698.30000</high_ask>
<high_bid>697.90000</high_bid>
<low_ask>671.25000</low_ask>
<low_bid>670.85000</low_bid>
<midpoint>683.91900</midpoint>
</quote>
<quote>
<ask>4.26425</ask>
<bid>4.24502</bid>
<currency>MYR</currency>
<high_ask>4.46750</high_ask>
<high_bid>4.44930</high_bid>
<low_ask>4.07540</low_ask>
<low_bid>4.06860</low_bid>
<midpoint>4.25464</midpoint>
</quote>
<quote>
<ask>6.35904</ask>
<bid>6.34162</bid>
<currency>CNY</currency>
<high_ask>6.37850</high_ask>
<high_bid>6.35850</high_bid>
<low_ask>6.12470</low_ask>
<low_bid>6.08470</low_bid>
<midpoint>6.35033</midpoint>
</quote>
<quote>
<ask>0.89118</ask>
<bid>0.89093</bid>
<currency>EUR</currency>
<high_ask>0.91776</high_ask>
<high_bid>0.91760</high_bid>
<low_ask>0.86997</low_ask>
<low_bid>0.86985</low_bid>
<midpoint>0.89106</midpoint>
</quote>
<quote>
<ask>16.57750</ask>
<bid>16.56630</bid>
<currency>MXN</currency>
<high_ask>17.02630</high_ask>
<high_bid>17.01690</high_bid>
<low_ask>16.32920</low_ask>
<low_bid>16.32160</low_bid>
<midpoint>16.57190</midpoint>
</quote>
<quote>
<ask>0.96908</ask>
<bid>0.96856</bid>
<currency>CHF</currency>
<high_ask>0.99596</high_ask>
<high_bid>0.99561</high_bid>
<low_ask>0.94777</low_ask>
<low_bid>0.94750</low_bid>
<midpoint>0.96882</midpoint>
</quote>
<quote>
<ask>65.09820</ask>
<bid>64.91310</bid>
<currency>INR</currency>
<high_ask>65.84000</high_ask>
<high_bid>65.65600</high_bid>
<low_ask>64.62600</low_ask>
<low_bid>64.46800</low_bid>
<midpoint>65.00570</midpoint>
</quote>
<quote>
<ask>0.65247</ask>
<bid>0.65221</bid>
<currency>GBP</currency>
<high_ask>0.66197</high_ask>
<high_bid>0.66188</high_bid>
<low_ask>0.64483</low_ask>
<low_bid>0.64416</low_bid>
<midpoint>0.65234</midpoint>
</quote>
<quote>
<ask>35.77210</ask>
<bid>35.60900</bid>
<currency>THB</currency>
<high_ask>36.79000</high_ask>
<high_bid>36.63500</high_bid>
<low_ask>35.18100</low_ask>
<low_bid>35.01200</low_bid>
<midpoint>35.69060</midpoint>
</quote>
<quote>
<ask>46.42470</ask>
<bid>46.24390</bid>
<currency>PHP</currency>
<high_ask>47.24100</high_ask>
<high_bid>47.06000</high_bid>
<low_ask>45.67800</low_ask>
<low_bid>45.50500</low_bid>
<midpoint>46.33430</midpoint>
</quote>
<quote>
<ask>45.67840</ask>
<bid>44.83050</bid>
<currency>DOP</currency>
<high_ask>46.69100</high_ask>
<high_bid>45.36000</high_bid>
<low_ask>45.00000</low_ask>
<low_bid>42.24000</low_bid>
<midpoint>45.25450</midpoint>
</quote>
<quote>
<ask>120.15100</ask>
<bid>120.11000</bid>
<currency>JPY</currency>
<high_ask>121.54700</high_ask>
<high_bid>121.49000</high_bid>
<low_ask>118.07300</low_ask>
<low_bid>118.05600</low_bid>
<midpoint>120.13000</midpoint>
</quote>
</quotes>
</response>
</API_HANDLE>
</API_RESPONSE>
</API_RESPONSES>
</ns0:OANDA_ROOT>
</ns0:Message1>
</ns0:Messages>
In target second BAPI, I have to populate a field VALID_FROM with comparing the 'end' field (input file) with current date. If current date is end date.. VALID_FROM should be generated for Monthly node.
Hi Swapna,
I'm sorry, I didn't understand this logic
>>>In target second BAPI, I have to populate a field VALID_FROM with comparing the 'end' field (input file) with current date. If current date is end date..
VALID_FROM should be generated for Monthly node. -->>> What needs to be populated for VALID_FROM?
Can you please explain the logic?
Secondly, the logic you have for creating the second BAPI Message - Can you flip the FiscalMonthly as 2nd message and Monthly as 3rd sequence from the input message and test it out? Just wanted to make sure your message still gets created.
Thanks
There is a field called 'end' coming in input file under RESPONSE--- meta--effective_params ---.
end ---- mapwithdefault--- VALID_FROM
<API_RESPONSE rate_type="Monthly">
<API_HANDLE name="October">
<response>
<base_currency>USD</base_currency>
<meta>
<effective_params>
<data_set>oanda</data_set>
<decimal_places>5</decimal_places>
<end>2015-10-31</end>
<fields>
Monthly and Fiscal monthly are both same. Those two nodes will come in file only in month end and we have to send the VALID_FROM in second BAPI if and only if the end value is equal to current date.
If current date is 2015-10-31, then only we will populate the VALID_FROM in second BAPI.
Please check the input test file.Under Daily node, end is not coming.. it is coming under Monthly.
Hi Swapna,
you have to change change context for @rate_type as mentioned by Eng. Use node function createIf for better readability.
Try below:
(right-click, change @rate_type context to one level higher API_RESPONSE)
@rate_type ----|
| ------------- equalS ------------createIf--------- EXCHRATE_LIST (1st)
"D" ---------------|
(right-click, change @rate_type context to one level higher API_RESPONSE)
@rate_type ----|
| ------------- equalS ------------createIf--------- EXCHRATE_LIST (2nd)
"M" ---------------|
Regards,
Yee Loon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually we have one daily, one Monthly and one is Fiscal Monthly. Fiscal Monthly is replica of Monthly. It is coming with same records of Monthly but we need some calculation based on fiscal month for some fields.
But at target we need 2 ECHANGE_LIST.. fiscal month calculated bid value will move to Monthly EXCHANGE_LIST bid field.
Target is a BAPI, I can not change the occurrence.
Hi Swapna,
I know ABAP is not accepting multiple ECXHRATE_LIST nodes, i just want to give you the solution as per your original question incase the requirement changes.
Use below UDF to set the occurrence of the target node as explained in below blog.
Excecution Type : Single Values
public String setOccurences(String sourcenode, String monthlyRateExist, Container container)
throws StreamTransformationException {
StructureNode node = ((StructureNode) container.getParameter("STRUCTURE_NODE"));
if (monthlyRateExist.equals("true"))
node.setOccurences(0, 2);
else
node.setOccurences(0, 1);
return "";
}
Mapping for EXCHRATE_LIST node:
Mapping Result:
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swapna,
Try this.
Change the Context of @rate_type to API_RESPONSES and follow the below one:
@rate_type - UDF - EXCHRATE_LIST.
UDF:
Create UDF with type of Queue and import 1 parameter (name - input type- string)
for (int i =0; i< input.length;i++)
{
if(input[i].equals("Monthly"))
{
result.addValue("");
}
}
This will work.
Question for you - Based on the queue I can see there are 3 API_RESPONSE , there will only 1 Monthly and 2 Daily? But still you are creating only one EXCHRATE_LIST for daily?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swapna,
So I assume you don't have any problem in generating the Daily type ExchangeList node. The problem is with Monthly - ExchangeList node correct?
In the Mapping on
"then" - remove the API_RESPONSE - Map With Default.
"then" - Just put a empty Constant there.
After that Please right click on If then step and Choose Display queue and give us the screenshot. It will help us to see where is the issue.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swapnashree
It should be due to incorrect context. Change context of "@rate_type" to one level higher.
Rgds
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.