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.
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