Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Purchase group

Former Member
0 Kudos

hai friends,

i have a secnario like , based on the company code to get list of purchase groups. please help me to get this or any bapi is there .. pls help me.

Regards,

selvamuthukumar.N

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Selva,

You have Company code ( BUKRS) and Purchasing Group (EKGRP) in table EKKO.

So you can select EKGRP for value of BUKRS.

DATA : BEGIN OF I_EKKO OCCURS 0,

BUKRS LIKE EKKO-BUKRS,

EKGRP LIKE EKKO-EKGRP,

END OF I_EKKO.

PARAMETERS : P_BUKRS LIKE EKKO-BUKRS.

SELECT BUKRS EKGRP

INTO TABLE I_EKKO

WHERE BUKRS = P_BUKRS. "company code

Regards,

Jyothi

8 REPLIES 8

Former Member
0 Kudos

Hi Selva,

You have Company code ( BUKRS) and Purchasing Group (EKGRP) in table EKKO.

So you can select EKGRP for value of BUKRS.

DATA : BEGIN OF I_EKKO OCCURS 0,

BUKRS LIKE EKKO-BUKRS,

EKGRP LIKE EKKO-EKGRP,

END OF I_EKKO.

PARAMETERS : P_BUKRS LIKE EKKO-BUKRS.

SELECT BUKRS EKGRP

INTO TABLE I_EKKO

WHERE BUKRS = P_BUKRS. "company code

Regards,

Jyothi

0 Kudos

hi jyothi,

Thanks for your response. Your answer was really helpful

But my concern is : If any transaction made then only i will have certain records in the EKKO table right ?

suppose i didn't have any transactions , so my EKKO table will be empty.

now i wanted to relate my purchase group to the company code

i.e. ( the purchase group which is given by the user ....needs to be checked as valid against the company code ...)

Please suggest how can i establish this relationship.

Further example :

my user is giving purchase group as : zpg001.

after getting the value i need to check with my company code : Zc001.

Please help by giving spontaneous answer.

Once again thanks .

0 Kudos

Hi,

I think purchasing group is not relate to any specific company code. So every company code could use all purchasing group.

Regards,

Teddy Kurniawan

0 Kudos

hi jyothi,

Thanks for your response. Your answer was really helpful

But my concern is : If any transaction made then only i will have certain records in the EKKO table right ?

suppose i didn't have any transactions , so my EKKO table will be empty.

now i wanted to relate my purchase group to the company code

i.e. ( the purchase group which is given by the user ....needs to be checked as valid against the company code ...)

Please suggest how can i establish this relationship.

Further example :

my user is giving purchase group as : zpg001.

after getting the value i need to check with my company code : Zc001.

Please help by giving spontaneous answer.

Once again thanks .

0 Kudos

hi jyothi,

Thanks for your response. Your answer was really helpful

But my concern is : If any transaction made then only i will have certain records in the EKKO table right ?

suppose i didn't have any transactions , so my EKKO table will be empty.

now i wanted to relate my purchase group to the company code

i.e. ( the purchase group which is given by the user ....needs to be checked as valid against the company code ...)

Please suggest how can i establish this relationship.

Further example :

my user is giving purchase group as : zpg001.

after getting the value i need to check with my company code : Zc001.

Please help by giving spontaneous answer.

Once again thanks .

0 Kudos

Hi Selva,

I tried to look for this. But unfortunatley there is no such relation ebtween Company Code and Purchasing Group by which we can validate them against each other.

You can only validate whether a value enters as Purchase Group or Company ocde is valid or not.

You have check tables for that.

Check table for Company code is T001.

Check table for Purchasing Group is T024.

Regards,

Jyothi

0 Kudos

hi jyothi

thanks for reply. ur suggestion is very help to me.can u pls tell me about the planning currency, controlling area currency and legal currency where it is defined

and i have to check these values against the company code whether the give currency is vaild or not. pls help me.

Regards,

selvamuthukumar.N

0 Kudos

Hi Selva,

I do not know about Planning currency and Legal currency. You must discuss it with your Functional Consultant and get an idea in which scenario these currencies are used.

If you can get the exact tables for Planning and Legal requirements, we can check if it is possible to draw relation between Company code.

Regarding Contorlling Area currency,

Go to table BSEG and get the Controlling Area ( KOKRS) corresponding to Company code - BUKRS.

Now use the Controlling area( KOKRS) and get the Controlling Area Currency (WAERS) from table TKA01.

Regards,

Jyothi