03-11-2013 10:31 AM
Hi Experts,
how to attach the HTML document dynamically for the respective BKPF documents in FB03.
Regards,
Gurunath Kumar D
03-12-2013 12:09 PM
Hi Guru,
For attaching a BKPF document which is .htm file, you need to follow the below steps
1. From Presentation Sever - Upload the file into an internal table of type soli in binary format
2. Application Server : Read the file in String format and convert the string format data to Xstring and then from XString to Binary format.
Use FM SO_OBJECT_INSERT - You need to pass the below parameters to it
CALL FUNCTION 'SO_OBJECT_INSERT'
EXPORTING
folder_id = l_fol_id
object_hd_change = x_obj_data
object_type = c_ext
owner = sy-uname
IMPORTING
object_id = x_object_id
TABLES
objcont = i_bin_data
objhead = i_objhead
EXCEPTIONS
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
dl_name_exist = 4
folder_not_exist = 5
folder_no_authorization = 6
object_type_not_exist = 7
operation_no_authorization = 8
owner_not_exist = 9
parameter_error = 10
substitute_not_active = 11
substitute_not_defined = 12
system_failure = 13
x_error = 14
OTHERS = 15.
Please let me know if you need any other information on this.
Regards,
Mohammed
03-12-2013 12:09 PM
Hi Guru,
For attaching a BKPF document which is .htm file, you need to follow the below steps
1. From Presentation Sever - Upload the file into an internal table of type soli in binary format
2. Application Server : Read the file in String format and convert the string format data to Xstring and then from XString to Binary format.
Use FM SO_OBJECT_INSERT - You need to pass the below parameters to it
CALL FUNCTION 'SO_OBJECT_INSERT'
EXPORTING
folder_id = l_fol_id
object_hd_change = x_obj_data
object_type = c_ext
owner = sy-uname
IMPORTING
object_id = x_object_id
TABLES
objcont = i_bin_data
objhead = i_objhead
EXCEPTIONS
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
dl_name_exist = 4
folder_not_exist = 5
folder_no_authorization = 6
object_type_not_exist = 7
operation_no_authorization = 8
owner_not_exist = 9
parameter_error = 10
substitute_not_active = 11
substitute_not_defined = 12
system_failure = 13
x_error = 14
OTHERS = 15.
Please let me know if you need any other information on this.
Regards,
Mohammed
03-13-2013 9:45 AM