Double Click Navigation with ABAP Source Codes of Reports On ABAP Workbench
Hi,
i have a problem about double click on abap source code on abap workbench. double clicking doesn't work after first double clicked on abap codes. that is going to row of first double clicking.
did anyone have the same problem? can somebody help me please?
thanks.
Nurullah RÜSTEM wrote:
> isn't there any radical solution to solve this problem?
> these are very kill-time
You feel
Source Code Editor --> Utilities --> Update Navigation Index
is not radical & kill-time.
Can you please define "radical" & "kill-time" ?
BR,
Suhas
Similar Messages
-
ABAP source code is written "by hand" or automatically?
Hi all,
I would like to modify the report "Open Items - Vendor Due Date Forecast" created by T. S_ALR_87012084.
With SE93 i found the name of the program RFKOFW00, which are referring to the T. S_ALR_87012084. T. S_ALR_87012084. (Parameter: D_SREPOVARI-REPORT = RFKOFW00) and with SE38 i have seen the ABAP source code of the program RFKOFW00.
My questions are:
1) The ABAP source code of the program RFKOFW00 is written "by hand", or automatically by one of the SAP tools, for example Report Painter/Writer, SAP queryu2026..? It seems to me that it is written "by hand". Is this true?
2) In general, how can i tell if a SAP ABAP program is written "by hand" or automatically by one of SAP tools? I know that one way to understand is that source code, written by hand is more clear.
Is there a way to understand, more accurate, more secure?
Thanks in advance
SerenaHi ,
if the code is automatically created, there will be a comment line in the beginning of the code which says
Generated function module for ..........
Please do not modify or copy this function module
Regards -
Upload and Download ABAP Source Code
This is a program that I have had kicking around for a couple of years in various incarnations.
Source Code Listing
Report: ZKBPROGS *
Function : Up/Download ABAP reports complete with texts *
- this program does not update TRDIR with the *
TRDIR entries that are in the program uploaded. Instead, *
current users stats are used. *
- this program allows selection of reports from a list or *
a single report can be tuped in and uploaded *
- this program also updates TADIR so that a development class*
is assigned to the program *
- this program checks to see if the program already has a *
TRDIR entry, and if it does, warns the user *
- this program will save/restore the program documenation too*
REPORT ZKBPROGS
NO STANDARD PAGE HEADING
LINE-SIZE 255.
Declare Database Objects *
tables:
DOKIL,
TRDIR.
Constants*
CONSTANTS:
MC_TRDIR_IDENTIFIER(72) TYPE C VALUE '%&%& RDIR',
MC_REPORT_IDENTIFIER(72) TYPE C VALUE '%&%& REPO',
MC_TEXT_IDENTIFIER(72) TYPE C VALUE '%&%& TEXP',
MC_THEAD_IDENTIFIER(72) TYPE C VALUE '%&%& HEAD',
MC_DOC_IDENTIFIER(72) TYPE C VALUE '%&%& DOKL',
MC_TRDIR_SHORT(4) TYPE C VALUE 'RDIR',
MC_REPORT_SHORT(4) TYPE C VALUE 'REPO',
MC_TEXT_SHORT(4) TYPE C VALUE 'TEXP',
MC_THEAD_SHORT(4) TYPE C VALUE 'HEAD',
MC_DOC_SHORT(4) TYPE C VALUE 'DOKP'.
Declare Module level data structures *
DATA: BEGIN OF MTAB_PROGRAM_SOURCE OCCURS 0,
LINE(72) TYPE C,
END OF MTAB_PROGRAM_SOURCE.
DATA: MTAB_PROGRAM_TRDIR LIKE TRDIR OCCURS 0 WITH HEADER LINE.
DATA: MTAB_PROGRAM_TEXTS LIKE TEXTPOOL OCCURS 0 WITH HEADER LINE.
DATA: MSTR_THEAD LIKE THEAD.
DATA: BEGIN OF MTAB_PROGRAM_FILE OCCURS 0,
LINE(275) TYPE C,
END OF MTAB_PROGRAM_FILE.
DATA: BEGIN OF MTAB_DIRECTORY OCCURS 0,
NAME LIKE TRDIR-NAME,
DESC(72) TYPE C,
SAVENAME LIKE RLGRAP-FILENAME,
END OF MTAB_DIRECTORY.
DATA: BEGIN OF MTAB_PROGRAM_DOCUMENTATION OCCURS 0,
LINE(255) TYPE C,
END OF MTAB_PROGRAM_DOCUMENTATION.
Selection Screen *
*-- Options for upload/download of programs
SELECTION-SCREEN BEGIN OF BLOCK FRM_OPTIONS WITH FRAME TITLE TEXT-UDL.
PARAMETERS:
RB_DOWN RADIOBUTTON GROUP UDL DEFAULT 'X'. " Download reports
SELECTION-SCREEN BEGIN OF BLOCK FRM_TRDIR WITH FRAME TITLE TEXT-DIR.
SELECT-OPTIONS:
S_NAME FOR TRDIR-NAME, " Program Name
S_SUBC FOR TRDIR-SUBC " Program Type
DEFAULT 'F' OPTION EQ SIGN E," Exclude Functions by default
S_CNAM FOR TRDIR-CNAM " Created by
DEFAULT SY-UNAME,
S_UNAM FOR TRDIR-UNAM, " Last Changed by
S_CDAT FOR TRDIR-CDAT, " Creation date
S_UDAT FOR TRDIR-UDAT. " Last update date
SELECTION-SCREEN END OF BLOCK FRM_TRDIR.
*-- Options for uploading programs
PARAMETERS:
RB_UP RADIOBUTTON GROUP UDL. " Upload reports
SELECTION-SCREEN BEGIN OF BLOCK FRM_UPLOAD WITH FRAME TITLE TEXT-UPL.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(29) TEXT-SNG.
PARAMETERS:
RB_FILE RADIOBUTTON GROUP HOW DEFAULT 'X'.
SELECTION-SCREEN COMMENT 33(42) TEXT-FNA.
SELECTION-SCREEN END OF LINE.
PARAMETERS:
RB_LIST RADIOBUTTON GROUP HOW.
SELECTION-SCREEN END OF BLOCK FRM_UPLOAD.
SELECTION-SCREEN END OF BLOCK FRM_OPTIONS.
*-- Options for up/downloading programs
SELECTION-SCREEN BEGIN OF BLOCK FRM_FILEN WITH FRAME TITLE TEXT-FIL.
PARAMETERS:
RB_DOS RADIOBUTTON GROUP FIL DEFAULT 'X', " Save to local
RB_UNIX RADIOBUTTON GROUP FIL, " Save to UNIX
P_PATH LIKE RLGRAP-FILENAME " Path to save files to
DEFAULT 'c:\temp\'.
SELECTION-SCREEN END OF BLOCK FRM_FILEN.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NAME-LOW.
CALL FUNCTION 'F4_PROGRAM'
EXPORTING
OBJECT = S_NAME-LOW
SUPPRESS_SELECTION = 'X'
IMPORTING
RESULT = S_NAME-LOW
EXCEPTIONS
OTHERS = 1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_NAME-HIGH.
CALL FUNCTION 'F4_PROGRAM'
EXPORTING
OBJECT = S_NAME-HIGH
SUPPRESS_SELECTION = 'X'
IMPORTING
RESULT = S_NAME-HIGH
EXCEPTIONS
OTHERS = 1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_UNAM-LOW.
PERFORM GET_NAME USING 'S_UNAM-LOW'
CHANGING S_UNAM-LOW.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_UNAM-HIGH.
PERFORM GET_NAME USING 'S_UNAM-HIGH'
CHANGING S_UNAM-HIGH.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CNAM-LOW.
PERFORM GET_NAME USING 'S_CNAM-LOW'
CHANGING S_CNAM-LOW.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_CNAM-HIGH.
PERFORM GET_NAME USING 'S_CNAM-HIGH'
CHANGING S_CNAM-HIGH.
TOP-OF-PAGE.
IF RB_LIST = 'X'.
FORMAT COLOR COL_HEADING.
NEW-LINE.
WRITE: AT 3 TEXT-H01,
AT 15 TEXT-H03.
FORMAT COLOR OFF.
ENDIF.
AT LINE-SELECTION.
CHECK RB_LIST = 'X'. " only do in list mode
READ LINE SY-CUROW FIELD VALUE MTAB_DIRECTORY-SAVENAME.
*-- Read file into an internal table
PERFORM READ_REPORT_FROM_DISK TABLES MTAB_PROGRAM_FILE
USING MTAB_DIRECTORY-SAVENAME.
*-- Split table into TADIR entry, report lines, and report text
PERFORM SPLIT_INCOMING_FILE TABLES MTAB_PROGRAM_FILE
MTAB_PROGRAM_SOURCE
MTAB_PROGRAM_TEXTS
MTAB_PROGRAM_DOCUMENTATION
CHANGING TRDIR
MSTR_THEAD.
*-- Save all of the data
PERFORM INSERT_NEW_REPORT TABLES MTAB_PROGRAM_SOURCE
MTAB_PROGRAM_TEXTS
MTAB_PROGRAM_DOCUMENTATION
USING TRDIR
MSTR_THEAD.
Start of processing *
START-OF-SELECTION.
FORMAT COLOR COL_NORMAL.
IF RB_DOWN = 'X'.
PERFORM DOWNLOAD_REPORTS.
ELSEIF RB_UP = 'X'.
PERFORM UPLOAD_REPORTS.
ENDIF.
END-OF-SELECTION.
IF RB_DOWN = 'X'.
CONCATENATE P_PATH
'directory.txt'
INTO P_PATH.
PERFORM SAVE_TABLE_TO_FILE TABLES MTAB_DIRECTORY
USING P_PATH.
ENDIF.
FORM UPLOAD_REPORTS *
FORM UPLOAD_REPORTS.
*-- Can upload a reports entered in selection criteria or
*-- select from a list. List can be from index.txt in same directory
*-- (created by the download) or by reading the first line of each file
*-- in the directory.
IF RB_FILE = 'X'. " Upload single program from a file
*-- Read file into an internal table
PERFORM READ_REPORT_FROM_DISK TABLES MTAB_PROGRAM_FILE
USING P_PATH.
*-- Split table into TADIR entry, report lines, and report text
PERFORM SPLIT_INCOMING_FILE TABLES MTAB_PROGRAM_FILE
MTAB_PROGRAM_SOURCE
MTAB_PROGRAM_TEXTS
MTAB_PROGRAM_DOCUMENTATION
CHANGING TRDIR
MSTR_THEAD.
*-- Save all of the data
PERFORM INSERT_NEW_REPORT TABLES MTAB_PROGRAM_SOURCE
MTAB_PROGRAM_TEXTS
MTAB_PROGRAM_DOCUMENTATION
USING TRDIR
MSTR_THEAD.
ELSEIF RB_LIST = 'X'. " Show list for user to choose from
*-- get list of report names/descriptions from directory text
CONCATENATE P_PATH
'directory.txt'
INTO P_PATH.
PERFORM READ_REPORT_FROM_DISK TABLES MTAB_DIRECTORY
USING P_PATH.
SORT MTAB_DIRECTORY.
*-- Write out list of report names/descriptions
LOOP AT MTAB_DIRECTORY.
WRITE:
/ MTAB_DIRECTORY-NAME UNDER TEXT-H01,
MTAB_DIRECTORY-DESC UNDER TEXT-H03,
MTAB_DIRECTORY-SAVENAME.
ENDLOOP.
*-- Process user selections for reports to upload.
ENDIF.
ENDFORM. " upload_reports
FORM DOWNLOAD_REPORTS *
From the user selections, get all programs that meet the *
criteria, and save them in ftab_program_directory. *
Also save the report to disk. *
FORM DOWNLOAD_REPORTS.
DATA:
LC_FULL_FILENAME LIKE RLGRAP-FILENAME.
*-- The table is put into an internal table because the program will
*-- abend if multiple transfers to a dataset occur within a SELECT/
*-- ENDSELCT (tested on 3.1H)
SELECT * FROM TRDIR
INTO TABLE MTAB_PROGRAM_TRDIR
WHERE NAME IN S_NAME
AND SUBC IN S_SUBC
AND CNAM IN S_CNAM
AND UNAM IN S_UNAM
AND CDAT IN S_CDAT
AND UDAT IN S_UDAT.
LOOP AT MTAB_PROGRAM_TRDIR.
*-- Clear out text and source code tables
CLEAR:
MTAB_PROGRAM_FILE,
MTAB_PROGRAM_SOURCE,
MTAB_PROGRAM_TEXTS,
MTAB_PROGRAM_DOCUMENTATION.
REFRESH:
MTAB_PROGRAM_FILE,
MTAB_PROGRAM_SOURCE,
MTAB_PROGRAM_TEXTS,
MTAB_PROGRAM_DOCUMENTATION.
*-- Get the report
READ REPORT MTAB_PROGRAM_TRDIR-NAME INTO MTAB_PROGRAM_SOURCE.
*-- Get the text for the report
READ TEXTPOOL MTAB_PROGRAM_TRDIR-NAME INTO MTAB_PROGRAM_TEXTS.
*-- Get the documentation for the report
CLEAR DOKIL.
SELECT * UP TO 1 ROWS FROM DOKIL
WHERE ID = 'RE'
AND OBJECT = MTAB_PROGRAM_TRDIR-NAME
AND LANGU = SY-LANGU
AND TYP = 'E'
ORDER BY VERSION DESCENDING.
ENDSELECT.
*-- Documentation exists for this object
IF SY-SUBRC = 0.
CALL FUNCTION 'DOCU_READ'
EXPORTING
ID = DOKIL-ID
LANGU = DOKIL-LANGU
OBJECT = DOKIL-OBJECT
TYP = DOKIL-TYP
VERSION = DOKIL-VERSION
IMPORTING
HEAD = MSTR_THEAD
TABLES
LINE = MTAB_PROGRAM_DOCUMENTATION
EXCEPTIONS
OTHERS = 1.
ENDIF.
*-- Put the report code and texts into a single file
*-- Put the identifier line in so that the start of the TRDIR line
*-- is marked
CONCATENATE MC_TRDIR_IDENTIFIER
MTAB_PROGRAM_TRDIR-NAME
INTO MTAB_PROGRAM_FILE-LINE.
APPEND MTAB_PROGRAM_FILE.
*-- Add the TRDIR line
MTAB_PROGRAM_FILE-LINE = MTAB_PROGRAM_TRDIR.
APPEND MTAB_PROGRAM_FILE.
*-- Put the identifier line in so that the start of the report code
*-- is marked
CONCATENATE MC_REPORT_IDENTIFIER
MTAB_PROGRAM_TRDIR-NAME
INTO MTAB_PROGRAM_FILE-LINE.
APPEND MTAB_PROGRAM_FILE.
*-- Add the report code
LOOP AT MTAB_PROGRAM_SOURCE.
MTAB_PROGRAM_FILE = MTAB_PROGRAM_SOURCE.
APPEND MTAB_PROGRAM_FILE.
ENDLOOP.
*-- Put the identifier line in so that the start of the report text
*-- is marked
CONCATENATE MC_TEXT_IDENTIFIER
MTAB_PROGRAM_TRDIR-NAME
INTO MTAB_PROGRAM_FILE-LINE.
APPEND MTAB_PROGRAM_FILE.
*-- Add the report texts
LOOP AT MTAB_PROGRAM_TEXTS.
MTAB_PROGRAM_FILE = MTAB_PROGRAM_TEXTS.
APPEND MTAB_PROGRAM_FILE.
ENDLOOP.
*-- Put the identifier line in so that the start of the THEAD record
*-- is marked
CONCATENATE MC_THEAD_IDENTIFIER
MTAB_PROGRAM_TRDIR-NAME
INTO MTAB_PROGRAM_FILE-LINE.
APPEND MTAB_PROGRAM_FILE.
MTAB_PROGRAM_FILE = MSTR_THEAD.
APPEND MTAB_PROGRAM_FILE.
*-- Put the identifier line in so that the start of the report
*-- documentation is marked
CONCATENATE MC_DOC_IDENTIFIER
MTAB_PROGRAM_TRDIR-NAME
INTO MTAB_PROGRAM_FILE-LINE.
APPEND MTAB_PROGRAM_FILE.
*-- Add the report documentation
LOOP AT MTAB_PROGRAM_DOCUMENTATION.
MTAB_PROGRAM_FILE = MTAB_PROGRAM_DOCUMENTATION.
APPEND MTAB_PROGRAM_FILE.
ENDLOOP.
*-- Make the fully pathed filename that report will be saved to
CONCATENATE P_PATH
MTAB_PROGRAM_TRDIR-NAME
'.txt'
INTO LC_FULL_FILENAME.
PERFORM SAVE_TABLE_TO_FILE TABLES MTAB_PROGRAM_FILE
USING LC_FULL_FILENAME.
*-- Write out message with Program Name/Description
READ TABLE MTAB_PROGRAM_TEXTS WITH KEY ID = 'R'.
IF SY-SUBRC = 0.
MTAB_DIRECTORY-NAME = MTAB_PROGRAM_TRDIR-NAME.
MTAB_DIRECTORY-DESC = MTAB_PROGRAM_TEXTS-ENTRY.
MTAB_DIRECTORY-SAVENAME = LC_FULL_FILENAME.
APPEND MTAB_DIRECTORY.
WRITE: / MTAB_PROGRAM_TRDIR-NAME,
MTAB_PROGRAM_TEXTS-ENTRY(65) COLOR COL_HEADING.
ELSE.
MTAB_DIRECTORY-NAME = MTAB_PROGRAM_TRDIR-NAME.
MTAB_DIRECTORY-DESC = 'No description available'.
MTAB_DIRECTORY-SAVENAME = LC_FULL_FILENAME.
APPEND MTAB_DIRECTORY.
WRITE: / MTAB_PROGRAM_TRDIR-NAME.
ENDIF.
ENDLOOP.
ENDFORM. " BUILD_PROGRAM_DIRECTORY
FORM SAVE_TABLE_TO_FILE *
--> FTAB_TABLE *
--> F_FILENAME *
FORM SAVE_TABLE_TO_FILE TABLES FTAB_TABLE
USING F_FILENAME.
IF RB_DOS = 'X'. " Save file to presentation server
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
FILENAME = F_FILENAME
FILETYPE = 'ASC'
TABLES
DATA_TAB = FTAB_TABLE
EXCEPTIONS
OTHERS = 4.
IF SY-SUBRC NE 0.
WRITE: / 'Error opening dataset' COLOR COL_NEGATIVE,
F_FILENAME COLOR COL_NEGATIVE.
ENDIF.
ELSE. " Save file to application server
OPEN DATASET F_FILENAME FOR OUTPUT IN TEXT MODE.
IF SY-SUBRC = 0.
LOOP AT FTAB_TABLE.
TRANSFER FTAB_TABLE TO F_FILENAME.
IF SY-SUBRC NE 0.
WRITE: / 'Error writing record to file;' COLOR COL_NEGATIVE,
F_FILENAME COLOR COL_NEGATIVE.
ENDIF.
ENDLOOP.
ELSE.
WRITE: / 'Error opening dataset' COLOR COL_NEGATIVE,
F_FILENAME COLOR COL_NEGATIVE.
ENDIF.
ENDIF. " End RB_DOS
ENDFORM. " SAVE_PROGRAM
FORM READ_REPORT_FROM_DISK *
Read report into internal table. Can read from local or *
remote computer *
FORM READ_REPORT_FROM_DISK TABLES FTAB_TABLE
USING F_FILENAME.
DATA:
LC_MESSAGE(128) TYPE C.
CLEAR FTAB_TABLE.
REFRESH FTAB_TABLE.
IF RB_DOS = 'X'.
TRANSLATE F_FILENAME USING '/\'. " correct slash for Dos PC file
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = F_FILENAME
FILETYPE = 'ASC'
TABLES
DATA_TAB = FTAB_TABLE
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TABLE_WIDTH = 4
INVALID_TYPE = 5
NO_BATCH = 6
UNKNOWN_ERROR = 7
OTHERS = 8.
IF SY-SUBRC >< 0.
WRITE: / 'Error reading file from local PC' COLOR COL_NEGATIVE.
ENDIF.
ELSEIF RB_UNIX = 'X'.
TRANSLATE F_FILENAME USING '\/'. " correct slash for unix
OPEN DATASET F_FILENAME FOR INPUT MESSAGE LC_MESSAGE IN TEXT MODE.
IF SY-SUBRC = 0.
DO.
READ DATASET F_FILENAME INTO FTAB_TABLE.
IF SY-SUBRC = 0.
APPEND FTAB_TABLE.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET F_FILENAME.
ELSE.
WRITE: / 'Error reading file from remote computer'
COLOR COL_NEGATIVE,
/ LC_MESSAGE,
/ F_FILENAME.
SY-SUBRC = 4.
ENDIF.
ENDIF.
ENDFORM. " READ_REPORT_FROM_DISK
FORM SPLIT_INCOMING_FILE *
--> FTAB_PROGRAM_FILE *
--> FTAB_PROGRAM_SOURCE *
--> ` *
--> FTAB_PROGRAM_TEXTS *
FORM SPLIT_INCOMING_FILE TABLES FTAB_PROGRAM_FILE
STRUCTURE MTAB_PROGRAM_FILE
FTAB_PROGRAM_SOURCE
STRUCTURE MTAB_PROGRAM_SOURCE
FTAB_PROGRAM_TEXTS
STRUCTURE MTAB_PROGRAM_TEXTS
FTAB_PROGRAM_DOCUMENTATION
STRUCTURE MTAB_PROGRAM_DOCUMENTATION
CHANGING FSTR_TRDIR
FSTR_THEAD.
DATA:
LC_DATATYPE(4) TYPE C, " Type of data, REPO, TEXP, RDIR
LC_PROGRAM_FILE LIKE MTAB_PROGRAM_FILE.
LOOP AT FTAB_PROGRAM_FILE.
LC_PROGRAM_FILE = FTAB_PROGRAM_FILE.
CASE LC_PROGRAM_FILE(9).
WHEN MC_TRDIR_IDENTIFIER.
LC_DATATYPE = MC_TRDIR_SHORT.
WHEN MC_REPORT_IDENTIFIER.
LC_DATATYPE = MC_REPORT_SHORT.
WHEN MC_TEXT_IDENTIFIER.
LC_DATATYPE = MC_TEXT_SHORT.
WHEN MC_DOC_IDENTIFIER.
LC_DATATYPE = MC_DOC_SHORT.
WHEN MC_THEAD_IDENTIFIER.
LC_DATATYPE = MC_THEAD_SHORT.
WHEN OTHERS. " Actual contents of report, trdir, or text
CASE LC_DATATYPE.
WHEN MC_TRDIR_SHORT.
FSTR_TRDIR = FTAB_PROGRAM_FILE.
WHEN MC_REPORT_SHORT.
FTAB_PROGRAM_SOURCE = FTAB_PROGRAM_FILE.
APPEND FTAB_PROGRAM_SOURCE.
WHEN MC_TEXT_SHORT.
FTAB_PROGRAM_TEXTS = FTAB_PROGRAM_FILE.
APPEND FTAB_PROGRAM_TEXTS.
WHEN MC_THEAD_SHORT.
FSTR_THEAD = FTAB_PROGRAM_FILE.
WHEN MC_DOC_SHORT.
FTAB_PROGRAM_DOCUMENTATION = FTAB_PROGRAM_FILE.
APPEND FTAB_PROGRAM_DOCUMENTATION.
ENDCASE.
ENDCASE.
ENDLOOP.
ENDFORM. " SPLIT_INCOMING_FILE
FORM INSERT_NEW_REPORT*
--> FTAB_PROGRAM_SOURCE *
--> FTAB_PROGRAM_TEXTS *
--> F_TRDIR *
FORM INSERT_NEW_REPORT TABLES FTAB_PROGRAM_SOURCE
STRUCTURE MTAB_PROGRAM_SOURCE
FTAB_PROGRAM_TEXTS
STRUCTURE MTAB_PROGRAM_TEXTS
FTAB_PROGRAM_DOCUMENTATION
STRUCTURE MTAB_PROGRAM_DOCUMENTATION
USING FSTR_TRDIR LIKE TRDIR
FSTR_THEAD LIKE MSTR_THEAD.
DATA:
LC_OBJ_NAME LIKE E071-OBJ_NAME,
LC_LINE2(40) TYPE C,
LC_ANSWER(1) TYPE C.
*-- read trdir to see if the report already exists, if it does, prompt
*-- user to overwrite or abort.
SELECT SINGLE * FROM TRDIR WHERE NAME = FSTR_TRDIR-NAME.
IF SY-SUBRC = 0. " Already exists
CONCATENATE 'want to overwrite report'
FSTR_TRDIR-NAME
INTO LC_LINE2 SEPARATED BY SPACE.
CONCATENATE LC_LINE2
INTO LC_LINE2.
CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
EXPORTING
DEFAULTOPTION = 'N'
TEXTLINE1 = 'The selected report already exists, do you'
TEXTLINE2 = LC_LINE2
TITEL = 'Report already exists'
CANCEL_DISPLAY = SPACE
IMPORTING
ANSWER = LC_ANSWER
EXCEPTIONS
OTHERS = 1.
ELSE.
LC_ANSWER = 'J'.
ENDIF.
IF LC_ANSWER = 'J'.
*-- Create the TADIR entry. (TRDIR entry created by INSERT REPORT)
LC_OBJ_NAME = TRDIR-NAME.
CALL FUNCTION 'TR_TADIR_POPUP_ENTRY_E071'
EXPORTING
WI_E071_PGMID = 'R3TR'
WI_E071_OBJECT = 'PROG'
WI_E071_OBJ_NAME = LC_OBJ_NAME
WI_TADIR_DEVCLASS = '$TMP'
EXCEPTIONS
EXIT = 3
OTHERS = 4.
IF SY-SUBRC = 0.
*-- Create Report
INSERT REPORT FSTR_TRDIR-NAME FROM FTAB_PROGRAM_SOURCE.
*-- Create Texts
INSERT TEXTPOOL FSTR_TRDIR-NAME FROM FTAB_PROGRAM_TEXTS
LANGUAGE SY-LANGU.
*-- Save Documentation
CALL FUNCTION 'DOCU_UPDATE'
EXPORTING
HEAD = FSTR_THEAD
STATE = 'A'
TYP = 'E'
VERSION = '1'
TABLES
LINE = FTAB_PROGRAM_DOCUMENTATION
EXCEPTIONS
OTHERS = 1.
ELSE.
WRITE: / 'Error updating the TADIR entry' COLOR COL_NEGATIVE,
'Program' COLOR COL_NEGATIVE INTENSIFIED OFF,
FSTR_TRDIR-NAME, 'was not loaded into SAP.'
COLOR COL_NEGATIVE INTENSIFIED OFF.
ENDIF.
ELSE.
WRITE: / FSTR_TRDIR-NAME COLOR COL_NEGATIVE,
'was not uploaded into SAP. Action cancelled by user'
COLOR COL_NEGATIVE INTENSIFIED OFF.
ENDIF.
ENDFORM. " INSERT_NEW_REPORT
FORM GET_NAME *
--> VALUE(F_FIELD) *
--> F_NAME *
FORM GET_NAME USING VALUE(F_FIELD)
CHANGING F_NAME.
DATA: LTAB_FIELDS LIKE DYNPREAD OCCURS 0 WITH HEADER LINE,
LC_PROG LIKE D020S-PROG,
LC_DNUM LIKE D020S-DNUM.
TRANSLATE F_FIELD TO UPPER CASE.
refresh ltab_fields.
LTAB_FIELDS-FIELDNAME = F_FIELD.
append ltab_fields.
LC_PROG = SY-REPID .
LC_DNUM = SY-DYNNR .
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = LC_PROG
DYNUMB = LC_DNUM
TABLES
dynpfields = ltab_fields
EXCEPTIONS
OTHERS = 01.
read table ltab_fields index 1.
IF SY-SUBRC EQ 0.
F_NAME = LTAB_FIELDS-FIELDVALUE.
refresh ltab_fields.
ENDIF.
CALL FUNCTION 'F4_USER'
EXPORTING
OBJECT = F_NAME
IMPORTING
RESULT = F_NAME.
ENDFORM. " GET_NAME
Program Texts
DIR File Download Options (File Selection)
FIL File Options
FNA Enter filename below (under File Options)
H01 Prog Name
H03 Program Description
SNG Upload a single file
UDL Upload to SAP/Download from SAP
UPL File Upload Options
R Backup/Restore program source code with texts
P_PATH Path to save programs to
RB_DOS Files on local computer
RB_DOWN Download Programs
RB_FILE Upload a single file
RB_LIST Select program(s) from a list
RB_UNIX Files on remote computer
RB_UP Upload Programs to SAP
S_CDAT Date Created
S_CNAM Created by UserID
S_NAME Program Name
S_SUBC Program Type
S_UDAT Date Changed
S_UNAM Last Changed by UserIDHi
you can use SAPLink for this
http://code.google.com/p/saplink/
Abhi -
Function Module to get ABAP source code for a specific version
Hi all
Is there a function module that I can use to get the source code of another function module at a specific version?
For example, can I call a function module passing in "FM_NAME" and "FM_VERSION" and have it return the lines of code associated with that object?
Thanks in advance.
StuartThanks guys
That's incredibly helpful! I have one more question that I just thought of last night...
Is there a way to hook into the code activation process? I want to be able to take a snapshot of the ABAP source code at each point when it is activated for use in another system, but need to be able to intercept this event and get the source code at that point in time.
Any ideas?
Thanks! -
ABAP source code to connect to third party systems using web service calls?
Hi all,
can any one provide an example ABAP source code to connect to third party systems using web service calls? The base system is CRM.Do you want to call a web service in a remote system, or do you want to provide a web service?
If you want to call a web service you should create a proxy object via SE80. Open your development package, right click on the tree entry and choose: Create -> Enterprise Service / Web Service -> Proxy Object and provide the needed information (including the WSDL description file). You may then use the proxy object to call the web service (if the connection and everything else works right).
See [http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm] -
How to document ABAP Source Code like doxygen
Hi, all.
Is there any way or tool to generate HTML from ABAP source code? Like doxygen?
What i want to do is like the following.
- Retrieve all the ABAP source code of a specified package.
- Generate HTML(coloring of keywords or so) from the ABAP source code.
Best Regards.
Sejoon AhnYou dont need to check the source code to find whether program is moved to PRD.
Just check the version management of program in development itself.
Click on transport log of request to find it. -
Bridge CS6 crash with double click not with "open with"
Bridge cs6 keeps crashing whenever I double click on a file (jpg/psd/raw files).
After reading on this forum I couldn't find anything that worked for me.
The strange thing is, when I select a file right click open with photoshop CS6 (default) the file opens without any problem in Photoshop.
I have my default file associations of all (image) files set to photoshop CS6.
Any Ideas what can be the problem?
(windows 7 Ultimate and I have double-click edits camera raw setting in bridge marked off, and bridge crashes too when it is marked on)
Thanks!well it never worked, and I installed several times. I kept working with bridge CS5, but I have a new camera with raw files only supported in CS6, so now I'm confronted with this problem again.
Also tried ctrl + open to reset & purge everything....
here's my log.
Faulting application name: Bridge.exe, version: 5.0.2.4, time stamp: 0x50d99f7a
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x0012f9f8
Faulting process id: 0x17a0
Faulting application start time: 0x01ce30d973f12912
Faulting application path: C:\Program Files\Adobe\Adobe Bridge CS6\Bridge.exe
Faulting module path: unknown
Report Id: b4367997-9ccc-11e2-80b9-20cf30c9d4c4 -
New Front-End Editor is Dumping when I try to check an ABAP source code
Hi Experts
I'm trying to check the source code of any ABAP in SE38 with the new front-end editor, but I'm facing a dump, maybe there is missing a patch or something like that. if any of you have information about that I really appreciate your aswers.
I reinstalled the SAP GUI and still have the issue.
part of the dump is here
Runtime Errors MESSAGE_TYPE_X
Date and Time 04/09/2008 15:12:51
Short text
The current application triggered a termination with a short dump.
What happened?
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
Error analysis
Short text of error message:
Control Framework : Error processing control
Long text of error message:
Diagnosis
An error occurred when the system tried to process the commands
from the Automation Queue on the presentation server.
There are several possible reasons for this:
- The installation of the SAP GUI on the presentation server is
faulty or obsolete.
- There is an error in the application program
- There is an error in the SAPGUI or an integrated controlHernan Enriquez ,
Hi you can try the below things :
1) You need have the latest patch of the SAP GUI installed.
2) If you have the above try to re-install the GUI from the scratch. It might be courrupted.
3) If VISTA need to check the GUI compatibility.
Thanks,
Greetson -
Tabset double click error with dataprovider
Ok, it's not simple to explain but i'll try.
I have an application that uses 3 DataProvider objects to modify data about a sport society. the first (bounded to a dropdownList) performs query on regions, the second (bounded to a dropdownList) performs query on cities depending on region. The last one performs query on data society.
I have two tabs:
one permits to change data about society residence information, the other permits to change data about society address information: so the three DataProvider are always necessary in both tabs.
My problem starts when i make a double click on a tab link ( i click repeatedly fast on the link):
the code executed is:
try
//set region (province) reference for city (comune) selection
getSessionBean1().getTbl_comuniRowSet().setLong(1, getSessionBean1().getTbl_societaRowSetSingolo().getLong("provincia_corrispondenza"));
tbl_provinceDataProvider.refresh();
tbl_comuniDataProvider.refresh();
}catch(Exception ex)
log("error",ex);
return null;
My problem is:
Sometimes data are not rendered well. example:
before action data are:
region: Lazio
city: rome
rome is a city located in Lazio.
After clicking repeatedly on the tab link i have:
region: Aosta
city: Allein
Allein is a city located in Aosta.
Aosta is the first record in database table and the first element in dropdownList.
Sometimes i got also "execute() never called" exeception.
Any suggestion?
thanks in advance
marcob
Message was edited by:
info_77I created a simple scenario to observe your problem. I created a tab set with 2 tabs. The action code for each tab is as follows:
public String tab1_action() {
log("tab 1 clicked");
return null;
public String tab2_action() {
log("tab 2 clicked");
return null;
}No matter how quickly I double-click a tab, the action method only gets called once.
Is there some simple scenario that you can present that will make it easy to duplicate your problem?
nClick event:
disableButton();That should be
setTimeout('disableButton()', 1) -
Problem file xls with jasper (source code mixed in the content XLS file)
i´m writing xls file with jasper, the problem is that is mixed the source code of the JSP (where doing request) in the content of the file xls, do not import the API thah use.
The java code whit JASPER is like:
FacesContext ctx = FacesContext.getCurrentInstance();
ExternalContext ectx = ctx.getExternalContext();
JRDataSource dataSource = ......
InputStream inputStream = ectx.getResourceAsStream(parametro);
JasperReport jasperReport = (JasperReport) JRLoader.loadObject(inputStream);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,new HashMap(), dataSource);
JRXlsExporter exporter = new JRXlsExporter();
ByteArrayOutputStream xlsReport = new ByteArrayOutputStream();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, xlsReport);
exporter.exportReport();
byte[] bytes2 = xlsReport.toByteArray();
response.setContentType("application/vnd.ms-excel");
response.setContentLength(bytes2.length);
response.setHeader("Content-disposition", "attachment; filename="" + "MI_EXCEL_JR" + ".xls"");
ServletOutputStream outputStream = response.getOutputStream();
outputStream.write(bytes2, 0, bytes2.length);
outputStream.flush();
outputStream.close(); whay is printed the response in the xml file?
tnk for your help....hoham wrote:
byte[] bytes2 = xlsReport.toByteArray();
Not related to the actual problem, but this line is not very efficient. What if the report is bigger than the available server memory? Or if there are many simultaneous requests which does all the same?
It would result in an OutOfMemoryError. Rather obtain it as an InputStream and write it in a loop to the OutputStream using a byte block as buffer. Or wrap the both streams by BufferedInputStream/BufferedOutputStream and write in a simple loop. Consult the basic Java IO tutorials for details and code examples. -
Bridge CS6 crashes with double-click, not with "open with"
Bridge cs6 keeps crashing whenever I double click on a file (jpg/psd/raw files).
After reading on this forum I couldn't find anything that worked for me.
The strange thing is, when I select a file right click open with photoshop CS6 (default) the file opens without any problem in Photoshop.
I have my default file associations of all (image) files set to photoshop CS6.
Any Ideas what can be the problem?
(windows 7 Ultimate and I have double-click edits camera raw setting in bridge marked off, and bridge crashes too when it is marked on)
Thanks!Have made comments on this in Photoshop forum, but have not solved problem yet. http://forums.adobe.com/thread/1184356?tstart=0
-
Double-Click speed with new TrackPad preference pane
I have an original white MacBook. Ever since I updated to 10.5.6 with the new Trackpad preference Pane no matter where I set the Double-click speed setting (everywhere from slow to fast) I constantly get a double click event even when I single click the track pad. Prior to 10.5.6 the trackpad worked perfectly. Has anyone else noticed different behavior since the update? Any solution to getting the correct double-click speed to stick?
I've got a similar problem, but in the opposite direction.
After the 10.5.6 update, my double click speed sticks to slow.
I can change it and make it faster, but after every boot, it starts up with a slow speed again.
I'm on a Early 2008 Macbook Pro (first multitouch, last non unibody) -
Double Click handling with Submit Button
Does a submitButton on the page automatically handle / block the user's double click action?
I have an application where a submit button causes processing & commits to occur.
I want to make sure that when the user "double-click" the button, it doesn't cause problems.
ThanksHi
Does a submitButton on the page automatically handle / block the user's double click action?No it doesnot handles so..
You can write the below code in processRequest method of your controller to disable the button till the moment processing is going on,After processing completes you can again click submit button.
OAWebBean body = pageContext.getRootWebBean();
if(body instanceof OABodyBean)
((OABodyBean)body).setBlockOnEverySubmit(true);
}Please refer to this article for more details
http://mukx.blogspot.com/2009/12/blocking-user-on-submit-action-in-oaf.html
Moreover,if you want to disable the button after first click then on click of get an event redirect it to same page and make it disabled or use Partial page rendering for this.
Thanks
AJ -
How To Upload Object Dependency with Long Source Code
Hi Everyone,
I use LSMW (IDoc:KNOMAS) to upload the Object Dependency with T-Code CU01. However I can not upload the formula/source code within more than 72 characters due to the maximum size of the source code field in dependency editor is 72 characters.
Is there anyone that have the same problem and know the solution? Or is there any advice / tips how to upload the Object Dependency that have long source code?
Any comments is appreciated. Thank you before hand.Hi Mika Permana,
Same Problem am also getting when i was trying to upload more than one object dependency syntax's on CU01,
After that i came to know we can restrict that all those things before 72 character's and we can add all those things to the next line in notepad,
For Example,
Header 1
$SELF.Z_PRICE_HDC= 'HDC30' IF TURNAROUND = 'TAT5' AND NDF_COLOR1 = '4/4'
AND NDF_COLOR1 = '4/4'
Here We cant upload the object dependencies through to excel file,because KCD_EXCEL_OLE_TO_INT_CONVERT and ALSMEX_TABLINE function module having 'Value' field ,its length is 50 only,
so it cant allow after 50th word. so i preferred to use notepad!!!
the following code is for your reference.
LOOP AT i_index WHERE knnam_001 = it_mmtab-knnam_001.
l_count = l_count + 1.
CONCATENATE 'RSTXP-TDLINE(' l_count ')' INTO var1.
PERFORM bdc_field USING var1 " 'RSTXP-TDLINE(01)' " syntax
i_index-tdline_01_006.
IF l_count > 15.
MESSAGE 'LINE ITEM EXCEEDED > 15 ' TYPE 'E'.
ENDIF.
ENDLOOP.
Thanks & Regards,BASTIN VINOTH NGSAP Technical Consultant, Unisoft Infotech Pvt. Ltd., -
E-Commerce for mySAP ERP: Problem with java source code
Hello everybody,
we try to implement web shops on the basis of ECO for ERP 5.0. The shop is running fine and we want to start with some extensions in java classes and web UI with NWDI 2004s.
We created a new track and our own application as described in "Development And Extension Guide". We need to extend some of the original java classes for the b2b scenario and of course the user interface.
We got the information from SAP, that the original java classes are not intended
to be modified by customers and therefore it is not intended to create a project with NWDI that contains that source code. But we should be able to create own DCs and copy the source code into it and then modify them on own risk.
We tried to do that, but always got errors.
Due to customer requirements we have to make some modifications otherwise we can not use this solution.
If there is anybody who has already some experience with this topic we
would be very glad to get some hints.
Kind Regards
HelmutHello Raju,
I am sorry, but I am no technical consultant, but I am have to change
the already installed application for our customers.
Nethertheless I try to give you some information I have. I had a look at SAP note 883948 you mentioned. The software components which are listed under XECO are the software components which contain the E-Commerce Application. You also find them in the "Development and Extension Guide".
There are some guides under http://service.sap.com/instguides -> mySAP Business Suite Solutions -> mySAP ERP -> mySAP ERP 2005 -> Installation. In the document "SAP E-Commerce for mySAP ERP: Business Scenario Configuration Guide" there is a table of the needed components on a high level.
From the view of the application you need the E-Commerce application itself, the TREX for searching in the product catalog, the IPC if you want to have price calculation in the shop or configuration of products with optional components.
Hope this helps a bit
Kind Regards
Helmut
Maybe you are looking for
-
Transfer structure sql2000 from Oracle Designer6.0
I would like to tranfer data (structure) of the SQL Server 7.0/2000 from Oracle through of the Designer 6.0. I tried with script of the Erwin, but I don4t get. As I can make that?
-
I'm trying to find a way to connect my xbox 360 to my mackbook pro. I've searched the internet and found that I can use a eagle eye device but, its to expensive. So after looking at the xbox website, I found a vga adaptor for my xbox and an vga to mi
-
Hi All, Our Client wants to use ODI to integrate with SAP BW and SAP ERP(SAP ECC) systems to extract data . Based on it could you please guide us on the below, Do we have to download SAP BW and SAP ERP adapter seperately ? If so please provide us the
-
Change the Production state of Software Component in SLD
Hello, I cannot see the list of software component to add in Dev Configuration because the Production State of software component is in Planned state and to appear in the list it should be in Devlopment state. How do I change the state. When I login
-
How to Add Still Photo for Movie Trailer?
I can't get iMovie '11 to see any of my iPhoto still pictures to add to a Movie Trailer. How can I do this? The photo icon is gray.