cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Custom Field to Shopping Cart and PO, Classic Scenario

Former Member
0 Kudos

We are running SRM 7.0 with ECC 6.0 as the backend and using the Classic scenario. I want to add a custom field to the shopping cart and have the data transfer over to a custom field (of the same name) on the purchase order to the ECC side. I have already added the field to the shopping cart and have the data saving successfully there on the SRM side. What I am having trouble with is getting the data from the custom field to go over to ECC on the purchase order.

I have extended the Shopping Cart and Purchase Order item structures through configuration on SRM. This has added the fields to the INCL_EEW_PD_ITEM_CSF_SC and INCL_EEW_PD_ITEM_CSF_PO structures, as described in note 672960 (do i need to extend the PO structure on SRM if using the Classic scenario?). I have also extended the CI_EKPODB and CI_EKPODBX structures on ECC as described in note 458591. So the placeholders are there.

I feel like there must be something I am missing. The OSS note 458591 suggests that just adding the fields to the needed structures will cause the data to transfer, but this does not appear to be the case.

I have an implementation of BBP_CREATE_BE_PO_NEW that I can use, but do not see where to add the data in the output parameters of that BADI. Is there a BADI I need to implement on the ECC side?

Any help in this issue would be greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Just to double check since you didn't mention it - the SC item custom field needs to be in structure INCL_EEW_PD_ITEM_CSF as well.

Former Member
0 Kudos

Hi Jay. Yes, it is in that structure as well.

The fields were added by going through SPRO and navigating to SAP Implementation Guide->SRM Supplier Relationship Management->SRM Server->Cross-Application Basic Settings->Extensions and Field Control->onfigure Customer Fields->Define Customer Fields on Item Level.

So the custom field has been added everywhere that configuration change would append it. I hope that makes sense.

Former Member
0 Kudos

So I guess I am still stuck on this. I suspect I need to add code to my BADIs, but I do not see a place in the parameter interface in BADI BBP_CREATE_BE_PO_NEW (on te SRM side) where I can put the values for my custom field. The custom field resides on the item level.

Former Member
0 Kudos

Can you please enhance

Structure BBPS_IF_BAPIEKPOC -in ECC and

Structure ZABBPS_BAPIEKPOC -in SRM

and the BAdI to fill the field in CS_PO_DOCUMENT->IT_PO_ITEMS to make the transfer.

Edited by: Chandrahasan H on Jan 4, 2011 12:27 PM

Answers (1)

Answers (1)

Former Member
0 Kudos

Dug around a little bit more and stumbled onto this article which solved it for me: [How to transfer custom fields from SRM to ECC|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20b36c12-685f-2c10-4fb4-ba2e0b969c27?quicklink=index&overridelayout=true]

In BADI BBP_CREATE_BE_PO_NEW I had to add some code to fill in the CS_PO1_DOCUMENT-EXTENSIONIN parameter table with the structure for the BAPI_TE_MEPOITEM structure on the ECC side. The tricky part is creating a string representation of that structure with the correct offset. And it isn't as easy as just counting up the number of characters in SE12. For example, looking at my BAPI_TE_MEPOITEM structure in SE12, my custom field appears to start on character 157, but in reality, I had to offset the writing of my value to character 143. I guess it depends on what types are in there.

But once that gets figured out, it works well. As long as the custom field is added correctly to the CI_EKPODB append structure (which is appended to BAPI_TE_MEPOITEM), the data gets tranferred over in the ExtensionIn table, and SAP automatically knows what to do with the data as long as you have everything in ExtensionIn aligned correctly.

Thanks for the help everyone!