Need of class
need of class
I need of class aii_map_api.jar. anybody can help me?
send me, please.
thank you.
Go to your XI server folders and use this path:
j2ee\cluster\server0\apps\sap.com\com.sap.xi.services
Inside com.sap.xi.services folder you'll find the jar file.
Hope this will help.
Thanks,
Nilesh
Similar Messages
-
In which case we need a class with all methods defined as abstract ?
In which case we need : A class with all methods defined as abstract (or should we go for Interface always in this case)
The concept of interface and abstract class overlaps sometime, but we can have the following thumb rule to use them for our specific need:
1) Interface: This should be use for code structuring. They standardize your application by providing a specific contract within and outside. If you think abstract class also provide structure, then reconsider as it limits the structure re-usability when there are many super-classes to inherit from. Java allow multiple inheritance by interface and not by Abstract class.
2) Abstract Class: This should be use for code-reusability. Interface doesn't have any code so can't be used for code-reusability.
Actually we can use both to provide the best.Taking a refernce to J2EE framework, the "Servlet" is an interface. It laids down the contract/structure for any code to be a servlet.
But the "GenericServlet" class is an abstract class which provides implementation of some of the methods defined in the "Servlet" interface and leave some method abstract.
Thus we see that the "Servlet" interface standardise the structure and the "GenericServlet" abstract class gives code re-usability.
Original Question:
In which case we need a class with all methods defined as abstract ?To this question, as all methods are abstarct we don't have option for code-reusability. so why not add standard structure concept to your application. So if there is not any restriction on making the field variable(if any) as final, we should go with the interface concept. -
Why we need Java Class in c++ pof Serialization
Hi,
I'm really confused why we need java class which implements PortableObject to support complex objects of c++. If we are not using any queries or entry processors in the application can't we keep the object as serialized byte format and can't we retrieve in from the c++ deserialization.
Please share your thoughts if there's a way if we can skip any Java implementation.
regards,
Surafeel both are doing same work. Also can anyone tell me what is teh difference between Serilization and Exgternalization.If you need someone to tell you the difference, (a) how can you possibly 'feel both are doing the same work'? and (b) why don't you look it up in the Javadoc?
It's not a secret. -
So after reading many posts, I've come to the realization that I need a class in Imovie, Final Cut and exporting to DVD's!
There are so many options, so many settings, so many "technical" terms being thrown around, how is a person supposed to know what the best solution is?!
I know, people will say, "There isn't one solution for everything, it depends on what you are doing". However, what I say is, the average joe like me wants to be able to shoot some home movies/videos, import them to Mac/whatever and then transfer them to a DVD to watch on a TV, maybe with a few edits even. But it seams there are a hundred ways to do this when all I want is the best way to get the best picture quality. I don't care how long it takes or how difficult it is, when you video tape the birth of a child for instance, and you want to transfer it to a DVD, you want the thing to look good and last. You don't want some crappy "digitized" version of it. I don't even know why Apple would have there systems set up to do that!?!?
It almost seams like the only way to "save" the footage is to keep it on the tape it was taped on, however as we all know, video tapes deteriorate faster than DVD's so you can't preserve them as long! Ugh!
So who offers a class in how to make good quality DVD's from Digital video tapes shot on a home video camera?This might get you started.
http://www.apple.com/ilife/tutorials/#imovie -
Need scheduler classes.
can anyone help...
i need scheduler classes in java.is there any API for scheduler? any suggestion from where i can get scheduler class etc..
thanksjava.util.Timer and java.util.TimerTask, perhaps.
-
Need FM/Class for Direct deletion of Development Class/Package in ABAP
Hi experts,
I had stored all the unwanted objects in a development class/ package which I intended to delete later. I want this deletion to be done automatically. Is there a function module or class that can help me do this?
Thanks in advance,
Adithya
Edited by: Adithya K Ramesh on Jul 18, 2011 3:56 PMI was hoping a separate server-side process wouldn't be needed -- if you're thinking of something like RMI, that's also a bit heavyweight for my needs. I know I can talk to the remote server on telnet port 23, though.
Further experimentation today with the Jakarta net library has generated something that works using their telnet classes. (After I asked for help here, of course. The same thing happens when I shop for groceries....) But using this leaves me referencing an external library that:
1. has functionality I don't need that complicates the code, and
2. forces me to address licensing requirements.
So I'd still love to see an example of a telnet-like Java class that strips away all the non-essentials in the Jakarta telnet library code, leaving behind a simple public domain class that can be used to connect to a remote host and transfer characters over that connection.
I appreciate that this may be asking for a lot, but as they say, if you don't ask, you don't get. ;-)
Thanks! -
Need FileInputOutputStream class
Hey everyone,
I was wondering what kind of classes are out there for both reading from and writing to a file at the same time. I know how to use a FileOutputStream, and I know how to use a FileInputStream, but I need something that has the features of both, like a FileInputOutputStream.
Gibrantake a look at java.io.RandomAccessFile
-
I need Java Classes to...
Hi every one,
I need a java class that takes a .class file (or set of files) and returns a list of all the classes that are used (referenced) by that class.
Does anyone know of a Java class, or a Method or a package, or a tiny magical Gremlin that can do that?
Also does anyone know of a class or method that takes two strings and returns a boolean informing me if one string is anywhere to be found in the other, for instance string abc is in string bcabcdef (it's there in the middle).
I could code this last one but there may be a free (for non-commercial uses) way to get this already done.
thank plentyHi every one,
I need a java class that takes a .class file (or set
of files) and returns a list of all the classes that
are used (referenced) by that class.
Does anyone know of a Java class, or a Method or a
package, or a tiny magical Gremlin that can do that?Not sure of this one, but the reflection mechanism might work.
>
Also does anyone know of a class or method that takes
two strings and returns a boolean informing me if
one string is anywhere to be found in the other, for
r instance string abc is in string bcabcdef (it's
there in the middle).
I could code this last one but there may be a free
(for non-commercial uses) way to get this already
done.
public boolean isSt2InSt1(String st1, String st2) {
return st1.indexof(st2) != -1;
thank plenty -
Need utilities class for application server file system (i.e. unix etc)
I need to do things to directories and files on the application server.
Is there an SAP class with methods for the application server file system (i.e. unix or whatever) with functionality similiar to what is provided by the methods of CL_GUI_FRONTEND_SERVICES for the presentation server?
Is there a group of SAP functions for this task?You may have a look at Thomas Jung article: [sdn contribution : ABAP Server Side File Access, by Thomas Jung|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/7a13f367-0401-0010-47ba-eab0b15cf31c]
Moreover, in release 7.10, it could be possible that SAP introduced input and output stream classes (to mimic java classes), so I guess there could be the ones for application server file system. -
Need the classes for fm REUSE_ALV_HIERSEQ_LIST_DISPLAY does.
I have a requirement where I need to display header and item using alv classes.. (the same functionality that REUSE_ALV_HIERSEQ_LIST_DISPLAY function module does). If any one worked on this please guide.
Hi
Hope it will help you.
Reward if ehlp.
Many a times there is a requirement to display ALV Grid (not ALV List) in the background Job. I have checked the SDN Forum for the same and it has been mentioned that ALV Grid cannot be displayed in Background, but the list output of ALV is possible. So user wont have the actual Grid interface but the List interface.
There is a workaround to display ALV Grid in Background Job. The only restriction is you cant schedule the job through SM36. You need to execute the transaction of the report program, fill in the selection screen data and hit Execute.
The job would be executed in background. User will be able to see the Job Log and Job Status after executing the program. User doesnt have to go to SM37 to view the job status/log. Once the Job Status is changed to COMPLETED, user can click on DISPLAY SPOOL to view the ALV Grid.
Limitations:
Cant schedulea background job
The session should be active until the background job is completed. If the session is closed, then user wont be able to check the output in ALV Grid. User would be able to check the output through spool or SM37
Advantages:
If the spool width is greater than 255 characters, then the entire width could be seen in the output because the output is directed to an ALV Grid and not to spool
Interface of ALV Grid is available instead of ALV List even though its a background job.
Program wont give the TIME OUT error
Steps Required:
1. Once you execute the program, the following screen would be displayed
2. Click Display Job Status to check the Status of the Background Job
3. Click on Display the Job Log to check the Log
4. Click on Display Job Status to check the Job Status
5. Click on DISPLAY SPOOL to check the spool content once the Job Status is changed to COMPLETED. Output is displayed in ALV Grid
Programs:
1. Two different programs needs to be created
ZPROGRAM_ONE: This is the 1st program, where the selection screen and all the data validations would be done. Error handling for invalid data should be done in this program.
Once the data validation is done, this program would call the 2nd program ZPROGEAM_TWO. Build the logic to display ALV Grid in this program. The logic will only display ALV in foreground and it wont be reflected in the spool.
ZPROGRAM_TWO: This program would fetch all the data and do all the processing. If you want the spool output along with ALV Grid output, then build the logic in this program to display ALV Grid.
*& Report ZPROGRAM_ONE *
REPORT zprogram_one .
PRASHANT PATIL
TABLES : mara,
tsp01.
type-pools:slis.
TYPES : BEGIN OF t_mara,
matnr TYPE mara-matnr,
ersda TYPE mara-ersda,
ernam TYPE mara-ernam,
laeda TYPE mara-laeda,
END OF t_mara.
DATA : i_mara TYPE STANDARD TABLE OF t_mara,
wa_mara TYPE t_mara,
wa_index TYPE indx, " For Index details
wa_index_key TYPE indx-srtfd VALUE 'PRG_ONE',
i_jobsteplist TYPE STANDARD TABLE OF tbtcstep, " For spool number
wa_params TYPE pri_params, " To Get Print Parameters
wa_jobhead TYPE tbtcjob, " To know the status of job
wa_jobsteplist TYPE tbtcstep, " To know the spool
w_jobname TYPE tbtco-jobname, " Job name for bckgrnd job
w_jobcount TYPE tbtco-jobcount, " Unique id for bckgrd job
w_path TYPE string, " Upload path
w_lsind TYPE sy-lsind, " Index
wa_seltab TYPE rsparams,
i_seltab TYPE STANDARD TABLE OF rsparams,
wa_index1 TYPE indx, " For Index details
wa_index_key1 TYPE indx-srtfd VALUE 'PRG_TWO',
i_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF i_fieldcat.
CONSTANTS DECLARATION *
CONSTANTS :
c_a(1) TYPE c VALUE 'A',
c_m(1) TYPE c VALUE 'M',
c_l(1) TYPE c VALUE 'L',
c_c(1) TYPE c VALUE 'C',
c_zfdr(4) TYPE c VALUE 'ZFDR',
c_x(1) TYPE c VALUE 'X',
c_locl(4) TYPE c VALUE 'LOCL', " Destination is LOCAL
c_f(1) TYPE c VALUE 'F', " Job Status - Failed
c_s(1) TYPE c VALUE 'S',
c_p(1) TYPE c VALUE 'P'.
SELECTION SCREEN PARAMETERS
SELECT-OPTIONS : s_matnr FOR mara-matnr.
START-OF-SELECTION.
Before the export, fill the data fields before CLUSTR
wa_index-aedat = sy-datum.
wa_index-usera = sy-uname.
EXPORT s_matnr
TO DATABASE indx(st) FROM wa_index ID wa_index_key.
To Open the Job for background processing
PERFORM open_job.
To get the print parameters
PERFORM get_print_parameters.
Submit the job in background
PERFORM job_submit.
Close the background job
PERFORM job_close.
This is the output screen with the buttons ********
Create 3 buttons DISPLAY SPOOL, STATUS, JOBLOG
SET PF-STATUS 'ZS001'.
WRITE: / 'The program is submitted in Background'.
WRITE: / 'Press DISPLAY SPOOL to see the spool'.
WRITE: / 'Press STATUS to see the status of the background'.
AT USER-COMMAND.
If user presses the 'BACK' button
IF sy-ucomm = 'BAK'.
IF wa_jobhead-status = c_f OR
wa_jobhead-status = c_a.
LEAVE TO SCREEN 0.
ENDIF.
ENDIF.
If the user presses the 'DISPLAY SPOOL' Button
IF sy-ucomm = 'DISPLAY'.
PERFORM display_spool.
ENDIF.
If the user presses the 'JOB STATUS' Button
IF sy-ucomm = 'STATUS'.
PERFORM display_status.
ENDIF.
If the user presses the 'JOB LOG' Button
IF sy-ucomm = 'JOBLOG'.
PERFORM display_job_log.
ENDIF.
*& Form open_job
text
--> p1 text
<-- p2 text
FORM open_job .
This is to Create a new job which is to be submitted in background to
process sales order/delivery/invoice
Here we would get a unique id ( Jobcount ) which identifies our job
along with the job name which we have assigned to our job
CONCATENATE sy-uname
sy-datum
sy-uzeit
INTO w_jobname . " Assign unique jobname
CALL FUNCTION 'JOB_OPEN'
EXPORTING
DELANFREP = ' '
JOBGROUP = ' '
jobname = w_jobname
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
JOBCLASS =
IMPORTING
jobcount = w_jobcount
CHANGING
RET =
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " open_job
*& Form get_print_parameters
text
--> p1 text
<-- p2 text
FORM get_print_parameters .
DATA : l_valid TYPE c.
This is to get the Print Parameters for the job which is to be
submitted in background to process sales order/delivery/invoice
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
ARCHIVE_ID = C_CHAR_UNKNOWN
ARCHIVE_INFO = C_CHAR_UNKNOWN
ARCHIVE_MODE = C_CHAR_UNKNOWN
ARCHIVE_TEXT = C_CHAR_UNKNOWN
AR_OBJECT = C_CHAR_UNKNOWN
ARCHIVE_REPORT = C_CHAR_UNKNOWN
AUTHORITY = C_CHAR_UNKNOWN
COPIES = C_NUM3_UNKNOWN
COVER_PAGE = C_CHAR_UNKNOWN
DATA_SET = C_CHAR_UNKNOWN
DEPARTMENT = C_CHAR_UNKNOWN
destination = c_locl " LOCL
EXPIRATION = C_NUM1_UNKNOWN
immediately = space
IN_ARCHIVE_PARAMETERS = ' '
IN_PARAMETERS = ' '
LAYOUT = C_CHAR_UNKNOWN
LINE_COUNT = C_INT_UNKNOWN
LINE_SIZE = C_INT_UNKNOWN
LIST_NAME = C_CHAR_UNKNOWN
LIST_TEXT = C_CHAR_UNKNOWN
MODE = ' '
new_list_id = c_x
PROTECT_LIST = C_CHAR_UNKNOWN
no_dialog = c_x
RECEIVER = C_CHAR_UNKNOWN
RELEASE = C_CHAR_UNKNOWN
REPORT = C_CHAR_UNKNOWN
SAP_COVER_PAGE = C_CHAR_UNKNOWN
HOST_COVER_PAGE = C_CHAR_UNKNOWN
PRIORITY = C_NUM1_UNKNOWN
SAP_OBJECT = C_CHAR_UNKNOWN
TYPE = C_CHAR_UNKNOWN
user = sy-uname
USE_OLD_LAYOUT = ' '
UC_DISPLAY_MODE = C_CHAR_UNKNOWN
DRAFT = C_CHAR_UNKNOWN
ABAP_LIST = ' '
USE_ARCHIVENAME_DEF = ' '
DEFAULT_SPOOL_SIZE = C_CHAR_UNKNOWN
PO_FAX_STORE = ' '
NO_FRAMES = C_CHAR_UNKNOWN
IMPORTING
OUT_ARCHIVE_PARAMETERS =
out_parameters = wa_params
valid = l_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " get_print_parameters
*& Form job_submit
text
--> p1 text
<-- p2 text
FORM job_submit .
The job which we have created & the unique id ( jobcount ) which we
have got identifies our job. Hence those parameters are passed along
with the name of the background program "ZPROGRAM_TWO"
The job is submitted in background.
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
ARCPARAMS =
authcknam = sy-uname
COMMANDNAME = ' '
OPERATINGSYSTEM = ' '
EXTPGM_NAME = ' '
EXTPGM_PARAM = ' '
EXTPGM_SET_TRACE_ON = ' '
EXTPGM_STDERR_IN_JOBLOG = 'X'
EXTPGM_STDOUT_IN_JOBLOG = 'X'
EXTPGM_SYSTEM = ' '
EXTPGM_RFCDEST = ' '
EXTPGM_WAIT_FOR_TERMINATION = 'X'
jobcount = w_jobcount
jobname = w_jobname
LANGUAGE = SY-LANGU
priparams = wa_params
report = 'ZPROGRAM_TWO'
VARIANT = ' '
IMPORTING
STEP_NUMBER =
EXCEPTIONS
bad_priparams = 1
bad_xpgflags = 2
invalid_jobdata = 3
jobname_missing = 4
job_notex = 5
job_submit_failed = 6
lock_failed = 7
program_missing = 8
prog_abap_and_extpg_set = 9
OTHERS = 10
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " job_submit
*& Form job_close
text
--> p1 text
<-- p2 text
FORM job_close .
Once the job is submitted in background then the job is closed
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
AT_OPMODE = ' '
AT_OPMODE_PERIODIC = ' '
CALENDAR_ID = ' '
EVENT_ID = ' '
EVENT_PARAM = ' '
EVENT_PERIODIC = ' '
jobcount = w_jobcount
jobname = w_jobname
LASTSTRTDT = NO_DATE
LASTSTRTTM = NO_TIME
PRDDAYS = 0
PRDHOURS = 0
PRDMINS = 0
PRDMONTHS = 0
PRDWEEKS = 0
PREDJOB_CHECKSTAT = ' '
PRED_JOBCOUNT = ' '
PRED_JOBNAME = ' '
SDLSTRTDT = NO_DATE
SDLSTRTTM = NO_TIME
STARTDATE_RESTRICTION = BTC_PROCESS_ALWAYS
strtimmed = c_x
TARGETSYSTEM = ' '
START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
START_ON_WORKDAY_NR = 0
WORKDAY_COUNT_DIRECTION = 0
RECIPIENT_OBJ =
TARGETSERVER = ' '
DONT_RELEASE = ' '
TARGETGROUP = ' '
DIRECT_START =
IMPORTING
JOB_WAS_RELEASED =
CHANGING
RET =
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
invalid_target = 8
OTHERS = 9
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " job_close
*& Form display_spool
text
--> p1 text
<-- p2 text
FORM display_spool .
To Read the Job to get the spool details
DATA : l_rqident TYPE tsp01-rqident, " Spool Number
l_spoolno TYPE tsp01_sp0r-rqid_char.
CLEAR : l_rqident,
w_lsind,
wa_jobsteplist.
REFRESH : i_jobsteplist.
SET PF-STATUS 'ZAR02'.
Get the Spool Number
CALL FUNCTION 'BP_JOB_READ'
EXPORTING
job_read_jobcount = w_jobcount
job_read_jobname = w_jobname
job_read_opcode = '20'
JOB_STEP_NUMBER =
IMPORTING
job_read_jobhead = wa_jobhead
TABLES
job_read_steplist = i_jobsteplist
CHANGING
RET =
EXCEPTIONS
invalid_opcode = 1
job_doesnt_exist = 2
job_doesnt_have_steps = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Read the Job Step list to get the spool number
READ TABLE i_jobsteplist INTO wa_jobsteplist INDEX 1.
CHECK wa_jobsteplist-listident <> space.
Spool Number
l_rqident = wa_jobsteplist-listident.
MOVE l_rqident TO l_spoolno.
Check the spool in TSP01
SELECT SINGLE * FROM tsp01 WHERE rqident = l_rqident.
IF sy-subrc = 0.
LEAVE TO LIST-PROCESSING.
CALL FUNCTION 'RSPO_R_RDELETE_SPOOLREQ'
EXPORTING
spoolid = l_spoolno
IMPORTING
RC =
STATUS =
PERFORM show_alv.
ENDIF.
w_lsind = sy-lsind.
IF sy-lsind GE 19.
sy-lsind = 1.
ENDIF.
ENDFORM. " display_spool
*& Form show_alv
text
--> p1 text
<-- p2 text
FORM show_alv .
Before the import, fill the data fields before CLUSTR.
wa_index1-aedat = sy-datum.
wa_index1-usera = sy-uname.
To Import the selection screen data from Calling Program
IMPORT i_mara
FROM DATABASE indx(st) ID wa_index_key1 TO wa_index1.
FREE MEMORY ID wa_index_key1.
This prepares the field-catalog for ALV.
PERFORM prepare_fieldcatalog.
This displays the output in ALV format .
PERFORM display_alv.
ENDFORM. " show_alv
*& Form display_status
text
--> p1 text
<-- p2 text
FORM display_status .
To Display the STATUS of the JOB which is exectued in background
CLEAR : wa_jobsteplist.
REFRESH : i_jobsteplist.
WRITE:/ 'DISPLAYING JOB STATUS'.
CALL FUNCTION 'BP_JOB_READ'
EXPORTING
job_read_jobcount = w_jobcount
job_read_jobname = w_jobname
job_read_opcode = '20'
JOB_STEP_NUMBER =
IMPORTING
job_read_jobhead = wa_jobhead
TABLES
job_read_steplist = i_jobsteplist
CHANGING
RET =
EXCEPTIONS
invalid_opcode = 1
job_doesnt_exist = 2
job_doesnt_have_steps = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
To Display the status text as per the status type
CASE wa_jobhead-status.
WHEN 'S'. WRITE: / 'Scheduled'.
WHEN 'R'. WRITE: / 'Released'.
WHEN 'F'. WRITE: / 'Completed'.
WHEN 'A'. WRITE: / 'Cancelled'.
WHEN OTHERS.
ENDCASE.
IF sy-lsind GE 19.
sy-lsind = 1.
ENDIF.
ENDFORM. " display_status
*& Form display_job_log
text
--> p1 text
<-- p2 text
FORM display_job_log .
To display the log of the background program
LEAVE TO LIST-PROCESSING.
CALL FUNCTION 'BP_JOBLOG_SHOW_SM37B'
EXPORTING
client = sy-mandt
jobcount = w_jobcount
joblogid = ' '
jobname = w_jobname
EXCEPTIONS
error_reading_jobdata = 1
error_reading_joblog_data = 2
jobcount_missing = 3
joblog_does_not_exist = 4
joblog_is_empty = 5
joblog_show_canceled = 6
jobname_missing = 7
job_does_not_exist = 8
no_joblog_there_yet = 9
no_show_privilege_given = 10
OTHERS = 11.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " display_job_log
*& Form prepare_fieldcatalog
text
--> p1 text
<-- p2 text
FORM prepare_fieldcatalog .
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-reptext_ddic = 'Material no.'.
wa_fieldcat-outputlen = '18'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ERSDA'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-reptext_ddic = 'Creation date'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ERNAM'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-reptext_ddic = 'Name of Person'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'LAEDA'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-reptext_ddic = ' Last Change'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
ENDFORM. " prepare_fieldcatalog
*& Form display_alv
text
--> p1 text
<-- p2 text
FORM display_alv .
Call ABAP List Viewer (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = i_fieldcat
tables
t_outtab = i_mara.
ENDFORM. " display_alv
ZPROGRAM_TWO: This is the 2nd program which would be called from program ZPROGRAM_ONE.
*& Report ZPROGRAM_TWO *
REPORT zprogram_two .
PRASHANT PATIL
TABLES : mara.
TYPE-POOLS:slis.
TYPES : BEGIN OF t_mara,
matnr TYPE mara-matnr,
ersda TYPE mara-ersda,
ernam TYPE mara-ernam,
laeda TYPE mara-laeda,
END OF t_mara.
DATA : i_mara TYPE STANDARD TABLE OF t_mara,
wa_mara TYPE t_mara,
wa_index TYPE indx, " For Index details
wa_index_key TYPE indx-srtfd VALUE 'PRG_ONE',
wa_index1 TYPE indx, " For Index details
wa_index_key1 TYPE indx-srtfd VALUE 'PRG_TWO',
i_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat LIKE LINE OF i_fieldcat.
SELECT-OPTIONS : s_matnr FOR mara-matnr.
Before the import, fill the data fields before CLUSTR.
wa_index-aedat = sy-datum.
wa_index-usera = sy-uname.
To Import the selection screen data from Calling Program
IMPORT s_matnr
FROM DATABASE indx(st) ID wa_index_key TO wa_index.
FREE MEMORY ID wa_index_key.
SELECT matnr
ersda
ernam
laeda
FROM mara
INTO TABLE i_mara
WHERE matnr IN s_matnr.
PERFORM prepare_fieldcatalog.
PERFORM display_alv.
Before the export, fill the data fields before CLUSTR
wa_index1-aedat = sy-datum.
wa_index1-usera = sy-uname.
EXPORT i_mara
TO DATABASE indx(st) FROM wa_index1 ID wa_index_key1.
*& Form prepare_fieldcatalog
text
--> p1 text
<-- p2 text
FORM prepare_fieldcatalog .
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MATNR'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-outputlen = '18'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ERSDA'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ERNAM'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'LAEDA'.
wa_fieldcat-tabname = 'I_MARA'.
wa_fieldcat-outputlen = '10'.
APPEND wa_fieldcat TO i_fieldcat.
ENDFORM. " prepare_fieldcatalog
*& Form display_alv
text
--> p1 text
<-- p2 text
FORM display_alv .
Call ABAP List Viewer (ALV)
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = i_fieldcat
TABLES
t_outtab = i_mara.
ENDFORM. " display_alv
its possible to display ALV Grid using OO ALV. Following code can be used instead of FM.
In the PBO, add following code
SET PF-STATUS 'ZSTAT'.
If program is executed in background
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING
e_offline = off.
IF off IS INITIAL.
IF container1 IS INITIAL.
CREATE OBJECT container1
EXPORTING
container_name = 'CC_ALV1' .
ENDIF.
ENDIF.
CREATE OBJECT g_grid1
EXPORTING
i_parent = container1.
CALL METHOD g_grid1->set_table_for_first_display
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
i_save = 'A'
i_default = ' '
is_layout =
is_print =
IT_SPECIAL_GROUPS =
it_toolbar_excluding =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
it_outtab = i_output
it_fieldcatalog = i_fieldcatalog
IT_SORT =
IT_FILTER =
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF. -
Need simple class for communicating with Solaris account
Hey, gang. After over a week of searching this forum and the Web for a solution, I'm stuck. I hope someone here can help.
I've got a Java application intended to run on both Windows and Solaris systems that needs to perform the following automated operations:
1. Connect to a user account on a Solaris server.
2. Login.
3. Run an sccs command.
4. Retrieve the output from the sccs command.
I can run commands (such as sccs) directly from Java; I've worked out how to do that. My situation is that I need to run sccs from an authorized account so that all file checkin/checkout operations are tagged properly. So the requirement to connect to a server isn't one I can ignore. I also don't need a full-up interactive client interface -- this needs to be an automated process.
What I'm hoping is that someone here will be willing to provide (or point me to) some relatively simple source code I can call to do this stuff. Maybe an example of a class that uses Socket and a couple of streams to programmatically connect to a server, send commands, and capture input. That's really all I need.
I've tried calling the Jakarta Commons telnet class to connect to the Solaris server, but it's more overhead than I need. (Plus the input stream kept blocking when I tried to use it in a purely automated mode.) I've also tried rolling my own code using the minimal info available on Google, but have not been able to figure out the magic words necessary to get anything back but gibberish. (InputStream and BufferedReader just do not seem to want to cooperate. Either I get back only garbage text, or readLine() or read() gets nothing and just sits and waits until the timeout.)
So I turn to the experts here. If anyone can offer (or direct me to) any simple, non-libraried source code that enables my Java code to connect to and talk to a Solaris machine, I'd be grateful.
Thanks!I was hoping a separate server-side process wouldn't be needed -- if you're thinking of something like RMI, that's also a bit heavyweight for my needs. I know I can talk to the remote server on telnet port 23, though.
Further experimentation today with the Jakarta net library has generated something that works using their telnet classes. (After I asked for help here, of course. The same thing happens when I shop for groceries....) But using this leaves me referencing an external library that:
1. has functionality I don't need that complicates the code, and
2. forces me to address licensing requirements.
So I'd still love to see an example of a telnet-like Java class that strips away all the non-essentials in the Jakarta telnet library code, leaving behind a simple public domain class that can be used to connect to a remote host and transfer characters over that connection.
I appreciate that this may be asking for a lot, but as they say, if you don't ask, you don't get. ;-)
Thanks! -
Help needed in class. cant figure out distance
i have declared 3 variables in a class, x and y are coordiantres
public class Robot
private double X;
private double Y;
private double Orientation;
public Robot()
X = 0;
Y = 0;
Orientation = 0;
public (double pX, pY, double pOrientation)
iX = pX;
iY= pY;
iOrientation = pOrientation;
public double getX()
return iXCoordinate;
public double getY()
return iY;
public double getOrientation()
return iOrientation;
public void turnRight (double pDeg) //Degrees
iOrientation= iOrientation + pDeg;
public void moveForward (double pDis)
double d=0;
double dx=0;
double dy=0;
double radians=0;
radians = Math.toRadians(A); //A is converted to radians
dx=d* Math.sin(radians); //distance travelled in x
dy=d* Math.cos(radians);//distance travelled in y
how do i get the moveforward i have been given the code written above. in the method also been given dx = d*sin(A) and dy = d*cos(A)
aprreciate the help thanksDamn, I love NetBeans' code reformatting macro...
public void moveForward(double pDis) {
double d=0;
double dx=0;
double dy=0;
double radians=0;
radians = Math.toRadians(A); //A is converted to radians
dx=d* Math.sin(radians); //distance travelled in x
dy=d* Math.cos(radians);//distance travelled in y
}If you read the comments in this method it quite clearly tells you that it is giving you the distances travelled in both dimensions. All you need to do is add those to the objects current position and voila, you have displacement.
(This is why courses on Newton's laws of motion should be required education for all students)
McF -
What makes a Bean? I thought it needed descriptor class, etc.
I am getting confused. i see all over the place people saying they have a JavaBean and are using it in a JSP file. But it is always just a java class. Nothing about it is a bean as far as i can tell - or am I wrong? I thought it needed a descriptor class?
You are not wrong, necessarily. There are no JavaBean interfaces to implement or base classes to subclass. Technically, any Java class is a (potential) JavaBean.
That said, bean classes should follow the JavaBean specification to properly expose meta information -- properties, methods, and events. The preferred approach is via BeanInfo classes.
I find the JavaBean component model lacking... the beans model is like an infants toy compared with other component models e.g., ActiveX. -
Do I need multiple Classes?
I have a question about a project I'm working on. The direction's are:
//Start
Design a class named Person with fields for holding a person's name, address, and telephone number. Write one or more constructors and the appropriate mutator and accessor methods for the class's fields.
Next, design a class named Customer, which is derived from the Person class. The Customer class should have a field for a customer number and a boolean field indication whether the customer wishes to be on a mailing list. Write one or more constructors and the appropriate mutator and accessor methods for the class's fields. Demostrate an object of the customer class in a simple program (CustomerDemo).
//End
My question is this, do I need to make 3 different classes? Why does the project require me to make a Person class, and a Customer class? Why not just combine the Person class and Customer class, then make the driver?CS_Student001 wrote:
Why not just combine the Person class and Customer class, ...?Because not every Person is also a Customer of yours, with a customer number and a boolean that stores whether they want to be on a mailing list.
Imagine an Employee class. An Employee has a name, adress, and a phone number, but not a customer number. Instead, his pay could be stored in the Employee class. Had you combined Person and Customer, youd have to double the Name, adress, phone number parts. As cotton.m suggested, "inheritance" is the key google word here. -
Help needed with class accessing
Hey, i have ran into another problem again.. The problem is accessing a class variable created in a different class from another class.
Im reading an XML file with let's say
class readXML(){
Items item = new Items();
//here im setting the variables.
item.name = "something";
item.level = "something else";
class Items(){
Vector<String> name = new Vector<String>();
Vector<String> level = new Vector<String>();}And now a sepparate class what creates me an object of those variable with a loop.
class makeTable(){
//here i need to get the variables for the loop and to create object.
readXML readXML = new readXML("test.xml");
Object[][] data = new Object[3][24]; public void createObjects(){
for (int j = 0; j < items.length; j++){
data[j][0] = readXML.item.name.get(j); //<--- this does not work. But how can i do it?
data[j][1] = exps[j];
data[j][2] = levels[j];
data[j][3] = getAmount(exps[j]);
//System.out.println("itemname: " + data[j][0]);Ok, i explained it a bit wrong, ill copy the whole code.
import javax.xml.parsers.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import java.io.*;
import java.util.Vector;
public class ReadItems extends DefaultHandler{
ReadItems(String filename){
File input = new File(filename);
SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setValidating(true);
try{
SAXParser sax = factory.newSAXParser();
sax.parse(input, new ItemHandler());
}catch (ParserConfigurationException pce){
System.out.println("Could not create parser.");
System.out.println(pce.getMessage());
}catch (SAXException se){
System.out.println("Problem with SAX parser.");
System.out.println(se.getMessage());
}catch (IOException ie){
System.out.println("Error reading file.");
System.out.println(ie.getMessage());
class ItemHandler extends DefaultHandler{
static int READING_NAME = 1;
static int READING_LEVEL = 2;
static int READING_EXPPER = 3;
static int READING_NOTHING = 0;
int currentActivity = READING_NOTHING;
Item item = new Item();
ItemHandler(){
super();
public void startElement(String uri, String localname, String qName, Attributes attributes){
if(qName.equals("name")){
currentActivity = READING_NAME;
}else if (qName.equals("level")){
currentActivity = READING_LEVEL;
}else if (qName.equals("expper")){
currentActivity = READING_EXPPER;
public void characters(char[] ch, int start, int length){
String value = new String(ch,start,length);
if (currentActivity == READING_NAME){
item.name.add(value);
if (currentActivity == READING_LEVEL){
item.level.add(value);
if (currentActivity == READING_EXPPER){
item.expper.add(value);
public void endElement(String uri, String localname, String qName){
/*if(qName.equals("item")){
System.out.println("Name: " + item.name);
}else if(qName.equals("level")){
System.out.println("Level: " + item.level);
class Item {
Vector<String> name = new Vector<String>();
Vector<String> level = new Vector<String>();
Vector<String> expper = new Vector<String>();
}Now i need to access the data from another class where i build a swing table.
It has a method:
public void createObjects(){
for (int j = 0; j < items.length; j++){
data[j][0] = these should be the values of that name variable;
data[j][1] = this should be expper and so on.;
System.out.println("itemname: " + ih.item.name.get(0));
}Im a bit confused on this
Maybe you are looking for
-
Unknown Error Message when creating Visual Reports
I get the Unknown error message periodically when trying to create an excel cash flow report. I am running Excel 2010, and Project 2010. Very frustrating
-
Which type of TV would you choose.
I am on the hunt for a TV or Projector for my Home Theater room project. With the options I have there is just too much avail to decide and I have been reading AVS Forums but there is just so much info that it would take years to read. I have atlea
-
okay so every time i try to install itunes and quicktime, this little thing pops up that says "could not open key: hkeylocalmachine\...\QuickTimeUpdater.exe. Verify that you have sufficient access to that key, or contact your support personell." what
-
Suppress "Save As" window for Scanning to PDF
Hello, We are upgrading our office from Acrobat Pro ver6 to ver8. While scanning documents in version 6, it never prompts to save locally prior to the scan. Now with version 8 it pops up to "save as" prior to scan, creating confusion for our users. A
-
Can't download cc apps. They won't show up on the creative cloud app.
After several problems trying to install the Creative cloud app I finally got it to install after booting into safe mode. Now that CC is installed when I click on the tabs application tab it doesn't work. I also tried downloading it from the website