‎2008 May 08 8:49 AM
Hi Friends
I am trying to create attachments for a business object from custom program.
I have create attachment and view attachments list push buttions on the screen.
when I try to create attachment, program dumps with message 'SET_HANDLER_HOBJ_NULL'
but it is working fiew with view attachments.
Please let me know if any of you have idea on this!
Here is my code:
CREATE OBJECT MANAGER
EXPORTING
IP_NO_COMMIT = 'R'
EXCEPTIONS OTHERS = 1.
ENDIF.
OBJ-OBJTYPE = 'VBRK'.
OBJ-OBJKEY = '1233454545'
WHEN 'ATTACH'. " when create attachments button is pressed
CALL METHOD MANAGER->START_SERVICE_DIRECT
EXPORTING
IP_SERVICE = 'CREATE_ATTA'
IS_OBJECT = OBJ
EXCEPTIONS
NO_OBJECT = 1
OBJECT_INVALID = 2
EXECUTION_FAILED = 3
OTHERS = 4.
WHEN 'LIST' . " When list attachments button is pressed
CALL METHOD MANAGER->START_SERVICE_DIRECT
EXPORTING
IP_SERVICE = 'VIEW_ATTA'
IS_OBJECT = OBJ
EXCEPTIONS
NO_OBJECT = 1
OBJECT_INVALID = 2
EXECUTION_FAILED = 3
OTHERS = 4.
Regards
‎2008 May 08 9:18 AM
‎2008 Aug 19 8:14 AM
can anyone help me how is problem can be resolved
Thanks in advance
‎2009 Sep 17 12:19 AM
‎2009 Sep 17 12:32 AM
Found in another thread: Use 'PCATTA_CREA' as IP_SERVICE
CALL METHOD manager->start_service_direct(
EXPORTING
ip_service = 'PCATTA_CREA'
is_object = borident
EXCEPTIONS
no_object = 1
object_invalid = 2
execution_failed = 3
OTHERS = 4 ).