07-08-2011 12:37 AM
Hi all
I am using BDS_BUSINESSDOCUMENT_CREA_URL to attach an URL link in the displayed document at ME32K.I also have tried to use create_with_url method of class cl_bds_document_set. But in both cases the url is not getting attached.
Please help me in this regard..
Thanks in advance.
Rama.
07-13-2011 12:50 PM
08-30-2011 12:45 AM
Hi Rama,
Can you please share how did you do to solve this issue?
Thanks in advance.
Balde.
08-30-2011 5:42 AM
Pass EBELN your contract number
data: is_object type borident,
folder_id type sofdk,
document_id type sofmk,
document_title type sood-objdes.
data lt_objhead type standard table of soli.
data lt_objcont type standard table of soli.
data ls_objcont type soli.
data lt_urltab type standard table of sood-objdes.
data l_tab_size type i.
data l_url_id type so_url.
data l_obj_id type soodk.
data l_obj_data type sood1.
data url_save type so_url. "note 509858
is_object-objkey = ebeln.
is_object-objtype = 'BUS2014'.
data rel_doc type borident.
call function 'SO_FOLDER_ROOT_ID_GET'
exporting
region = 'B'
importing
folder_id = folder_id
exceptions
others = 1.
clear document_id. "note 1387602
document_title = url_text. " URL text
L_URL_ID = TARGET_URL.
IF URL_SAVE(132) <> URL(132).
L_URL_ID = URL.
ELSE.
L_URL_ID = URL_SAVE.
ENDIF.
l_url_id = url. " your URL
while not l_url_id is initial.
concatenate '&KEY&' l_url_id(250) into ls_objcont.
append ls_objcont to lt_objcont.
shift l_url_id left by 250 places.
endwhile.
l_obj_data-objsns = 'O'.
l_obj_data-objla = sy-langu.
IF DOCUMENT_TITLE IS INITIAL.
SPLIT URL AT '/' INTO TABLE LT_URLTAB.
DESCRIBE TABLE LT_URLTAB LINES L_TAB_SIZE.
READ TABLE LT_URLTAB INDEX L_TAB_SIZE INTO DOCUMENT_TITLE.
ENDIF.
l_obj_data-objdes = document_title.
call function 'SO_OBJECT_INSERT'
exporting
folder_id = folder_id
object_type = 'URL'
object_hd_change = l_obj_data
importing
object_id = l_obj_id
tables
objhead = lt_objhead
objcont = lt_objcont
exceptions
active_user_not_exist = 35
folder_not_exist = 6
object_type_not_exist = 17
owner_not_exist = 22
parameter_error = 23
others = 1000.
if sy-subrc = 0.
document_id-foltp = folder_id-foltp.
document_id-folyr = folder_id-folyr.
document_id-folno = folder_id-folno.
document_id-doctp = l_obj_id-objtp.
document_id-docyr = l_obj_id-objyr.
document_id-docno = l_obj_id-objno.
else.
endif.
if not is_object-objkey is initial.
if not document_id is initial.
clear rel_doc.
rel_doc-objkey = document_id.
rel_doc-objtype = 'MESSAGE'.
call function 'BINARY_RELATION_CREATE'
exporting
obj_rolea = is_object
obj_roleb = rel_doc
relationtype = 'URL'
exceptions
others = 1.
if sy-subrc = 0.
commit work.
endif.
endif.
else.
ep_url = document_id.
endif.
Edited by: rama krishna vishnubhatla on Aug 30, 2011 6:44 AM