on 07-29-2009 1:09 PM
Hi Experts,
I have a scenario where I am getting an exchange rate csv file its converted to xml and mapped to idoc.
now a new requirement has come up as I need to put a validation that this file should contain all the specified currencies in the system for example right now there are 31 currencies in the system so the file shld contain all these currencies.If anything other than specified currencies aur less than specifies currencies comes than system shld through error.
what is the best possible way to do this other than RFC lookup??
regards,
Nidhi
Hi Nidhi,
>>what is the best possible way to do this other than RFC lookup??
If your currency count is constant say 31 then no need for RFC Look up else you will need one.
Regards
Suraj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use enum in xsd (datatype), no coding required.
See this: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/XML/Q_20846275.html
Else you can write simple UDF.
Regards,
Gourav
Hi,
by using enum in xsd you can restrict permissible values for that particular field (do it while defining datatype). In PI7.1 you can use XML validation to avoid any message which is not as per exact definition of xsd.
However if this is not suitable for you then you can write UDF for validating this, throw mapping exception if it is not valid currency.
NOTE: World currencies are almost constant so don't worry if they change in future.
This blog will answer your question: /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
also discussed in this forum (solved):
Regards,
Gourav
Hi Nidhi,
RFC Look up is the lone possibility if you are trying to read the number of currencies from R3.
Other option can be to put this number in the input file itself so that you can compare the same in Mapping (I am not sure whether this is feasible or not).
else make file to XI to Proxyscenario and the response from proxy should be mapped to the real receiver (using Response onewaybean).
But all this approaches are tedius and not recommended. Try explaining your scenario little more and let us see whether any other approach comes out or not.
Regards
Suraj
Hi Nidhi,
I am not sure about this but currencies are maintained in text table within SAP. But you can always download Currency ISO code from internet (google it). ISO code is 3 character currency code like INR (Indian Rs), EUR (Euro), USD (US Dollar), GBP etc.
I can find currency exchange rate in this table: TCURR but still you must consult with functional consultant.
I suggest to close thread in this forum if your original question is answered and raise question in ERP forum as those expert will be able to help you quickly.
Regards,
Gourav
Hi Nidhi,
If those 31 cureney values are fixed type. Then you can write an UDF to validate those 31 values . so the UDF throws an exception if any different variable comes in .
Thanks,
Ram.
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.