Professional Documents
Culture Documents
GOS Attachment in SAP Screen Personas
Akila Murugesan
1
GOS Attachment in SAP Screen Personas
Overview
Using Services for Object / GOS attachment functionality can be made easy using screen personas.
Generally attaching documents in GOS involves navigating through popups and menu options, this can
be avoided by using the prescribed Function Module. The given function module portrays simplifying
attachment creation and viewing for SAP PM Work Orders and can be extended to any SAP document.
var sOrder =
session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:*/ssubSUB_LEVEL:SAPLCOIH:*/subSUB_KOPF:SAPL
COIH:1102/txtCAUFVD-AUFNR").text;
oRFC.setParameter("I_BOR_INSTID", sOrder);
oRFC.setParameter("I_BOR_TYPEID", "BUS2007");
oRFC.setParameter("I_LEADING_ZEROES", 10);
oRFC.setParameter("I_MODE", 'C');
oRFC.send();
2
GOS Attachment in SAP Screen Personas
if i_leading_zeroes is not initial.
assign lv_instid(i_leading_zeroes) to <conv>.
if sy-subrc ne 0.
e_error = 'Leading 0 conversion'.
return.
endif.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = i_bor_instid
importing
output = <conv>.
else.
lv_instid = i_bor_instid.
endif.
ls_object-instid = lv_instid.
ls_object-typeid = i_bor_typeid.
ls_object-catid = 'BO'.
endfunction.
Go to transaction /personas/admin
Now click on Display/Change button to create an entry for the function module as shown below: