cancel
Showing results for 
Search instead for 
Did you mean: 

mass approval scenario in case of multiheader and Item

former_member338801
Participant
0 Kudos

Hi Experts,

How can we pick multi header and multi Item from SAP UI5 in case of deep entry(mass approval). If header is only single record then it's easy to loop in and get item data and send in the payload format. How can we achieve in above said requirement.

1) In case of first Multi approve scenario :

Header(Fixed)

"EntityNameM":[{},
{},
{},
{}](Dynamic)


While creation Read header


2) In case of Team seconf Multi approve scenario :

Header (Dynamic due to multiple record)

"EntityNameL": [ {},
{},
{},
{}] (Dynamic)

Thanks and Regards,

RK

former_member338801
Participant
0 Kudos

Any help from anyone please?

Accepted Solutions (0)

Answers (1)

Answers (1)

maheshpalavalli
Active Contributor
0 Kudos

Hi ram mishra

You can make use of batch for this right?

In ui5 make sure you are using odata v2 model, which is batch enabled by default and call multiple times odata create method (which has deep data).

In the backend use chageset process to get all the data that you sent from the UI in one go.

https://blogs.sap.com/2018/05/06/batch-request-in-sap-gateway/

Thanks,
Mahesh

former_member338801
Participant
0 Kudos

Is it possible to send multi header and multi Item from UI5? As per my knowledge,SAP has provided only provision for sending 1 header with multiple line item. Please help from the UI5 perspective.

Thanks and Regards,

RK

maheshpalavalli
Active Contributor
0 Kudos
ram mishra, Like I said, call the odata create method multiple times (in a loop) by passing the header and items in the deep format and make sure your ui5 odata model is v2 model and then in the changeset method(odata service abap) you can get all the data.I hope I explained you correctly.. Please let me know if you are missing something ram mishraBR,Mahesh
UdayMS
Participant
0 Kudos

maheshkumar.palavalli I have tried this. But the problem is each time I loop through the model, say for e.g 1 header has 2 sets of line items, second set of line items goes as a another record. It does not get appended to the original header like

It goes like

{ header 1 : value

lineitem1 : [

prop1 : value1,

prop2 : value2

]

},

{ header 1 : value

lineitem2 : [

prop1 : value1,

prop2 : value2

]

}

where as it must go like

{ header 1 : value

lineitem1 : [

{ prop1 : value1,

prop2 : value2

},

lineitem2 : [

{ prop1 : value1,

prop2 : value2

}

]

},

Thanks

Uday