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

Custom GOS attachments refreshment

Former Member
0 Likes
1,130

Hi,

I have a custom transaction where in it has a custom GOS Object. URL attachments are maintained in that GOS object, which is working very fine but there is refreshment delay onto the attachments screen.The generated URL attachment does'nt appear immediately,it appears once you trigger the refresh button(%ATTA_REFRESH).So for that i need to incorporate the refresh functionality.

I could able to see the standard SAP process, which uses the method "REFRESH" of "CL_GOS_ATTACHMENTS" ,but as the the importing parameter which is used with nested refrerences, where in im facing the issue.

I have tried with some combinations but finally landed up with short dumps with Null reference.

Same method is also exisitng in another class where in i guess this functionality can be handeled CL_GOS_ATTACHMENT_LIST->REFRESH, which does'nt have any importing parameters. So this needs to be maintained with the references of the object.Prior to calling the method refresh i guess we need to call get_selected_objects method.

Can you guys let me know how can i pass the parameters to the method Refresh.

CL_GOS_ATTACHMENT->REFRESH

Thanks

KV

4 REPLIES 4
Read only

former_member156446
Active Contributor
0 Likes
815

Hope this link will help you [click>>>|http://help-abap.blogspot.com/2008/09/tutorials.html#GOS]

Read only

0 Likes
815

If you have created your GOS object. The Object which creates the ulr needs to raise the event:

     
RAISE EVENT service_succeeded
      EXPORTING eo_service = me.

The gos object which shows the urls needs to react on the

ON_SERVICE_SUCCEEDED event:


* ...
  DATA lo_document_create TYPE REF TO your gos object which creates the URL
  DATA lp_status TYPE sgs_status.

**
  CATCH SYSTEM-EXCEPTIONS move_cast_error = 1.
    lo_document_create ?= eo_service.
  ENDCATCH.

  IF sy-subrc = 0.
* what ever you need to execute the refresh
  ENDIF.

I assume this is what you ask?

Read only

0 Likes
815

Thanks for your response,im sorry i could 'nt understand what you are saying.

Well either it is a custom GOS or standard GOS you have got your attachments the refresh action is going to be same.Bu in my case for my custom GOS it is not happening automatically.So i want to incorporate the refresh action so that i can see my newly created attachments.

Once you view our attachments thru attachment list the newly created attachmnet(URL attachment) is not displayed immediately.So to display the new URL attachment i need to go ahead with Refresh button, which refreshes the documents.

So to implement that functionality i need call CL_GOS_ATTACHMENTS->REFRESH.

I'm facing difficulty in passing the parameters so let me know if you have any idea of passing the parameters to the method REFRESH of class CL_GOS_ATTACHMENTS.

Thanks

KV

Read only

naimesh_patel
Active Contributor
0 Likes
815

It looks like you some problem with your IP_NO_COMMIT parameter.

When you don't pass the IP_NO_COMMIT, it defaults to "X" which means commit work would be done by the application program.

When you pass "R", system attaches the document in the RFC FM. So, when you first time check the Attachment List, you don't see this new document. But, when you do the refresh, system would find the attached document. In this case, when you attach the attachment, you don't get the message "The Attachment was successfully created". For other options, you would see this message.

Regards,

Naimesh Patel