to post gen journal line with applies to no. as well

Dear All,

I need to post lines using codeunit 12 gen. jnl.-post line but i am not getting any idea how to use it. the problem that i get is about consistency. i am not getting idea about creating another balancing line of the line i have inserted in the gen. journal line. Can anyone make my concept clear in this?