2010 Jun 01 11:33 AM
Dear All,
I want to delete itab on the basis of input which I enter on selection screen. Means I want to use delete as a between operator. e.g; delete field values between input_from to input_to.
I am using the following statement. It is not fullfilling my requirements, not deleteing all values from 2 to.
DELETE itab where field LE input_from AND field LE input_to.Which statement I should use.
Thanks and Regards,
Sohail
2010 Jun 01 11:42 AM
I guess you can directly use the BETWEEN addition
DELETE itab where field BETWEEN input_from AND input_to.
Vikranth
Dear All,
I want to delete itab on the basis of input which I enter on selection screen. Means I want to use delete as a between operator. e.g; delete field values between input_from to input_to.
I am using the following statement. It is not fullfilling my requirements, not deleteing all values from 2 to.
DELETE itab where field LE input_from AND field LE input_to.Which statement I should use.
Thanks and Regards,
Sohail
2010 Jun 01 11:38 AM
hi,
please check GE( equal or greater) at your code.
DELETE itab where field GE input_from AND field LE input_to.regards,
orhan
2010 Jun 01 11:42 AM
I guess you can directly use the BETWEEN addition
DELETE itab where field BETWEEN input_from AND input_to.
Vikranth
2010 Jun 01 11:45 AM
Hi Sohail,
DELETE itab WHERE field GE input_from AND field LE input_to.
This code will delete the record from itab the data of the field is between the range input_from & input_to.
Regards
Dillip
2010 Jun 01 11:46 AM
>
>
DELETE itab where field *LE* input_from AND field LE input_to.>
Could it be GE.
--
Reddy
2010 Jun 01 11:47 AM
Hi
s_field-low = input_from.
s_field-sign = 'I'.
s_field-option = 'BT'.
s_filed-high = input_to.
append s_field.
DELETE itab where field in s_field.
Thanks
Regards
I.Muthukumar.
2010 Jun 01 11:48 AM
Hi,
try this:
TABLES: MARA.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
*
DATA: IT_ITAB TYPE TABLE OF MARA.
DATA: wa_ITAB TYPE MARA.
*
SELECT * FROM MARA UP TO 100 ROWS INTO TABLE IT_ITAB.
*
LOOP AT IT_ITAB INTO WA_ITAB. WRITE: / WA_ITAB-MATNR. ENDLOOP.
DELETE IT_ITAB WHERE MATNR IN S_MATNR.
LOOP AT IT_ITAB INTO WA_ITAB. WRITE: / WA_ITAB-MATNR. ENDLOOP.
Regards, Dieter
2010 Jun 01 11:53 AM
Hi,
TYPES : BEGIN OF t_ekko,
ebeln TYPE ekko-ebeln,
END OF t_ekko.
DATA : it_ekko TYPE TABLE OF t_ekko,
wa_ekko TYPE t_ekko,
line TYPE i.
PARAMETERS : p_ebeln TYPE ekko-ebeln.
START-OF-SELECTION.
wa_ekko-ebeln = '4500109249'.
APPEND wa_ekko to it_ekko.
wa_ekko-ebeln = '4500109250'.
APPEND wa_ekko to it_ekko.
wa_ekko-ebeln = '4500109251'.
APPEND wa_ekko to it_ekko.
wa_ekko-ebeln = '4500109252'.
APPEND wa_ekko to it_ekko.
wa_ekko-ebeln = '4500109253'.
APPEND wa_ekko to it_ekko.
wa_ekko-ebeln = '4500109254'.
APPEND wa_ekko to it_ekko.
wa_ekko-ebeln = '4500109255'.
APPEND wa_ekko to it_ekko.
wa_ekko-ebeln = '4500109256'.
APPEND wa_ekko to it_ekko.
CLEAR : line.
DELETE it_ekko where ebeln BETWEEN '4500109250' AND '4500109255'.
DESCRIBE TABLE it_ekko LINES line.
WRITE : line.
With Regards,
Sumodh.P
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |