08-08-2007 6:58 PM
Hi All,
Can any one help me in answering the below questions.
1. How can we update the database table with this format, AcCeNtUrE. i want to update this field as it is. I know about checking of uppercase & lowercase. I think it dont works in this case. So how can we do this type of update.
2. what is the use of Exit, Stop, Cancel. how these three will work with in the loop and outside the loop.
Thanks in Advance,
Regards,
Ramana Prasad.
08-08-2007 7:17 PM
Hi,
<b>STOP</b>
The statement is only intended for use in the INITIALIZATION,
AT SELECTION-SCREEN, START-OF-SELECTION, and GET events. It
terminates the current processing block in an executable
program and triggers the END-OF-SELECTION event. In all other
processing blocks, or when you do not want to trigger the
END-OF-SELECTION event, you must use EXIT.
<b>EXIT</b>
- Within a loop structure:
Terminates looop processing (DO, WHILE, LOOP, SELECT).
- Within subroutines and other modularization units (but not
in a loop structure):
Leaves the subroutine or modularization unit (FORM, MODULE,
FUNCTION, TOP-OF-PAGE, END-OF-PAGE).
- Outside loop structures and modularization units (report
processing):
Terminates report processing and triggers list display.
DATA: SAP_COUNT TYPE I,
WA_T100 TYPE T100.
SELECT * FROM T100 INTO WA_T100 WHERE SPRSL = SY-LANGU AND
ARBGB = 'DS'.
WRITE / WA_T100-TEXT.
IF WA_T100-TEXT CS 'SAP'.
ADD 1 TO SAP_COUNT.
IF SAP_COUNT = 3.
EXIT.
ENDIF.
ENDIF.
ENDSELECT.
If you have a set of nested loops, EXIT only terminates the
current loop, and processing continues after the corresponding
END... statement in the next-highest loop.
<b>CONTINUE</b>
Within loop structures like
- DO ... ENDDO
- WHILE ... ENDWHILE
- LOOP ... ENDLOOP
- SELECT ... ENDSELECT
CONTINUE terminates the current loop pass, returns the
processing to the beginning of the loop and starts the next
loop pass, if there is one.
DO loop: Omit an area (10 ... 20)
DO 100 TIMES.
IF SY-INDEX >= 10 AND SY-INDEX <= 20.
CONTINUE.
ENDIF.
...
ENDDO.
Regards.
Marcelo Ramos
08-08-2007 7:15 PM
HI,
1) Let us say have a field called company in ur table and you want to upload 'AcCeNtUrE' into this field.. First ensure that the domain for the data element that this field is taking referece of should have Lower Case Check box( At domain level) checked.
2) Exit will take you out of loop, if no loop take you out of the program
stop will take you to end of selection event , this will always take you to end of selection irrespective of with in or out side of the loop.
continue will continue the loop by skipping the statments after it. This has no importance out of the loop
Thanks
mahesh
08-08-2007 8:23 PM
Hi Mahesh,
Thanks for your response.
But if i check this Lower case check box, i think it will update as 'accenture'. but my requirement is to update the same like AcCeNtUrE.
so how can we do this.
Regards,
Ramana Prasad.
08-08-2007 8:56 PM
HI,
if you check this box. it means that take as it is.. normally field values will be converted into upper case automaticall.. if you check this box it will ensure that the data is saved as it is.
Thanks
Mahesh
08-08-2007 7:17 PM
Hi,
<b>STOP</b>
The statement is only intended for use in the INITIALIZATION,
AT SELECTION-SCREEN, START-OF-SELECTION, and GET events. It
terminates the current processing block in an executable
program and triggers the END-OF-SELECTION event. In all other
processing blocks, or when you do not want to trigger the
END-OF-SELECTION event, you must use EXIT.
<b>EXIT</b>
- Within a loop structure:
Terminates looop processing (DO, WHILE, LOOP, SELECT).
- Within subroutines and other modularization units (but not
in a loop structure):
Leaves the subroutine or modularization unit (FORM, MODULE,
FUNCTION, TOP-OF-PAGE, END-OF-PAGE).
- Outside loop structures and modularization units (report
processing):
Terminates report processing and triggers list display.
DATA: SAP_COUNT TYPE I,
WA_T100 TYPE T100.
SELECT * FROM T100 INTO WA_T100 WHERE SPRSL = SY-LANGU AND
ARBGB = 'DS'.
WRITE / WA_T100-TEXT.
IF WA_T100-TEXT CS 'SAP'.
ADD 1 TO SAP_COUNT.
IF SAP_COUNT = 3.
EXIT.
ENDIF.
ENDIF.
ENDSELECT.
If you have a set of nested loops, EXIT only terminates the
current loop, and processing continues after the corresponding
END... statement in the next-highest loop.
<b>CONTINUE</b>
Within loop structures like
- DO ... ENDDO
- WHILE ... ENDWHILE
- LOOP ... ENDLOOP
- SELECT ... ENDSELECT
CONTINUE terminates the current loop pass, returns the
processing to the beginning of the loop and starts the next
loop pass, if there is one.
DO loop: Omit an area (10 ... 20)
DO 100 TIMES.
IF SY-INDEX >= 10 AND SY-INDEX <= 20.
CONTINUE.
ENDIF.
...
ENDDO.
Regards.
Marcelo Ramos