Import statement in .java files and .jsp files ..correction
Guys I have few mysteries about this import statement.
Please correct me if I am wrong.
1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement in two.java I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import one.class in My.jsp .That is i have to say
<%@page import="one"%>
in My.jsp.
and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder and MyJsp is compiled sucessfully.(Note that My.class is created in a folder different from c:\ClassFolder )
But I am wondering why was there no need for me to import one.class in two.java.
(Note I am using JDeveloper and Apache server)
Please help.
It has to do with packages. Most java classes are in a package, the name of which must conform to its place on the filesystem relative to the classpath. By that I mean that if you have com.mystuff.One.java, it must be in a folder com/mystuff where com is located somewhere in the classpath.
What you've done is a little different. I'm assuming a couple of things:
1. you have no package declaration at the top of one.java or two.java
2. you have the current directory "." in your classpath.
Java has the concept of the "default package", which covers classes without a declared package, and in your case is the current directory.
So when you're in c:\sourcefolder and run the compiler, then "."="c:\sourcefolder", and that directory is part of the default package. No import statements are necessary for classes that are in the same package. This is why two.java can call methods in one.java without an import statement.
When you run your jsp, the "current directory" part of your classpath is not c:\sourcefolder, but some other value (probably the directory you start your jsp engine from) You will have to import all non-java-library classes because the jsp itself becomes a java class, with a package that is determined by the jsp engine.
Similar Messages
-
Import statement in .java files and .jsp files
Guys I have few mysteries about this import statement.
Please correct me if I am wrong.
1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import the class I want to use.That is i have to say
<%@page import="one"%>
and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder.(Note that My.class is created in a folder different from c:\ClassFolder )
But I am wondering why was there no need for me to import one.class in two.java.
(Note I am using JDeveloper and Apache server)
Please help.
In this case the pSo I am wondering in JSP why it doesn't take the class I am looking for from the classpath .
Help.You have to understand Java scoping rules. In the 1st scenario with the two Java files I am guessing neither one of them begins with a package statement. This means that they belong to the default package. When you compile the compiler uses the classpath to resolve method calls looking in the default package since there was no import statement specified in two.java. JSP is a little different. Now I just read this here in these forums a couple of days ago. Since the classfiles generated from the JSP files are not in the CLASSPATH they are loaded by a different classloader. This is why you have to import all references to all classes in the default package.
-
Hi everyone,
I build a class in java, and now i wanna use this class in my jsp file.
I put that class into web-inf/classes in Apache Tomcat, but don't work.... Anyone can help me?
Greetings!Put the class with its package such as com.sun.ejb.MyClass
-- > /WEB-INF/classes/com/sun/ejb/MyClass.class
then use it
http://www.skillipedia.com -
Help me to convert Java and Jsp Files into WAR File!!!!
I need someone to help me to convert some java servlet files and jsp files into a WAR file. I need it URGENTLY and I'll be very grateful to anyone who is willing to help me! My email is [email protected] Thanks!!!!
Are the Oracle JDBC drivers 11g used?
oracle.jdbc.driver.OracleDriver is not supported in 11g drivers.
Please replace with:
oracle.jdbc.OracleDriver -
Dear all,
I am trying to do multinode installtion on AIX 5.3 HACMP . During post installation i am getting this error.
Dbc file and Jsp error
Updating Server Security Authentication
java.sql.SQLException: Io exception: Invalid number format for port number
Database connection to jdbc:oracle:thin:@host_name:port_number:database failed
Updating Server Security Authentication failed with exit code 1
adgendbc.sh exiting with status 1
ERRORCODE = 1 ERRORCODE_END
SQLPLUS Executable : /mglapp/oramgl/mglora/8.0.6/bin/sqlplus
SP2-0642: SQL*Plus internal error state 2165, context 4294967295:0:0
Unable to proceed
ERRORCODE = 1 ERRORCODE_END
Thanks in advanceMaybe you have problem with the date format, please ensure that NLS_DATE_FORMAT env variable is set to a valid value.
Please view SP2-0642: Sql*Plus Internal Error State 2165, Context 4294967295:0:0 Doc ID: Note:396154.1.
Hope it helps.
Adith -
ASAP Is any Java libraries exist to modify Excel file and PDF file
Is any Java libraries exist to modify Excel file and PDF file. I know about the third party libraries like Apache poi and many more. But I want to know about java libraries not the third party tools.
Souvik_Software wrote:
I don't know what you guys want. I simply asked for a answer and because me want it urgently that is why I have written "ASAP". But I think you are more energetic in fighting not with the answer. Thanks for the help.By flagging it with words as "ASAP" and "Urgent" your are implying that your question is more important than other people's questions or that your time is more valuable than the time of people answering questions here. So you see, by doing so, you sound rather selfish.
But, the answer to the question in your original post is: "no, there are no classes in the core Java API that do what you want". Simple. -
I am having issues checkin/checkout html, js and jsp files in Microsoft Sharepoint Workspace 2010. I can access (checkin/checkout) any files in the actual Sharepoint site, but when I am synchronized to the site in Sharepoint Workspace 2010 I cannot access
html, js, and jsp files. When I try to checkout a html file, a message pops up saying:
"Can not perform this operation. This document has been checked out or may no longer exist."
Could this be a synchronization issue, or was Sharepoint Workspace 2010 not design to work with html, js, txt, and jsp files?Hi Armando,
I'm afraid that you posted your question on the wrong forum. This forum is intended for Project Server questions. Please go to this forum in order to have answers from experts:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/home?category=sharepoint&filter=alltypes&sort=lastpostdesc
Cheers.
Guillaume Rouyre - MBA, MCP, MCTS -
Import dimension and member via maxl, how to create data file and rule file
Hi
I have a task to import dimension and member into Essbase, for project requirement, I have to use text file or spreadsheet file.
I wonder which format can be imported into Essbase?
I tried to create them, failed.
Do you have any samples to help me? dimension file and rule file...
I search a lot in http://gerardnico.com/wiki/epm/essbase/dimension_build#about , but there are no samples.
Thanks in advance...
Best regards,
Samanthaimport database Sample.Basic data from data_file 'C:\TEMP\GENREF.txt' using rules_file 'C:\TEMP\GENREF.rul' on error append to 'C:\TEMP\logs\dimbuild.log';Here issue is not with rulefile but in reading the rule file.
I hope rule file is in the database directory (By default it will get saved there only)
Try with the below command
import database Sample.Basic data from data_file 'C:\TEMP\GENREF.txt' using server rules_file 'GENREF' on error append to 'C:\TEMP\logs\dimbuild.log';
Rule file also had one issue
Market, Product, Measures, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, DecHere I am seeing only four dimensions from the Sample.Basic database
Scenario is missing. So define Actual (Scenario Dimension member) in the rule file header definition.
All dimensions must be identified to parse one data file with rule file.
PS: Naming (GENREF) is also irrelevant if you are loading data. It is apt for dim load. -
Hi all, need data file and co file after single transport in 6.4 or 6.7
hi all
following is the requirement
To process/compile the attached programs (given below) in 6.4/7 Kernel (SAP 6.4 version or 6.7 version )and send a single transport (Data File and Co File).
these data file and co file are flat files.
CAN ANYONE HELP ME GETTING THESE FLAT FILES. I need these flat files urgently.
WHAT U HAVE TO DO IS:
IF U HAVE 6.4 OR 6.7 VERSION, JUST TRANSPORT FOLLOWING 10 PROGRAMS IN SINGLE TRANSPORT IN TESTING SYSTEM OR DEVELOPEMENT SYSTEM AND AFTER GETTING DATA FILE AND CO FILE U CAN REVERT THE TRANSPORT.
Programs files are as follows: (total number of prog is 10)
1.
FUNCTION Z_3N_CKS_EXIST_USER .
""Local interface:
*" IMPORTING
*" VALUE(CKSUSRID) TYPE USR02-BNAME
*" VALUE(CKSMDTID) TYPE USR02-MANDT DEFAULT SY-MANDT
*" EXPORTING
*" VALUE(RCODE) TYPE SY-SUBRC
*" EXCEPTIONS
*" USER_DONT_EXIST
*" USER_EXISTS
FUNCTION TO CHECK IF USER EXISTS
CLEAR RCODE.
CALL FUNCTION 'USER_EXISTS'
EXPORTING
BNAME = CKSUSRID
CLIENT = CKSMDTID
EXCEPTIONS
USER_DONT_EXIST = 1
USER_EXISTS = 0.
RCODE = SY-SUBRC.
ENDFUNCTION.
2.
FUNCTION Z_3N_CKS_LOCKSTATE.
""Local interface:
*" IMPORTING
*" VALUE(CKSUSRID) TYPE USR02-BNAME
*" EXPORTING
*" VALUE(RCODE) TYPE SY-SUBRC
FUNCTION TO OBTAIN THE CURRENT LOCK STATUS FOR A USER
*{ PASSGOAPR06
*\DATA:LOCKSTATE(50) type c,
*\C_LOCKED_BY_ADMIN like usr02-uflag.
*\tables:usr02.
DATA:LOCKSTATE(50) type c.
*} PASSGOAPR06
CLEAR: RCODE, LOCKSTATE.
SELECT SINGLE * FROM USR02 WHERE BNAME = CKSUSRID.
IF SY-SUBRC <> 0.
RCODE = 01. "No such User
EXIT.
ENDIF.
*{ PASSGOAPR06
IF USR02-UFLAG Z C_LOCKED_BY_ADMIN AND
USR02-UFLAG Z C_LOCKED_BY_FAILED_LOGON.
LOCKSTATE = 'UNLOCKED'.
RCODE = 00.
ELSE.
IF USR02-UFLAG O C_LOCKED_BY_FAILED_LOGON.
LOCKSTATE = 'LOCKED_BY_FAILED_LOGON'.
RCODE = 02.
ENDIF.
IF USR02-UFLAG O C_LOCKED_BY_ADMIN.
LOCKSTATE = 'LOCKED_BY_ADMIN'.
RCODE = 02.
ENDIF.
ENDIF.
uflag = usr02-uflag.
IF UFLAG Z C_LOCKED_BY_ADMIN AND
UFLAG Z C_LOCKED_BY_FAILED_LOGON.
LOCKSTATE = 'UNLOCKED'.
RCODE = 00.
ELSE.
IF UFLAG O C_LOCKED_BY_FAILED_LOGON.
LOCKSTATE = 'LOCKED_BY_FAILED_LOGON'.
RCODE = 02.
ENDIF.
IF UFLAG O C_LOCKED_BY_ADMIN.
LOCKSTATE = 'LOCKED_BY_ADMIN'.
RCODE = 02.
ENDIF.
ENDIF.
*} PASSGOAPR06
ENDFUNCTION.
3.
FUNCTION Z_3N_CKS_PWDCHG_INITIAL.
""Local interface:
*" IMPORTING
*" VALUE(CKSUSRID) TYPE USR02-BNAME
*" VALUE(CKSUSRPWD) TYPE RSYST-BCODE
*" EXPORTING
*" VALUE(RCODE) TYPE SY-SUBRC
*" TABLES
*" RETURN STRUCTURE BAPIRET2
FUNCTION TO INITIALISE USERs PASSWORD, USER WILL BE FORCED
TO CHANGE PASSWORD ON NEXT LOGIN
CLEAR: USR02, RCODE.
SELECT SINGLE * from USR02 WHERE BNAME = CKSUSRID.
IF SY-SUBRC <> 0.
RCODE = 01.
else.
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
USERNAME = CKSUSRID
PASSWORD = CKSUSRPWD
PASSWORDX = 'X'
TABLES
RETURN = RETURN.
loop at return.
if return-type eq 'E' or return-type eq 'A'.
rcode = 13.
endif.
endloop.
endif.
ENDFUNCTION.
4.
FUNCTION Z_3N_CKS_VERIFY_USER.
""Local interface:
*" IMPORTING
*" VALUE(CKSUSRID) TYPE RSYST-BNAME
*" VALUE(CKSUSRPWD) TYPE RSYST-BCODE OPTIONAL
*" EXPORTING
*" VALUE(RCODE) TYPE SY-SUBRC
FUNCTION TO VALIDATE A USER
*{ PASSGOAPR06
TABLES:USR02.
CLEAR: USR02, RCODE.
SELECT SINGLE * from USR02 WHERE BNAME = CKSUSRID.
IF SY-SUBRC = 4.
RCODE = 01. "no such user
EXIT.
ELSEIF CKSUSRPWD = SPACE.
RCODE = 03. "invalid old password
EXIT.
ELSE.
CALL FUNCTION 'SUSR_LOGIN_CHECK_RFC'
EXPORTING
BNAME = CKSUSRID
PASSWORD = CKSUSRPWD
EXCEPTIONS
WAIT = 1
USER_LOCKED = 2
USER_NOT_ACTIVE = 3
PASSWORD_EXPIRED = 4
WRONG_PASSWORD = 5
NO_CHECK_FOR_THIS_USER = 6
INTERNAL_ERROR = 7
OTHERS = 8
CASE SY-SUBRC.
WHEN '2'. RCODE = 02. "user disabled/blocked
WHEN '3'. RCODE = 02. "user disabled/blocked
WHEN '4'. RCODE = 03. "invalid old password
WHEN '5'. RCODE = 03. "invalid old password
WHEN '8'. RCODE = 12. "internal error
ENDCASE.
ENDIF.
*} PASSGOAPR06
ENDFUNCTION.
5.
*& Include ZMS01JTOP *
PROGRAM MS01JTOP MESSAGE-ID 01 LINE-SIZE 132. "Berechtigungsdatenpflege
13.08.93
INCLUDE MS01CTP2.
INCLUDE MS01CTCO.
TABLES: XU200, XU213, XU310, XU350, XU390, XU400.
TABLES: TSTC, TSP03, TPARA, TPARAT.
TABLES: *USR01, *USR03, USR15.
TABLES: SOUD, SOUD3.
*ABLES: ZCSA, ADRS.
*{ PASSGOAPR06
TABLES: usr02.
DATA: uflag type x.
DATA: begin of return occurs 0.
INCLUDE structure bapiret2.
DATA: end of return.
DATA calling_cksusrid like usr02-bname.
DATA: init_pass like BAPIPWD.
INCLUDE USER_CONSTANTS.
*} PASSGOAPR06
CONTROLS TC213 TYPE TABLEVIEW USING SCREEN 213.
CONTROLS TC520 TYPE TABLEVIEW USING SCREEN 350.
DATA: COPYOK TYPE I,
RENAMEOK TYPE I,
DATFM1,
DATFM2,
DATFM3,
DATFM4,
DCPFM1,
DCPFM2,
USERNAME LIKE USR01-BNAME,
LOCK,
UNLO,
STATFLAG TYPE I VALUE 0,
NAVIFLAG TYPE I VALUE 0,
PARTOPIX TYPE I,
PARFILL TYPE I,
PARAMETER LIKE USR05-PARVA,
PARID LIKE USR05-PARID,
PARLOOP LIKE SY-STEPL,
SHOW_ONLY VALUE ' ',
INTPRO_LOADED TYPE I VALUE 0,
EXT_SECURITY VALUE ' '.
DATA: H_201_USGRP LIKE USGRP-USERGROUP,
H_201_VALID TYPE C,
CC201 LIKE SY-CUCOL VALUE 2,
CR201 LIKE SY-CUROW VALUE 6,
SAVE_LINE201 LIKE SY-LILLI VALUE 1,
SAVE_LSIND201 LIKE SY-LSIND VALUE 1.
DATA: OFFICENAME LIKE SOUD-USRNAM.
DATA: BEGIN OF NAME_IN.
INCLUDE STRUCTURE SOUD3.
DATA: END OF NAME_IN.
DATA: BEGIN OF NAME_OUT.
INCLUDE STRUCTURE SOUD3.
DATA: END OF NAME_OUT.
DATA: BEGIN OF EMPTYPROF OCCURS 2.
INCLUDE STRUCTURE USREF.
DATA: END OF EMPTYPROF.
DATA: BEGIN OF PROFILES OCCURS 10.
INCLUDE STRUCTURE USREF.
DATA: END OF PROFILES.
DATA: MAXPAR TYPE I VALUE 300.
DATA: BEGIN OF TABPAR OCCURS 300,
PARID LIKE USR05-PARID,
PARVA LIKE USR05-PARVA,
END OF TABPAR.
DATA: BEGIN OF DELTAB OCCURS 50,
USGRP LIKE USR02-CLASS,
END OF DELTAB.
DATA: BEGIN OF ADDTAB OCCURS 50,
USGRP LIKE USR02-CLASS,
END OF ADDTAB.
DATA: BEGIN OF ADDRESS_DATA.
INCLUDE STRUCTURE SADRP_USR.
DATA: END OF ADDRESS_DATA.
DATA:
CLEAR TYPE X VALUE '00'.
*ATA: BEGIN OF ADRSDATEN.
INCLUDE STRUCTURE ADRS.
*ATA: END OF ADRSDATEN.
06.10.95 Tosun
DATA 930_FLAG.
"$$
6.
FUNCTION Z_3N_CKS_LOCK_USER.
""Local interface:
*" IMPORTING
*" VALUE(CKSUSRID) TYPE USR02-BNAME
*" EXPORTING
*" VALUE(RCODE) TYPE SY-SUBRC
CLEAR RCODE.
*{ PASSGOAPR06
*\ PERFORM LOCK_USER IN PROGRAM ZSAPMS01J USING CKSUSRID.
*\ IF SY-SUBRC <> 0.
*\ RCODE = SY-SUBRC.
*\ EXIT.
*\ ELSE.
*\ COMMIT WORK.
*\ ENDIF.
the report (form) is dumping.
so we try it with the correct BAPI
CALL FUNCTION 'BAPI_USER_LOCK'
EXPORTING
USERNAME = CKSUSRID
TABLES
RETURN = return
IF return-type <> 'S'.
RCODE = '8'.
rollback work.
EXIT.
ENDIF.
*} PASSGOAPR06
ENDFUNCTION.
7.
FUNCTION Z_3N_CKS_PWDCHG_DIRECT.
""Local interface:
*" IMPORTING
*" VALUE(CKSUSRID) TYPE USR02-BNAME
*" VALUE(CKSUSRPWD) TYPE RSYST-BCODE
*" EXPORTING
*" VALUE(RCODE) TYPE SY-SUBRC
*" TABLES
*" RETURN STRUCTURE BAPIRET2
FUNCTION TO CHANGE USERs PASSWORD
Password is initialised to a fixed value,
to avoid having to provide the valid old password
If the password change fails, the change is
rolled back - this is required because
BAPI_USER_CHANGE does an internal commit.
CLEAR: USR02, RCODE.
DATA: L_TIME LIKE SY-UZEIT,
ZLIN TYPE I.
*{ PASSGOAPR06
calling_cksusrid = cksusrid. "Save calling userid
init_pass = 'INITPASS'.
*} PASSGOAPR06
do 1 times.
SELECT SINGLE * from USR02 WHERE BNAME = CKSUSRID.
IF SY-SUBRC <> 0.
RCODE = 1.
else.
* Change login to initpass.
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
USERNAME = CKSUSRID
*{ PASSGOAPR06
*\ PASSWORD = 'INITPASS'
PASSWORD = init_pass
*} PASSGOAPR06
PASSWORDX = 'X'
TABLES
RETURN = RETURN.
* Evaluate return table, if not success, rcode = 13
describe table return lines zlin.
IF zlin > 0.
IF return-type ne 'S'.
rcode = 13.
exit.
ENDIF.
ENDIF.
* Wait 1 second, otherwise table ush02 gets the same key as before.
* Not very good, but its the only way, because the wait up to
* statement includes a db-commit.
L_TIME = sy-uzeit.
WHILE L_TIME = sy-uzeit.
GET TIME.
ENDWHILE.
* Change 'INITPASS' to input login
CALL FUNCTION 'SUSR_USER_CHANGE_PASSWORD_RFC'
EXPORTING
BNAME = CKSUSRID
PASSWORD = 'INITPASS'
NEW_PASSWORD = CKSUSRPWD
NEW_BCODE = '0000000000000000'
NEW_CODVN = ' '
EXCEPTIONS
CHANGE_NOT_ALLOWED = 1
PASSWORD_NOT_ALLOWED = 2
INTERNAL_ERROR = 3
CANCELED_BY_USER = 4
OTHERS = 5.
case sy-subrc.
when '0'. rcode = 0.
when '1'. rcode = 2.
when '2'. rcode = 4.
when '3'. rcode = 12.
when '4'. rcode = 2.
when '5'. rcode = 12.
ENDCASE.
ENDIF.
exit. "end of do 1 times "
enddo.
* rollback if it didn't work
if not rcode is initial.
rollback work.
endif.
ENDFUNCTION.
8.
FUNCTION Z_3N_CKS_UNLOCK_USER.
""Local interface:
*" IMPORTING
*" VALUE(CKSUSRID) TYPE USR02-BNAME
*" EXPORTING
*" VALUE(RCODE) TYPE SY-SUBRC
CLEAR RCODE.
*{ PASSGOAPR06
*\ PERFORM UNLOCK_USER IN PROGRAM ZSAPMS01J USING CKSUSRID.
*\ IF SY-SUBRC <> 0.
*\ RCODE = SY-SUBRC.
*\ EXIT.
*\ ELSE.
*\ COMMIT WORK.
*\ ENDIF.
the report (form) is dumping.
so we try it with the correct BAPI
CALL FUNCTION 'BAPI_USER_UNLOCK'
EXPORTING
USERNAME = CKSUSRID
TABLES
RETURN = return
IF return-type <> 'S'.
RCODE = '8'.
rollback work.
EXIT.
ENDIF.
*} PASSGOAPR06
ENDFUNCTION.
9.
*& Include ZMS01JO10 *
MS01JO10 Module before Output
14.05.93
MODULE D150_SELECT *
Einen Eintrag aus der Liste uebernehmen. *
MODULE D150_SELECT OUTPUT.
IF SELE = 1.
IF SY-LILLI < 3.
MESSAGE S209.
ELSE.
IF USRFLAG = 10 AND SY-LILLI = 3.
MESSAGE S209.
ELSE.
IF USRFLAG = 10.
XU150-VON = SY-LISEL.
ELSE.
COUNTX = PUSR - 1.
ASSIGN SY-LISEL+COUNTX(12) TO <TEXT>. " unicode
WRITE <TEXT> TO XU150-VON.
ENDIF.
ENDIF.
ENDIF.
SELE = 0.
ENDIF.
IF FERTIG = 2.
FCODE = 'BACK'.
SUPPRESS DIALOG.
ENDIF.
ENDMODULE.
MODULE D150_SETSTATUS *
PF-Status setzen *
MODULE D150_SETSTATUS OUTPUT.
PERFORM SET_STATUS USING 150.
XU150-SELPROF = XU150-SELFEST = XU150-SELADRE = XU150-SELPARA = 'X'.
XU150-SELMENU = 'X'.
ENDMODULE.
MODULE D155_SETSTATUS *
PF-Status setzen *
MODULE D155_SETSTATUS OUTPUT.
PERFORM SET_STATUS USING 155.
ENDMODULE.
MODULE D200_SELECT *
Einen Eintrag aus der Liste ins Dynpro uebernehmen *
MODULE D200_SELECT OUTPUT.
IF SELE = 1.
IF SY-LILLI < 3.
MESSAGE S209.
ELSE.
XU200-XUSER = SY-LISEL.
ENDIF.
SELE = 0.
ENDIF.
IF FCODE2 = 'USER' OR FCODE2 = 'FEST' OR FCODE2 = 'ADRE' OR
FCODE2 = 'PARA' OR FCODE2 = 'ADMI' OR FCODE2 = 'RESE' OR
FCODE2 = 'N '.
SUPPRESS DIALOG.
ENDIF.
PERFORM SET_STATUS USING 200.
ENDMODULE.
MODULE D213_VALOUT *
Festwerte auf das Dynpro schreiben. *
MODULE D213_VALOUT OUTPUT.
DEL = 0.
XU213-DIA = '.'.
XU213-ODC = '.'.
XU213-BDC = '.'.
XU213-CPIC = '.'.
XU213-BATCH = '.'.
CASE USR02-USTYP.
WHEN TYPDIA.
XU213-DIA = 'X'.
WHEN TYPBATCH.
XU213-BATCH = 'X'.
WHEN TYPCPIC.
XU213-CPIC = 'X'.
WHEN TYPBDC.
XU213-BDC = 'X'.
WHEN TYPODC.
XU213-ODC = 'X'.
ENDCASE.
IF USR02-LTIME <> SPACE AND USR02-LTIME <> '000000'.
LOOP AT SCREEN.
CASE SCREEN-GROUP1.
WHEN 'MOD'.
SCREEN-INVISIBLE = '1'.
SCREEN-INPUT = '0'.
MODIFY SCREEN.
ENDCASE.
ENDLOOP.
SET CURSOR FIELD 'USR02-CLASS'.
IF F <> ' ' AND L <> 0.
SET CURSOR FIELD F LINE L.
ENDIF.
CODEFLAG = 1.
ELSE.
CLEAR XU213-BCODE.
CLEAR XU213-BCODE2.
IF USR02-BCODE <> '0000000000000000' AND BCODE_C = SPACE.
CODEFLAG = 0.
ENDIF.
IF CODEFLAG = -2.
SET CURSOR FIELD 'XU213-BCODE'.
MESSAGE S290.
ELSE.
SET CURSOR FIELD 'USR02-CLASS'.
IF F <> ' ' AND L <> 0.
SET CURSOR FIELD F LINE L.
ENDIF.
ENDIF.
ENDIF.
ENDMODULE.
MODULE D213_SELECT *
Einen Eintrag aus der Liste uebernehmen. *
MODULE D213_SELECT OUTPUT.
IF SELE = 1.
IF SY-LILLI < 4.
MESSAGE S209.
ELSE.
ASSIGN SY-LISEL(PROFLNG) TO <TEXT>.
MOVE <TEXT> TO XU213-PROFILE.
PERFORM AUTH_CHECK USING OBJ_PROF
XU213-PROFILE SPACE ACT_INCLUDE RC.
IF RC <> 0.
MESSAGE S478 WITH XU213-PROFILE.
ELSE.
FOUND = 0.
LOOP AT TABUSR.
IF TABUSR-PROFILE = XU213-PROFILE.
FOUND = 1.
MESSAGE S268 WITH XU213-PROFILE.
EXIT.
ENDIF.
ENDLOOP.
IF FOUND = 0.
PERFORM EXIST_USR10
USING XU213-PROFILE AKTIVATED SPACE RC.
CLEAR TABUSR.
TABUSR-PROFILE = XU213-PROFILE.
IF USR10-TYP = COLECTPROF.
TABUSR-SAMPROF = 'X'.
ENDIF.
Profiletext lesen
CLEAR USR11.
SELECT SINGLE * FROM USR11
WHERE LANGU = SY-LANGU
AND PROFN = TABUSR-PROFILE
AND AKTPS = AKTIVATED.
TABUSR-PTEXT = USR11-PTEXT.
APPEND TABUSR.
XU213-FILL = XU213-FILL + 1.
IF XU213-FILL >= MAXUSR.
MESSAGE S269.
ENDIF.
UCHANGE = 1.
PERFORM NOTSAVED.
ENDIF.
ENDIF.
ENDIF.
SELE = 0.
ENDIF.
PERFORM SET_STATUS USING 213.
PERFORM MESSAGE.
IF EXT_SECURITY <> '1'.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'EXT'.
SCREEN-INPUT = '0'.
SCREEN-INVISIBLE = '1'.
SCREEN-ACTIVE = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDMODULE.
MODULE D213_PROFOUT *
Profiles auf den Bildschirm ausgeben. *
MODULE D213_PROFOUT OUTPUT.
include <symbol>.
COUNTX = XU213-TOPIX + SY-STEPL - 1. "Bild-oben-Pos. in Tab. feststell
IF COUNTX <= XU213-FILL. "Am Ende der Tabelle ?
READ TABLE TABUSR INDEX COUNTX. "Tab. lesen
IF SY-SUBRC = 0.
MOVE-CORRESPONDING TABUSR TO XU213. "Daten auf den Bildschirm
xu213-samprof = sym_documents.
ENDIF.
ENDIF.
USRLOOP = SY-LOOPC.
ENDMODULE.
MODULE D254_SUPPRESS *
Dialog fuer Dynpro 254 unterdruecken *
MODULE D254_SUPPRESS OUTPUT.
SUPPRESS DIALOG.
ENDMODULE.
MODULE D310_SETSTATUS *
PF-Status setzen *
MODULE D310_SETSTATUS OUTPUT.
IF SHOW_ONLY = SPACE.
PERFORM SET_STATUS USING 310.
IF STATFLAG = 1.
LOOP AT SCREEN.
IF SCREEN-NAME = 'USR01-CATTKENNZ '.
AUTHORITY-CHECK OBJECT 'S_DEVELOP'
ID 'DEVCLASS' DUMMY
ID 'OBJTYPE' FIELD 'SCAT'
ID 'OBJNAME' DUMMY
ID 'P_GROUP' DUMMY
ID 'ACTVT' FIELD '70'.
IF SY-SUBRC <> 0.
SCREEN-INPUT = 0.
SCREEN-INVISIBLE = 1.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ELSE.
PERFORM SET_STATUS USING 330.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'RO '.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
CLEAR FCODE.
ENDMODULE.
MODULE D310_FORMAT_OUT. *
Datumsformat und Dezimalpunktformat entsprechend Daten aus usr01 *
ankreuzen. *
MODULE D310_FORMAT_OUT OUTPUT.
XU310-DATFM1 = ' '.
XU310-DATFM2 = ' '.
XU310-DATFM3 = ' '.
XU310-DATFM4 = ' '.
XU310-DATFM5 = ' '.
XU310-DCPFM1 = ' '.
XU310-DCPFM2 = ' '.
XU310-SPDB1 = ' '.
XU310-SPDA1 = ' '.
IF USR01-DATFM < 1 OR USR01-DATFM > 5.
CALL 'C_SAPGPARAM'
ID 'NAME' FIELD 'zcsa/moddatfm'
ID 'VALUE' FIELD USR01-DATFM.
ENDIF.
CASE USR01-DATFM.
WHEN 1.
XU310-DATFM1 = 'X'.
WHEN 2.
XU310-DATFM2 = 'X'.
WHEN 3.
XU310-DATFM3 = 'X'.
WHEN 4.
XU310-DATFM4 = 'X'.
WHEN 5.
XU310-DATFM5 = 'X'.
WHEN OTHERS.
XU310-DATFM1 = 'X'.
ENDCASE.
IF USR01-DCPFM = ' '.
XU310-DCPFM1 = 'X'.
ELSE.
XU310-DCPFM2 = 'X'.
ENDIF.
IF USR01-SPDB = 'G'.
XU310-SPDB1 = 'X'.
ENDIF.
IF USR01-SPDA = 'D'.
XU310-SPDA1 = 'X'.
ENDIF.
CLEAR TSP03.
SELECT SINGLE * FROM TSP03
WHERE PADEST = USR01-SPLD.
ENDMODULE.
MODULE D320_SETSTATUS *
PF-Status setzen *
MODULE D320_SETSTATUS OUTPUT.
IF SHOW_ONLY = SPACE.
PERFORM SET_STATUS USING 320.
ELSE.
PERFORM SET_STATUS USING 340.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'RO '.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
CLEAR FCODE.
ENDMODULE.
MODULE D330_SETSTATUS *
PF-Status setzen *
MODULE D330_SETSTATUS OUTPUT.
PERFORM SET_STATUS USING 330.
ENDMODULE.
MODULE D340_SETSTATUS *
PF-Status setzen *
MODULE D340_SETSTATUS OUTPUT.
PERFORM SET_STATUS USING 340.
ENDMODULE.
MODULE D350_SETSTATUS *
PF-Status setzen *
MODULE D350_SETSTATUS OUTPUT.
IF SELE = 1.
IF SY-LILLI < 3.
MESSAGE S209.
ELSE.
TABPAR-PARID = SY-LISEL.
APPEND TABPAR.
PARFILL = PARFILL + 1.
ENDIF.
SELE = 0.
ENDIF.
IF SHOW_ONLY = SPACE.
PERFORM SET_STATUS USING 350.
ELSE.
PERFORM SET_STATUS USING 360.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'RO '.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
CLEAR FCODE.
ENDMODULE.
MODULE D350_PAROUT *
Parameter auf den Bildschirm ausgeben. *
MODULE D350_PAROUT OUTPUT.
COUNTX = PARTOPIX + SY-STEPL - 1. "Bild-oben-Pos. in Tab. feststell
IF COUNTX <= PARFILL. "Am Ende der Tabelle ?
READ TABLE TABPAR INDEX COUNTX. "Tab. lesen
IF SY-SUBRC = 0.
MOVE-CORRESPONDING TABPAR TO XU350. "Daten auf den Bildschirm
SELECT SINGLE * FROM TPARAT
WHERE SPRACHE = SY-LANGU
AND PARAMID = TABPAR-PARID.
ENDIF.
ENDIF.
PARLOOP = SY-LOOPC.
ENDMODULE.
MODULE D351_SETSTATUS *
PF-Status setzen *
*ODULE D351_SETSTATUS OUTPUT.
IF SELE = 1.
IF SY-LILLI < 3.
MESSAGE S209.
ELSE.
XU350-PARID = SY-LISEL.
ENDIF.
SELE = 0.
ENDIF.
PERFORM SET_STATUS USING 352.
SUPPRESS DIALOG.
*NDMODULE.
MODULE D360_SETSTATUS *
PF-Status setzen *
MODULE D360_SETSTATUS OUTPUT.
PERFORM SET_STATUS USING 360.
ENDMODULE.
MODULE D390_STATUS *
PF-Status setzen. *
MODULE D390_STATUS OUTPUT.
data uflag_x type x. " unicode
SELECT SINGLE * FROM USR02
WHERE BNAME = XU200-XUSER.
uflag_x = USR02-UFLAG. " unicode
IF SY-SUBRC <> 0.
XU390-STATTEXT = ' Nicht vorhanden.'(222).
ELSE.
IF uflag_x Z YULOCK AND uflag_x Z YUSLOC. " unicode
PERFORM SET_STATUS USING 390.
XU390-STATTEXT = ' Nicht gesperrt. '(223).
ELSE.
IF uflag_x O YULOCK. " unicode
PERFORM SET_STATUS USING 391.
XU390-STATTEXT = ' Durch Falschanmeldungen gesperrt !!!'(224).
ENDIF.
IF uflag_x O YUSLOC. " unicode
PERFORM SET_STATUS USING 391.
XU390-STATTEXT = ' Durch Systemmanager gesperrt !!!'(225).
ENDIF.
ENDIF.
ENDIF.
LOCK = '.'.
UNLO = '.'.
ENDMODULE.
MODULE D400_CLEAR_CODE *
Passwortfeld loeschen. *
MODULE D400_CLEAR_CODE OUTPUT.
CLEAR XU400-NEWCODE.
CLEAR XU400-NEWCODE1.
ENDMODULE.
MODULE D400_SETSTATUS *
PF-Status setzen *
MODULE D400_SETSTATUS OUTPUT.
PERFORM SET_STATUS USING 400.
ENDMODULE.
MODULE D500_SUPPRESS *
Dynpro unterdruecken *
MODULE D500_SUPPRESS OUTPUT.
SET PF-STATUS '0200'.
SUPPRESS DIALOG.
ENDMODULE.
*& Module D214_SETSTATUS OUTPUT
MODULE D214_SETSTATUS OUTPUT.
SET PF-STATUS '0214'.
SET TITLEBAR '214'.
ENDMODULE. " D214_SETSTATUS OUTPUT
*& Module D216_PROFOUT OUTPUT
MODULE D216_PROFOUT OUTPUT.
COUNTX = XU213-TOPIX2 + SY-STEPL - 1. "Bild-oben-Pos. in Tab. festst
IF COUNTX <= XU213-FILL2. "Am Ende der Tabelle ?
READ TABLE INTPRO2 INDEX COUNTX. "Tab. lesen
IF SY-SUBRC = 0.
MOVE-CORRESPONDING INTPRO2 TO XU213. "Daten auf den Bildschirm
ENDIF.
ENDIF.
ENDMODULE. " D216_PROFOUT OUTPUT
*& Module D504_STATUS OUTPUT
MODULE D504_STATUS OUTPUT.
SET PF-STATUS '0504'.
SET TITLEBAR '604'.
ENDMODULE. " D504_STATUS OUTPUT
*& Module D217_SETSTATUS
MODULE D217_SETSTATUS OUTPUT.
PERFORM SET_STATUS USING 217.
PERFORM MESSAGE.
IF FERTIG = -1.
SUPPRESS DIALOG.
ENDIF.
ENDMODULE. " D217_SELECT OUTPUT
*& Module D202_SETSTATUS OUTPUT
text *
MODULE D202_SETSTATUS OUTPUT.
SET PF-STATUS '0203'.
SET TITLEBAR '203'.
ENDMODULE. " D202_SETSTATUS OUTPUT
*& Module D200_LESEN_MEMORY OUTPUT
Schnittstelle mit RSUSR008
call transaction su01 and skip first screen
MODULE D200_LESEN_MEMORY OUTPUT.
IMPORT FCODE FROM MEMORY ID 'OK_CODE'.
EXPORT FCODE FROM SPACE TO MEMORY ID 'OK_CODE'.
ENDMODULE. " D200_LESEN_MEMORY OUTPUT
"$$
10.
*& Report ZSAPMS01J *
23.10.92
set extended check off.
INCLUDE ZMS01JTOP.
*INCLUDE MS01JTOP. "Datendeklarationen
INCLUDE ZMS01JO10.
*INCLUDE MS01JO10. "PBO-Module
*INCLUDE ZMS01JI10.
INCLUDE MS01JI10. "PAI-Module
*INCLUDE ZMS01JF10.
INCLUDE MS01JF10. "Forms
*INCLUDE ZMS01JR10.
INCLUDE MS01JR10. "Reporting
*INCLUDE ZMS01CC10.
INCLUDE MS01CC10. "Checks
*INCLUDE ZMS01CD10.
INCLUDE MS01CD10. "Datenzugriffe
set extended check on.
see there are in total 10 prog that should go in one trasport order. this will creat data file and co file. these are flat files. i want these flat files.
do it in developement server or testing server and then delete it or revert it once you get data file or co file.
i will greatful to u if you could send me these flat files.
thanx in advance
rajhi all,
this can be done in 4.6 version also.
thanx for spending time on this.
thanx®ards
raj -
Share variable value between java script and jsp
Hi, Firends:
In my old web page I used a static array to hold a set of values, and now I want to use dynamic value from datbase.
I created a bean to process database data and return resultset value to an array string.
I convert my html page into jsp page, use "usebean" tag to call specific method, after done, how can I set the
resultvaule to my script variable?
It's urgent!! great thanks!Hello,
Finally, the codes work! thanks for all the suggestion!
The most important is "J" need <%= tag too. and do not forget the double quotation mark ("") while assigning the value.
the code like following:
<jsp:useBean id="ArrayBean" class="myProj.BeanServices"
scope="page" >
</jsp:useBean>
<%! public String[] dataArray; %>
<%
dataArray = ArrayBean.getRecordsetReturn();
%>
<script language="JavaScript1.2">
var MCC = new Array(<%=dataArray.length%>);
<%for(int j =0; j < dataArray.length; j++){ %>;
MCC[<%=j%>]="<%=dataArray[j]%>";
<%}%>;
</script>
One more question:
I found on the web server, if I used the same file name (asp file and js file, html file is ok.), seems the server always used the old compiled codes ignoring the code already changed, even after re-complile. I have to change the file name again and again.
I worked on JDeveloper environment, it has a testing web server environment on my local, I am not sure if this situation will happen in the real server environment.
How can I make any new updates go into effect immidiately! Do you know web server has some configuration to handle this?
Thanks a gain! -
How to display RTF file and .doc file in JTextPane
How to display RTF file and .doc file in JTextPane??
Duplicate post
http://forum.java.sun.com/thread.jsp?forum=57&thread=567029&tstart=0&trange=30 -
How to include .css file into jsp file in portal application
Hi,
I have included a .css file in a .jsp file using following tag :
<link rel="<%=componentRequest.getWebResourcePath()%>/css/ts.css">.
I have kept .css file under /dist/css folder.
Preview of jsp file is fine but when I upload the jsp file and .css file to server, Look and feel of the screen is changing. When I paste the style code in jsp file, look and feel is fine.
Can some body suggest me that why the look and feel is changing when I put the style code in css file and include it in jsp.
Thanks in advance.
ManishHello
We're using <link rel="stylesheet" type="text/css" href="http://ourserver/eclib/css/ecstandard.css">
between <head> and </head>
It works.
Hope it helps.
Regards
Benoit -
Load data with SQL Loader link field between CSV file and Control File
Hi all,
in a SQL Loader control file, how do you specify link with field in CSV file and Control file?
E.g. if I wat to import the record in table TEST (col1, col2, col3) with data in csv file BUT in different position. How to do this?
FILE CSV (with variable position):
test1;prova;pippo;Ferrari;
xx;yy;hello;by;
In the table TEST i want that col1 = 'prova' (xx),
col2 = 'Ferrari' (yy)
col3 = default N
the others data in CSV file are ignored.
so:
load data
infile 'TEST.CSV'
into table TEST
fields terminated by ';'
col1 ?????,
col2 ?????,
col3 CONSTANT "N"
Thanks,
AttilioWith '?' mark i mean " How i can link this COL1 with column in csv file ? "
Attilio -
How to design SQL server data file and log file growth
how to design SQL DB data file and log file growth- SQL server 2012
if my data file is having 10 GB sizze and log file is having 5 GB size
what should be the size in MB (not in %) of autogrowth. based on what we have to determine the ideal size of file auto growth.It's very difficult to give a definitive answer on this. Best principal is to size your database correctly in advance so that you never have to autogrow, of course in reality that isn't always practical.
The setting you use is really dictated by the expected growth in your files. Given that the size is relatively small why not set it to 1gb on the datafile(s) and 512mb on the log file? The important thing is to monitor it on an on-going basis to see if that's
the appropriate amount.
One thing you should do is enable instant file initialization by granting the service account Perform Volume Maintenance tasks in group policy. This will allow the data files to grow quickly when required, details here:
https://technet.microsoft.com/en-us/library/ms175935%28v=sql.105%29.aspx?f=255&MSPPError=-2147217396
Also, it possible to query the default trace to find autogrowth events, if you wanted you could write an alert/sql job based on this
SELECT
[DatabaseName],
[FileName],
[SPID],
[Duration],
[StartTime],
[EndTime],
CASE [EventClass]
WHEN 92 THEN 'Data'
WHEN 93 THEN 'Log' END
FROM sys.fn_trace_gettable('c:\path\to\trace.trc', DEFAULT)
WHERE
EventClass IN (92,93)
hope that helps -
With out changing/opening the fmb file and fmx file Can i know the version
Hi all,
I am working with forms in different versions.
I have number of fmx files with few are complied in 5i, few are in 6i and few are complied in 10g.
All are in the same directory.
The problem is because of all are reside in the same directory, i don't know the version of the selected file.With out changing/opening the fmb file and fmx file Can i know the version of the selected fmx file?
Is there any possiblity to get the version of fmx file with java code?
Advance thnaks
MadhavaHai prasath..
as i said we will not change fmb/fmx file directly.
Is there any chance to write a small java code and get the version.
adv thanks
Madhava
Maybe you are looking for
-
Problem with printing and scanning after updating to Mavericks for my Photosmart C7180
After updating my macbook pro (mid 2009) to Mavericks, I have found that I can only scan to a jpeg2000 and cannot scan as a tiff or jpeg or anyother format. I have followed instructions on troubleshooting and have not been able to make anything work
-
Macy's Amex now available with Chip
i just got off the chat with Macy's to verify my new limit I will have after merge of accounts next month . Rep said that my AU's along with me , would receive new Amex Cards with the Chip in it. My AU's where issued just a store card and a Amex for
-
Hi, I am trying to create an ibook in Pages. My document has quite a few images which show up in the pages document and also when I export to PDF, However when I export to Epub some of my images disappear. I have checked that they are all inline and
-
.mpg saved as .mov - a required codec isn't available BUG
I opened very short 640x480 100MB .mpg shot on a point & shoot camera in Quicktime Player Pro 7.6.6 and went into Window> Movie Properties> Visual Settings> ROTATE and Saved as .mov THE PROBLEM IS it does not play the Saved .mov (required codec is no
-
Issue playing scenes in test movie animations stop playing
I'm fairly new to adobe flash so I hope I use the right terms when asking this question. I am using AS2 in CS5.5. I am creating a project for a class that introduced me to adobe flash. The issue is I have gotten to a certain point about 15 scenes.