on 11-26-2015 12:13 PM
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.
Hi Arun,
is the Parameter phio_fsize really set to 2400? it Needs to have the exact file length in Byte. If that is not the issue I would recommend to save the Content of LT_CONTENT[] to a local file and see if the file is corrupted as well. If yes I would concentrate on the Coding that populates LT_CONTENT[].
Regards
Oliver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arun .
Could you please trying opening the attachements at SC level and see whether they are corrupted or not ?
if they not getting corrupted then probably in while creating PO ( Change Badi ) we can fetch SC attachments and pass it to PO.
Let me know if this works.
Regards,
Binay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.