cancel
Showing results for 
Search instead for 
Did you mean: 

SAP FIORI - Purchase Requisition Approval - not displayed correctly

trusadi
Participant
0 Kudos

Hi,

I am trying to set PR Approval app .

Everything seems correctly configured, but the SAP Fiori does not displayed the number of PR that need to be approved properly. It always display zero.

Event though in the SAP inbox it showed many workflow items.

Can anybody inform me what could be wrong?

Thanks

Tj

Accepted Solutions (0)

Answers (3)

Answers (3)

trusadi
Participant
0 Kudos

Finally, this problem was solved.

Follow what Ashish suggested.

And then you will find some currency conversion issue which supposed not to happen.

I think the currency conversion was meant for PO limit, so I made another enhancement to the currency conversion logic.

Thanks again to Masa, and Ashish for helping me.

Regards,

Tj

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tjarliman,

What is the task ID for approve PR?

Do you see workitems after you select Approve PR tile?

Regards, Masa

SAP Customer Experience Group - CEG

trusadi
Participant
0 Kudos

Hi Masa,

Thanks for replying. Actually, somehow, the problem was solved.

I am not sure how it was solved. Sorry for not updating this discussion.

The Task ID: TS20000159.

What was happend was like this.

Previously the WF (workflow) was working fine until my colleague told me that the WF was not work anymore since there was no data work item thrown to his inbox. Then I checked the WF via SWDD, and noticed that the "binding agent" was blank (some one must have changed it, not sure). Then i fixed it. I re-activated the WF, and test it, and the WF was working fine.

My colleague tested it, and also he tested in FIORI via web browser, and he confirmed that the WF work fine, and supprisingly he said that the FIORI can display the correct number. Until now the FIORI can display the correct number, and my problem was solved.

But, I am not sure what the solution was. Was it because I re-activated the WF? or maybe my other colleague who works in the gateway side changed something.

Actually, now i have the same problem with Purchase Order Approval App. The issue is the same, the fiori only display zero, even though there are many workitems in the inbox.

Do you think, I should create another discussion thread for it  and "close" this thread ?

Regards,

Tj

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tj,

Please follow this troubleshooting steps. Identifying OData service and setting external breakppints will help you.

SAP Fiori LL11 - Consultants should know about OData troubleshooting

Regards, Masa

SAP Customer Experience Group - CEG

trusadi
Participant
0 Kudos

Thank you Masa,

That's very helpful.

Regards,

Tj

trusadi
Participant
0 Kudos

Hi Masa,

I have follow your guidance and managed to debug, and found the root cause.

The logic to count the number of PO which has to be displayed is in this part.

cl_gbapp_apv_po_api=>GET_PO_INBOX_COUNTER line 100

IF <fs_ekpo>-pstyp EQ if_gbapp_apv_constants=>cc_pr_item_category_service OR

                 <fs_ekpo>-pstyp EQ if_gbapp_apv_constants=>cc_pr_item_category_limit OR " Limit

                <fs_ekpo>-pstyp EQ if_gbapp_apv_constants=>cc_pr_item_category_mat_group OR

                <fs_ekpo>-pstyp EQ if_gbapp_apv_constants=>cc_pr_item_category_mat_stand.

                lv_po_include = abap_true.

It seems that only certain item category which will be captured.

In my case the PO is stock transport, and it was not capture by that logic, hence the FIORI will displayed 0.

Is there any reason why std logic it is filtered like that?

Actually I can create BADI to put my own logic, and I did create the BADI.

But now, the problem is, when you click the PO Approval tile, details of the PO is blank.

So, I guess, I should implement another BADI to overcome this.

But what about the approval or rejection process? Do I need to implement another BADI again?

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tj,

Same logic is in the method GET_PO_WORKFLOW_FOR_LIST and you can implement BADI for CHANGE_WORKFLOW_TASK_API which returns list of workitems.

