cancel
Showing results for 
Search instead for 
Did you mean: 

Derive business unit from billing doc

Former Member
0 Kudos

Hi all,

I am trying to derive the business unit (VBRK-BZIRK) from the billing document instead of the customer master data.

For that purpose, I added the charachteristic "billing document" (WWBD) and then I create a derivation rule of type 'table lookup' with the following parameters:

source:

VBRK VBELN Billing Document = CO-PA WWBD Billing Document

Assignment of table fields to target fields:

VBRK BZIRK Business Unit = CO-PA BZIRK Business Unit

on the condition tab I added the range of sales organizations for which this derivation needsto be active:

CO-PA VKORG Sales Organization >= 6000

CO-PA VKORG Sales Organization <= 8000

When I test it in KEDR by entering, customer, sales org, billing document, is is working OK, but when I do an actual by creating a billing document, the derivation is not working.

Does anyone know why this derivation is not working?

And also, is there a way to analyze the actual derivation (not the test run in KEDR)?

Thanks,

Yoel.

Accepted Solutions (1)

Accepted Solutions (1)

ajaycwa1981
Active Contributor
0 Kudos

Hi

Ask your abap consultant to define the maintenance view.. am not very familiar with it

Once you do settings in TKEZU, it should click

br, Ajay M

Former Member
0 Kudos

Hi Ajay,

I finally got some ABAP help and was able to add an entry in table TKEZU using view V_TKEZU:

Char. BTran Table Field Name

WWBD KEDR KOMK BELNR

Now, when I try to create the derivation rule with type table lookup I face another problem: in the 'source fields' section I

am required to enter the operating concern (TKEZU-ERKRS), the field name (TKEZU-MERKMAL) and the business transaction (TKEZU-VRGNG), but when I enter the parameters (i.e. TKEZU-ERKRS=US10, TKEZU-MERKMAL=WWBD

and TKEZU-VRGNG=KEDR) I get an error "Enter a valid source field. The field US10 is not a permitted source field" (message no. K/018).

When I try to select values from the list (F4), I can only select out

of the carachteristic names available in the system.

Why am I not getting on the drop down list the real values for the table fields?

Thanks,

Yoel.

ajaycwa1981
Active Contributor
0 Kudos

Hi,

I think you should use VBRK or VBRP table...

br, Ajay M

Former Member
0 Kudos

Ajay,

It's not working with VBRK. That was my initial try, but as you pointed out billing doc. will not be available in VBRK at point of derivation/billing.

It would be great you could instruct me on how to get the business unit derived from the billing document as I am in a dead end right now.

Thanks,

Yoel.

ajaycwa1981
Active Contributor
0 Kudos

Hi

Please post a doc w/o maintaining any derivation rule to derive Billing Unit

Just see if the Billing doc no is populated WWBD Char that you assigned in TKEZU... Based on that we can take it further

br, Ajay M

Former Member
0 Kudos

Ajay,

Thanks a lot for your support.

Once I added an entry in TKEZU:

BZIRK-KEDR =KOMK-BZIRK

The business unit from the billing doc. was used for KEDR-BZIRK.

Issue is closed.

Cheers,

Yoel.

Answers (1)

Answers (1)

ajaycwa1981
Active Contributor
0 Kudos

Hi

The only way to transfer billing document number directly to corresponding CO-PA characteristic is an assignment in table TKEZU.

At the point of the billing documents creation (when the profitability segment gets determined) only structures KOMP/KOMK will be provided by SD; so you need to assign the desired KOMP/KOMK-field to the corresponding CO-PA characteristic in table TKEZU. TKEZU can be maintained with SM30.

In your case in think it will be KOMK-BELNR

br, Ajay M

Former Member
0 Kudos

Ajay,

Thanks you for your reply, I understand what you are suggesting.When trying to maintain TKEZU in SM 30 I get message 'TKEZU' and when I try to follow 'Generate the required maintenance dialog' I reach SE54. I tick the 'generated objects' option ant try to create but I am asked to provide function group - do you know how to pass this step and enable maintenance of TKEZU?

Thanks,

Yoel.