Skip to Content
Technical Articles
Author's profile photo Jose Sequeira

Reverse engineering OnPremise FIORI for “key” source code!

Hello,

Sometimes you are looking for a solution at Google (or even here) and it’s very hard to find, or you’re looking for better ways on how to achieve a scenario that standard SAP already does (like BAPIs, etc.) but without much success.

I’m here to tell you that, if you have OnPremise FIORI installed (or other products), you can study how it’s done on the “new approach” that comes with the standard apps, mostly with “API” classes/methods that can be or contain exactly what you need!

Let’s use the Approve Purchase Order standard FIORI App as an example:

Looking at the Item details page, we can see that lists all major important details regarding it:

But if i don’t want to manually select all the relevant tables to get these data, i want a “complete” and simple solution to achieve that, what can i do? Let’s study how FIORI does!

First, activating a trace for my user at: /IWFND/TRACES. After the refresh, we notice what service/entity this exactly screen executes to get the data:

Looking at the return, we can see all the data presented at the screen.

Now that we know what service it’s executed (you can find that out as well checking the FIORI Apps Library ?):

Go to service implementation to find the Data provider class (DPC):

This one:

Now searching this class, placing a break point at the GET_ENTITY method (looking for the WorkflowTask entity, as we saw at the TRACE):

We discover that the exact place that standard code looks for the relevant data for this PO is on the GET_PO_WORKFLOW_FOR_LIST method:

Voilà! ? Now you’ve discovered that there is a class (CL_GBAPP_APV_PO_API) that contains a lot of methods regarding the process of approval a PO, so you can see what all the methods do and copy to your needs or even use this class methods as well.

Enjoy! ??????

Regards.

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Michelle Crapo
      Michelle Crapo

      Nice!  Step by step and easy to follow.

      Author's profile photo Florian Henninger
      Florian Henninger

      Yep.. exactly one way I do it. Even with the old "Call transaction" I always look at some standard programs which do exactly what I want and debug a little:-)

      Author's profile photo Mauricio Pinheiro Predolim
      Mauricio Pinheiro Predolim

      Cool Man! Thanks for sharing it!