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

Problem with FM GOS_EXECUTE_SERVICE

Former Member
0 Likes
4,202

Hi,

we use this FM under 4.6C and there are no Problem.

Now we have changed to ECC6 and this FM doesn't work with

'CREATE_ATT'. If we use it with VIEW_ATT, there are no Problems.

Here my FM-Call

CALL FUNCTION 'GOS_EXECUTE_SERVICE'

EXPORTING

IP_SERVICE = 'CREATE_ATTA'

IS_OBJECT = IS_OBJECT

IP_NO_COMMIT = ' '

IP_POPUP = ' '

  • IMPORTING

  • EP_EVENT =

  • EP_STATUS =

  • EP_ICON =

EXCEPTIONS

EXECUTION_FAILED = 1

OTHERS = 2.

Any new CALL or other FM or CL..?

Regards, Dieter

Message was edited by:

Dieter Gröhn

5 REPLIES 5
Read only

michael-john_turner
Active Participant
0 Likes
2,076

I haven't used them myself, but there are a number of CL_GOS* classes that can probably do what you want. Take a look at CL_GOS_SRV_ATTACHMENT_CREATE in particular.

MJ

Read only

0 Likes
2,076

Hi Michael-John,

thanks for your Answer. I use CL_GOS_SRV_ATTACHMENT_CREATE

and i get the dialog to attach a file. It makes the upload. But how can i

attach it to my BUS2080 Object.

I have tried it with ->SET_OBJECT but it doesn't work.

Any Idea??

Regards, Dieter

Read only

former_member194669
Active Contributor
0 Likes
2,076

Hi,

Instead of call function module, you can do like this.

select * from sgosattr where name ne 'VIEW_ATTA'

and name ne 'PCATTA_CREA'.

i_service-sign = 'E'.

i_service-option = c_eq. " EQ

i_service-low = sgosattr-name.

append i_service to i_services.

endselect.

i_borident-objtype = 'BUS2080 '.

i_borident-objkey = v_docno.

create object gos_manager

exporting

is_object = i_borident

it_service_selection = i_services

ip_no_commit = ' '

exceptions

object_invalid = 1.

Thanks

aRs

Read only

0 Likes
2,076

Hi ars,

thanks for your answer.

It solved my problem not directly but you give me

an idea to search in this forum for PCATTA_CREA and i find a solution (thanks to Andrei Chapovalov).

This is like this:

DATA: MY_OBJECT TYPE REF TO CL_GOS_MANAGER,

LS_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,

LS_OBJECT TYPE BORIDENT OCCURS 0 WITH HEADER LINE.

CREATE OBJECT MY_OBJECT.

LS_OBJECT-OBJKEY = '000000000000'.

LS_OBJECT-OBJTYPE = 'BUS2080'.

APPEND LS_OBJECT.

CALL METHOD MY_OBJECT->START_SERVICE_DIRECT

EXPORTING

  • IP_SERVICE = 'VIEW_ATTA'

IP_SERVICE = 'PCATTA_CREA'

IS_OBJECT = LS_OBJECT

IO_CONTAINER = LS_CONTAINER.

*

break-point.

*

COMMIT WORK.

Regards, Dieter

Message was edited by:

Dieter Gröhn

Read only

0 Likes
2,076

you can also use this FM to create attachment/s

BDS_BUSINESSDOCUMENT_CREATEF

search the forum with the FM name i have earlier explained how to use the same.

Regards

Raja