‎2008 Apr 01 12:23 PM
Hi all.
Need a little bit of help here. When you create a new program you get a template with space for comments at the top of the program and basic stuff. If I want to change this template to add areas that we want to have comments on for every program we make at work. How do I do that?
Instead of :
*************************************************
* *
* *
* *
*************************************************
* *
* *
* *
*************************************************I want to have in a way similar to this:
*************************************************
* Author: *
* *
* *
*************************************************
* Function: *
* *
* *
*************************************************And so on
I want the words to be there when our developers creates the program.
How can I do that?
BR
Kalle
‎2008 Apr 01 12:27 PM
You can creqte a page header and make this in a include.
Call this include in the report you are using . This is for the O/ p list.
Let me know the version you are working on.
Vijay.
‎2008 Apr 01 12:32 PM
Not sure if that's what we are looking for.
I've heard about an exit where you can add your own code to be the default code in a program when you create it. Do you have any idea of what exit that is and how I use it?
//Andreas
‎2008 Apr 01 12:32 PM
Hi,
1. se38>change>Utilities -> More Utilities -> Edit Pattern -> Create Pattern -
create pattern that you want
2. Enter the name of the pattern and press enter
3. Press SAVE
use it in your program by calling Pattern -> Other patterns
-> your pattern name
Regards
Yossi Rozenberg
‎2008 Apr 01 12:41 PM
We dont want to manualy go in and call the pattern in the program because the develepoers will "forget" to do that so we want it to be created automaticly when you create a program. Is that possible with your method?
//Kalle
‎2008 Apr 01 12:32 PM
Hi,
it created automatically friend...if u want ur own template u had to create
Regards,
V.Balaji
Reward if Usefull...
‎2008 Apr 01 12:48 PM
‎2008 Apr 01 12:52 PM
Check out the enhancement : SEU00001
and the exits
EXIT_SAPDSAHD_010
EXIT_SAPLSEDTATTR_010
Vijay.
‎2008 Apr 01 1:06 PM
After I create a new report program, I delete everything but the REPORT line. I then put this code in for my skeleton.
***********************************************************************
* Created By: Walter Industries (Paul Chapman)
* Created On: 02/29/2008
*
* Tran Code: ZLMxx
* Program Name: YPTC_REPORT_SKELETON " replace New Progam Name herer
* Program Descr: Configurable Leads Data Query
*_______________________________________________________________________
* Modification Log
*_______________________________________________________________________
* Programmer :Issue: Date : Chg Req. : Description
*_______________________________________________________________________
* Paul Chapman :00000:02/29/2008:DEVK000000:New Program
*_______________________________________________________________________
REPORT yptc_report_skeleton MESSAGE-ID zleads_msg. " replace New Progam Name herer
*_________________________________________________ Tables
TABLES: zpca, cepc, zlmlead.
*_________________________________________________ Constants
CONSTANTS:
line_length TYPE i VALUE 100,
c_tab TYPE x VALUE 9, " x'09'
c_crlf TYPE x VALUE 3338. " x'ODOA'
*_________________________________________________ Types
TYPES: BEGIN OF scr_text_line,
line(line_length) TYPE c,
END OF scr_text_line.
*_________________________________________________ DATA
DATA:
curr_screen_tab(4) TYPE n.
*_________________________________________________ ALV Area
*_________________________________________________ Ranges
RANGES:
r_branch FOR zpca-branch.
*_________________________________________________ Selection Screen
SELECTION-SCREEN:
BEGIN OF TABBED BLOCK tabs FOR 36 LINES,
TAB (20) tab1 USER-COMMAND push1 DEFAULT SCREEN 1010,
TAB (20) tab2 USER-COMMAND push2 DEFAULT SCREEN 1020,
END OF BLOCK tabs.
*----------------------------------------------------------------------*
* Tab1 Options S E L E C T I O N S C R E E N S Tab 01 *
*----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
SELECTION-SCREEN: BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:
sdiv FOR cepc-prctr MATCHCODE OBJECT zdivjwh,
ssbrch FOR zlmlead-branch.
SELECTION-SCREEN: END OF BLOCK blk1.
SELECTION-SCREEN: BEGIN OF BLOCK bl10 WITH FRAME TITLE text-010.
PARAMETERS:
cparm1 AS CHECKBOX USER-COMMAND sel,
cparm2 AS CHECKBOX USER-COMMAND sel,
cparm3 AS CHECKBOX USER-COMMAND sel,
cparm4 AS CHECKBOX USER-COMMAND sel,
cparm5 AS CHECKBOX USER-COMMAND sel.
SELECTION-SCREEN: END OF BLOCK bl10.
SELECTION-SCREEN END OF SCREEN 1010.
*----------------------------------------------------------------------*
* Tab 2 Options S E L E C T I O N S C R E E N S Tab 02 *
*----------------------------------------------------------------------*
SELECTION-SCREEN BEGIN OF SCREEN 1020 AS SUBSCREEN.
SELECTION-SCREEN: BEGIN OF BLOCK blk2 WITH FRAME TITLE text-002.
SELECT-OPTIONS:
sctype FOR zlmlead-ctype,
sprfcnt FOR zlmlead-prefcont.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) text-201.
SELECTION-SCREEN POSITION 30.
PARAMETERS: rb_opt1 RADIOBUTTON GROUP gr20.
SELECTION-SCREEN COMMENT 34(03) text-991. " Yes
SELECTION-SCREEN POSITION 40.
PARAMETERS: rb_opt2 RADIOBUTTON GROUP gr20.
SELECTION-SCREEN COMMENT 44(03) text-992. " No
SELECTION-SCREEN POSITION 50.
PARAMETERS: rb_opt3 RADIOBUTTON GROUP gr20.
SELECTION-SCREEN COMMENT 54(06) text-993. " Either
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN: END OF BLOCK blk2.
SELECTION-SCREEN: BEGIN OF BLOCK bl20 WITH FRAME TITLE text-020.
PARAMETERS:
cb_opt1 AS CHECKBOX,
cb_opt2 AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN: END OF BLOCK bl20.
SELECTION-SCREEN END OF SCREEN 1020.
*____________________________________________ Screen Actions
AT SELECTION-SCREEN OUTPUT.
PERFORM what_tab_am_i_on.
CASE curr_screen_tab.
WHEN '1010'. " Tab 1
WHEN '1020'. " Tab 2
WHEN OTHERS.
ENDCASE.
PERFORM tab_hide_unhide.
*___________________________________________ Initialization
INITIALIZATION.
* Tab Text
tab1 = 'Tab 1'.
tab2 = 'Tab 2'.
*_________________________________________________ Load of Program
LOAD-OF-PROGRAM.
*_________________________________________________ Start of Selection
START-OF-SELECTION.
PERFORM set_up_branch_range.
*_________________________________________________ End of Selection
END-OF-SELECTION.
*&---------------------------------------------------------------------*
*& Form what_tab_am_i_on
*&---------------------------------------------------------------------*
FORM what_tab_am_i_on.
LOOP AT SCREEN.
IF screen-name CS 'BLOCK_1010'.
curr_screen_tab = '1010'.
ELSEIF screen-name CS 'BLOCK_1020'.
curr_screen_tab = '1020'.
ENDIF.
ENDLOOP.
ENDFORM. " what_tab_am_i_on
*&---------------------------------------------------------------------*
*& Form tab_hide_unhide
*&---------------------------------------------------------------------*
FORM tab_hide_unhide.
LOOP AT SCREEN.
CHECK screen-group3 = 'TAB'.
CASE screen-name.
WHEN 'TAB1'.
* IF
* screen-active = 1.
* screen-required = 1.
* screen-input = 1.
* screen-output = 1.
* screen-intensified = 1.
* screen-invisible = 1.
* ELSE.
* screen-active = 0.
* screen-required = 0.
* screen-input = 0.
* screen-output = 0.
* screen-intensified = 0.
* screen-invisible = 0.
* ENDIF.
WHEN 'TAB2'.
* IF
* screen-active = 1.
* ELSE.
* screen-active = 0.
* ENDIF.
ENDCASE.
MODIFY SCREEN.
ENDLOOP.
ENDFORM. " tab_hide_unhide
*&---------------------------------------------------------------------*
*& Form set_up_branch_range
*&---------------------------------------------------------------------*
FORM set_up_branch_range.
r_branch[] = ssbrch[].
CHECK NOT sdiv IS INITIAL.
r_branch = 'IEQ'.
SELECT branch INTO r_branch-low
FROM zpca
WHERE region = 'JWHCO'
AND division IN sdiv.
APPEND r_branch.
ENDSELECT.
SORT r_branch.
DELETE ADJACENT DUPLICATES FROM r_branch.
ENDFORM. " set_up_branch_range
‎2008 Apr 01 1:13 PM
That's pretty much the thing I look for but I want it to be automaticly when I create a program.