Hello Soumick,
As explained in the note 1929929 and shown in the post from Sagnik, the option to allow or not manual posting is managed at the account level.
To answer why it happens in some cases and not in other cases, please check the following :
1. What are the accounts posted in both cases ? Are they the same ?
2. Are the posting made in the same company ?
3. Is the account assignment category in the PO the same ? Is the cost object entered in the PO the same ?
4. Are the materials using the same valuation class ?
The error message is directly triggered depending on the value of the field SKB1-XINTB from the account. I suggest (as I do often) to execute the posting in debug mode. The break point should be put for the FM MEX_LESEN_SACHKONTO, after that see how the value is read from the table and the condition check done in various cases.
It might be also that there are some substitution rule in some cases (for instance based on the specifics of the cost object in the PO) and so at the moment of the posting, the G/L account is changed by another one, check possible substitution in transaction GGB1.
Cheers,
Alex