‎2006 Dec 10 3:47 PM
1) WHAT IS THE DIFFRENCE B/W AT NEW AND ON CHANGF OF events?
2) difference b/w BDC and LSMW
3) difference b/w select single * and select upto 'n' rows?
4) difference b/w at selection screen on field and at selection screen output?
‎2006 Dec 10 4:11 PM
hi...
ans to ur first ques:
a) When AT NEW occurs,
the alpha-numeric fields have ******* in their value,also
after AT NEW statement we have to read the internal table
AT NEW MATNR.
READ TABLE ITAB INDEX SY_TABIX.
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.
*----
Other differences are :
ON CHANGE OF can be used any where in the program..
on change of differs from at new in the following respects:
1.It can be used in any loop construct, not just loop at. For example, it can be used within select and endselect, do and enddo, or while and endwhile, as well as inside get events.
2.A single on change of can be triggered by a change within one or more fields named after of and separated by or. These fields can be elementary fields or field strings. If you are within a loop, these fields do not have to belong to the loop.
3.When used within a loop, a change in a field to the left of the control level does not trigger a control break.
4.When used within a loop, fields to the right still contain their original values; they are not changed to contain zeros or asterisks.
5.You can use else between on change of and endon.
6.You can use it with loop at it where . . ..
7.You can use sum with on change of. It sums all numeric fields except the one(s) named after of.
8.Any values changed within on change of remain changed after endon. The contents of the header line are not restored as they are for at and endat.
while
AT NEW can be used only within a loop of an INTERNAL TABLE..
‎2006 Dec 10 4:21 PM
hi..
ans to ur 3rd ques:
Select single * -> this statement selects jus one record with all the fields from the table and is put into the it_tab.
Also this is used when u hav all the primary keys.
select upto n rows -> this statements selets only the specified no of rows with the all the fields and is put into the work area. if the fields are also specified in the condition,then it seletcs only the specified no of rows with the specified fields.
for more details,check the link below.
‎2006 Dec 10 4:22 PM
hi...
ans to ur 2nd ques:
The differences between LSMW and BDC are stated as below :
1.lsmw is basically for standard sap application.
BDC is basically for customized applications.
2. In lsmw mapping is take care by sap.
In bdc we have to give mapping concept explicitly.
3. LSMW offers different techniques for migrating data say : Direct input , Batch input recording , BAPI , IDOC.
BDC basically uses recording. There are two methods to implement BDC : (a) Call Trasaction Method
(b) Session Metohd.
4. LSMW is basically designed for Functional consultants who do no coding .
BDC is used by technical consultants , who do coding.
5.In LSMW , Coding cannot be done flexibily as BDC.
On the other hand in BDC ,Coding can be done flexibly to customize applications.
Function module BDC and LSMW are the two data migration techniques (from legacy to SAP) . BDC technique is usually done by ABAPers. It consists of three methods.
1) Call Dialog Method
2) Session Method
3) Call Transaction Method
In the case of Session Method , a BDC Session is created , which has the data and info to run it in batch mode. When the user runs this session, every transactions are run in batch mode and tables are updated.
WHile in call transaction, no session is created. Instead , a report prog is created , which takes input from the file and calls the transaction in Batch mode.
Call dialog method is similar to call transaction, except that updation is done by the calling program itself.This method is obsolete.
Advantages of Batch Input Method are
1)Can process large data volumes
2) data integrity is maintained
Just check these links.
all the best.
‎2006 Dec 10 4:32 PM
Hi,
ans to ur 4th ques :
<b>at selection-screen output</b>
(it is like A PBO) is used to modify the selection screen fields.
This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION. Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified values.
Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the input/output attributes of selection screen fields.
Example
Output all fields of the SELECT-OPTION NAME highlighted:
SELECT-OPTIONS NAME FOR SY-REPID MODIF ID XYZ.
...
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CHECK SCREEN-GROUP1 = 'XYZ'.
SCREEN-INTENSIFIED = '1'.
MODIFY SCREEN.
ENDLOOP.
The addition MODIF ID XYZ to the key word SELECT-OPTIONS assigns all fields of the selection option NAME to a group you can read in the field SCREEN-GROUP1. At PBO of the selection screen, all these fields are then set to highlighted.
AT-SELECTION SCREEN ON FIELD:
is to validate a particular selection screen field.
ie, we can use this statement for validation of that particular field only.
if any error comes it will open only this field and other fields will be disabled.
hope this is given u some what a clear idea of ur questions.
do reward points if u find my asnwers useful.
all the best.
‎2006 Dec 11 4:17 AM
Hi,
Executes the processing block enclosed by the <u><i><b>"ON CHANGE OF f"</b></i></u> and "ENDON" statements whenever the contents of the field f change (control break processing).
Normally, you use the statement to manipulate database fields during GET events or SELECT/ENDSELECT processing.
Both <u><i><b>"AT NEW f."</b></i></u> and "AT END OF f. " introduce processing blocks which are concluded by " ENDAT.".
These processing blocks are processed whenever the contents of a field f or a sub-field defined before f change as a result of processing with LOOP. "AT NEW f." begins a new group of (table) lines with the same contents as the field f while "AT END OF f." concludes such a group.
Within the AT ... ENDAT processing of internal tables, all argument fields following f are filled with "*".
*****************************************************************
BDC & LSMW
<u><i><b>Batch data communication</b></i></u> (BDC) is an instruction set that SAP can follow to execute a transaction without user intervention. The instructions dictate the sequence in which a transaction's screens are processed and which fields should be populated with data on which screens. All of the elements of an SAP transaction that are exposed to an online user have identifications that can be used in a BDC.
<u><i><b>LSMW</b></i></u>
http://www.ficoexpertonline.com/downloads/0703.doc
****************************************************************************************
<u><i><b>select single *</b></i></u> --> Selects single record with all the fields of the table where as
<u><i><b>select up to n rows</b></i></u> --> selects n number of rows from the table , it can be either all the fields or even selected number of fields .
‎2006 Dec 11 6:05 AM
regards to ques1
i remember seeing in sap doc (f1 help) that on change shd be avoided in itab loops...
regards
Charles