cancel
Showing results for 
Search instead for 
Did you mean: 

populate custom fields of Shopping Cart's item data

former_member204255
Participant
0 Kudos

Dear SRM Experts,

We have the requirement to add three custom fileds.

Needed entries/settings and has been made within below objects. We are able to find these fields in BBP_PDS_SC_ITEM_D meanwhile.

Customer Enhancements for Item:

INCL_EEW_PD_ITEM_CSF

Customer Enhancements for Shopping Cart Item

INCL_EEW_PD_ITEM_CSF_SC

Customer Metadata for ItemFields

/SAPSRM/V_MDF_IC

Affected WD-Component and VIew.

WD-Component:  /SAPSRM/WDC_DODC_SC_I_BD

View:                  V_DODC_SC_I_BD

In which method we write the logic to fill these custom fields now. I cannot find any table where the Shopping Cart

item data is stored to populate custom fileds.

Regards

Hakan

Accepted Solutions (1)

Accepted Solutions (1)

former_member204255
Participant
0 Kudos

Dear Community,

thank you for all your clues and hints. They were really very helpful.

I will implement WD_BADI_DOMODIFYVIEW badi for my requirement.

What's still bothering me is:

Which table is the correct one in case of appending custom fields in structure

CI_BBP_ITEM_SC and CI_BBP_ITEM instead of

INCL_EEW_PD_ITEM_CSF, INCL_EEW_PD_ITEM_CSF_SC.


Table -> BBP_PDISC for

INCL_EEW_PD_ITEM_CSF, INCL_EEW_PD_ITEM_CSF_SC


Table -> ????????? for

CI_BBP_ITEM_SC and CI_BBP_ITEM



Best Regards

Hakan

oliver_wurm
Active Participant
0 Kudos

Hi Hakan,

to extend INCL_EEW_PD_ITEM_CSF* is the "new" way of enhancing the SRM data structure. The fields are added to database table BBP_PDISC which is described as "Item Extension for Customer Fields". The "old" CI_BBP_ITEM structure is part of table BBP_PDIGP which is the Standard Item Purchasing Information.

Regards

Oliver

Answers (8)

Answers (8)

former_member204255
Participant
0 Kudos

Dear All,

than you very much again.

Best Regards

Hakan

former_member204255
Participant
0 Kudos

Dear All,

we can see our custom fields, that's not the problem.

Dynamic Disable/Enable Cuszom Fields and Control display fo custom fields works well.

I need only the information how and where (in which WebDynpro/Class/method) can I populate or assign a value to our custom fields.

LOOP AT lt_items ASSIGNING <ls_item>.

<ls_item>ZZ_CUSTOMFIELD2 = 'test'.

<ls_item>ZZ_CUSTOMFIELD3 = 'test2'.

ENDLOOP.

I cannot assign right here since the ZZ method has all parameter as import and one changing parameter (cs_metadata) which does not suit to my requirement.

Best Regards

Hakan

former_member207661
Active Participant
0 Kudos

Hi Hakan,

Please confirm in business terms what data(user input/based on some logic) you want to populate.

If you have these fields open for input on WD screen, then context mapping will do the data passing for you.

If you want to assign some values based on logic(and not from user input), then you can populate these in BBP_DOC_CHANGE_BADI.

Hope it helps.

Warm Regards,

Shyam Agrawal

former_member204255
Participant
0 Kudos

Hi Shyam,

I am talkingabout input from user, not about based on logic.

I can see these fields while creating a Shopping Cart but not on the

View:   V_DODC_SC_I_BD

AFAIK it is not necessary to create these custom fields on the view when entries/settings has been made in INCL_EEW_PD_ITEM_CSF, INCL_EEW_PD_ITEM_CSF_SC.

Regards

Hakan

laurent_burtaire
Active Contributor
0 Kudos

Hello,

do not understand your problem...


Hakan Asikoglu wrote:

(...)

I can see these fields while creating a Shopping Cart...

(...)

So, field is populated by user while creating his Shopping Cart, as written by Shyam...

Regards.

Laurent.

former_member204255
Participant
0 Kudos

Hi Laurent

I can see these fields while creating a real Shopping Cart.

-> wthin NWBC in the WEB

but cannot see on the View:   V_DODC_SC_I_BD

-> Transaction SE80 Workbench

    WD-Component:  /SAPSRM/WDC_DODC_SC_I_BD

    View:                  V_DODC_SC_I_BD

