Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Change standard layout of SE38

HKany
Participant
0 Kudos

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.

1 ACCEPTED SOLUTION

GauthamV
Active Contributor
0 Kudos

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.

6 REPLIES 6

former_member226203
Active Contributor
0 Kudos

This is based on the client requirement and standards in coding.

if u hve some coding standards please follow that. u can change it wrt the coding standards that u r told.

former_member226203
Active Contributor
0 Kudos

plz check for the doc on the same

former_member555112
Active Contributor
0 Kudos

Hi,

Although you cannot make it as default.

But one option is to use the patterns.

In SE38 Go to Utilities>More Utitlies>Edit Pattern-->Create new pattern.

Create a new pattern in which you can put your requirement.

Next time when you create a new program always call this pattern.

This is the better method to achieve your requirment.

Regards,

Ankur Parab

former_member181962
Active Contributor
0 Kudos

There is a suer exit SEU00001 for SE38.

See if there is a way to enhance the se38 editor.

Regards,

Ravi

Former Member
0 Kudos

You should create a pattern and call the same when required.

GauthamV
Active Contributor
0 Kudos

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.