Hello Vadim,
Ist my mistake. In running it again and again I got confused and coppied wrong code above but I tried
*FOR %COMP%=%COMPANY_CODE_SET%
*RUNALLOCATION
*FACTOR = 1
*DIM COST_CENTER WHAT=CC_NONE; WHERE=[COMP_CODE]="%COMP%"
*ENDALLOCATION
*NEXT
In UJKT the Portion of log looked like:
*XDIM_MEMBERSET COST_CENTER = CC_NONE
*XDIM_MEMBERSET COMPANY_CODE = 1005,1040
*RUNALLOCATION
*FACTOR = 1
*DIM COST_CENTER WHAT=CC_NONE; WHERE=[COMP_CODE]="1005"
*ENDALLOCATION
*RUNALLOCATION
*FACTOR = 1
*DIM COST_CENTER WHAT=CC_NONE; WHERE=[COMP_CODE]="1040"
*ENDALLOCATION
For all the cost Center it created entry with both the Company codes though it should have been only for either..
I tried couple of more things. But nothing worked out. I am not sure but I Need to move this to ABAP.