Issue with Flat idoc send to SAP .

Hi ,I am moving the SAP connections from Wm 6.5(SAP Adapter 4.6 ) to 8.2 (SAP adapter 7.1).The following process is done in both 6.5 and 8.21) Convert the flat idoc string using pub.sap.idoc:decodeString2) Send the idocList to SAP using pub.sap.transport.ALE:OutboundProcess.All the messages goes through successfully in 6.5.I face the following issues in 8.2 1) Unable to use the decodeSting Service for a particular idoc type . com.sap.conn.idoc.IDocRuntimeException: Unable to get metadata for CLFMAS02: SEGMENT_UNKNOWNIs there any tweaking of setting required either in wM .Checked from SAP, the particular idoc type exists and also the lookup in the adapter admin returns the idoc .2) pub.sap.transport.ALE:OutboundProcessGet the following error for the the other idocs which were successful in decodeString .Could not find matching metadata for segment E1MASTM. Could not find matching metadata for segment E1STPOM. This is due to the hierachy mismatch returned in the decodeString and the actual idoc definition in SAP.The same works in 6.5 without error .I had to map it the same format using idocToDocument and DocumentToIdoc services (requires manual mapping of segments ).I tried reset DDIC cache . It didnt work .Is there someway to tweak the settings to get the acutal document type using decodeString .Your thoughts and comments please !!