SAP ABAP Class CL_FDT_JSON_SERVICES (JSON transformation services)
Hierarchy
☛
SAP_BASIS (Software Component) SAP Basis Component
⤷
BC-SRV-BR (Application Component) BRFplus - ABAP-Based Business Rules
⤷
SFDT_CORE (Package) BRFplus: Core
⤷
⤷
Properties
| Class | CL_FDT_JSON_SERVICES | |
| Short Description | JSON transformation services | |
| Super Class | ||
| Instantiability of a Class | 2 | Public |
| Final |
General Data
| Message Class | ||
| Program status | ||
| Category | 0 | |
| Package | SFDT_CORE | BRFplus: Core |
| Created | 20131202 | SAP |
| Last change | 20141121 | |
| Shared Memory-enabled | ||
| Fixed point arithmetic | ||
| Unicode checks active |
Forward declarations
| # | Type group / Object type | Type | Type Description |
|---|---|---|---|
| 1 | Type group use (TYPE-POOLS tp) | Type group use (TYPE-POOLS tp) | |
| 2 | Forward declaration interface (INTERFACE i DEFINITION DEF... | Forward declaration interface (INTERFACE i DEFINITION DEF... |
Interfaces
Class CL_FDT_JSON_SERVICES has no interface implemented.
Friends
Class CL_FDT_JSON_SERVICES has no friend class.
Attributes
| # | Attribute | Level | Visibility | Read only | Typing | Associated Type | Initial Value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Constant | Public | Type reference (TYPE) | STRING | 'Context' | 20131205 | |||
| 2 | Constant | Public | Type reference (TYPE) | STRING | 'None' | 20131205 | |||
| 3 | Constant | Public | Type reference (TYPE) | STRING | 'Result' | 20131205 | |||
| 4 | Constant | Public | Type reference (TYPE) | STRING | 'BRFplus JSON 1.01' | JSON Version | 20131205 |
Methods
| # | Method | Level | Visibility | Method type | Description | Created on |
|---|---|---|---|---|---|---|
| 1 | Static method | Public | Method | Convert function context into a JSON string | 20131205 | |
| 2 | Static method | Public | Method | Convert content to JSON | 20131205 | |
| 3 | Static method | Public | Method | Create dynamic structure for data objects in a context | 20131205 | |
| 4 | Static method | Public | Method | Create a dynamic structure for a list of data objects | 20131205 | |
| 5 | Static method | Public | Method | Create dynamic structure for data object(s) in a result | 20131205 | |
| 6 | Static method | Public | Method | Convert JSON to content | 20131205 | |
| 7 | Static method | Public | Method | Fill function context from JSON string | 20131205 | |
| 8 | Static method | Public | Method | Fill result from JSON string | 20131205 | |
| 9 | Static method | Public | Method | Convert function result into a JSON string | 20131205 |
Events
Class CL_FDT_JSON_SERVICES has no event.
Types
| # | Type | Visibility | Typing | Associated Type | Description | Created on | Type Source |
|---|---|---|---|---|---|---|---|
| 1 | S_JSON_CONTENT | Private | See coding | 20131205 | BEGIN OF s_json_content,
format TYPE string,
type TYPE string,
version type string,
data TYPE REF TO data,
END OF s_json_content
|
Method Signatures
Method CONTEXT_TO_JSON Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | IO_CONTEXT | Call by reference | Object reference (TYPE REF TO) | IF_FDT_CONTEXT | FDT: Context | 20131205 | |||
| 2 | IV_EXPORT | Call by reference | Type reference (TYPE) | ABAP_BOOL | Exportable format | 20131205 | |||
| 3 | RV_JSON | Value transfer | Type reference (TYPE) | STRING | 20131205 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | FDT: Abstract Exception Class | 20131205 |
Method EXPORT_TO_JSON Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | IA_DATA | Call by reference | Type reference (TYPE) | ANY | 20131205 | ||||
| 2 | IV_CONTENT_TYPE | Call by reference | Type reference (TYPE) | STRING | 20131205 | ||||
| 3 | IV_VERSION | Call by reference | Type reference (TYPE) | STRING | 20131205 | ||||
| 4 | RV_JSON | Value transfer | Type reference (TYPE) | STRING | 20131205 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | FDT: Errors related to JSON transformation | 20131205 |
Method GET_STRUCTURE_FOR_CONTEXT Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | EO_STRUCTDESCR | Call by reference | Object reference (TYPE REF TO) | CL_ABAP_STRUCTDESCR | Runtime Type Services | 20131205 | |||
| 2 | ER_STRUCTURE | Call by reference | Object reference (TYPE REF TO) | DATA | Structure data | 20131205 | |||
| 3 | IO_CONTEXT | Call by reference | Object reference (TYPE REF TO) | IF_FDT_CONTEXT | FDT: Context | 20131205 | |||
| 4 | IV_SET_VALUES | Call by reference | Type reference (TYPE) | ABAP_BOOL | Set values from context | 20131205 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | FDT: Abstract Exception Class | 20131205 |
Method GET_STRUCTURE_FOR_DATA_OBJECTS Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | EO_STRUCTDESCR | Call by reference | Object reference (TYPE REF TO) | CL_ABAP_STRUCTDESCR | Runtime Type Services | 20131205 | |||
| 2 | ER_STRUCTURE | Call by reference | Object reference (TYPE REF TO) | DATA | Structure data | 20131205 | |||
| 3 | ITS_ID_DOBJ | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>TS_OBJECT_ID | Object IDs as sorted table | 20131205 | |||
| 4 | IV_SORT_BY_NAME | Call by reference | Type reference (TYPE) | ABAP_BOOL | ABAP_TRUE | Sort structure components by name | 20131205 | ||
| 5 | IV_TIMESTAMP | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>TIMESTAMP | Time Stamp (active version, UTC) | 20131205 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | FDT: Abstract Exception Class | 20131205 |
Method GET_STRUCTURE_FOR_RESULT Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | EO_STRUCTDESCR | Call by reference | Object reference (TYPE REF TO) | CL_ABAP_STRUCTDESCR | Runtime Type Services | 20131205 | |||
| 2 | ER_STRUCTURE | Call by reference | Object reference (TYPE REF TO) | DATA | Structure data | 20131205 | |||
| 3 | IO_RESULT | Call by reference | Object reference (TYPE REF TO) | IF_FDT_RESULT | FDT: Context | 20131205 | |||
| 4 | IV_SET_VALUES | Call by reference | Type reference (TYPE) | ABAP_BOOL | Set values from context | 20131205 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | FDT: Abstract Exception Class | 20131205 |
Method IMPORT_FROM_JSON Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | EA_DATA | Call by reference | Type reference (TYPE) | DATA | 20131205 | ||||
| 2 | EV_CONTENT_TYPE | Call by reference | Type reference (TYPE) | STRING | 20131205 | ||||
| 3 | EV_VERSION | Call by reference | Type reference (TYPE) | STRING | 20131205 | ||||
| 4 | IV_JSON | Call by reference | Type reference (TYPE) | STRING | 20131205 |
Method IMPORT_FROM_JSON on class CL_FDT_JSON_SERVICES has no exception.
Method JSON_TO_CONTEXT Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | IV_FUNCTION_ID | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>ID | Function ID | 20131205 | |||
| 2 | IV_JSON | Call by reference | Type reference (TYPE) | STRING | 20131205 | ||||
| 3 | IV_TIMESTAMP | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>TIMESTAMP | Time Stamp (active version, UTC) | 20131205 | |||
| 4 | RO_CONTEXT | Value transfer | Object reference (TYPE REF TO) | IF_FDT_CONTEXT | FDT: Context | 20131205 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | FDT: Abstract Exception Class | 20131205 |
Method JSON_TO_RESULT Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | IV_FUNCTION_ID | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>ID | 20131205 | ||||
| 2 | IV_JSON | Call by reference | Type reference (TYPE) | STRING | 20131205 | ||||
| 3 | IV_TIMESTAMP | Call by reference | Type reference (TYPE) | IF_FDT_TYPES=>TIMESTAMP | Time Stamp (active version, UTC) | 20131205 | |||
| 4 | RO_RESULT | Value transfer | Object reference (TYPE REF TO) | IF_FDT_RESULT | FDT: Result | 20131205 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | FDT: Abstract Exception Class | 20131205 |
Method RESULT_TO_JSON Signature
| # | Type | Parameter | Pass Value | Optional | Typing Method | Associated Type | Default value | Description | Created on |
|---|---|---|---|---|---|---|---|---|---|
| 1 | IO_RESULT | Call by reference | Object reference (TYPE REF TO) | IF_FDT_RESULT | FDT: Result | 20131205 | |||
| 2 | IV_EXPORT | Call by reference | Type reference (TYPE) | ABAP_BOOL | Exportable JSON format | 20131205 | |||
| 3 | RV_JSON | Value transfer | Type reference (TYPE) | STRING | 20131205 |
| # | Exception | Resumable | Description | Created on |
|---|---|---|---|---|
| 1 | FDT: Abstract Exception Class | 20131205 |
History
| Last changed by/on | SAP | 20141121 |
| SAP Release Created in | 740 |