Skip to Content
4
May 30, 2018 at 03:31 PM

Reusing a Gateway DPC_EXT class in ABAP report / simulate via ABAP a call to gateway

1333 Views Last edit Jun 16, 2018 at 06:36 AM 2 rev

Hi all,

i was pondering if it's possible to simulate via ABAP a call to a gateway service developed on the same system.

A little scenario

I created an OData service to create and update materials: it receive a JSON, retrieve a model material and copy it to create the new one.

This is working perfectly but, of course, it works one by one.


For an upcoming golive project, we have to create around 1000 materials and, one by one, can be a bit tricky, so i'm developing the classical ABAP report which reads an XLSX file and does the dirty job.

The issue/question

Yes, i can copy-and-paste the same methods of my OData service, but it would be a mess to keep updated the same code in two different places.
i can detach the original code, put into another class and call the class in the service and the report.

But i was wondering if it would be possible to invoke the service i already implemented, just paramter io_data_provider seems to be a bit tricky.

Anyone already tried it?