‎2006 Oct 13 4:23 PM
Certain transactions allow you to "attach" objects to documents. For those that do (ex. VBO2) there is a "services for object" button on the top left of the screen.
Is there any way to use this functionality in batch? The BDC recording disables this button. Is there a BAPI/FM out there that covers the "services for object" functionality?
Thanks
Srinivas
‎2006 Oct 19 5:58 AM
You can have a look at this example.Maybe this will help you
start-of-selection.
DATA : gs_borident TYPE borident,
lv_service TYPE sgs_srvnam,
lp_no_commit TYPE sgs_cmode,
gl_service_selection TYPE tgos_sels,
lv_rwmode TYPE sgs_rwmod,
lv_pop TYPE sgs_cmode,
lv_status TYPE sgs_status,
lv_icon TYPE sgs_icon,
lv_event TYPE i.
gs_borident-objkey = '0000004057620001'.
gs_borident-objtype = 'QMSM'.
lv_rwmode = 'E'.
lv_service = 'PCATTA_CREA'.
CALL FUNCTION 'GOS_EXECUTE_SERVICE'
EXPORTING
ip_service = lv_service
is_object = gs_borident
ip_no_commit = lp_no_commit
ip_popup = lv_pop
ip_rwmod = lv_rwmode
it_service_selection = gl_service_selection
IMPORTING
ep_event = lv_event
ep_status = lv_status
ep_icon = lv_icon
EXCEPTIONS
execution_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
.
data: lv_class type ref to ZCL_FI_IMG_WF_OVERVIEW.
CREATE OBJECT lv_class.
CALL METHOD lv_class->update_service
EXPORTING
ip_status = lv_status
ip_icon = lv_icon
ip_event = lv_event.
.
‎2006 Oct 13 4:33 PM
‎2006 Oct 19 5:58 AM
You can have a look at this example.Maybe this will help you
start-of-selection.
DATA : gs_borident TYPE borident,
lv_service TYPE sgs_srvnam,
lp_no_commit TYPE sgs_cmode,
gl_service_selection TYPE tgos_sels,
lv_rwmode TYPE sgs_rwmod,
lv_pop TYPE sgs_cmode,
lv_status TYPE sgs_status,
lv_icon TYPE sgs_icon,
lv_event TYPE i.
gs_borident-objkey = '0000004057620001'.
gs_borident-objtype = 'QMSM'.
lv_rwmode = 'E'.
lv_service = 'PCATTA_CREA'.
CALL FUNCTION 'GOS_EXECUTE_SERVICE'
EXPORTING
ip_service = lv_service
is_object = gs_borident
ip_no_commit = lp_no_commit
ip_popup = lv_pop
ip_rwmod = lv_rwmode
it_service_selection = gl_service_selection
IMPORTING
ep_event = lv_event
ep_status = lv_status
ep_icon = lv_icon
EXCEPTIONS
execution_failed = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
.
data: lv_class type ref to ZCL_FI_IMG_WF_OVERVIEW.
CREATE OBJECT lv_class.
CALL METHOD lv_class->update_service
EXPORTING
ip_status = lv_status
ip_icon = lv_icon
ip_event = lv_event.
.
‎2006 Oct 19 5:22 PM
Ravi
Thank you.
Does the gs_borident-objtype field contain the object I'm trying to attach (in this case a url link) or the object I'm attaching to (in this case a rebate agreement)?
Thanks
‎2006 Oct 19 5:24 PM
‎2006 Oct 19 5:40 PM
Whoa that was fast Rich thanks!
So, in my scenario where I'm attaching a URL to a rebate agreement I think I need the following:
gs_borident-objkey = the rebate number?
gs_borident-objtype = 'BUS3031'.
lv_rwmode = 'E'.
lv_service = 'URL_CREA'.
But where do I pass the actual URL value?
Thanks
‎2006 Oct 29 9:26 AM
check this weblog for code sample.
<a href="/people/rammanohar.tiwari/blog/2006/03/25/generic-object-services-gos--in-background--part-ii">Generic object services (GOS) - in Background - Part II</a>
Regards
Raja