sap - How to call generic object services in a report? -


enter image description here

hi,

i have repot attachment list object. want display these list. best way display it?

report zay_gos_demo.  data ls_appl_object     type gos_s_obj. data lo_gos_api         type ref cl_gos_api. data lt_attachment_list type gos_t_atta. data lt_role_filter     type gos_t_rol.  data ls_attachment   type gos_s_atta. data ls_attachm_cont type gos_s_attcont. data ls_atta_key     type gos_s_attkey.  ls_appl_object-typeid = 'kna1'. ls_appl_object-instid = '0000000001'. ls_appl_object-catid  = 'bo'. "bo - bor object "cl - persistent class  start-of-selection.  * create instance of gos api providing unique application object   try.   lo_gos_api = cl_gos_api=>create_instance( ls_appl_object ). *   attachment list object (if needed restrict selection *   adding roles filter table; initial table means: *   attachments in roles)   append cl_gos_api=>c_attachment lt_role_filter.   append cl_gos_api=>c_annotation lt_role_filter.   append cl_gos_api=>c_website lt_role_filter.   lt_attachment_list = lo_gos_api->get_atta_list( lt_role_filter ). catch cx_gos_api. *   error handling   endtry. 

i found other example , want test it:

report zay_attachment_list_display.  data: go_attachments  type ref cl_gos_attachments,   g_att_container type ref cl_gui_custom_container,   ls_object       type borident,   lo_bitem        type ref cl_sobl_bor_item.   ls_object-objtype = 'kna1'.  ls_object-objkey = '0000000001'.   if not go_attachments initial.    clear go_attachments.  endif.  create object g_att_container   exporting    container_name              = 'atts'   exceptions    cntl_error                  = 1    cntl_system_error           = 2    create_error                = 3    lifetime_error              = 4    lifetime_dynpro_dynpro_link = 5.  if sy-subrc ne 0.  *    add handling  endif.  create object lo_bitem  exporting   is_bor = ls_object.  if go_attachments initial.  create object go_attachments   exporting     io_object      = lo_bitem     ip_check_arl   = 'x'     ip_check_bds   = 'x'     io_container   = g_att_container *       is_layout      = ls_layout *       ip_mode        = wf_mode     ip_notes       = 'x'     ip_attachments = 'x'     ip_urls        = 'x'.  else.    go_attachments->set_container( g_att_container ).  endif.    go_attachments->display( ). 

i create custom control in 0100 dynrpo , name atts. still can't attachment list of gos. did miss something?

after weeks of searching , asking. simple. call function gos_attachment_list_popup


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -