Maximum records an internal table can hold?
Hi All,
Van you tell me maximum capacity of a standard internal table and that of an extract? How do we increase the capacity of the internal table if it is flooded?
Thanks a lot - Chandan
hi Chandan,
Storage in internal Table does not depend on the number of records but depend on the memory they will be using.
An internal table allows maximum of 2GB of storage, this can be increased by applying some patch up to 4 GB but that will degrade the programs performance.
To resolve this limit the number of records while selecting and rerun the program as per required number of times.
<b>
Reward if usefull</b>
Similar Messages
-
With in the internal table can I READ the same internal table for a record?
With in the internal table can I READ the same internal table?
For Suppose
LOOP AT itab.
can I do as below
READ TABLE itab with key bukrs = itab-bukrs
belnr = itab-belnr.
*and I have to compare
IF itab-shkzg = itab-shkzg_ia.
ENDIF.
ENDLOOP.Hi,
Yes..But use work area to differentiate..
EX.
DATA: WA LIKE ITAB.
DATA: WA_READ LIKE ITAB.
LOOP AT itab <b>INTO WA</b>.
can I do as below
READ TABLE itab <b>INTO WA_READ</b>
with key bukrs = itab-bukrs
belnr = itab-belnr.
*and I have to compare
IF <b>WA</b>-shkzg = <b>WA_READ</b>-shkzg_ia.
ENDIF.
ENDLOOP.
Please reward for helpful answers.
Thanks,
Naren -
Inserting records from internal table to database table
Hi all,
i want to insert records from internal table to zDatabase table, can u plz guide me which statement is better in performance to insert the records.
1) insert one by one record from internal table
loop at itab.
insert ztable from wa.
endloop.
2) insert total records at a time
INSERT <dbtabname> CLIENT SPECIFIED FROM TABLE itab.
or let me know if any other statement is there with high performance.
i internal table contains nearly 40000 records.
thanks.Hi,
Insert the entire table at atime rather than a record so as to increase the performance.
you can use INSERT <dbtabname> CLIENT SPECIFIED FROM TABLE itab.
or
MODIFY ZPRODUCT FROM TABLE GI_AFPO.
Regards,
Raj. -
How to update Records from Internal table to u2018Zu2019 table?
Hi Friends,
How to update Records from Internal table to u2018Zu2019 table.
I have records in Internal table , that records want to update on u2018Zmarau2019 Table.
( my internal table & u2018 Zu2019 table structures are same.)
Thanking you.
Regards,
SubashHi,
loop at internal table.
modify <Z- table > from values < internal table Workarea>.
if sy-subrc = 0.
COMMIT work.
else.
ROLLBACK waork.
endif.
endloop.
or
UPDATE <Z- table > from table < internal table Workarea>.
if sy-subrc = 0.
COMMIT work.
else.
ROLLBACK waork.
endif.
Prabhudas -
What's the maximum size a varchar2 variable can hold for and NDS Stmnt?
What's the maximum size a varchar2 variable can hold for and NDS Statement? I read that NDS is good for doing EXECUTE IMMEDIATE on statements that aren't too big. The 10g PL/SQL manual recommends using DBMS_SQL for statements that are too large, but it never gave a limit for what too large was. Does anyone know offhand?
The limit is the same as the length of varchar2 variable within PL/SQL - that is varchar2(32767).It's not documented, but intermediate concatenation result can hold up to (64k-1) :
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
declare
part1 varchar2(32767) := rpad('begin null;', 32767);
part2 varchar2(32767) := lpad('end;', 32767);
begin
dbms_output.put_line(length(part1 || ' ' || /*' ' ||*/ part2));
execute immediate part1 || ' ' || part2;
end;
65535
PL/SQL procedure successfully completed. -
Can sorting facilty in internal tables can be used on char fields?
Can sorting facilty in internal tables can be used on char fields?
there is no restriction to sort by any TYPE. u ve the freedom to sort on any TYPE of fields.
sort itab by ascending / descending F1 F2 F2.
abap doubts, i request you to try and practise your doubts befor posting here in forums. I can understand you are a buddy.Please remember, PRACTISE MAKES MAN PERFECT. Try to master on own and approch forum in worst case.
Also award points to all helpful answers.
All the Best
Thanks & Best Regards
Kiran -
To delete duplicate records from internal table
hi friends,
i have to delete records from internal table based on following criterion.
total fields are 7.
out of which if 4 fields are same and 5th field is different,then both records must be deleted.
in case all five fields are same,the program should do nothing.
for example.
if there are 3 records as follows
a1 b1 c1 d1 e1 f g
a1 b1 c1 d1 e2 w r
a1 b1 c1 d1 e1 j l
then first two records should be deleted as four fields are same but fifth(e) field differs.
but third record should remain as it is evenif first five fields are same for first and third record.
values of last two fields need not to be consider for deleting the records.LOOP AT ITAB.
V_FILED5 = ITAB-F5. "to compare later
V_TABIX = SY-TABIX. "used to delete if condition not matches
READ TABLE ITAB WITH KEY F1 = ITAB-F1
F2 = ITAB-F2
F3 = ITAB-F3
F4 = ITAB-F4.
IF SY-SUBRC = 0.
IF ITAB-F5 <> V_FIELD5.
*--both the records to be deleted,as Field5 is different.
DELETE ITAB INDEX SY-TABIX. "deletes that record
DELETE ITAB INDEX V_TABIX. "deletes the current record
ENDIF.
ENDIF.
ENDLOOP.
Message was edited by: Srikanth Kidambi
added comments
Message was edited by: Srikanth Kidambi -
Identifying the maximum length of a record in internal table
Hi,
Im using an internal table for a string for some requirement.
Now, at later point of time i need to use for CHAR variable to copy the data from the above internal table.
I need to identify the max length of the record stored in this internal table so that i can assign that much length to this CHAR variable.
Is there any standard fm or any abap stmts.
Thanks
rohithYou have to Loop the entire Itab to find the Maximum length of the record stored.
Just like this:
data: begin of itab occurs 0,
v_str1 type string,
end of itab.
data: v_len type i.
data: v_len1 type i.
itab-v_str1 = 'mahesh sap abap'.
append itab. clear itab.
itab-v_str1 = 'mahesh'.
append itab. clear itab.
itab-v_str1 = 'mahesh sap'.
append itab. clear itab.
loop at itab.
v_len = strlen( itab-v_str1 ).
if v_len > v_len1.
v_len1 = v_len.
else.
continue.
endif.
clear: v_len.
endloop.
write:/ 'Max Length', v_len1. -
Want last record in internal table
Hi All,
I have two internal table. in one internal table all data are available. now i want last record on first internal table and store in second internal table.... so give me some logic or sample code......
Thanks
zeniget the latest record from an internal table.
if you are using function module RH_READ_INFTY_1001 then <itab
> will always contain all the records betweebn specified period (taken from selection screen), but to retrieve the latest, sort the records by ENDDA and you will get it on top, then use INDEX 1 for that record only, and store the record in a <work_area>, finally get that record from <work_area> to <itab> it self. thats way your <itab> will hold only latest record.
(you can store <work_area> in <work_area_2> and then pass the record in to <itab>
or, you can store the <work_area> to a different <itab_2>).
call function RH_READ_INFTY_1001
tables
i1001 = it_hrp1001
sort it_hrp1001 by endda descending.
read table it_hrp1001 into wa_hrp1001 INDEX 1.
refresh it_hrp1001.
append wa_hrp1001 to it_hrp1001. -
How to get multiple records from internal table through BDC
PERFORM DYNPRO USING:
'X' 'SAPMM61L' '0500',
' ' 'BDC_OKCODE' '=NEWC',
'X' 'SAPMM61L' '0500',
' ' 'BDC_CURSOR' 'PLPTU-PLWRK(01)',
' ' 'BDC_OKCODE' '=TAKE',
' ' 'PLPTU-PLWRK(01)' '2531'. (2531 is a plant)
This is the recording used to get plant via BDC of MS31.
Using this code i can get only single plant...
If i want to get multiple plants from an internal table,how i can change this code?
Since it is a recording i cant put this code in LOOP..ENDLOOP.
Suggest any method for doing this....
Awaiting for ur reply...Hi,
While recording also record the scroll down button.
The you can place different plant in the BDC using loop and endloop
Regards
Arun -
Delete records in internal table
Hi,
I have two internal tables itab1 and itab2.
I need to delete records from itab1 comparing the data from itab2. I tried to use the read statement within the main table.
My problem is itab2 and itab1 has multiple records and all the records need to be checked from itab2 with itab1 before deleting the records from itab1.
itab1 and itab2 have a common field 'runid' between them.
How can this be accomplished?
Thanks,
VG>
Venkat.O wrote:
> Hi VG,
> Try this way.
>
> data: tabix type sy-tabix.
> loop at itab1.
> tabix = sy-tabix.
> _LOOP at itab2 where runid = itab1-runid._
_> if sy-subrc NE 0._
> delete itab1 index tabix.
> endif.
> endloop.
>
> Thanks
> Venkat.O
Venkat, inside a loop a IF SY-SUBRC NE 0 doesn't make sense because you are in the loop only after the condition in WHERE clause is satisfied (which means SY-SUBRC is always 0). Also you are missing another ENDLOOP. -
Delete records from internal table
hi all,
i want to delete records from intenal table which are starting with a particular starting number .
eg internal table
10000
20000
90000
91000
92000
88880
i want delete the records starting with 9 i.e. 90000 91000 92000.
Thanks in Adv
RAJYou can test this piece of code.
DATA:
i_tab TYPE STANDARD TABLE OF mara,
wa_tab TYPE mara.
wa_tab-matnr = '1000'.
APPEND wa_tab TO i_tab.
CLEAR wa_tab.
wa_tab-matnr = '1001'.
APPEND wa_tab TO i_tab.
CLEAR wa_tab.
wa_tab-matnr = '1002'.
APPEND wa_tab TO i_tab.
CLEAR wa_tab.
wa_tab-matnr = '1003'.
APPEND wa_tab TO i_tab.
CLEAR wa_tab.
wa_tab-matnr = '2001'.
APPEND wa_tab TO i_tab.
CLEAR wa_tab.
wa_tab-matnr = '3001'.
APPEND wa_tab TO i_tab.
CLEAR wa_tab.
wa_tab-matnr = '4010'.
APPEND wa_tab TO i_tab.
CLEAR wa_tab.
<REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Aug 8, 2008 4:49 PM -
Question reg. modifying latest record in internal table
Can you tell me if it is possible to modify the last appended record to the internal table?
I just want to modify the record in the internal table which is appended at the latest. Please tell me the logic for this.
Thanks a lot,
KrishenHi try with this:
DATA line TYPE I.
DATA wa_itab TYPE LINE OF it_itab.
DESCRIBE TABLE IT_TABLE LINE line.
READ TABLE IT_TABLE INTO wa_itab INDEX line.
WA_TABLE-FIELD = 'new value'.
MODIFY TABLE IT_TABLE FROM wa_itab
TRANSPORTING field.
Best regards. -
Calling record in internal table
Hi,
I have an internal table itab of this type:
types: begin of tdat
fld1(10) type c,
fld2(10) type c,
fld3(10) type c,
end of tdat.
All I want to do is assign the second field of the second record of the internal table to a variable. How do I do so?
thanks!Not sure what you requirement is......but you can do this too.
report zrich_0001.
data: begin of itab occurs 0,
fld1(10) type c,
fld2(10) type c,
fld3(10) type c,
end of itab.
field-symbols: <fs>.
data: some_variable(10).
itab-fld1 = '1'.
itab-fld2 = '2'.
itab-fld3 = '3'.
append itab.
itab-fld1 = '4'.
itab-fld2 = '5'.
itab-fld3 = '6'.
append itab.
itab-fld1 = '7'.
itab-fld2 = '8'.
itab-fld3 = '9'.
append itab.
assign itab-fld2 to <fs>.
read table itab index 2.
check sy-subrc = 0.
some_variable = <fs>.
Regards,
Rich Heilman -
Number of records in internal table
Hi
How can I tjeck an internal table for the number of records it contains (even if it contains 0).
Thanks in advance, regards
TorbenHi,
DESCRIBE TABLE itab.
Effect
Returns the attributes of the internal table itab. You must use at least one of the additions listed below:
Note
The DESCRIBE statement cannot be used for all ABAP types. In connection with ABAP Objects, SAP has introduced a RTTI concept based on system classes to determine type attributes at runtime. This concept applies to all ABAP types and as such covers all the functions of the DESCRIBE TABLE statement.
Extras:
1. ... LINES n
2. ... OCCURS n
3. ... KIND k
Addition 1
... LINES n
Effect
Places the number of filled lines of the table t in the field lin. The value returned to lin has type I.
Note
The number of filled lines of the table itab can also be ascertained using the predefined function lines( itab ).
Example
DATA: N TYPE I,
ITAB TYPE TABLE OF I.
CLEAR ITAB.
APPEND 36 TO ITAB.
DESCRIBE TABLE ITAB LINES N.
Result: N contains the value 1.
Addition 2
... OCCURS n
Effect
Passes the size of the OCCURS parameter from the table definition (as defined with DATA) to the variable n. The value returned to n has type I.
Example
DATA: N1 TYPE I,
N2 TYPE I,
ITAB1 TYPE TABLE OF I INITIAL SIZE 10,
ITAB2 TYPE I OCCURS 5.
DESCRIBE TABLE ITAB1 OCCURS N1.
DESCRIBE TABLE ITAB2 OCCURS N2.
Result: OCC contains the value 10 and N2 the value 5.
Addition 3
... KIND k
Effect
Writes the table type from itab to the variables n. The value returned to k is of type C. The constants SYDES_KIND-STANDARD, SYDES_KIND-SORTED and SYDES_KIND-HASHED are defined in the type group SYDES for the return values.
Example
Generic FORM routine any table type
TYPE-POOLS: SYDES.
FORM GENERIC_FORM USING ITAB TYPE ANY TABLE.
DATA: K TYPE C.
DESCRIBE TABLE ITAB KIND K.
CASE K.
WHEN SYDES_KIND-STANDARD.
WHEN SYDES_KIND-SORTED.
WHEN SYDES_KIND-HASHED.
ENDCASE.
ENDFORM.
Notes
Performance: The runtime for executing the DESCRIBE TABLE statement is approximately 4 msn (standardized microseconds).
The DESCRIBE TABLE statement also passes values to the SY-TFILL and SY-TLENG System fields
Additional help
Determining the Attributesof Internal Tables
Thanks,
Sankar M
Maybe you are looking for
-
The QUESTION: How do I get the ashx handler to work with the master page to generate a report when the user clicks on the hyperlink. I can get it to work if I just route the hyper link control directly to the ashx page, but I eventually need to add c
-
HOW DO I LOCATE MY APPLE IPAD THAT WAS STOLEN?
My name is Kayode, a national of Nigeria. I purchased my APPLE IPAD AIR from JUMIA. JUMIA is an online market. it has a physical office on 6B, Universal Close, Adeniyi Jones, Ikeja, Lagos State, Nigeria, The IPAD was delivered to my office on the 4t
-
Line skipping in continues report pages
Dear All, I have a report with width 8.5 & height 11; while I am printing continuously the first page will print with out any problem and second page will skip 2 or 3 line and third page will skip 5 or 6 line so on. How can I solve this issue? Afte
-
Importing Roles-User Groups Mapping from one Environment to Another
Hi, I have this situation. I am using WLP8.1 SP4 I have two environments (E1 and E2)and I have 2 MS Active Directory server (MS1 and MS2). The LDAP authenticator in E1 is configured to use MS1 and the LDAP authenticator in E2 is configured to use MS2
-
Database operation with web dynpro java
Hi, Our portal installed on MaxDB database.We need to develop web dynpro java application has some database opeartions (insert,update, delete, select) on MaxDB database. 1- Is there a blog or sample how can it be done over MaxDB? 2- Is there explorin