cancel
Showing results for 
Search instead for 
Did you mean: 

Item-Level Worklfow ( WS14500015 )..

Former Member
0 Kudos

Hi friend,

can you please help me to figure out how to restart workflow when approved change the SC value in item level workflow 'WS14500015'. i know SAP has given OSS notes '777133' for consultants. from this OSS notes i could n't get mach help , so if you have implemented how to restart from '777133' OSS notes , please give me some idea how the table fields and how the logic going to be implement in BADI.

that will help me very lot please,

regards,

john.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

i saw lot of our guru's implemented item level workflow (WS14500015) badi with restart functionality, but no hints yet, i am thinking is there any thing did i asked wrong?..

please if you implemented item level workflow badi with restart functionality from help of OSS notes '777133' please give some hints how the table structure and example input value and where this should be implement in the badi.

sorry if i wrong.

regards,

john.

Former Member
0 Kudos

hi friends,

i have seen lot of consultants already implemented restart functionality for item level workflow (WS14500015) Badi from help of OSS notes '777133' but no one ready to help me out. please give me some hints to implement same thing.

regards,

john.

Former Member
0 Kudos

Hi John,

For restart logic, you will need to set BBP_WFL_SECURITIES in users personalization using transaction SU01. There are different values like (low, medium, high etc). Please have a look.

I will check OSS 777130 tomorrow and revert on SDN.

To find spend limits for requisitioner / or approval limit for approver, you need to read table

HRP5503. In this table, there is a field called SUBTY , If sub type = 0100 it is spend limit of requisitioner. What you can do, go to PPOMA_BBP ->Extended Attributes -> PO Values -> Enter Spend Limit / Approval limit for your user. Then go to HRP5503 and check using SE16.

One more thing, to get requisitioner or approvers organization details ( org id , object type etc),

there is a function module( can't remember its name at this moment). Search BBPorguser* in SE37. This function module is having import parameter is username and returns all organization details for user which you will require to access HRP5503.

I am attaching my method to get Spend limit for requisitioner. In my current project, there are many currencies involved, so if spend limit is not in US$, I need to convert it into US$ so don't get confused.

Hope this will help.

Warm Regards.

Pras

method GET_SPEND_LIMIT .

data: lw_subrc type subrc,

lw_hrp5503 type hrp5503.

select single limit currency from hrp5503

into (lw_hrp5503-LIMIT, lw_hrp5503-CURRENCY)

where PLVAR = PLAN

and OTYPE = OTYPE

and OBJID = OBJID

and SUBTY = '0100' "Spend Limit

and ISTAT = 1

and BEGDA <= sy-datum

and ENDDA >= sy-datum.

if sy-subrc is initial.

  • convert Spend Limit to Shopping currency (Carts always in GBP)

if lw_hrp5503-CURRENCY = CURRI.

LIMIT = lw_hrp5503-LIMIT.

else.

  • convert Spend Limit amt

me->convert_currency( EXPORTING

FROM_CURRENCY = lw_hrp5503-CURRENCY

TO_CURRENCY = CURRI

FROM_AMT = lw_hrp5503-LIMIT

DATE = DATE

TYPE_OF_RATE = RATE

IMPORTING

TO_AMT = LIMIT

RETURN = lw_subrc ).

  • if no exchange rate found, fail safe and set spend limit to 0

if lw_subrc <> 0.

LIMIT = 0.

endif.

endif.

else.

LIMIT = 0.

endif.

endmethod.

Former Member
0 Kudos

hi pras,

how are you? thank you very much, i have one more clarification,

say for example SC value is $250,000 , my spending limit is $ 1000 only. so my cart should go for value approval, value approvals are maintaining in Org unit not custom table. now i have to read all my value approvals from my Org Unit and check their approval limit and finaly i have to append value approvals those who are having approval limit is LE $ 250,000 to approval table, here my manager1 has approval limit is $3000 and Manager2 $10000 and etc , i have to read all my managers, is there any function module avaliable for read all my value approval based on my user name and Org id.

please look at that OSS notes '777133' not OSS 777130 too to fix restart workflow logic.

thank you,

regards,

john.

Former Member
0 Kudos

John,

I will send you a piece of code tomorrow to read all managers while checking their approval limits.

Will definitely look at OSS 777133 tomorrow and revert.

Regards.

Pras

Former Member
0 Kudos

hi John,

Item level workflow restarting I dont have much idea, rather i am trying to find the next level approval dynamically after each step . If SC has been changed then for the next level it will look into the BADi for the approvals.

Thats why its dynamic WF.

This workflow works very different from any other workflow in SAP. The shopping cart transaction will trigger and update the workflow containers directly when a shopping cart is ordered or changed.

If you are able to achieve restarting WF on change do let me know .

Regards,

smita

Former Member
0 Kudos

hi smita,

thank you, as per your answer can you please give me some more hints how do you find next level approval dynamically?

you mean each and every approval level, BAdi will call, say for example my SC needs to be go 5 level of approvls , in the 3rd level approval change some data let us say category from 'A' to 'B', will Badi call again and find the new approvals based on the new category?

please give me some more brief hints , that will help me very lot smita.

thank you,

regards,

john.

Former Member
0 Kudos

Hi John,

IS category is in the start condition of your WF?

you can check the category inside the code of your BADI and assign agent accordingly. Please look at the sample code of the BADI . you will have to implement BADI "BBP_WFL_APPROV_BADI" . Some sample codes are there which are talking about the item level workflow scenario.

in SE18

goto implementation-> display There you will find the sample code given by SAP.

Hope this will help,

Regards,

smita

Former Member
0 Kudos

hi smita,

thank you, your correct. i already saw that sample coding but my doubt is how to restart ( find new approval ) once approver change the shopping cart? let us say SC waiting for 3rd level approval and 3rd level approval change SC data then requester recieve change accept , once requester accepted the changes , new approval need to append the approval table based on changes made by 3rd level approval, by this time Badi will call again and find new approval?

regards,

john.

Former Member
0 Kudos

I think so you need to handle this in BADI. It will be called everytime to get the next approver list. Depending on the approval index you check you condition adn get the approver table filled.

In the approval index LE 3 you can write your logic to check the condition and get the future approvers. However I have not reached to this point in my development so far :-).

Experts please correct me if I am wrong.

Regards,

smita

Former Member
0 Kudos

hi,

how is your workflow working? because the scenario which brought into picture is common for all. say for example if any one your approval change the SC how workflow badi react , will badi call again and find the approval based on change made? will it skip that changes?

can you test this scenario and let me know how WF Badi react

regards,

john.

Answers (0)