Skip to Content
1
Jul 07, 2015 at 10:55 AM

fm SO_OBJECT_INSERT: filename is empty

1606 Views

Hello!

I use fm SO_OBJECT_INSERT to store an attachment to an infotype record. Attachment is created sucessfully, but when I open the infotype record in PA30 I see the created attachment with empty filename:

If i create an attachment directly in PA30 using GOS the filename I get is not empty.

This is a code fragment containing fm call.

DATA ls_folder_id TYPE soobjinfi1-object_id.

DATA ls_folder TYPE soodk.

DATA lt_head TYPE TABLE OF soli.

DATA ls_obj_data TYPE sood1.

DATA ls_obj_id TYPE soodk.

CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'

EXPORTING

region = 'B' "#EC NOTEXT

IMPORTING

folder_id = ls_folder

EXCEPTIONS

OTHERS = 1.

ls_folder_id = ls_folder.

ls_obj_data-objsns = 'O'.

ls_obj_data-objla = sy-langu.

ls_obj_data-objdes = ls_obj_data-objnam = 'MyFile.pdf'.

ls_obj_data-file_ext = 'pdf'.

ls_obj_data-objlen = iv_size. //is provided, not empty

CALL FUNCTION 'SO_OBJECT_INSERT'

EXPORTING

folder_id = ls_folder_id

object_hd_change = ls_obj_data

object_type = 'EXT'

IMPORTING

object_id = ls_obj_id

TABLES

objcont = it_cont //is provided, not empty

objhead = lt_head //is empty

EXCEPTIONS

OTHERS = 1.



Has anyone faced this issue yet?

Thanks in advance.




Attachments

file.jpg (41.5 kB)