01-29-2008 2:25 PM
Hello,
I have added the GOS object to my transaction by the following ABAP code:
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STAT_0100'.
SET TITLEBAR 'START'.
IF lo_atb_gos is initial.
ls_object-objtype = 'BUS2105'.
ls_object-objkey = ''.
create OBJECT lo_atb_gos
exporting is_object = ls_object
ip_no_instance = 'X'
IP_NO_COMMIT = 'R'
exceptions
others = 1.
ELSE.
CALL METHOD LO_ATB_GOS->GET_CONTEXT_MENU
.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
Buth when I add an attachment with the men "Create  Create attachment list" I'm able to add documents so far I could see. If I return to the GOS object the menu option "Attachment list" is not enabled.
Could any one explain why?
Many thanks,
Richard Meijn
01-29-2008 2:37 PM
01-29-2008 2:36 PM
Hi,
You need the Objkey which creating attachments. Here in your code objkey is blank. Binary attachments are created on the basis of objkey.
The instid_b in table srgbtbrel is linked with instid_a (SAP office folder linked with your object key)
Like :For example -->
FOL27000000000004EXT31000000000030 to objkey 0000102011
Please check this code
refresh : i_services. clear : i_services, i_service.
select * from sgosattr where name ne 'VIEW_ATTA'
and name ne 'PCATTA_CREA'.
i_service-sign = 'E'.
i_service-option = c_eq.
i_service-low = sgosattr-name.
append i_service to i_services.
*
endselect.
i_borident-objtype = 'Y_ATTA'.
i_borident-objkey = yatthdr-docno.
create object gos_manager
exporting
is_object = i_borident
it_service_selection = i_services
ip_no_commit = ' '
exceptions
object_invalid = 1.
a®s
Edited by: a®s on Jan 29, 2008 9:42 AM
01-29-2008 2:37 PM
01-29-2008 3:53 PM
The reason why I left the objkey blank is that I fill in first the hole screen with values from the user and then put the values to a BAPI which creates the document form me. When the user saves the data the data is stored and the screen is closed.
Thats why,
If I need an objkey I have to see if there is an other way to get the proper objkey.
I'm creating a purchase requisition.
Kind regards,
Richard