2015 Jan 23 8:05 AM
Hi All
I am passing to date and from date as input and fetching records from ekko into lt_ekko.
Now ,i had field 'customername' in output screen(importing parameter of a function module).
LT_ekko has field verkf (customername) values as SDN SAP - 10 records.and SAP - 10 records and SDN - 10 records
My query is if the user gives input as SAP.i need to display SDN SAP records(along with SAP records) and delete SDN records from lt_ekko as it is my final table.
I am giving ranges
IF iv_customername IS NOT INITIAL.
ls_r_custname-sign = 'I'.
ls_r_custname-option = 'NP'.
ls_r_custname-low = iv_customername.
APPEND ls_r_custname TO lt_r_custname.
ENDIF.
DELETE lt_ekko WHERE verkf IN lt_r_custname.
this delete statement is not working ,not deleting entries of SDN records.
Thanks
Vamsi
2015 Jan 23 8:16 AM
hi mohan
with CP or NP there must be atleast one masking character.
can you insert this before above code and try.
concatenate iv_customername '*' into iv_customername.
2015 Jan 23 8:40 AM
2015 Jan 23 9:01 AM
If you use a range (IN, select-option) you could concatenate "*" at start and end of string, if you are using LIKE statement, use "%".
But for internal table criteria you could also use operator NS Contains No String, DELETE lt_ekko WHERE verkf NS string. (log_exp - Comparison Operators for Character-Like Data Types)
Regards,
Raymond
2015 Jan 23 8:21 AM
Hi,
Instead u can try using DELETE lt_ekko WHERE verkf NE iv_customername.
Regards,
Vinodkumar.
2015 Jan 23 8:36 AM
Vinodh
if i do verkf NE iv_customername, SDN SAP records also gets deleted.i need SAP & SDN SAP records
2015 Jan 23 8:51 AM
Hi Mohan,
Make following changes to your code snippet -
IF iv_customername IS NOT INITIAL.
ls_r_custname-sign = 'I'.
ls_r_custname-option = 'EQ'.
ls_r_custname-low = iv_customername.
APPEND ls_r_custname TO lt_r_custname.
ENDIF.
DELETE lt_ekko WHERE verkf IN lt_r_custname.
Let me know incase of any help.
Thanks & Regards
Richa