Count rows without ABAP
Hi,
I am wondering how display the number materials for each material type in the system - without using ABAP? I have access to the standard tools SE16, SE16N, SQVI.
In excel, I would download MARA, sort by MART than add a subtotal using type count. However, in this case, MARA is too big for excel.
SL
Thats true but not very practical since we have many different material types in the system. I would have to key them in one by one then click Number of Entries then note down the number - and repeat the process x times. What I need is some kind of list
FERT 949048
COMB 43034
Similar Messages
-
Count the no.of rows without using count function
Hi,
How to count the no.of rows without using the count function?
Thanks,they won't be 100% accurate. You're correct, Bluefrog, but the same goes for doing a count(*) (depending on the size of the table, ofcourse):
the table being queried might be under DML (deletes/inserts), and the next count(*) might give different results.
Both approaches will never be 100% accurate.
But simply selecting num_rows will be much much faster than doing a count(*).
Counting the number of rows always reminds me of this ongoing discussion, by the way:
http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:127412348064#14136093079164 ;)
Usually knowing the number of records by approximatly is sufficient, imo. 1000000 or 1000007 records: I don't care, don't need to know that.
I've never needed to know the exact number of records in a table in my code, or been given a requirement that forced me to. -
Dynamic rows in ABAP webdynpro table
hi all
I've got a question. I have a webdynpro with a table.
This table is feed by a node. The number of rows of this node is dynamic.
I had seen in the properties of the table object that the number of visible rows can be set.
But is there also a method to set this number of rows dynamicly? So when the node has 20 rows
the table object is also set to show 20 rows and when there are none, the table
only shows the header of the table.
Currently the table always shows 5 rows, without checking how many rows there actually are.
Does any of you know how to do this?
kind regards,
Anton PierhagenHi Anton ,
You can use the method SET_VISIBLE_ROW_COUNT() of the class cl_wd_table for setting the visible row count dynamically.
In the WDDOMODIFY view , you can get the reference of the table UI element used and proceed.
DATA lo_table TYPE cl_wd_table.
lo_table ?= view->get_element( ID = 'name_of_table_in_the_view').
lo_table->SET_VISIBLE_ROW_COUNT(value = 5)."Here the value you can decide based on your data.
But this method is not recommended as it directly deals with the view's elements and will be very difficult for the person maintaining the code.
Instead create a attribute which can store a number and bind the visible row count property to this attribute.
set this attribute with the values based on the data.(as in number of visible rows you would want to see.)
Thanks,
Aditya -
How to use selection buttons in an ALV created without abap objects?
Hi, I use an alv created without ABAP Objects to show some information. Can I introduce inside the alv, the top buttons to select all rows / none row? And the second question, how may I introduce lateral buttons in the ALV to select indidividual rows?
Thanks!HI
i think you use REUSE_ALV_LIST_DISPLAY or REUSE_ALV_GRID_DISPLAY FMs.
Try to calling the function in this way
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE = ' '
i_callback_program = 'YOURREPORT'
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMAND'
* I_STRUCTURE_NAME =
is_layout = ls_layout
it_fieldcat = fieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
i_save = 'A'
is_variant = gt_variant
it_events = event_tab
* IT_EVENT_EXIT =
* IS_PRINT =
* IS_REPREP_ID =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = tb_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " LISTA
where
'SET_PF_STATUS'
'USER_COMAND'
are two form like this.
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'ZSTANDARD'. " EXCLUDING rt_extab.
ENDFORM. " SET_PF_STATUS
FORM user_comand USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&CPR'.
WHEN 'YOUR CODE FUNCTION'
endcase.
I hope it can help you.
Bye
enzo -
Count option in abap programme
Dear
I am writing abap programme.
i want count option in abap programme.
For how many rows display in my programme.
pls suggest.To display count of rows in ur final table use this code:
data: l_lines type i.
l_lines = lines( itab ).
write: l_lines. -
Cannot add row without complete selection of batch / serial numbers SBO 8.8
Hi
I have written some code to import a goods receipt po document in SAP 8.8
When the item is a batch number I get the message 'Cannot add row without complete selection of batch / serial numbers'
This is my code -
doc.Lines.SerialNumbers.SetCurrentLine(0)
doc.Lines.SerialNumbers.InternalSerialNumber = batchno
doc.Lines.SerialNumbers.ExpiryDate = CDate(bbdate2)
doc.Lines.SerialNumbers.ReceptionDate = CDate(Now.Date)
Can anyone see what is wrong please ?
Many thanks
Regards AndyHello
You would like to import items with batches or items with serials?
This code is importing items with serials.
Hereby an expample for each cases
'bacthes
oDoc.Lines.BatchNumbers.SetCurrentLine(0)
oDoc.Lines.BatchNumbers.BatchNumber = "1"
oDoc.Lines.BatchNumbers.Quantity = 1
oDoc.Lines.BatchNumbers.Add()
oDoc.Lines.BatchNumbers.SetCurrentLine(1)
oDoc.Lines.BatchNumbers.BatchNumber = "2"
oDoc.Lines.BatchNumbers.Quantity = 1
oDoc.Lines.BatchNumbers.Add()
' here you should apply condition: sum of batch qty = oDoc.Lines.Quantity -this completes the selection
oDoc.Lines.Add()
'serials
oDoc.Lines.SerialNumbers.SetCurrentLine(0)
' Use the correct line for selection of serial numbers:
' I have the settings "None" -> Systemserialnumber will be used
' query: SELECT T0.[SriUniqFld] FROM OADM T0
oDoc.Lines.SerialNumbers.SystemSerialNumber = "1"
'oDoc.Lines.SerialNumbers.ManufacturerSerialNumber = "1"
'oDoc.Lines.SerialNumbers.InternalSerialNumber = "1"
oDoc.Lines.SerialNumbers.Add()
oDoc.Lines.SerialNumbers.SetCurrentLine(0)
oDoc.Lines.SerialNumbers.SystemSerialNumber = "2"
'oDoc.Lines.SerialNumbers.ManufacturerSerialNumber = "2"
'oDoc.Lines.SerialNumbers.InternalSerialNumber = "2"
oDoc.Lines.SerialNumbers.Add()
' here you should apply condition: count of serialnumer lines = oDoc.Lines.Quantity
Regards
János -
Front Row without Apple Remote
Is there a way to open Front Row without the apple remote?
Mac OS X (10.4.8)~*~ You can also press the command key and Esc and front row will open :P Hope this helps ~*~
-
Error:Cannot add row without complete selection of batch/serial numbers
Dim oPDN As SAPbobsCOM.Documents
oPDN = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes)
Dim serno As String = "SH-A1,SH-A2"
Dim sernoval As String() = serno.Split(",")
Dim mnfser As String = "SH-B1,SH-B2"
Dim mnfserval As String() = mnfser.Split(",")
For k = 0 To sernoval.Length - 1
oPDN.Lines.SerialNumbers.InternalSerialNumber = sernoval(k).Trim
oPDN.Lines.SerialNumbers.ManufacturerSerialNumber = mnfserval(k).Trim
oPDN.Lines.SerialNumbers.Quantity = linedetails(iRowNo).Quantity
oPDN.Lines.SerialNumbers.SetCurrentLine(k)
oPDN.Lines.SerialNumbers.Add()
Next
oPDN.CardCode = "C232323"
oPDN.Lines.ItemCode = "A00004"
'oGR.Lines.LineNum = 0
oPDN.Lines.BaseLine = 1
oPDN.Lines.BaseEntry = 202
'oGR.Lines.BaseRef = 203
oPDN.Lines.BaseType = 20
oPDN.Lines.Quantity = 1
oPDN.Lines.UnitPrice = 2
oPDN.Lines.WarehouseCode = '01'
oPDN.Lines.Add()
lRetCode = oPDN.AddHi Vasanth,
Invert the SetCurrentLine () and Add() at the end of the SSSerialNUmbers loop.
Regards,
Eric -
'Another user or another operation modified data, to continue open the window again ' Inventory Transaction Log' (OITL)(ODBC-2039) (Message 131-183). If I click again on add I get the following message : 'Cannot add row without complete selection of Batch / Serial Nos. [Message-29-77]
Path:
Inventory -> Item Management -> Batches -> Batch Management - Complete form.
Before this I use Return Components on Receipts from Production as I am mistakenly issued it more than what was needed.
Were anyone be able to explain why it worked for certain items and not for others? I have successfully done “return components with some batches"Hi Nagarajan,
I'm one of colleague of caterine, we only accessing the batch management-complete window, no other window is open, still the error occurs; see image below
Before that error occurs(in image); first error we encounter was batch number is already exist, then upon click add another person modified the window; but we tried to restore the db then try to add the batch number in different transaction like SI 1658(Goods Issue), and it is okay.. but on the SI 50003 which is Receipt from production we can't add it.
Hope you can help us.
Regards,
Lean -
Message:Row without tax was found
Sir,
When i try to make A/P Invoice for an interstate purchase against Form C, in that i give unit price inclusive of tax (i.e total amount including tax), so tax is not applicable for that ... so, i leave the tax code field blank,,and when i try to add the document, it give me mesaage"Row without tax field was found"... What could be the reason??Hi,
I think you should fill it with Tax Group: Zero Rate, please do not leave it blank. And also check in tax group setup, tax account code should not be blank for each tax group.
Thanks and regards -
Count rows from multiple tables using SQL only
Hi, I know this has probably been answered before, but I couldn't find the answer anywhere. Please help.
I'd like count(*) [rows] for all tables in database using SQL only - no PL/SQL
The result should be something like:
Table RowCount
DBA_TABLES 1000
DBA_USERS 50
etc.
Thanks!offcource write this script:
create or replace procedure count_tables (ip_schema VARCHAR2)
is
lv_owner VARCHAR2(100);
lv_table_name VARCHAR2(100);
lv_sql_statement VARCHAR2(2000);
lv_count_table NUMBER;
CURSOR c1 IS
SELECT owner, table_name
FROM all_tables
WHERE owner = ip_schema
ORDER BY table_name;
begin
dbms_output.put_line ('+--------------------------------------------------------------------+');
dbms_output.put_line ('¦ | | ¦');
dbms_output.put_line ('¦ Schema Name | Table Name | Number of Rows ¦');
dbms_output.put_line ('¦ | | ¦');
dbms_output.put_line ('¦------------------------------------------------------------------¦');
OPEN c1;
LOOP
FETCH c1 INTO lv_owner , lv_table_name;
EXIT WHEN c1%NOTFOUND;
lv_sql_statement := 'SELECT count(*) FROM ' || lv_owner || '.' || lv_table_name;
EXECUTE IMMEDIATE lv_sql_statement INTO lv_count_table;
IF lv_count_table > 0 THEN
dbms_output.put_line ('| '||rpad(lv_owner, 14, ' ')||'| '|| rpad(lv_table_name, 32, ' ')||'| '|| rpad(lv_count_table, 16, ' ')||' |');
-- dbms_output.put_line ('|---------------|---------------------------------|------------------|');
END IF;
END LOOP;
CLOSE c1;
dbms_output.put_line ('+--------------------------------------------------------------------+');
exception
WHEN OTHERS THEN
dbms_output.put_line ('owner: '||lv_owner||' - table: '||lv_table_name||' - '||sqlerrm);
end count_tables;
set serveroutput on size 1000000
exec count_tables
drop procedure count_tables; -
Count rows from several tables
hello,
im trying to count row from multiple tables
for example i need the select statement to produce the following
table_name count
table1 5
table2 6
table3 3
i came up with the following script but it counts the number of tables i have
select object_name, (select count(*) from user_tables where table_name = object_name) from all_objects
where object_type = 'TABLE'Manik wrote:
May be possible:
Check this:
SELECT table_name,
TO_NUMBER (
EXTRACTVALUE (
xmltype (
DBMS_XMLGEN.getxml ('select count(*) c from ' || table_name)),
'/ROWSET/ROW/C'))
COUNT
FROM (select * from all_tables where table_name in ('TABLE1','TABLE2'))
WHERE owner = 'SCOTT';Cheers,
Manik.Awesome Manik... Just too good. Thanks.
I wish i could have given you the 'Correct' points. ;-)
Can you please explain the logic in brief? Will be helpful for everybody to understand... -
SQL Developer 2.1 EA - count rows with filter on a table
This is a small problem that I came across today while using 2.1 EA. I opened a table and did a filter to narrow down the results of the table. Then when I right clicked on the search results and clicked on 'Count Rows'....I get the count of the rows in the table and not my search results.
Is this a feature or a bug?
Thanks,
MikeIn EA2, we get both the total and the filtered total, nice.
Only remark is we don't get a progress indicator anymore, and thus can't cancel a query that might take up hours to finish!
Please log a bug for this.
Thanks,
K. -
Count rows in an internal table
Anybody how knows how I can count rows in my internal table?
Hi,
Data: lines like sy-tabix.
DESCRIBE TABLE ITAB LINES LINES.
where itab is your internal table.
This will work out.
Please award sutiable points .
Regards,
Irfan -
How to hide rows without data or all zero?
Hi.experts:
I have define a query that using query designer,and I have defined structure for both row and column,and then I have a free chatacteristic,such as 0MATERIAL,if I navigate by material then in each row,the material looks like read all the master data and displayed in the result area.
How can I hide these row without data.(or to say all with zero).where to using supress zero etc to avoid this?
Your quick response is highly appreciated!!Thanks in advance.
Best Regards
Martin XieHi,
you have the option of suppress zeroes in the properties of the queries where you can give the option whether you want to supress the rows or columns as well which conatains zeroes.
Thanks
Ajeet
Maybe you are looking for
-
Excise Invoice for Partly Returned Quantity
Dear Experts, My Client is into Trading of Goods & we are updating RG23D register for Purchases & Sales. After Delivery we create Excise Invoice with T-Code J1IJ & extract & print it thru J2I5 7 J2I6. In past in case of Returns we simple used to canc
-
What should i do if my iPod is stuck on the apple and doesn't need a update
My iPod all of a sudden blacked out now it's stuck on the apple sign, i tried plugging it in to iTunes but it says it does'nt need an update. What should i do to fix it?
-
Component labels not rendering correctly after applying fusion skin
Hi I have been using ADF 11g with blaf-plus-rich skin. Recently I upgraded to 11g R1 Patch Set 1 . I applied the new fusion skin and after that labels on the components are not appearing in the right color. They are appearing in white color as the ba
-
Difference between ActiveX Controls and JavaBeans
Hi, I have just started programming Java Beans. Being from Microsoft background my first feel is that Java Beans are to Java what ActiveX is to Microsoft. Is this true? I hope that some of the gurus out there will be better able to explain. Thankx in
-
Immediate kill session in alert log file
hi.. i'm using db10.2.0 ,windows 2003 server we're having alot of "immediate kill session " in the alert log file ,what could be causing it? the log file looks lsomething ike that Sat Oct 11 10:55:33 2008 Thread 1 advanced to log sequence 2390 Curren