BR

Hakan

laurent_burtaire
Active Contributor
0 Kudos

Hello,

why do you want to see those CUF in view of Web Dynpro Component?

Laurent.

former_member204255
Participant
0 Kudos

Hi,

my req is:

<ls_item>ZZ_CUSTOMFIELD2 = 'test'.

<ls_item>ZZ_CUSTOMFIELD3 = 'test2'.

In which method we write the logic to fill these custom fields. Cannot find where the Shopping Cart

item data is stored to populate custom fileds.

BR

Hakan

former_member207661
Active Participant
0 Kudos

Hi Hakan,

Did you tried passing some data in these custom fields(from Portal) when creating real Shopping Cart. It will work and data will get saved in table BBP_PDISC. No need of any code for this to work.

WD Enhancement is required only when you want these fields at a particular place in WD. In that case, you need to perform below:

1) add these custom fields in Context

2) Create new field on View and map field to corresponding context-field

again, no need to write any code so far for SC screen value to be saved in DB table, until you have a specific requirement.

Warm Regards,

Shyam Agrawal

former_member207661
Active Participant
0 Kudos

Hi Hakan,

Is this done or you still facing any challenges?

Warm Regards,

Shyam Agrawal

vinita_kasliwal
Active Contributor
0 Kudos

Hi Hakan

You will not see the custom fields added in SE80 as SE80 is a standard webdynpro component view .

For the 2nd part of your answer you have to do the code changes in BBP_doc_change_badi

In Dynamic class and method in Metadata you will basically only be controlling the 4 values

Enable , Visible , Post editable , display

I hope that clarifies ?

Regards

Vinita

former_member207661
Active Participant
0 Kudos

Hi Hakan,

There is no need to write any logic for field mapping, until there is a particular logic involved.

What you need to do is in addition to steps mentioned in your query section is, do mapping with context tab-field so that data can automatically flow between tables and WDA.

Please refer last section in below thread:

http://scn.sap.com/thread/3473863

Warm Regards,

Shyam Agrawal

venkatakrishna
Active Participant
0 Kudos

Hi Hakan,

There is noting do with Webdynpro as mentioned above use Dyn. Customer Class to

control customer fields,

Refer below threads and also check standard filed methods in customization


for sample code.


Dynamic Disable/Enable Account Assignment Categ... | SCN



Control display fo custom field | SCN



Regards,

Venkat

Former Member
0 Kudos

Hello Hakan,

Did you try using the BBP_DOC_CHANGE_BADI.

Please refer to the following links (WIKI articles)

BBP_DOC_CHANGE_BADI - Supplier Relationship Management - SCN Wiki

BBP_DOC_CHANGE_BADI Change preferred vendor into assigned vendor in shopping Cart - Supplier Relatio...

Hope this helps.

Regards,

Karthik

former_member204255
Participant
0 Kudos

Hi Oliver Hi Venkat,

thank you for this hints.

One field will be getting filled through a z-search help created by me but the other two fileds

sholud populated through this way as described above by you and by Venkat.

Is it possible to get a short sample code relating to this requirement since it is a webdynpro.

Best Regards

Hakan

vinita_kasliwal
Active Contributor
0 Kudos

Hi Hakan

You should  not ideally use a webdynpro no need for it . Add the fields via config as shown below

then add your code in Metadata class and method just where you add the field ,.

Check screenshots and link below

Regards

Vinita

former_member204255
Participant
0 Kudos

Hi Vinita,

it sounds very good. Thank you very much for this helpful hint.

Especially the screenshot was very helpful. A picture is worth a thousand words:-).

I try it out and will get back to you.

Regards

Hakan

oliver_wurm
Active Participant
0 Kudos

Hi Hakan,

you have already identified the Web Dynpro Component. The method depends a bit on your requirement. If you need to populate These fields only once per execution of the SC application you can use a Post-Exit for method WDDOINIT. If you Need to re-calculate the fields depending on user Input and independently for each SC Item I would recommend a Post-Exit of method WDDOMODIFYVIEW.

Table is BBP_PDISC (as Venkat mentioned already).

Regards

Oliver

venkatakrishna
Active Participant
0 Kudos

Hi Hakan,

Tables BBP_PDHSC Header Extension for Customer Fields,

          BBP_PDISC Item Extension for Customer Fields,

No logic required to save values , just maintain customization mentioned below.

     

Regards,

Venkat