Whenever a cost center is created via an Idoc the corresponding entry is not maintained in CDHDR table.
Whereas if I use Tcode ks01 to create Cost Center (ie via screen) then there is an entry to CDHDR table.
I tried debugging the FM IDOC_INPUT_COSTCENTER .
Here in PERFORM write_ale_cp_via_cd tables LT_CSKS,
there is a call to CALL FUNCTION 'IDOC_CD_WRITE_CHECK,
here ld_active is always initial.
If I set this as X while debugging then I do have my entry in CDHDR table.
Can anyone let me know the significance of this ld_active and why is it not set to X initially.
As it is important for me to have entry in CDHDR because I need to trigger an event as a cost center is added.