/scripts/ahub.form.attachments.js
0

How to read nested CAD data in SAP IC

Dec 01, 2016 at 03:29 PM

77

avatar image

Hi,

We are using CTI functionality in SAP IC Webclient. The IVR data is coming in XML in CAD.

Following is the data structure.

<attachedData>
<?xml version="1.0" encoding="UTF-8"?>
<ItemAttachedData>
<Application id="SAP-IC">
<CV01/>
<CV02/>
<CV03/>
<CV04/>
<CV05/>
<CV06/>
<CV07/>
<CV08/>
<CV09/>
<CV10/>
<MID>33628423</MID>
<ECC>
<user.ced>12345</user.ced>
<user.dnis>0041319175233</user.dnis>
</ECC>

</Application>
</ItemAttachedData>
</attachedData>

Now The following code it translating the data into ABAP internal table.

But as the ECC variables are again nested in <ECC> tag the data is coming in a single line concatenated.

lr_interaction_manager = cl_crm_ic_interaction_manager=>get_instance( ).
IF lr_interaction_manager IS BOUND.
TRY.
lr_interaction ?= lr_interaction_manager->get_current_interaction( ).
lv_source = lr_interaction->if_crm_ic_interaction~get_source( ).
CHECK lv_source = lc_ivr_call.
lr_contact ?= lr_interaction->if_crm_ic_interaction~get_leading_contact( ).
lv_cad = lr_contact->get_iaad_cstring( iv_applicationid = 'SAP-IC' ).
CATCH cx_root.
ENDTRY.

IF lv_cad IS NOT INITIAL.

* transform tags to abap table
CALL TRANSFORMATION ('CRM_IC_BPIDENT_EXT_IAD_TO_ABAP')
SOURCE XML lv_cad
RESULT partners = lt_tags. " This table has the data
ENDIF.

How can I read the ECC data also in a separate table?

10 |10000 characters needed characters left characters exceeded

Hello Tapas,

The main point in the source codes are

CALL TRANSFORMATION ('CRM_IC_BPIDENT_EXT_IAD_TO_ABAP'), right? The other source codes are just how to get the IVR data, they actually are not relevant to your requirement--how to read nested data.

Maybe this thread helps:

https://archive.sap.com/discussions/message/2574484#2574484

I change your primary tag to 'ABAP development'.

Best Regards, Corrine

0
* Please Login or Register to Answer, Follow or Comment.

0 Answers

Skip to Content