EPO Consulting Wiki - EPO_Connector_-_JSON_strip_table_/EPO1/JSON_STRIP


This is an old version of this page. To the new page please click here

Das ist eine alte Version dieser Seite. Zur neuen Seite klicken sie hier

The table /EPO1/JSON_STRIP can be used to strip (remove) empty elements of a JSON response (of an incoming webservice call).


Data processing

When an ABAP response (structure or table is converted to JSON, empty elements can be stripped (skipped from the processing), if they are customized in the table /EPO1/JSON_STRIP. There is more control over the stripped elements than to use the stripping option '1'.

Requirements

The JSON conversion is controlled by the 'response format' in the table /EPO1/CONFIGOUT, which must be one of the values '0', '1', '2' or '10' in order to invoke the JSON processing.

Additionally, the checkbox 'Field mapping' has to be checked, in order to pass the current service id to the processing function module.

ClipCapIt-201117-101519.PNG

Customizing table /EPO1/JSON_STRIP

Create one line for each combination of service / element, which should be stripped when empty

  • field names are entered directly (e.g. 'IDATU'), which handles all elements with this name
  • ABAP type names (data elements) are entered in brackets (e.g. '[LVS_IDATU]'), which handles all elements with this type
  • ABAP type kind - keywords are entered in double brackets (e.g. '[[DATE]]'), which handles all elements with this type kind


Currently defined ABAP type kind values:

Keyword Typekind constant Value
[[DATE]] cl_abap_typedescr=>typekind_date D
[[TIME]] cl_abap_typedescr=>typekind_time T
[[CHAR]] cl_abap_typedescr=>typekind_char C
[[HEX]] cl_abap_typedescr=>typekind_hex X
[[NUM]] cl_abap_typedescr=>typekind_num N
[[INT]] cl_abap_typedescr=>typekind_int I integer, 4 byte
[[INT1]] cl_abap_typedescr=>typekind_int1 b integer, 1 byte
[[INT2]] cl_abap_typedescr=>typekind_int2 s integer, 2 bytes
[[INT8]] cl_abap_typedescr=>typekind_int8 8 integer, 8 bytes
[[FLOAT]] cl_abap_typedescr=>typekind_float F
[[PACKED]] cl_abap_typedescr=>typekind_packed P
[[TABLE]] cl_abap_typedescr=>typekind_table h
[[STRUCT]] cl_abap_typedescr=>typekind_struct1 u flat structure
[[STRUCT]] cl_abap_typedescr=>typekind_struct2 v deep structure