Regards, Masa

SAP Customer Experience Group - CEG

trusadi
Participant
0 Kudos

Hi Masa,

Thanks for replying.

After checking the method you mentioned above, and also looking at the point in where the badi is triggered.

I decided to enhance the method rather than using the BADI, because in that BADI, there is no information about the work item.

That solved my problem.

Now, I am still having problem with this method GET_ITEM_INFORMATION.

When trying to display detail about one PO item, the system throw an exception error. And this error was triggered in that method.

After checking logic in that method, i found this line

line 178

ELSE.

      " Raise Exception

      MESSAGE e018(gbapp_apv_msg) WITH is_ekpo-ebeln INTO lv_msg.

      lo_cmn->raise_exception_iwbep_business( iv_leading_msg = lv_msg ).

    ENDIF.

Because of this, I cannot use enhancement spot nor BADI anymore.

Pls. suggest what should I do?

Thanks

Tj

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tj,

Debugging is the best way to find a solution.

Regards, Masa

SAP Customer Experience Group - CEG

trusadi
Participant
0 Kudos

Hi Masa,

Yes, I agree with you.

But while debugging I found out that standard SAP program has to be changed.

ELSE.

      " Raise Exception

      MESSAGE e018(gbapp_apv_msg) WITH is_ekpo-ebeln INTO lv_msg.

      lo_cmn->raise_exception_iwbep_business( iv_leading_msg = lv_msg ).

    ENDIF.

Because of this program statement (Message type "E", I could not put anymore custom logic under it).

Regards,

Tj

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tj,

I guess there is some if statement. You need to find why the logic goes to raise exception.

Regards, Masa

SAP Customer Experience Group - CEG

trusadi
Participant
0 Kudos

Hi Masa,

Thanks for quick reply.

Yes, there is "if ...elseif...else...".

For my case it goes to raise exception because my purchase order item category is stock transfer which has code equal to "7", ekpo-pstyp = "7", which is treated as an exception in std program.

Hence the system raise an error.

Why is there only a few item category (ekpo-pstyp) captured by standard program ? Why stock transfer item category is not captured.

Regards,

Tj

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Tj,

Fiori Approve Requests app can also handle workitems.

Regards, Masa

SAP Customer Experience Group - CEG

Former Member
0 Kudos

this is by design of the App because if you check the online Help Documentation for the App it will clear tell you kind of PO Item Category types it supports i.e Material , Service and LIMIT.

you can do an implicit enhancement and change this method if you like in this class and comment that IF condition. again i do not know your requirement but this is just an option.

thanks

Ashish

trusadi
Participant
0 Kudos

Hi Ashish,

Thanks for your reply.

I think I missed out the online Help documentation.

Actually the requirement is to display the PO stock transfer item in the FIORI. Which, according to the online help is not supported.

Anyway, I have tried like what you said, to put the implicit enhancement spot in that method, but when i tried it, I only can put my logic at the beginning and at the end of the method, which is not enough for me.

So, i guess i just need to change std sap program. I will get an access key for it, and then change it right away.

Thanks again Ashish.

trusadi
Participant
0 Kudos

Hi Masa,

Thanks.

I will check if that document can cover also PO approval.

Regards,

Tj

Former Member
0 Kudos

You can do the IMPLICIT enhancement such that it will OVERRIDE the full method and insert logic in the middle too. it is possible and I have done that several times and it works.

Please check ENHANCE tool menu from top and see all the options.

thansk

Ashish

trusadi
Participant
0 Kudos

Hi Ashish,

Thanks.

I will try that one.

Regards,

Tj

suraj_pabbathi2
Participant
0 Kudos

Hi,

Can you please let us know what is the purchase requisition workflow that needs to be activated?

Thanks,
Suraj Pabbathi

trusadi
Participant
trusadi
Participant
0 Kudos

In addition to this, in our system, the component GBAPP002 already at level 6.