Saturday, May 20, 2006

[BW] Set user Workbook template

&---------------------------------------------------------------------*
*& Report Z_SET_BEX_USER_TEMPLATE *
*& *
*&---------------------------------------------------------------------*
*& Program to update all user's default template *
*& *
*&---------------------------------------------------------------------*

REPORT Z_SET_BEX_USER_TEMPLATE.
parameter wbid like rsrwbindex-workbookid.
tables: rsrwbtemplate, usr01.
select * from usr01.
rsrwbtemplate-templateuser = usr01-bname.
rsrwbtemplate-workbookid = wbid.
update rsrwbtemplate.
if sy-subrc <> 0. insert rsrwbtemplate. endif.
endselect.