2008 Aug 19 8:25 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.
please help
Regards
Sathya.S
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.
please help
Regards
Sathya.S
2008 Aug 20 5:42 AM
2008 Aug 25 12:14 PM
2008 Aug 25 12:37 PM
Hi,
Try creating the object with ip_no_commit = space.
Furthermore, try using calling the method start_service_direct with PCATTA_CREA.
Hope it helps.
regards,
Bert
2008 Aug 26 8:03 AM
Hi Bert,
Thanks a lot for your reply. I tried giving the ip_no_commit = ' ' while creating object. but then iam getting the same short dump.
Any idea why iam getting the short dump while using the Create_atta in that method.
Thanks
Sathya.S
2009 Sep 17 12:34 AM
'CREATE_ATTA' is the problem in the method call, use 'PCATTA_CREA' as IP_SERVICE
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 ).
2016 Apr 06 9:47 PM
Hi Jaimes Martín:
Your reply IS STILL usefull after 7 years!!
Thanks a lot!
2020 Feb 19 4:08 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |