cancel
Showing results for 
Search instead for 
Did you mean: 

Plant & Purchasing Group update using program in Shopping Cart

0 Kudos

Hello All,

I'm presently working on a customer requirement, where each shopping cart will contain some 200-500 items. So asking user to select plant & purchasing group(if its different than default from attributes) is a painful exercise for users.

So we are asking user to input the plant & purchasing group in first item of shopping cart and execute a Z program, in which user inputs shopping cart number and Z program copies from first item certain data i.e.(plant, purchasing group & some customer defined fields) to all other items of shopping cart.

I could do the needful of copying data, but for these 2 fields i.e. plant & purchasing group, though data is changed and saved in database but not getting reflected on ITS.

Can anyone help me with some code to update plant & purchasing group or how to refresh the ITS screen with new values of database.

Thanks in advance !!!

regards,

vishal gupta

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Kudos

Hi Yann,

Reason for not doing it through BADI is that we want the control to be left with users. What i mean with this is, that this functionality is not to be used for all shopping carts created in the system. So we wanted a Z program, that only for users who require this functionality, this program authority will be given to them only. Doing it through BADI, we'll face these kind of problems.

But still i tried doing it with BADI also initially, by changing BE_PLANT in it_item (all items) and then moving it to et_item. It didnt work that way also or maybe some other way to handle it. Any ideas even how to do it BADI ?

regards

vishal

Former Member
0 Kudos

Be careful Vishal,

The data to change is not BE_PLANT: plant (since EBP 4.0) and purch org are partners on the SC, not simple fields.

In all BBP documents functions modules you'll find the partner table with the data you're interrested in.

Regards.

Vadim

Former Member
0 Kudos

Hello Vishal,

Instead doing it in 2 steps (Shop and then Z report), why don't you modify the standard Shop transaction and add a new button "copy Plant & Purch group" at line level in item overview (for example just above the "copy item" button).

Link a custom OKCODE to your button and process it like standard ones: mass update off all items:

- purch group (SRM org ID + item BE_PURCH...)

- plant (SRM item partner + item BE_PLANT).

Rgds

Christophe

yann_bouillut
Active Contributor
0 Kudos

Hi Visha,

Why not doing it through BADI ?

regards,

Yann

0 Kudos

Thanks Yann & Vadim.

First not doing in BBP_DOC_CHANGE_BADI.

Secondly cant use default settings, as shopping cart creation will not happen in 1 go, i.e, users will add some items, hold shopping cart and then add some more items, hold and this will happen multiple times. Can take days for shopping cart and thus default settings have to be maintained by users everytime after login.

Additionally not directly updating the database, using FM BBP_ITEMLIST_DB_UPDATE to do the database update.

Is there any other way out ???

regards,

vishal

Former Member
0 Kudos

Hi Vishal,

First of all, why don't you ask the users to use the 'default settings' functiuon which allows them to specify default values for these data ?

About your specific program: DO NOT CHANGE THE DATA DIRECTLY IN THE DATABASE TABLES, use Function modules instead.

Regards.

Vadim

yann_bouillut
Active Contributor
0 Kudos

Hi Vishal,

Are you using BBP_DOC_CHANGE BADI to do your plant and purchasing groups ?

Regards,

Yann