Hello Experts,
I have a requirement of adding attachment during SC creation. The SC is created using FM: BBP_PD_SC_UPDATE, which has the import parameter lt_attach in which i am passing the following values:
ls_attach-guid = lv_guid.
ls_attach-p_guid = ls_item-guid. "item guid
ls_attach-loio_class = 'BBP_L_DOC'.
ls_attach_kw-phio_class = 'BBP_P_DOC'.
ls_attach_kw-phio_version_no = '00000001'.
ls_attach_kw-phio_ext = 'PDF'.
ls_attach_kw-phio_fsize = '2400'. "(size)
ls_attach_kw-phio_mime = 'application/pdf'.
ls_attach_kw-phio_fname = lv_fname. "('name.pdf')
ls_attach_kw-phio_ps_mime = 'application/postscript'.
ls_attach_kw-PHIO_CONTENT[] = lt_content[].
The hexadecimal content is passed in the lt_content.
Once the SC and PO is created and ordered. When we try to open the attachment in PO, the file (PDF/doc) is not opening as it gets corrupted.
What would be the problem here, is there any other way of doing the attachment. Please assist me in solving this issue.
Thanks
Arun.