cancel
Showing results for 
Search instead for 
Did you mean: 

Deriving Material Code from Profit Center in CO-PA

adnan_ahmed4
Participant
0 Kudos

Hi,

Is there any way we can drive Material Code from Profit Center only ? I  have a scenario in which  certain information ( material group 1) is derived  from material master table (MARC) using material number field .However, some of the documents entered only  with profit center  and no material numbers so ' the material group 1' information could not be derived  from material master . So we need to derive material code first from profit center.

As derivation of  profit center from product code using MARC table is already in use  , I am unable to make a new table look up for vice versa. any suggestions?

Regards

Adnan

Accepted Solutions (1)

Accepted Solutions (1)

ajaycwa1981
Active Contributor
0 Kudos

Hi Adnan

Salaam

You can use a Derivation Rule (KEDR) using Derivation Method Option and Specify PRCTR in SOURCE and ARTNR in TARGET

Then click on MAINTAIN RULE VALUES and specify an ARTNR for your PRCTR.. But this can help you derive only one default Material number against a PC.. If you want to derive Material number based on some complex logic, create Derivation Rule using ENHANCEMENT and write code in exit COPA0001

Ajay M

adnan_ahmed4
Participant
0 Kudos

Thanks Ajay and Mustafa for your responses.

As I need to derive multiple materials from multiple Profit centers , Derivation rule is not serving the purpose. But before going to any other option , I would like to know if  the same table 'MARC' in  Table Lookup (KEDR ) can be used multiple times for different derivation?  In this case , I have used MARC for deriving profit center  ( PRCTR -target field ) from material number -MATNR ( source field) . Now is it possible to use the same 'MARC' table using table lookup (KEDR)  reversing the target field with  MATNR and source field PRCTR with the condition that when the MATNR is blank and PRCTR is not equal to dummy PC?

Regards

Adnan

ajaycwa1981
Active Contributor
0 Kudos

Hi Adnan

I dont think you can do this.. You cant achieve this through TABLE LOOK UP. MATNR and WERKS are the Primary Keys. PRCTR is not Primary Key of MARC. So it is ruled out

Moreover, one PRCTR may have many materials against it. Which one the system is supposed to Look up?

If you want to Default only One Material per PRCTR, then DERIVATION METHOD is your Choice. You can maintain mapping between PRCTR and ARTNR in Derivation Method (Rule Entries)

Else, User Exit is your choice

Ajay M

Former Member
0 Kudos

Hi Ajay

Thanks for correcting me.

I forgot to notice that the query was around profit center to be used as a source field to derive Material. My bad

Regards

Mustafa

adnan_ahmed4
Participant
0 Kudos

Many thanks Ajay and Mustafa for all your help.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Adnan

I would rather recommend to setup a derivation rule (KEDR) to derive Material group directly from a Profit Center.

As I assume, a profit center would involve sales transactions etc for multiple material codes i.e. Profit Center design to represent product lines, it would not be recommended to pick one out of the lot. This may distort your reports.

Further you can have multiple derivations for the same field (Material Group) in KEDR. Just ensure to maintain a condition in the new Step (Material group is blank), alongwith parameter setup to overwrite old values when new values found.

Regards Mustafa