Skip to content

Commit 31dec44

Browse files
authored
Release 1.0.0 (#4)
1 parent cd48b16 commit 31dec44

24 files changed

+4602
-2790
lines changed

Diff for: MIGRATION-V0.3.0.md

-7
This file was deleted.

Diff for: MIGRATION-V1.0.0.md

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Upgrading to ABAP SDK version 1.0.0
2+
3+
Note: If migrating from a version less than v0.3.0, also see the
4+
[v0.3.0 migration guide
5+
wiki](https://github.com/watson-developer-cloud/abap-sdk-scp/blob/0.3.0/MIGRATION-V0.3.0.md).
6+
7+
<details>
8+
<summary>Table of Contents</summary>
9+
10+
- [Breaking changes](#breaking-changes)
11+
- [Breaking changes by service](#breaking-changes-by-service)
12+
- [Watson Assistant V1](#watson-assistant-v1)
13+
- [Watson Assistant V2](#watson-assistant-v2)
14+
- [Compare and Comply V1](#compare-and-comply-v1)
15+
- [Discovery V2](#discovery-v2)
16+
- [Text to Speech V1](#text-to-speech-v1)
17+
- [Discontinued services](#discontinued-services)
18+
- [Compare and Comply V1](#compare-and-comply-v1-1)
19+
- [Personality Insights V3](#personality-insights-v3)
20+
- [Visual Recognition V3 and V4](#visual-recognition-v3-and-v4)
21+
22+
</details>
23+
24+
## Breaking changes
25+
26+
### Breaking changes by service
27+
28+
#### Watson Assistant V1
29+
30+
Data types `t_Dialog_Node_Output_Generic` and `t_Runtime_Response_Generic` were changed from structures with several components (`RESPONSE_TYPE`, `TEXT`, `VALUES`, ...) to data type `JSONOBJECT`. Depending on the expected data type, data type `JSONOBJECT` must be mapped to the corresponding data structure, for example `t_Dia_Nd_Otpt_Gnrc_Dia_Nd_Otp1` (dialog node output generic) or `t_Rt_Resp_Gnrc_Rt_Resp_Typ_Txt` (runtime response generic).
31+
32+
When you fill in one of these structures and want to assign this structure to a variable of type `JSONOBJECT`, you can use the reference operator `REF` or the deprecated form `GET REFERENCE OF` to perform the mapping. When you receive data in a variable of type `JSONOBJECT` and need to map it to one of these structures, you can use method `move_data_reference_to_abap`, which is provided in the service class `zcl_ibmc_service`.
33+
34+
#### Watson Assistant V2
35+
36+
Data type `t_Runtime_Response_Generic` was changed from a structure with several components (`RESPONSE_TYPE`, `TEXT`, ...) to data type `JSONOBJECT`. Depending on the expected data type, data type `JSONOBJECT` must be mapped to the corresponding data structure, for example `t_Rt_Resp_Gnrc_Rt_Resp_Typ_Txt`.
37+
38+
When you fill in one of these structures and want to assign this structure to a variable of type `JSONOBJECT`, you can use the reference operator `REF` or the deprecated form `GET REFERENCE OF` to perform the mapping. When you receive data in a variable of type `JSONOBJECT` and need to map it to one of these structures, you can use method `move_data_reference_to_abap`, which is provided in the service class `zcl_ibmc_service`.
39+
40+
#### Compare and Comply V1
41+
42+
Parameters `I_BEFORE` and `I_AFTER` have been removed from method `LIST_FEEDBACK`.
43+
44+
#### Discovery V2
45+
46+
The Discovery V2 interface is available for Premium Discovery instances only and not supported by the ABAP SDK.
47+
48+
#### Text to Speech V1
49+
50+
The following types were renamed:
51+
52+
| Old name | New name |
53+
|:-----------------------|:------------------------|
54+
| `t_Voice_Model` | `t_Custom_Model` |
55+
| `t_Voice_Models` | `t_Custom_Models` |
56+
| `t_Create_Voice_Model` | `t_Create_Custom_Model` |
57+
| `t_Update_Voice_Model` | `t_Update_Custom_Model` |
58+
59+
The following methods were renamed:
60+
61+
| Old name | New name |
62+
|:---------------------|:----------------------|
63+
| `create_Voice_Model` | `create_Custom_Model` |
64+
| `get_Voice_Model` | `get_Custom_Model` |
65+
| `update_Voice_Model` | `update_Custom_Model` |
66+
| `delete_Voice_Model` | `delete_Custom_Model` |
67+
| `list_Voice_Models` | `list_Custom_Models` |
68+
69+
70+
### Discontinued services
71+
72+
The following services are discontinued. New service instances cannot be created anymore. The ABAP SDK still includes interfaces to these services, which cannot be used anymore when IBM support of the corresponding service ends.
73+
74+
#### Compare and Comply V1
75+
76+
Existing instances are supported until 30 November 2021 and will be deleted afterwards.
77+
78+
#### Personality Insights V3
79+
80+
Existing instances are supported until 1 December 2021 and will be deleted afterwards.
81+
82+
#### Visual Recognition V3 and V4
83+
84+
Existing instances are supported until 1 December 2021 and will be deleted afterwards.
85+

Diff for: README.md

+22-79
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
# ABAP SDK for IBM Watson, using SAP Cloud Platform ABAP Environment
44

5-
ABAP client library to use the [IBM Watson APIs][wdc]. This is a Community SDK written by ABAPers for the ABAPers in the Open Source community, to provide easy usage of IBM Watson Developer Services in innovation initatives using the SAP Cloud Platform ABAP Environment. It is the choice and responsibility of application developers how this Community SDK is used.
5+
ABAP client library to use the [IBM Watson APIs][wdc]. This is a Community SDK written by ABAPers for the ABAPers in the Open Source community, to provide easy usage of IBM Watson Developer Services in innovation initiatives using the SAP Cloud Platform ABAP Environment. It is the choice and responsibility of application developers how this Community SDK is used.
66

7-
Additionally, as the ABAP SDK is a community release it is not updated with the same schedule as IBM-supported SDKs. Please see more information in [Questions](#questions).
7+
Additionally, as the ABAP SDK is a community release it is not updated with the same schedule as IBM-supported SDKs. Please see more information in [Questions](#Questions).
88

99
# Choose ABAP SDK release for the applicable ABAP Runtime
1010

@@ -14,8 +14,6 @@ Additionally, as the ABAP SDK is a community release it is not updated with the
1414
| tested on SAP Business Suite and SAP S/4HANA on-premises edition | |
1515
| | `this repository` |
1616

17-
**Note:** The SDK can currently only be deployed in non-Trial instances of the SAP Cloud Platform ABAP Environment. It is planned to make a deployment possible in Trial systems as well later this year.
18-
1917
---
2018

2119
<details>
@@ -37,8 +35,8 @@ Additionally, as the ABAP SDK is a community release it is not updated with the
3735
</details>
3836

3937
## ANNOUNCEMENTS
40-
### Minor version 0.3.0 released
41-
Version v0.3.0 of the SDK has been released and includes one breaking change - see what's changed in the [migration guide](MIGRATION-V0.3.0.md).
38+
### Major version 1.0.0 released
39+
Version v1.0.0 of the SDK has been released and includes breaking changes - see what's changed in the [migration guide](MIGRATION-V1.0.0.md).
4240

4341
## Before you begin
4442
* You need an [IBM Cloud][ibm_cloud_onboarding] account.
@@ -100,21 +98,23 @@ Afterwards, service methods can be called as long as the provided token is valid
10098
The client library is delivered as package *ZIBMC*. Once the Git Repository has been cloned to the SAP system, a Watson service instance is wrapped by an ABAP class instance.<br>
10199
The following Watson services are currently supported:
102100

103-
| Service | ABAP Class Name |
104-
|:------------------------------ |:------------------------------ |
105-
| Compare and Comply | ZCL_IBMC_COMPARE_COMPLY_V1 |
106-
| Discovery | ZCL_IBMC_DISCOVERY_V1 |
107-
| Language Translator | ZCL_IBMC_LANG_TRANSLATOR_V3 |
108-
| Natural Language Classifier | ZCL_IBMC_NAT_LANG_CLASS_V1 |
109-
| Natural Language Understanding | ZCL_IBMC_NAT_LANG_UNDRSTND_V1 |
110-
| Personality Insights | ZCL_IBMC_PERSONAL_INSIGHTS_V3 |
111-
| Speech to Text | ZCL_IBMC_SPEECH_TO_TEXT_V1 |
112-
| Text to Speech | ZCL_IBMC_TEXT_TO_SPEECH_V1 |
113-
| Tone Analyzer | ZCL_IBMC_TONE_ANALYZER_V3 |
114-
| Visual Recognition | ZCL_IBMC_VISUAL_RECOGNITION_V3 |
115-
| | ZCL_IBMC_VISUAL_RECOGNITION_V4 |
116-
| Watson Assistant | ZCL_IBMC_ASSISTANT_V1 |
117-
| | ZCL_IBMC_ASSISTANT_V2 |
101+
| Service | ABAP Class Name |
102+
|:------------------------------ |:----------------------------------- |
103+
| Compare and Comply | ZCL_IBMC_COMPARE_COMPLY_V1 (\*) |
104+
| Discovery | ZCL_IBMC_DISCOVERY_V1 |
105+
| Language Translator | ZCL_IBMC_LANG_TRANSLATOR_V3 |
106+
| Natural Language Classifier | ZCL_IBMC_NAT_LANG_CLASS_V1 |
107+
| Natural Language Understanding | ZCL_IBMC_NAT_LANG_UNDRSTND_V1 |
108+
| Personality Insights | ZCL_IBMC_PERSONAL_INSIGHTS_V3 (\*) |
109+
| Speech to Text | ZCL_IBMC_SPEECH_TO_TEXT_V1 |
110+
| Text to Speech | ZCL_IBMC_TEXT_TO_SPEECH_V1 |
111+
| Tone Analyzer | ZCL_IBMC_TONE_ANALYZER_V3 |
112+
| Visual Recognition | ZCL_IBMC_VISUAL_RECOGNITION_V3 (\*) |
113+
| | ZCL_IBMC_VISUAL_RECOGNITION_V4 (\*) |
114+
| Watson Assistant | ZCL_IBMC_ASSISTANT_V1 |
115+
| | ZCL_IBMC_ASSISTANT_V2 |
116+
117+
(\*) Deprecated service; will be discontinued in the future.
118118

119119
Using the client library requires two steps:
120120

@@ -234,63 +234,6 @@ Using the client library requires two steps:
234234

235235
</details>
236236

237-
<details>
238-
<summary>Personality Insights Example</summary>
239-
240-
```abap
241-
* Analyze profile using example text using Watson Personality Insights
242-
243-
" declare variables
244-
data:
245-
lv_apikey type string value '...',
246-
lo_personality_insights type ref to zcl_ibmc_personal_insights_v3,
247-
lo_service_exception type ref to zcx_ibmc_service_exception,
248-
ls_content_item type zcl_ibmc_personal_insights_v3=>t_content_item,
249-
ls_response type zcl_ibmc_personal_insights_v3=>t_profile,
250-
ls_content type zcl_ibmc_personal_insights_v3=>t_content,
251-
lv_content_language type string value 'en',
252-
lv_accept_language type string value 'en',
253-
lv_raw_scores type boolean value 'C_BOOLEAN_FALSE',
254-
lv_csv_headers type boolean valiue 'C_BOOLEAN_FALSE',
255-
lv_consumption_preferences type boolean value 'C_BOOLEAN_FALSE',
256-
lv_accept type string value 'text/csv'.
257-
258-
" get Watson Personality Insights service instance
259-
zcl_ibmc_service_ext=>get_instance(
260-
exporting
261-
i_url = 'https://api.eu-gb.personality-insights.watson.cloud.ibm.com/instances/<uuid>'
262-
i_apikey = lv_apikey
263-
i_version = '2018-05-01'
264-
importing
265-
eo_instance = lo_personality_insights ).
266-
267-
" store text to be analyzed into ls_content
268-
" concatenate ... into ls_content_item-content
269-
" append ls_content_item to ls_content-contentitems
270-
271-
" call Watson Personality Insights service to analyze text in ls_content
272-
try.
273-
lo_personality_insights->profile(
274-
exporting
275-
i_content = ls_content
276-
i_content_language = lv_content_language
277-
i_accept_language = lv_accept_language
278-
i_raw_scores = lv_raw_scores
279-
i_csv_headers = lv_csv_headers
280-
i_consumption_preferences = lv_consumption_preferences
281-
importing
282-
e_response = ls_response ).
283-
284-
catch zcx_ibmc_service_exception into lo_service_exception.
285-
message lo_service_exception type 'E'.
286-
endtry.
287-
288-
" retreive profile analysis results from ls_response
289-
290-
```
291-
292-
</details>
293-
294237
<details>
295238
<summary>Language Translator Example</summary>
296239

@@ -350,7 +293,7 @@ GitHub Pages contain the [ABAP Client Library for Watson API Reference](https://
350293

351294
The ABAP SDK is a Community SDK for IBM Watson, created by the IBM Watson development community and SAP's ABAP development community - written by ABAPers from IBM Cloud, IBM Services and IBM Systems. Therefore as a community release it is not updated with the same schedule as IBM-supported SDKs, and does not include support by IBM. For more information on IBM-supported SDKs and the update policy, please see https://cloud.ibm.com/docs/watson?topic=watson-using-sdks
352295

353-
If you have questions about the IBM Watson services or are having difficulties using the APIs, please ask a question at [dW Answers](https://developer.ibm.com/answers/questions/ask/?topics=watson) or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson-cognitive).
296+
If you have questions about the IBM Watson services or are having difficulties using the APIs, please ask a question at [IBM Support Forums](https://www.ibm.com/mysupport/s/forumshome) or [Stack Overflow](http://stackoverflow.com/questions/ask?tags=ibm-watson-cognitive).
354297

355298
## License
356299

0 commit comments

Comments
 (0)