Hello Ragavendran,
Thanks for your inputs.
Issue resolved.
I passed the form name from the program to the container and did the entire coding(OTF to Binary and Binary to XSTRING) and finally used 'SAP_WAPI_ATTACHMENT_ADD'in the method of the business object.
Regards
Akmal