2006 Dec 08 9:52 AM
Hi All,
Please give me the difference between AT NEW AND ON CHANGE OF:
CALL TRANSACTION AND BATCH INPUT:
Kindly provide me some knowladge on ALV.
Regards.
Ramu
2006 Dec 08 9:55 AM
2006 Dec 08 9:59 AM
hi,
again same thread.
a) When AT NEW occurs,
the alpha-numeric fields have ******* in their value,
b) where as in case of ON CHANGE,
the alpha-numeric fields have their corresponding value,
of that particular record,
where the Event gets fired.
BATCH INPUT AND CALL TRANSACTION>
CALL TRANSACTION.
1. Synchronous Processing
2. Synchronous and Asynchronous
Database Update
3. Transfer form individual transaction,
each time the CALL Transaction is
called.
4. Separate LUW for the transaction.
5. System executes commit immediately
before and after CALL TRANSACTION
USING statement.
6. No batch input processing log is
generated.
SESSION METHOD.
1. Asynchronous processing
2. Only Synchronous Database update (During
processing, no transaction is started until the
previous transaction has been written to the
database.)
3. Transfers data for multiple transactions.
4. Sessions cannot be generated in parallel.
5. Supports playback for correcting sessions that
contains errors.
6. A batch input processing Detailed Log is
generated for each session.
(Prgg opens a session in queue before data transfer)
Both hav advan & disadvan ,but in The CALL TRANSACTION method allows only a single transaction tobe processed by SAP.therefore i prefer Session method.
<b>ALV</b>
ALV is available in two modes: list and grid. List mode is good old list processing with standard functionnalities, and grid mode is using a new OCX object displaying grids
ABAP Report Types
ABAP report types are those ones available in some report's attributes screen, i.e. :
Executable program
Function group (containing function modules)
Include
Interface pool
Class pool
Module pool
Subroutine pool
Also ALV means ABAP List Viewer. Most convenient way to use it is through reuse library (cf. transaction se83) available from release 4.6 of SAP R/3.
In ABAP, there are a total of 4 types of reports. They are:
Classical
Interactive
Logical Database
ABAP query
Classical Reports
Classical reports are normal reports. These reports are not having any sub reports.IT IS HAVING ONLY ONE SCREEN/LIST FOR OUTPUT. Events In Classical Reports. INTIALIZATION:This event triggers before selection sreen display. AT-SELECTION-SCREEN:This event triggers after proccesing user input still selection screen is in active mode. START OF SELECTIONS:starrt of selection screen triggers after proceesing selection screen. TOP-OF-PAGE:It provides header for abap reports. END-OF-PAGE:It provides footer for page. AT PF:For predefined function kes AT USER COMMAND:For user defined function keys.
reward ppoints if this helps you.
regards,
siva
Message was edited by:
sivakumar palaniswamy
2006 Dec 08 10:00 AM
1.At new can be used inside the loop at itab where as on change of can be used inside slecect..Endselect & loop.
2.On change of <field> can be used with logical operators (and,or) but at new cant be used like tht.
Batch input.
Asynchronous processing
Transfers data for multiple transactions
Synchronous database update
During processing, no transaction is started until the previous transaction has been written to the database.
A batch input processing log is generated for each session
Sessions cannot be generated in parallel
Call transaction
1.Synchronous processing
2.Transfer of data from an individual transaction each time the statement CALL TRANSACTION USING is called
3.You can update the database both synchronously and asynchronously
4.Separate LUW (logical units of work) for the transaction
5.The system executes a database commit immediately before and after the CALL TRANSACTION USING statement
6.No batch input processing log
Use this link for ALV.
<a href="http://www.erpgenie.com/sap/abap/code/abap28.htm">http://www.erpgenie.com/sap/abap/code/abap28.htm</a>
2006 Dec 08 10:02 AM
Hello,
1.
During AT NEW control event the alpha numeric fields have *** as their value ( ie the workarea fields which are alpha numeric),
During ON CHANGE event the alpha-numeric fields have their corresponding value,
of that particular record
2.
Return Code
BI:No
CALL:Yes
Database update
BI:Synchronous
CALL: Synch / Asysn
Processing Time
BI:delayed
CALL: Immediately
Transaction at a time
BI:More than one
CALL:Only one
Error log
BI: Will be created
CALL: No
Regs,
Venkat Ramanan N
Message was edited by:
Venkat Ramanan Natarajan
2006 Dec 08 10:02 AM
Hi,
1.
Look at the
2. Call transaction and Batch Input
Call transaction does the transaction online in the current work process which will hold the current process untill finished. Doing a Batch Input, means that it takes all of the data needed and creates a batch input session which can be ran later via another transaction. Use SM35 to manage the Batch Input Sessions. You can run them in foreground or in background. You can analyze the errors also.
3. ALV
Check this link:
http://www.abap4.it/download/ALV.pdf
Please go thru above links, U will get good knowledge..
Regards
Kumar
2006 Dec 08 10:27 AM
hi mitta,
take a simple class scenario,
where primary fields are class and rollno..
at new event can be used for every new class data
on change event is used when the roll no in that class is changed to next value.. here if u use at new then u wil face problem when u go to next class..
ALV
the alv grid is one method to display output in a grid format..
we use the function REUSE_ALV_GRID_DISPLAY to display as alv output..
it is to be noted that u have to use a fieldcatalog only then u will have an output with the heading.. i have attached a sample code u can try with it..
&----
*& Report ZRK_ALV_ALV1 *
*& *
&----
*& *
*& *
&----
REPORT zrk_alv_alv1 .
TYPE-POOLS slis.
TABLES : marc.
TYPES :BEGIN OF ty_mm,
sl_no type i,
werks TYPE marc-werks,
matnr TYPE mara-matnr,
maktx TYPE makt-maktx,
mtart TYPE mara-mtart,
volum TYPE mara-volum,
ntgew TYPE mara-ntgew,
ersda TYPE mara-ersda,
laeda TYPE mara-laeda,
END OF ty_mm.
DATA : it_mm TYPE TABLE OF ty_mm,
wa_mm TYPE ty_mm.
field catalog declaration, only if u do so u can display heading in alv
DATA : it_fc TYPE slis_t_fieldcat_alv,
wa_fc TYPE slis_fieldcat_alv.
PARAMETERS : p_werks TYPE marc-werks.
SELECT marc~werks
mara~matnr
makt~maktx
mara~mtart
mara~volum
mara~ntgew
mara~ersda
mara~laeda
FROM marc
INNER JOIN mara ON marcmatnr = maramatnr
INNER JOIN makt ON maramatnr = maktmatnr
INTO CORRESPONDING FIELDS OF TABLE it_mm
WHERE marc~werks = p_werks and spras = 'EN'.
loop at it_mm into wa_mm.
wa_mm-sl_no = sy-tabix.
modify it_mm from wa_mm transporting sl_no .
endloop.
this is how u append the header to an alv grid
wa_fc-col_pos = 1.
wa_fc-seltext_l = 'SLNO'.
wa_fc-fieldname = 'SL_NO'.
wa_fc-tabname = 'IT_MM'.
wa_fc-hotspot = 'X'.
APPEND wa_fc TO it_fc.
CLEAR wa_fc.
wa_fc-col_pos = 2.
wa_fc-fieldname = 'WERKS'.
wa_fc-tabname = 'IT_MM'.
wa_fc-ref_fieldname ='WERKS'.
wa_fc-ref_tabname = 'MARC'.
wa_fc-hotspot = 'X'.
APPEND wa_fc TO it_fc.
CLEAR wa_fc.
wa_fc-col_pos = 3.
wa_fc-fieldname = 'MATNR'.
wa_fc-tabname = 'IT_MM'.
wa_fc-ref_fieldname ='MATNR'.
wa_fc-ref_tabname = 'MARA'.
wa_fc-hotspot = 'X'.
APPEND wa_fc TO it_fc.
CLEAR wa_fc.
wa_fc-col_pos = 4.
wa_fc-fieldname = 'MAKTX'.
wa_fc-tabname = 'IT_MM'.
wa_fc-ref_fieldname ='MAKTX'.
wa_fc-ref_tabname = 'MAKT'.
wa_fc-hotspot = 'X'.
APPEND wa_fc TO it_fc.
CLEAR wa_fc.
wa_fc-col_pos = 5.
wa_fc-fieldname = 'MTART'.
wa_fc-tabname = 'IT_MM'.
wa_fc-ref_fieldname ='MTART'.
wa_fc-ref_tabname = 'MARA'.
wa_fc-hotspot = 'X'.
APPEND wa_fc TO it_fc.
CLEAR wa_fc.
wa_fc-col_pos = 6.
wa_fc-fieldname = 'VOLUM'.
wa_fc-tabname = 'IT_MM'.
wa_fc-ref_fieldname ='VOLUM'.
wa_fc-ref_tabname = 'MARA'.
wa_fc-hotspot = 'X'.
APPEND wa_fc TO it_fc.
CLEAR wa_fc.
wa_fc-col_pos = 7.
wa_fc-fieldname = 'NTGEW'.
wa_fc-tabname = 'IT_MM'.
wa_fc-ref_fieldname ='NTGEW'.
wa_fc-ref_tabname = 'MARA'.
wa_fc-hotspot = 'X'.
APPEND wa_fc TO it_fc.
CLEAR wa_fc.
wa_fc-col_pos = 8.
wa_fc-fieldname = 'ERSDA'.
wa_fc-tabname = 'IT_MM'.
wa_fc-ref_fieldname ='ERSDA'.
wa_fc-ref_tabname = 'MARA'.
wa_fc-hotspot = 'X'.
APPEND wa_fc TO it_fc.
CLEAR wa_fc.
wa_fc-col_pos = 9.
wa_fc-fieldname = 'LAEDA'.
wa_fc-tabname = 'IT_MM'.
wa_fc-ref_fieldname ='LAEDA'.
wa_fc-ref_tabname = 'MARA'.
wa_fc-hotspot = 'X'.
APPEND wa_fc TO it_fc.
CLEAR wa_fc.
fn module to display alv grid
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_grid_title = 'PLANT'
it_fieldcat = it_fc[]
TABLES
t_outtab = it_mm
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
regards
Rajkumar.G