‎2008 Feb 27 9:54 AM
Hi
I had uploaded a flat file. I'm having all the data from my flat file to an internal table. In that flat file i'm having a field MANDT also. Now i want to check mandt field with my system mandt field and if i found the other mandt other than the present system mandt then i have to redirect to some other internal table and then i want to count all the data in that table. How to do that??
Regards
Nanda
‎2008 Feb 27 10:00 AM
Hi
Suppose you are having all the records in a internal table as lt_flat and you are having data in this internal table then compare like this
if sy-mandt = lt_flat.
and then u can use for all entries in your select statement or u can use read statement then get all your values into your internal table
Regards
Pavan
‎2008 Feb 27 9:58 AM
hi Nanda,
something like:
DATA : gv_lines TYPE i.
LOOP AT itab INTO wa WHERE mandt NE sy-mandt.
APPEND wa TO itab2.
DELETE itab.
ENDLOOP.
DESCRIBE TABLE itab LINES gv_lines.
gv_lines contains the number of lines in your itab now.
hope this helps
ec
‎2008 Feb 27 10:00 AM
Hi
Suppose you are having all the records in a internal table as lt_flat and you are having data in this internal table then compare like this
if sy-mandt = lt_flat.
and then u can use for all entries in your select statement or u can use read statement then get all your values into your internal table
Regards
Pavan
‎2008 Feb 27 10:02 AM
Hi,
LOOP AT ITAB.
IF ITAB-MANDT NE SY_MANDT.
MOVE : all records to one more internal table ITAB2.
APPEND ITAB2.
If you want to delete that record from ITAB
DELETE ITAB WHERE MANDT EQ ITAB-MANDT.
ENDIF.
ENDLOOP.
To count the data ...
DATA v_line TYPE I.
DESCRIBE TABLE ITAB2 LINES v_lines.
WRITE v_lines.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Feb 27, 2008 5:31 PM