""""When debugged we find that komk structure is filled with vbtyp (document category) - O than H (for returns""
Are you sure of this?
What was the Document category assigned for your Returns document type and
Credit memo Doc type in VOV8??(Why 0 normally used for master Contracts)
I think in mid of the Question you slipped to some other query?
Pl Confirm your Requirement...
Phanikumar