Skip to Content
May 04, 2020 at 03:59 PM

GS_CM as pop up from GSTEXT, carrying attachments to main transaction in CRM

84 Views Last edit May 04, 2020 at 05:53 PM 2 rev


I want to open attachment as pop up window by clicking a custom button on GSTEXT and I am opening GSTEXT from service request transaction in CRM. So when I upload the attachments though GSTEXT should get uploaded in the main transaction.

- I have created a custom button on GSTEXT.

-On click event for the button, it opens the pop up for attachment. I have done component usage for GS_CM in GSTEXT and using below for pop up attachment upload.

IF reuse_popup IS NOT BOUND.
reuse_popup_var = me->comp_controller->window_manager->create_popup(
iv_interface_view_name = 'MainWindow'
iv_usage_name = 'CuAttach'
iv_title = lv_title ).

gv_cfnattach = 'X'.
reuse_popup->set_on_close_event( iv_event_name = 'ZTTACH_CLOSE' iv_view = me ).
reuse_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
reuse_popu->open('2DOCLIST'). "('2ADD_DOC').

This opens and allows to upload from local. When I click on the "upload" from the popup it goes for infinite loop it seems (CL_GS_CM_BSPWDCOMPONENT_IMPL=>SAVE) and never comes back to the component.

Please advise how can I achieve the req of attaching the files uploaded in the pop up window to the main transaction though GSTEXT.