Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Change standard layout of SE38

Hello everybody,

is is possible to change permanent the default setting of report layout when you create a new one?

When I create a new report I get the following layout:

&----


*& Report XYZ

*&

&----


*&

*&

&----


But I would like to change this default setting for every new report from every user/programmer like this:

&----


*& Report: Name

*& Company:

*& Date:

&----


*& Description:

*&

&----


and so on.

Can anybody tell me how to realize?

Thanks in advance.

Former Member replied

Yes , you can do it.

create a project for this user exit SEUED001 - EXIT_SAPLS38E_001 and add this code in CMOD.


*&---------------------------------------------------------------------*
*&  Include           ZXSEUU08                                         *
*&---------------------------------------------------------------------*
DATA: it_code(256) TYPE c OCCURS 0.
DATA: wa_code LIKE LINE OF it_code.
DATA: it_new_code(256) TYPE c OCCURS 0.
DATA: lv_linecount TYPE i.
IF operation = 'EDIT'. " only if the user edits / creates the program
READ REPORT program INTO it_code.
DESCRIBE TABLE it_code LINES lv_linecount.
IF lv_linecount LE 10. " ensures that this happens only for new programs
READ TABLE it_code INTO wa_code INDEX 5.
IF wa_code(9) <> '*& Author'. " ensures that it doesnt happen again once already done
READ TABLE it_code INTO wa_code INDEX 1.
APPEND wa_code TO it_new_code.
READ TABLE it_code INTO wa_code INDEX 2.
APPEND wa_code TO it_new_code.
READ TABLE it_code INTO wa_code INDEX 3.
APPEND wa_code TO it_new_code.
* you can put your customizing here
CLEAR wa_code.
wa_code = '*&---------------------------------------------------------------------*'.
APPEND wa_code TO it_new_code.
CLEAR wa_code.
wa_code = '*& Author :'.
APPEND wa_code TO it_new_code.
CLEAR wa_code.
wa_code = '*& Date :' .
APPEND wa_code TO it_new_code.
CLEAR wa_code.
wa_code = '*& Description :'.
APPEND wa_code TO it_new_code.
CLEAR wa_code.
wa_code = '*&---------------------------------------------------------------------*'.
APPEND wa_code TO it_new_code.
CLEAR wa_code.
wa_code = '*& Modification History '.
APPEND wa_code TO it_new_code.
CLEAR wa_code.
wa_code = '*&'.
APPEND wa_code TO it_new_code.
CLEAR wa_code.
wa_code = '*&---------------------------------------------------------------------*'.
APPEND wa_code TO it_new_code.
* till here
DATA: lv_firstline TYPE i.
* find out from where to continue adding the rest of the program
LOOP AT it_code INTO wa_code FROM 4 TO 8.
IF wa_code = ''.
lv_firstline = sy-tabix.
ENDIF.
ENDLOOP.
LOOP AT it_code INTO wa_code FROM lv_firstline.
APPEND wa_code TO it_new_code.
ENDLOOP.
INSERT REPORT program FROM it_new_code.
ENDIF.
ENDIF.
ENDIF.
*After this, activate the include program.
*then go back to CMOD transaction and activate the PROJECT that you've just created.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question