cancel
Showing results for 
Search instead for 
Did you mean: 

RFx: Change Company code

RicardoRomero_1
Active Contributor
0 Kudos

Hi all,

We are creating a RFx from a SC automatically when the SC is approved. We want to transfer the SC Company Code at item level (BE_CO_CODE) to the RFx Company at header level (CO_CODE).

The problem is that the company code is being filled with the company in user's attributes.


I've debugged the standard code and I can see just before call the FM  BBP_PD_BID_CREATE ( include LBBP_DPE_INTEGRATION_SOCOF33 line 1373) is reading the user's attribute BUK and filling the field co_code with the first value of the table.


In my case the user is WF-BATCH and has several values for the attribute BUK.

I thought in change it using the badi BBP_DOC_CHANGE_BADI but I can't see the field CO_CODE in the header structure of the method.

It's possible to change it ? How? Is there any badi or Do I need to create an enhancement point in the standard code?

Thanks in advance.

Regards,

Ricardo.

Accepted Solutions (0)

Answers (2)

Answers (2)

RicardoRomero_1
Active Contributor
0 Kudos

I've just found a SAP note:

Note 1279218 - DOC_CHANGE_BADI of Bid Invitation cannot change Company Code

I'm going to implent it.

Former Member
0 Kudos

Did the note help?

Regards,

Naveen

RicardoRomero_1
Active Contributor
0 Kudos

Yes, It's working fine.

former_member208244
Active Participant
0 Kudos

Hello Ricardo,

To do that, try using metadata class and methods provided by SRM standard to change the functionality of the field. You can make it gets completed by your own logic.

You can find it in Supplier Relationship Management - SRM Server - Cross application basic settings - Extensions and field controls. In this tree you can manage fields functionality one by one with his own logic.

Kind Regards,

Sebastián

RicardoRomero_1
Active Contributor
0 Kudos

Hi Sebastian,

Thanks for answer.

Metadata classes are for change the visibility of the field... I don't want to put the field in editable mode.

What I want is change the field CO_CODE automatically when the RFx is created and in a transparent way to the user.

Regards,

former_member208244
Active Participant
0 Kudos

Hello Ricardo,

Sorry for the wrong answer, I interpreted your question worngly.

Can you tell me the main reason of transfer Item Level Company Code to Header Level invisible Company Code in the RFx?

I remember that we had a similar requirement a time ago, and we created a metadata field at header level and only if all item level company codes were the same it gets populated.

In that case no follow-on document logic used that field.

Is that your business case?

Regards,

Sebastián

RicardoRomero_1
Active Contributor
0 Kudos

Hi Sebastian,

This is not my business case.

In our scenario the company codes in the SC must be the same in all the items,  so we need to read the first item, read the field BE_CO_CODE and transfer it to the field CO_CODE at RFx header level.

Former Member
0 Kudos

Hi Ricardo,

There is a CO_CODE field at the RFX header field in the doc change badi of Bid

Please find attached the screenshot.

Maybe I didnt understand you correctly. I got this screenshot directly while creating and RFX

are you saying that when you create an rfx from Sourcing via SC, the structure is different?

Regards,

Naveen

RicardoRomero_1
Active Contributor
0 Kudos

HI Naveen,

Thanks for answer.


The screenshot you've attached is for the Importing parameter IS_HEADEAR (type BBP_PDS_BID_HEADER_U) and there is the field CO_CODE. But in the Exporting parameter ES_HEADER (type BBPS_BID_HEADER_BADI) there isn't the field.

Regards,

Ricardo.