sapmentors / SITregParticipant

SAP Event Registration - Front end for Participants
Apache License 2.0
3 stars 11 forks source link

Relation to SAP #10

Closed roman0701 closed 8 years ago

roman0701 commented 8 years ago

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.

gregorwolf commented 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.

gregorwolf commented 8 years ago

The backend provides now the OData entity for RelationToSAP. Please fill the Drop-Down with it.

mokadiri commented 8 years ago

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.

gregorwolf commented 8 years ago

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.

gregorwolf commented 8 years ago

@roman0701 please retest and close this issue if fixed.

mokadiri commented 8 years ago

Hi @gregorwolf , i get the same error when i test ur link :

error

{ "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" }

gregorwolf commented 8 years ago

What response from the server do you see in the browser developer tools?

mokadiri commented 8 years ago

--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"?>Service exception: [359] string is too long --7066983AE50EF7FAECA5EE7557F8DB540 Content-Type: application/http Content-Length: 228 content-transfer-encoding: binary

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--

gregorwolf commented 8 years ago

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

gregorwolf commented 8 years ago

Please install the latest backend version with the commit that should fix the issue.

mokadiri commented 8 years ago

it works fine now.