on 2018 Feb 06 9:52 AM
Hi Gurus,
1) I have declared the following fields in Custom BO.
import AP.Common.GDT as apCommonGDT;
businessobject TestBO {
[AlternativeKey] element ID : ID;
[Label("Section")] element Section : LANGUAGEINDEPENDENT_EXTENDED_Text;
[Label("First Level")] element FirstLevel : LANGUAGEINDEPENDENT_EXTENDED_Text;
[Label("Second Level")] element SecondLevel : LANGUAGEINDEPENDENT_EXTENDED_Text;
[Label("Information")] element Information : LANGUAGEINDEPENDENT_EXTENDED_Text;
[Label("Information 2")] element Information2: LANGUAGEINDEPENDENT_EXTENDED_Text;
[DependentObject(TextCollection)] [LanguageIndependent] node TextCollection;
}
2) Right Click the BO and Create Service Integration -> Type = "WebService"
3) Selected the fields (including the TextCollection)
4) And, created an QueryByElements and Read operation in the WebService. Both of them does not return the TextCollection dependentobject field.
5) Since i need to store more than 255 characters in the field and In order to overcome this limitation (of not able to expose Textcollection field - not sure it is still a limitation or there is a way to expose a textcollection), I have to write logic in BeforeSave to split the TextCollection into two fields "Information" and "Information2" each of 255 chars.
Request
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/SAPGlobal20/Global">
<soap:Header/>
<soap:Body>
<glob:TestBOQueryByIDByIDQuery_sync>
<TestBO>
<ID>123</ID>
</
TestBO>
</glob:TestBOQueryByIDByIDQuery_sync>
</soap:Body>
</soap:Envelope>
Response
<SAP_UUID>00163e0f-zzzzz-xxxx-aaaa-2e670590e162</SAP_UUID>
<ID>123</ID>
<Section>My Team</Section>
<FirstLevel>FirstLevel</FirstLevel>
<SecondLevel>SecondLevel</SecondLevel>
<Information>Please provide the information below to help us to progress your enquiry:
Please attach any document(s) that will further support your enquiry.
If you are filling this out on behalf of someone</Information>
<Information2>please include their name and personnel number.</Information2>
Note - Response does not seem to be having the TextCollection field. Rather only the "Information" and "Information2" fields - which are of 255 char limit each.
Appreciate your early response and help with this issue.
Thanks
Sampath Kumar N
Request clarification before answering.
Hello Samapth,
If you know that roughly 500 chars are enough for your business case and you are not disturbed by the name you can also use the GDT
LANGUAGEINDEPENDENT_ENCRYPTED_EXTENDED_Name.
This data type can carry up to 765 chars.
HTH,
. Horst
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Horst for getting back on this query. This is the exact workaround I have implemented now (with field of type LANGUAGEINDEPENDENT_ENCRYPTED_EXTENDED_Name) and able to successfully consume the new field in Webservice WSDL as well.
Wondering - are you aware of any inherent limitation in exposing TextCollection field to the WebService (though this blog mentions it can be exposed successfully-
Wondering is there anything I could be doing wrong now?
Thanks and Regards
Sampath Kumar N
Hello Samapth,
You can check my blog Expose TextCollection data belonging to a Custom BO via OData service.
Best regards,
Jerry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.