Skip to Content
author's profile photo Former Member
Former Member

problem to convert Json schema to ABAP internal table

Dear Experts ,

my database table contains json data , now i have to convert that data into internal table . my tried number of methods but unfortunately i didn't get proper result.

json data is like

{

"userSession": {

"name": "X1234500",

"lastname": "",

"firstname": "",

"emailaddress": "",

"connRegistrationId": "738b584ebf8258c",

"userSystemId": "xxxxx"

},

"bfmData": [

{

"controlArea": "1000",

"rpaGroup": "US"

},

{

"controlArea": "1000",

"rpaGroup": "TS"

},

{

"controlArea": "1000",

"rpaGroup": "AS"

}

]

}

how do i convert that data into internal table .

please guide me.

Regards,

Venkatesh.

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Best Answer
    Posted on Jul 29, 2016 at 09:14 AM

    Please indicate both the expected result, and what you tried.

    Add comment
    10|10000 characters needed characters exceeded

    • I was just mentioning a fact, that you had not mentioned (and because there is a note about it for this class shows that there is really a problem with it, otherwise SAP wouldn't have created it). It often happens that unsupported objects are removed by SAP.

  • author's profile photo Former Member
    Former Member
    Posted on Jul 29, 2016 at 12:59 PM

    You need to create a structure

    1.

    s_struct {

    userSession type s_user_Session,

    bfmData type t_bfmData

    }

    2.

    s_usersession{

    name,

    lastname,

    firstname ,

    emailaddress,

    connRegistrationId,

    userSystemId

    }

    3. s_bfmData {

    controlArea,

    rpaGroup

    }

    You need to write a simple transformation to covert JSON into internal table ....

    Add comment
    10|10000 characters needed characters exceeded