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

GOS Problem

Former Member
0 Likes
508

Hi

i have created a GOS in my custom Transaction

now my question is in my screen 1 fieldsare there like PO

if i attach some files(5) in one PO

i would like to have 3 attachmens from the previous PO how can i get the 3 attachments

is that Possible ?

Thanks

Surendra

3 REPLIES 3
Read only

christine_evans
Active Contributor
0 Likes
473

You can get attachments from any object if you pass it the right key eg

CLEAR gt_object.
  gs_object-objkey = gs_header-doc_reference.
  gs_object-objtype = 'ZZBUSCPJ'.
  APPEND gs_object TO gt_object.

  IF g_my_object IS INITIAL.
     CREATE OBJECT g_my_object
        EXPORTING
           is_object        = gs_object
           ip_no_commit     = 'R'
        EXCEPTIONS
           object_invalid   = 1
           others           = 2.
  ENDIF.

  CALL METHOD G_MY_OBJECT->START_SERVICE_DIRECT
    EXPORTING
       IP_SERVICE = 'VIEW_ATTA'
       IS_OBJECT = gs_object
    EXCEPTIONS
       NO_OBJECT = 1
       OBJECT_INVALID = 2
       EXECUTION_FAILED = 3
       OTHERS = 4.

Read only

0 Likes
473

Hi Christine Evans ,

Thanks for ur reply

can u explain how to cary forword the attachments from one GOS to another GOS menu

Thanks in Advance

Surendra

Read only

0 Likes
473

I guess you'd need to attach the attachments to your new object using another START_SERVICE_DIRECT option - you can find these in table SGOSATTR. I've never actually tried to do this though, so no idea if it will work.