Where to download Java Source Code of Libraries?
Hi Sir/Madam,
Would you please tell me where can I get the Java source code of Libraries?
Specifically for package sap.comcrmtcuserassembly.jar?
I tried to look on to Downloads and Search but can't find it.
Thank you very much in advance.
-jemaru
I've found it, the source codes are downloaded at:
C:\usr\sap\J2E\JC00\j2ee\cluster\server0\apps\sap.com\
Similar Messages
-
Where to find java source code on tiger?
I'm taking a class on java, and i need to open up some of the java source code for classes like Abstractcollections and Abstractlist to see how their implementations work. Does anyone know where the java folder is located and how to open up the source on a mac? I've seen it done on windows( applications-java-java-sdk - unzip, or something like that), but it is not in the same place place on mac.
I've searched through the folders named java but could not figure out which folder to open and how.Hmmm, are you trying to view the Source Code for Abstractcollections and Abstractlist, or find it, or compile it, or what exactly?
Source code can be viewed in any text editor, but BBEdit, TextWrangler, & jEdit are really good...
http://www.barebones.com/products/bbedit/threeway.html
http://www.barebones.com/products/textwrangler/index.html
http://www.jedit.org/index.php?page=download -
Where to download JVM source code? Thanks.
AhJin
Hi,
The JVM consists of the ClassLoader,ByteCode Verifier,and JIT.Now for the developing of the JVM you require to develop all three parts.But Classloader again have BootStrap Classloader,Extension ClassLoader and Application ClassLoader.Out of these you have the BootStrapClassLoader Developed in C++/C(You can check the code).
BootStrap Class Loader is basically developed for all platforms as it will load the rt.jar the basic java classes.So all the OS have different implementaion of this class loader.Rest all is developed in the Java.
Now comming to your query I would like you to check the JAVA_HOME/include directory where you can find win32 and some *.h files which are basically should be the implementation of your JVM.I am talking about the hotspot JVM.
So with the download of hotspot for windows you have source code also embeded in that.
Hope this helps you
regards
Vicky -
Where is java source code for TitledBorder
Where is java source code for TitledBorder?
I don't want to decompile it, as it may be slightly different than the original.
Is it in some jar file on my computer?
ThanksIt's different from the original because the names of objects are different. I decompiled them, because I didn't feel like paging through that URL to find them.
I was trying to fix the TitledBorder, because it leaves like 2 pixels of padding outside of the border, but all the variables I change in that class don't seem to correct that. -
How to read the Java source code (in Netbeans)
I use OS X10.5.5, NetBeans 6.1 and JSE 6 on a 64 bit mac.
When I downloaded NB6.1 it had JSE 5 as it's default (and only) java platform. I ran Software Update to get Java 6 from Apple, used the Java Prefrences utitlity to set JSE6 as default. In NB I added the JDK6 platform, registered the JDK6 javadocs and noticed that I also have the option of registering the Java source code.
I have three questions:
1) How do I make JDK6 the default in NetBeans. The JDK5 keeps being default after I did the steps above and I don't see anywhere to change that.
2) How do I read the Java 6 source code? I can see sun provides [source code| http://download.java.net/jdk6/] for their supported platforms. I dont see Apple doing the same for its JDK port. What would I need to do to get to read the java SE6 sources? or is it actually hiding somewhere in the /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home hierarchy?
3) Where does the JVM look for the binary code to run when I make a call to, say java.util.ArrayList or any other library. In my naivety I would have assumed it would be a .class file somewhere in the java Home folder, but I don't see anything like it.
thanks in advance,
chrisThis is taken from the help included with netbeans. In response to question 1.
By default, the IDE uses the version of the Java SE platform (JDK) with which the IDE runs as the default Java platform
for compilation, execution, and debugging. You can view your IDE's JDK version by choosing Help > About and clicking the
Detail tab. The JDK version is listed in the Java field.
You can run the IDE with a different JDK version by starting the IDE with the --jdkhome jdk-home-dir switch on the command line
or in your IDE-HOME/etc/netbeans.conf file. For more information, see IDE Startup Parameters.
In the IDE, you can register multiple Java platforms and attach Javadoc and source code to each platform. For example, if you
want to work with the new features introduced in JDK 5.0, you would either run the IDE on JDK 5.0 or register JDK 5.0 as a
platform and attach the source code and Javadoc to the platform.
In , you can switch the target JDK in the Project Properties dialog box. In , you have to set the target JDK in the Ant script itself,
then specify the source/binary format in the Project Properties dialog box.
To register a new Java platform:
Choose Tools > Java Platforms from the main window.
Click New Platform and select the directory that contains the Java platform. Java platform directories are marked with a
in the file chooser.
Use the Sources and Javadoc tabs to attach Javadoc documentation and source code for debugging to the platform.
Click Close.
To set the default Java platform for a standard project:
Right-click the project's root node in the Projects window and choose Properties.
In the Project Properties dialog box, select the Libraries node in the left pane.
Choose the desired Java platform in the Java Platform combo box.
Switching the target JDK for a standard project does the following:
Offers the new target JDK's classes for code completion.
If available, displays the target JDK's source code and Javadoc documentation.
Uses the target JDK's executables (javac and java) to compile and execute your application.
Compiles your source code against the target JDK's libraries.
If you want to register additional Java platforms with the IDE, you can do so by clicking the Manage Platforms button.
Then click the Add Platform button and navigate to the desired platform.
To set the target Java platform for a free-form project:
In your Ant script, set the target JDK as desired in the javac, java, and javadoc tasks.
Right-click the project's root node in the Projects window and choose Properties.
In the Sources panel, set the level of JDK you want your application to be run on in the Source/Binary Format combo box.
When you access Javadoc or source code for JDK classes, the IDE searches the Java platforms registered in the
Java Platform Manager for a platform with a matching version number. If no matching platform is found, the IDE's default platform is used instead.
See Also
Managing the Classpath
Declaring the Classpath in a Free-Form Project
Stepping Through Your Program
Legal Notices -
I heard about the possibilty of decompiling the java code and getting back the source code, is this flaw specific to java or is it common among all programming langauges?
how is it possible to protect the source code? and how expensive is the solution?
thank youBack to poster: To my knowledge, the ability tode-compile back to valid source code is unique to
Java.
No it's not. Any program files can be decompiledback
to source code.
If not their original C or C++ code, then at least
assembly code.You cannot decompile C or C++ code to anything but
assembler language. Which even when written by a good
programmer is considered obfuscated by others. I
doubt that anyone has lifted C or C++ code from
another application using a decompiler.yes you can, all binaries can be reverse compiled, logically speaking they have to be!
However, the readability of the output is not going to be as high as that obtained from decompiled java.
>
I would say that de-compilation is not a flaw in Javawhen compared to
powerful features it has to offer. Of course it's a flaw (so I disagree with you here).
People don't want this behavior, but it exists. As I
stated earlier (and I'm agreeing with you on this
one), it was an issue of priorites, and the
developers of Java decided that it was OK because it
allowed "powerful features"...it is a feature - whether it is a desirable feature is another argument entirely.
>
Here's a list of projects where the developers arenot interested in
hiding the source code from you, in fact they let youhave it for free:
Notice the words developers, not software companies.
I believe in open source and participate in it when
not bound by non-disclosure which is 99% of the time.
But I would stand by my statement that there are no
o software companies selling retail software that
believe the ability to decompile Java back to Java
source code is OK or good for them in anyway. I would
gently suggest that providing open source code, and
providing the ability to decompile to source code
really don't belong in the same discussion...Protecting code is not the job of programmers, it is the job of the Law.
rob, -
How to save the user-defined Java source code
Would you please tell me how to download all of the java source code in one software component.
UDFs can be exported one by one as a .mte file...not at one go...
-
Report for downloading the source code of a Program
Hi.
Need a code to download the source code of a Program in a text file and all the includes of that program in a separate coressponding files. <b>This should be with scan and read report statements.It should be with classe CL_GUI_FRONTEND_SERVICES but not with function modules.</b>
Thanks in advance.
Regards,
AshaHi Asha
Use the below program for your purpose.
Report: ZKBPROGS *
Function : Up/Download ABAP reports complete with texts *
Change Log : *
July 5, 1999 *
- Combined existing programs that did the upload and download into*
- one program. *
- Changed format that the reports are saved in to be compatible *
with Wolfgang Morgenthaler's upload/download program(YSTRASN00 *
at www.antarcon.de). Major differences between this program and*
Wolfgang's are:
- 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
Regards,
Sree -
Generate java source cod/ contect menu
I am new to JDeveloper, so please excuse the ignorance. I am using JDeveloper 9.0.3.10.35 and UML modelers 9.0.3.9.4. I am going through the JDeveloper tutorial( Modeling Java Classes tutorial). I design a Class model and i try to generate java source code for some of the java interfaces in the design. The tutorial sates: Choose Generate|Java from the contect menu.
Any idea where is this mysterious conext menu? There is a generate option under model but every thing is grayed out...Any help would be appriciated.Thanks Lisa. The problem really was with the poor instructions provided and a tired mind. There is no "context menu" ala right click on something BTW, right clicking on the main design page does not do any thing and right clicking a class only gives the properties. Anyway, what was meant, i think is to select Java from the main menu "model" and then select Generate/Java. Now since the code is "automatically generated", the Java option was grayed out and that threw me off.
To descover all this i re-did the whole tutorial with only one class and viola, the code was there. -
How to download VOIP source code for windows
I want to download VOIP source code. where can i downoad?how to make a call from VOIP to IVR?
Please help me?
thank uIf your goal is to get an IVR working under windows tries http://www.imagicle.com/Home/tabid/228/language/en-US/Default.aspx
It's not free.
Regards. -
Hello,
I'm trying to download the source code for the Record Working Time iView. None of the ESS-related tracks in NWDI have the code I'm looking for. I've created a new track and put the EA-HR Software Component in it, but when I imported the configuration for the remote DC, there was no code in it to turn into an NWDS project.
I went to the SAP Marketplace and downloaded the installation package, thinking the code would be in there, but there were no .sca files in there when I unpacked it - just a .pat file with no .att file.
My questions are:
- Would the source code be in the maintenace packages? If not, where would I find it?
- I have the EA-HR maintenance packages (EA-HR 605: 0001-0015) in my Approval List awaiting download regardless of whether or not the code I need would be in one of them, who approves this? Would it be someone in my company, or do we need to contact SAP for approval?
Thank you very much,
JamieHi Marcin,
In addition to specialized iView Editors that are available for certain iView types (for example, URL iView Editor and XML iView Editor), you edit other iView properties in the Property Editor.
You must be granted the appropriate permission to edit the iView.
In the Property Editor, you can:
·Customize property values
·Modify metadata attributes of each property
check the below link for any issues.
http://help.sap.com/saphelp_nw04/helpdata/en/13/81a66d100011d7b84b00047582c9f7/content.htm
Regards,
Ponneswari. -
Help: Calling C++ method in Java source code?
I found a method very useful, but it is written in C++, really hate to translate it into Java. My questions are:
1. Is it possible to call it in my java source code?
2. If so, how to call the C++ method in my Java program?To answer your first question, yes it is possible to call your C++ method from Java. There are several answers to your second question, however. You can use the raw procedural JNI and code your own layer that maps your Java proxy object instances to C++ peer instances. Another option is to generate the code for that mapping automatically. How? Download JNI++ (http://jnipp.sf.net or http://www.sf.net/projects/jnipp). JNI++ is a free, open-source toolkit that makes easy work of bi-directional Java <---> C++ integration -- it will even generate your makefile. Comes complete with a 100-page printable PDF User Guide and plenty of examples to get you started.
Good luck with your project.
I found a method very useful, but it is written in
C++, really hate to translate it into Java. My
questions are:
1. Is it possible to call it in my java source code?
2. If so, how to call the C++ method in my Java
program? -
Java Source Code to UML Class Diagram
Can anyone tell me exactly which kinds of relationships may be identified for a UML CLass diagram, directly from 'static' source code..
Note that I am developing my own case tool which will convert from java to uml..
At the moment, I have only managed to get Inheritance and Association relationships..
Where Association is identified by looking at the types of all variables belonging to a class (excluding method variables etc) and if the type of the variable is non-primitive, than I have deduced it is an association relationship with that class.
Would this be the right approach?
Secondly I have noticed in JBuilder, it models dependency relationships by getting all the Imports at the top of the java source file, is this right?? also I have read that a dependency can be modelled by the variable types in operation arguments (paremeterS ?)..
I would also appreciate if someone could clarify the difference betweeen Composition and Aggregation for me and explain if it is possible to identify the two relationships directly from java source code..
Last but not least, what about multiplicity ? am I right in thinking that an instance variable is 0-1, an array declaration is seen as 0-n (fixed number) and a Vector/ data collection.. is seen as 0 - * (any number)..
Thanks for any help,
Regards
Tony.although this post is way old it could do with a decent answer.
some guidance can be taken from JSR26: UML Mapping for EJB
find it a www.jcp.org
also this research paper on consistency of reverse engineering between uml tools
http://citeseer.nj.nec.com/545406.html
Where Association is identified by looking at the types of all variables belonging >to a class (excluding method variables etc) and if the type of the variable is >non-primitive, than I have deduced it is an association relationship with that >class.
Would this be the right approach?Yes. You could also say that if it is a java.* type then it would also be an attribute.
Secondly I have noticed in JBuilder, it models dependency relationships by getting >all the Imports at the top of the java source file, is this right?? also I have >read that a dependency can be modelled by the variable types in operation >arguments (paremeterS ?)..JBuilder would be consistent with JSR26, and that's how i intend to implement in ArgoUml.
I would also appreciate if someone could clarify the difference betweeen >Composition and Aggregation for me and explain if it is possible to identify the >two relationships directly from java source code..Composition is a stronger form of ownership. the composed class is owned only by 1 class. Its lifetime is strongly linked to its owner - ie. it is not created before its owner and it is destroyed before its owner is.
eg. leg of a table.
Agregation is weak ownership. the owned class may be owned by several classes.
eg. a company is owned by many shareholders.
Last but not least, what about multiplicity ? am I right in thinking that an >instance variable is 0-1, an array declaration is seen as 0-n (fixed number) and a >Vector/ data collection.. is seen as 0 - * (any number)..sound right.
Alex -
APT and Java source code generation
Hi all,
In many articles about APT tool, I read that it is possible to generate Java source code from annotations read by AnnotationProcessorFactory.
I am very interesting by this possibility but I can't find an exemple (all exemples I found display informations only).
Where can I find a concrete exemple of this functionnality ?
Thanks
Micka�lMicka�l
I have a project on java.net that has several examples of code generation.
Go to the project source code here.
https://rapt.dev.java.net/source/browse/rapt/
The ones here are quite simple
https://rapt.dev.java.net/source/browse/rapt/src/net/java/dev/rapt/proposed/generators/
and these packages are more complex
https://rapt.dev.java.net/source/browse/rapt/src/net/java/dev/rapt/exploratory/#dirlist
Check out the javadoc to see how they should be used.
One pointer is, work out exactly what you want to generate first. Then code an example by hand, then make sure it compiles and does what you want it to do. That way you know exactly what you need to generate. It is much quicker to fix compiler and functional errors in your hand coded example, than to change the generator, recompile that, then run it to generate and compile the code.
If you do find errors in your generated code, tweak the generated code by hand till it works, then go back and change the generator to do the right thing.
A second point is: generate nicely formatted code, indented etc, then when it doesn't work, or doesn't even compile, you can at least read the generated code to debug it.
Bruce -
Where to get the source code of the owa_cookie.send procedure?
I want to know where you get the source code of the owa_cookie.send procedure? I can only get the header of this package from ...\RDBMS\ADMIN\pubcook.sql. Could you paste the whole source code here and then I can modify it to set the 'httponly' attribute? I also have a problem that after changing the package, how to use the package I changed? Does it still a system package here? Or it has been changed to an user-defined package in database and I need to execute the package on the database for the web server?
Thank you!Hi Arun,
I am unable to see the pcui_gp components in the DTR ,I require this in order to get the source code of one of its component.
Can you please tell me the step by step procedure getting those pcui_gp components from J2ee engine to the dtr or NWDI.
If there are any documents on pcui_gp components exclusively please do forward to my mail id [email protected]
Thansk and Regards,
Anand.
Maybe you are looking for
-
Time Machine error 13 sparsebundle?
Hello - my Time Machine wireless backup was working flawlessly for months from my Seagate GoFlex Home wireless hard drive, backing up my iMac and my MacBook. Now suddenly I'm getting the following message - but only on my MacBook: "Time Machine Error
-
Making JTable columns 2- n scrollable, not the first column, how?
Id like for my JTable's first column to always be visible, and columns 2->n to be scrollable. The table also follows the sortable table model found from the swing examples...so if the user sorts any of the columns, all the other columns should sort a
-
Required Client Deployments Never Kickoff On Time 2012 SP1
SCCM engineers, With other OSD tools, when you design a deployment to kick off at 8:00pm, you actually get that (or pretty close to it). With SCCM 2012 SP1, we've never had luck getting required deployments to start on time...which is a problem when
-
CS5: Why do I need 2 places to define the Chapter Number style?
Hello, I was wondering, when I use Chapter Number via the text Variables, I can define the nubers style over there, but I can also define it via Numbering and Sections options. Why do I need 2 places to define that? thanks, shlomit
-
Dear All, I am trying to read the workflow task data. I am able to read the header data through this table swwwihead. and after that i called this FM SAP_WAPI_READ_CONTAINER but all i can read through this FM is the idoc number. so I am looping throu