Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Short dump while creating attachments using START_SERVICE_DIRECT method

Former Member
0 Likes
647

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

4 REPLIES 4
Read only

Former Member
0 Likes
576

Solved

Read only

Former Member
0 Likes
576

can anyone help me how is problem can be resolved

Thanks in advance

Read only

b1jdm
Explorer
0 Likes
576

Please post the resolution to this issue. Thanks

Read only

0 Likes
576

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 ).