on 12-17-2004 2:38 AM
Hello,
I'm getting a "Portal Request Failed (no specific exception)" error when calling BAPI_EXCHANGERATE_CREATE. By process of elimination I've been able to determine that this error occurs when a number (with or without decimals) is entered into a field with a type of bigdecimal in the Exch_Rate input parameter. When this error occurs, the BAPI does not appear to have been called. In other words, it appears that the error is occuring during the mapping of the entered value to the bigdecimal field of the input parameter.
Any help with resolving this issue would be greatly appreciated. Thanks.
Brian Vandehey
Hi Brian,
Hi ,
Did the replies help? If so, don't forget to assign points. I gave some, but feel free to increase them!
See: /people/mark.finnern/blog/2004/08/10/spread-the-love for directions.
Click on the Yellow Star icon in each reply.
You can give:
1 - 10 pointer (solves problem, marks as answered)
2 - 6 pointers (very helpful)
Lots of 2 pointers (helpful)
Thanks!
Linda (and Mark Finnern)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brian,
When I run the function in the backend I get an error message about the factor.
Please let me know what to enter in this parameter and I'll try to help you solve the problem.
Regards,
Lisi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lisi,
The factor parameter should be 1. I can successfully call the BAPI externally using the SAP .net connector. Following is the code snippet (in C#) showing how the parameters are populated before the BAPI call. The numbers you see ending with M is just a C# notation for specifying a decimal value. I think there might be an issue with how Visual Composer is mapping decimals.
-
SAPProxy.Connection = SAP.Connector.SAPConnection.GetNewConnection(SAPDest);
SAPProxy.Connection.Open();
// Define parameter values for BAPI
string chgFixed = "X";
string devAllow = "000";
BAPI1093_0 exchRate = new BAPI1093_0();
string updAllow = "X";
string fromCurr = "";
string toCurr = "";
string rateType = "";
BAPIRET2 rtn = new BAPIRET2();
// Populate exchange rate structure
exchRate.Rate_Type = "M";
exchRate.From_Curr = "USD";
exchRate.To_Currncy = "AED";
exchRate.Valid_From = "20010101";
exchRate.Exch_Rate = 3.666666M;
exchRate.From_Factor = 1.0M;
exchRate.To_Factor = 1.0M;
SAPProxy.Bapi_Exchangerate_Create(chgFixed, devAllow, exchRate, updAllow, out fromCurr, out rateType, out rtn, out toCurr);
SAPProxy.CommitWork();
SAPProxy.Connection.Close();
-
Thank you for your help on this.
Regards,
Brian Vandehey
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
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.