09-25-2008 2:34 PM
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
09-25-2008 5:17 PM
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
09-25-2008 5:17 PM
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
09-26-2008 10:28 AM
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 .
09-26-2008 10:45 AM
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
09-26-2008 11:19 AM
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 .
09-26-2008 11:20 AM
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 .
09-26-2008 12:54 PM
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
09-27-2008 6:36 AM
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
09-27-2008 8:56 AM
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