cancel
Showing results for 
Search instead for 
Did you mean: 

Change/add SC item during approval from other catalogs

Former Member
0 Kudos

Dear all

I need your help for a scenario to was already presented int the forum but the topic was dead without final answer (old topic see 😞

We are using SRM 4.0 SP9 and as well Internal as External Catalogs.

The situation step by step:

First step (EndUser Requisitioner):

We create and save shopping cart with item describe requirement (because not found in his available catalogs). He ordered it (and then SC goes to approval to a Purchaser).

Second step(Purchasing user, in approval workflow: n item or completion workflows have same way of working):

The Purchaser receives the item to approve because rule is that Purchasing reviews everything not from catalogs before other financial approvers. Then he opens the saved SC and wants to change the "existing Item" to Item from an extended list of catalogs (the Purchaser has a lot more catalogs assigned in PPOMA_BBP than initial requisitioner). He push change button as he has changes rights as his parameter BBP_WFL_SECURITY is set to HIGH.

3 issues happend:

a) he can add if he wants another item to the SC (and delete/reject the existing one), and for that he has access to catalogs (if the SC was created with Wizard BUT not if Shopping Cart was created with one step screen) but the list of catalogs is the list of the requisitioner and not his extended list (and his PPOMA_BBP CAT attributes) (as suggested by SEBE in previous forum topic)

b) If the original SC was created with one step screen the Add item subscreen is empty, why difference with Wizard?

c) but as requested by RAMI prefered solution will be to change existing line to have a catalog product i n place of the describe requirement. Otherwise he must check and copy manually all the rest of info being Company, Plant, internal note, vendor text, attachments, account assignment ...

Base on previous post and my need it seems to be a common need. Has somebody finally solved it. Rami, Sebe, others?

SOlution for problem a) will already be a big step.

Thanks very much!

RD

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi RD,

Here is the solution for the step <b>a)</b>.

When initializing the transaction with the SC data, the requestor attributes are read, and not the approver ones.

The list of catalogs is read in BBP_SC_APP_EVENT_DISPATCHER --> PERFORM sc_init --> PERFORM user_attributes_get.

FORM user_attributes_get (LBBP_SC_APPF05):

....

PERFORM catalogs_get USING iv_uname

CHANGING es_attributes-cat.

es_export-catalogs[] = es_attributes-cat[].

....

So you would have to change iv_uname by sy-uname, but only in the case of SC approval.

For this you will have to check the scenario (es_import-scenario = c_sc_man_inbox ?), and maybe change the parameters of FORM user_attributes_get to pass es_import and not only es_import-uname.

Or change the code higher, just after the PERFORM user_attributes_get to override es_export-catalogs.

Rgds

Christophe

PS: please reward points for helpfull answers

Former Member
0 Kudos

Thanks

a)In summary not standard functionality or BADI to have the approver catalogs. Will see if really needed then as we don't like code modifications.

b) Solved myself. In fact the Add item is empty but there is a button to expand. I just discovered.

c) remains open.

RD

Former Member
0 Kudos

Hi RD,

for C) one of the still opened requirements is to use the catalog as a SOS. I mean in the purchaser Sourcing Cockpit. So the purchaser can assign a source of supply from a catalog item, and not only from contract, PIR, VL...

In that case, I guess that the SC item would be completed with catalog item.

This functionnality could be reused in the purchaser completion WF.

It could be realized in next SRM release.

But now, the only solution is to develop it by yourself.

You would have to start from the std catalog call, but instead off using Ok-Code ADDI, use a custom Z okcode, and keep the target SC item GUID (the catalog link should be available from each SC item, otherwise the system won't know which SC item to update).

To summarize the logic:

- call the catalog with a custom Ok-code and pass the SC item GUID in the HookURL

- process this custom ok-code back from the catalog, so you update selected item instead of adding a new one.

Rgds

Christophe