Well Hello again!
Just like attachment issue in Fiori Procurement Apps, there is another problem in Fiori MM apps that GOS Notes and Private notes (saved to external respository) are not displayed by default. So what to do? Wait! There is a working solution to that. 😉
So, let’s get to know how we can display GOS Notes and Private notes in SAP MM Fiori apps. We just have to follow a few quick and simple steps and Notes would be visible in Fiori Approve Purchase Order, Approve Purchase Requisition and Service Entry Sheet apps.
Without wasting any time we are going for a how to!
I will demonstrate with Fiori SES App, please follow the same procedure for Approve Purchase Order and Approve Purchase Requisition app.
I am assuming that you must have implemented respective SES BADI, if yes then follow me!
If most of you are not aware of what Notes I am talking about then see the screenshot below with highlighted boxes:
Go to your BADI and Method is IF_EX_BADI_MMSRV_APPROVAL_APP~CHANGE_NOTES, shown below:
Now double click method CHANGE_NOTES, shown below:
Here you have to write your own code for Notes and Private Notes. First part is the data declaration! But wait? Which BAPI, Method or FM would be used? Genius! Here you go! We will use couple of them
We will use Class:
1. cl_binary_relation to links of the saved notes in Purchase Order or Purchase Requisition or Service Entry Sheet. Method: cl_binary_relation=>read_links will be used.
2. Then we will use FM: SO_OBJECT_READ to read the document content.
Moving ahead with the necesarry data declaration for the above method and FM:
Now we are done with the data declaration, we will tell cl_binary_relation=>read_links what notes we are going to read, for that see below:
We just asked to give us Notes and Private Notes.
Now we will read links for Notes and Privates Notes, gs_lpor contain Object info, in this case it’s SES! see below:
We will now fill necessary variables to fetch notes content!
Now we will call our FM to fetch document content!
Finally after moving vairables to our local Notes strcture, we will fill CT_NOTES of this method!
We are done with adding Notes and Private Notes to Fiori Procurement apps.
For Approve Purchase Order Fiori App – write your code in Method: IF_GBAPP_EX_APV_PO_RDP~CHANGE_NOTES_API
For Approve Purchase Requisition Fiori App – write your code in Method: IF_GBAPP_EX_APV_PR_RDP~CHANGE_NOTES_API
In Fiori Notes would look something like this:
More detailed view:
Please let me know in your comments, how you feel about this one!
Goodbye till my next post!