on 03-27-2012 8:07 AM
We have been using NCO 3 in an ASP.Net application to integrate with our 4.6B system without any issues.
We are now upgrading to ECC6 and the same programs we use for 4.6B (standard bapi calls ie BAPI_SALESORDER_GETLIST for example) are now producing an error.
Tried upgrading to latest version of NCO 3 (3.06) and still have the same problem.
The error is :
[RfcTypeConversionException: Cannot convert 00000901 into DATE (yyyyMMdd)]
SAP.Middleware.Connector.RfcScalarMetadataDate.ConvertString(String value, Object& currentValue) +295
SAP.Middleware.Connector.RfcDataContainer`1.SetValue(Int32 index, String value) +256
[RfcTypeConversionException: FIELD DOC_DATE of STRUCTURE BAPIORDERS (SETTER): cannot convert String into DATE]
I heard this was a bug in NCO 3 (Fixed in 3.02) but i am still experiencingthe same problem. I am not providing any dates in the call, but there is a problem getting date data back from the RFCTable
My code that works against 4.6B but fails on ECC6
Dim destination As RfcDestination = RfcDestinationManager.GetDestination(ABAP_APP_SERVER)
Dim func As IRfcFunction = destination.Repository.CreateFunction("BAPI_SALESORDER_GETLIST")
func.SetValue("Customer_Number", Request("Account").ToString)
func.SetValue("Sales_Organization", Request("SalesOrg").ToString)
func.Invoke(destination) << FAILS HERE
can anyone shed some light on why this would be failing against ECC6 ? I have made sure the date settings are the same for the user in both systems.
Dear Gavin,
Can you login to SAP and manually check with same input parameters as you mentioned in C#.net page. It doesn't return any value the problem is passing number of input parameters.
Your test case is success contact your abap team regarding this issue.
1). we can call BAPI_SALESORDER_GETLIST from RFC?
2).second solution you need to create custom bapi for BAPI_SALESORDER_GETLIST.
Best Regards,
Harish.Y
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harish
Thanks for the response
Yes, we can execute the BAPI in SE37 with same input parameters (and same user id) and it returns 61 records.
The problem is not with the input data, it is a problem with NCO receiving the DOC_DATE field back from the bapi call.
I have been talking with our ABAP developer but he is also at a loss as to why it is failing (suspecting a bug in NCO ?).
Yes, we can call BAPI_SALESORDER_GETLIST form RFC (it is RFC enabled)
We should not need to create a custom bapi to address this issue. The standard bapi works in 4.6B. The only different I can see in the standard bapi code is ECC6 now has an additional internal conversion for input parameters but as I said, the issue is with the output, not input and we are not providing any date input anyway.
The only other point of interest is that the ECC6 system is in Japan and the 4.6B is in Australia (not sure if this has relevance)
OK, Making some progress on this. It looks like a new conversion function has been added to ECC6 BAPIs which is breaking .NET
For our test, we called the standard SAP Bapi "BAPI_SALESORDER_GETLIST"
In 4.6B, the functions does the following
1)Accepts Input parameters eg, Customer, Sales Org, Date_To, Date_From, Purchase order etc
2) Calls another RFC function "SD_SELECT_SALES_ORDERS_WWW" passing all the input parameters and returns a Table "SALES_ORDERS" with a list of customer sales orders.
3) Returns the SALES_ORDERS table
In ECC6, the BAPI has another step
1)Accepts Input parameters eg, Customer, Sales Org, Date_To, Date_From, Purchase order etc
2) Calls another RFC function "SD_SELECT_SALES_ORDERS_WWW" passing all the input parameters and returns a Table "SALES_ORDERS" with a list of customer sales orders.
3) Calls another RFC Function "MATNR_BAPI_TABLES_CONVERSION" passing SALES_ORDERS and returns the table SALES_ORDERS with some conversions
4) Returns the modified SALES_ORDERS table.
It is step 3 of the ECC6 bapi that is causing the problem.
In ECC6, If I call the rfc function "SD_SELECT_SALES_ORDERS_WWW" directly (passing all the input parameters required) , the returned "SALES_ORDERS" table works correctly, so it is the conversion that breaks the .NET connector
Any ideas how to overcome this ? I do not want to have to write custom bapis for every standard bapi we currently call, that does everything except the conversion part. Is there a way to turn off the conversion (it looks hard coded in the bapi to me)
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.