Closed roman0701 closed 8 years ago
You're completely right. We want to use the list used in http://www.sithh.de/sitreg/. I haven't implemented the backend service yet as I want to have a solution that supports i18n.
The backend provides now the OData entity for RelationToSAP. Please fill the Drop-Down with it.
Hallo gregorwolf
i think the log on language isn't determined in the RelationToSAP.hdbtablefunction: SELECT SESSION_CONTEXT('LOCALE') INTO lv_locale FROM DUMMY;
When u call the Service https://hanamdcp1933806579trial.hanatrial.ondemand.com/com/sap/sapmentors/sitreg/odataparticipant/service.xsodata/RelationToSAP in the Browser u get values of all languages and when i tried to bind it in the combobox i received an error. i could bind the combobox after adjusting the RelationToSAP.hdbtablefunction to this:
FUNCTION "SITREG"."com.sap.sapmentors.sitreg.odataparticipant.procedures::RelationToSAP" () RETURNS TABLE ("RelationToSAP" NVARCHAR (1), "Description" NVARCHAR (250)) LANGUAGE SQLSCRIPT SQL SECURITY INVOKER AS BEGIN DECLARE lv_locale NVARCHAR (2); DECLARE lv_count INT := 0;
RETURN SELECT "RelationToSAP","Description" FROM "com.sap.sapmentors.sitreg.data::SITreg.RelationToSAP"
WHERE "Language" = 'en';
END;
but i know that don't solve the problem of current user language requirement.
Hi @mokadiri, the error did not occur in my environment. I've also deployed my latest checkin to https://sitregparticipant-s0001142741trial.dispatcher.hanatrial.ondemand.com/ where you can give it a try directly. If the error still occurs please check if in the request header
Accept-Language:en
is sent. Sorry that I've already solved this issue now. But as you haven't pushed your code I needed a test environment. So it was the easiest to fix this issue.
@roman0701 please retest and close this issue if fixed.
Hi @gregorwolf , i get the same error when i test ur link :
{
"message": "HTTP request failed",
"headers": {
"Content-Type": "application/xml;charset=utf-8",
"content-language": "de-DE",
"Content-Length": "227"
},
"statusCode": "500",
"statusText": "Internal Server Error",
"responseText": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?><error xmlns=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"><message xml:lang=\"en-US\">Service exception: [359] string is too long"
}
What response from the server do you see in the browser developer tools?
--7066983AE50EF7FAECA5EE7557F8DB540 Content-Type: application/http Content-Length: 356 content-transfer-encoding: binary
HTTP/1.1 500 Internal Server Error Content-Type: application/xml;charset=utf-8 content-language: de-DE Content-Length: 227
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
HTTP/1.1 500 Internal Server Error Content-Type: application/json content-language: de-DE Content-Length: 112
{ "error": { "code": "", "message": { "lang": "en-US", "value": "Service exception: [359] string is too long"}}} --7066983AE50EF7FAECA5EE7557F8DB540--
OK, as this is a backend issue I will track it further in Create i18n enabled service to provide content for Relation to SAP drop down list #6
Please install the latest backend version with the commit that should fix the issue.
it works fine now.
I would add a list with possible relations to SAP to the input field. This will make live easier when working with the data later.