Categorising Company Codes & then posting the amount in GL Accounts
We are having a set of company codes stored into a table. Earlier we were taking the total expenses for all the company codes & were crediting into one account & were debiting into respective company code books thru BDC and the values for company codes were being taken from the table.
Now the group of Company Codes is divided into three categories. Total expenses for one category of Company codes will be posted to one account, for second category into second account & third category into third account.
So, plz tell me how the this different groups the BDC will take from the table & then how the loop will go for debiting the amount in the respective books of company code.