Calculating no. of entries in a table
Hi experts,
How can i calculate the number of entries in the table vbak?
I will reward all the helpful answers.
Thanks,
Ajay.
Ajay,
data : number(10) type n.
describe table itab lines number.
this will get you the no.of entries in the internal table itab.For a Standard table you can check in SE12 itself by clicking on the NUMBER OF ENTRIES button.
K.Kiran.
Similar Messages
-
No entry found in table TTXD Calculation procedure with TAXCR
Hello,
Transaction FB01 F-02 and is sending me the following error, "No entry found in table TTXD Calculation procedure with TAXCR Message no. TAX_TXJCD106" requires me to turn jurisdiction code.
What I can do to avoid this problem?
Regards,Hello,
You need to make sure the basic configuration is in place first, because I saw in my plain SAP environment, Costa Rica doesn't have a tax procedure assigned. I'm not familiar with Tax in CR as well. However, general rule of thumb for tax posting:
1. SPRO general settings - Set countries - Define countries in my SAP Systems
Assign the tax procedure TAXCR in country CR
2. SPRO FI global settings (New) - tax on sales/purchases - Basic settings - assign country to calc procedure
3. Define Tax Jurisdictions - TAXCR
4. Then Specify structure for tax jurisidiction code for TAXCR (This is the config content for table TTXD)
Regards,
WH -
Unable to display data no entry in the table without using Model clause
Hi,
I've an urgent requirement described below :
The previously posted Question has been answerted using Model Clause:
Is there any way out to solve it without using Model clause:
I've a table named as "sale" consisting of three columns : empno, sale_amt and sale_date.
(Please ref. The table script with data as given below)
Now if I execute the query :
"select trunc(sale_date) sale_date, sum(sale_amt) total_sale from sale group by trunc(sale_date) order by 1"
then it displays the data for the dates of which there is an entry in that table. But it does not display data for the
date of which there is no entry in that table.
If you run the Table script with data in your schema, then u'll see that there is no entry for 28th. Nov. 2009 in
sale table. Now the above query displays data for rest of the dates as its are in sale table except for 28th. Nov. 2009.
But I need its presence in the query output with a value of "sale_date" as "28th. Nov. 2009" and that of "total_sale" as
"0".
Is there any means to get the result as I require?
Please help ASAP.
Thanks in advance.
Create table script with data:
CREATE TABLE SALE
EMPNO NUMBER,
SALE_AMT NUMBER,
SALE_DATE DATE
SET DEFINE OFF;
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('12/01/2009 10:20:10', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/30/2009 10:21:04', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/29/2009 10:21:05', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/26/2009 10:21:06', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/25/2009 10:21:07', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 5000, TO_DATE('11/27/2009 10:23:06', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 4000, TO_DATE('11/29/2009 10:23:08', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 3000, TO_DATE('11/24/2009 10:23:09', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 2000, TO_DATE('11/30/2009 10:23:10', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 7000, TO_DATE('11/24/2009 10:24:19', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 5000, TO_DATE('11/25/2009 10:24:20', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 3000, TO_DATE('11/27/2009 10:24:21', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 2000, TO_DATE('11/29/2009 10:24:22', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 1000, TO_DATE('11/30/2009 10:24:22', 'MM/DD/YYYY HH24:MI:SS'));
COMMIT;
Any help will be needful for me
Regards,select sale_date,sum(sale_amt) total_sale
from
select empno,0 sale_amt,(sale_date + ao.rn) sale_date
from
select empno,sale_amt,sale_date ,(t.nxt_dt - t.sale_date) diff
from
select empno
,sale_amt,trunc(sale_date) sale_date
,trunc(nvl(lead(sale_date) over (partition by 1 order by sale_date),sale_date)) nxt_dt
from sale
) t
where (t.nxt_dt - t.sale_date) >1
) rec,(select rownum rn from user_objects where rownum<=200) ao
where ao.rn <=(rec.diff-1)
union all
select empno,sale_amt,trunc(sale_date) sale_date
from sale
group by sale_date
order by 1;
~~~~Guess this will serve the purpose...
Cheers Arpan -
How to schedule a job poles for a entry in a table.
Hi All ,
I have to schedule a job which runs somw stored procedures only on sunday and monday of a week at 3 AM in the morning.
The condition is that another application puts an entry into a table around 3 AM (some times before and some times late), now my should query
count in the table and runs the procs , however once its done ,it should do it monday and then it should not run till next sunday.
I have successfully created a job which keeps failing till it receives the entry and successfully runs the proc once the entry is there...
However how to schedule this thing ..correctly I need help , I want this job to disable itself on sunday once the procs are run wake up next morning
run again..and then next week ..
Following is the job ,
BEGIN
-- Job defined entirely by the CREATE JOB procedure.
DBMS_SCHEDULER.create_job (
job_name => 'TESTING_FIRST_JOB',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN SEODS.test_procedure_11292011(); END;',
start_date => SYSTIMESTAMP,
repeat_interval => 'freq=minutely; byminute=5',
end_date => NULL,
enabled => TRUE,
comments => 'Job defined entirely by the CREATE JOB procedure.');
end;
=====================================================
and following is the proc...
create or replace
procedure
test_procedure_11292011 as
var number;
begin
insert into SEODS.job_status
values (systimestamp, 'JOB TEST_PROCEDURE_11292011 HAS STARTED SUCCESSFULLY');
commit;
SELECT COUNT(*)
INTO var
FROM seods.student_weekend_status;
if var=0 then
raise_application_error(-20101, 'There is no record in the student_weekend_status table');
else
all_realtime();
end if;
insert into SEODS.job_status
values (systimestamp, 'JOB TEST_PROCEDURE_11292011 HAS FINISHED SUCCESSFULLY');
commit;
end;
Thanks in advance , please helpHi,
This is a known issue in the previous SQL Server version and has been fixed in SQL Server 2012. You should be able to set 90 minutes and the change would be saved in SQL Server 2012.
http://connect.microsoft.com/SQLServer/feedback/details/346786/ssms-does-not-support-job-schedule-frequencies-greater-than-60-minutes
Currently, you may schedule the job to occur every 1 hour or you may refer to the suggestion by Latheesh to get around this.
Thank you for your understanding.
Tracy Cai
TechNet Community Support -
How to delete the entries in CDCLS table
Hi All,
There is a potential issue with the size of table CDCLS on production system. We need to reduce or manage the amount of data in this table. CDCLS is a cluster table and cannot be reduced directly,
So first we were reduced the entries in CDHDR and then from CDPOS tables.
After that we tried to reduce the entries from CDCLS table through the program - RSSCD7RE, We are facing the error as - no data available and No active archive key was selected.
Please help me out, how to proceed further in this task. Thanks in advance.Go to DB15 and see the archiving object.
You can also use the archiving object CHANGEDOCU, please refer SAP documents for that.
Transaction is
SARA -> Archive object CHANGEDOCU
Message was edited by:
ANIRUDDHA DAS -
How to delete the NULL entries in nest table
Hi,
After I used a loop and open/fetch cursor populated the object table
I found there are random NULL entries in my object table (nest table)
The data look like this
NULL NULL NULL
NULL NULL NULL
123 03-MAY-04 ACTIVE
NULL NULL NULL
NULL NULL NULL
234 21-MAY-04 ACTIVE
NULL NULL NULL
345 11-MAY-04 ACTIVE
NULL NULL NULL
How can I get rid of those NULL entries in my nest table? So it can become
123 03-MAY-04 ACTIVE
234 21-MAY-04 ACTIVE
345 11-MAY-04 ACTIVE
Additional info:
create type myType as object
(id NUMBER (10,0),
eff_date date,
status VARCHAR2(17)
create type myNestTab as table of myType;
I have tried Delete procedure in following two ways.
Version 1:
FOR i IN l_my_nest_tab.FIRST..l_my_nest_tab.LAST
LOOP
IF l_my_nest_tab(i).id IS NULL THEN
l_curr_event_tb.DELETE(i);
END IF;
END LOOP;
Version 2:
FOR i IN l_my_nest_tab.FIRST..l_my_nest_tab.LAST
LOOP
IF l_my_nest_tab(i) IS NULL THEN
l_curr_event_tb.DELETE(i);
END IF;
END LOOP;
Both of them give me the error no data found. And only left me the first NOT NULL entry in the table.
123 03-MAY-04 ACTIVE
Thanks in avdance.Hi Vishnu,
u can write a report program for this and in that use the event :
AT NEW <field-name> ( use primary key)
your statements
ENDAT
for eg.
loop at itab ( herfe itab must be of type of table for which u want to track new entries)
at new matnr
write:/ new record
endat
endloop.
schedule this report in background to run in every 5 or 10 mins as per your requirement and hence changes can be tracked.
regards
Vinod -
Error message while running the payroll-no entry found in table t54c1
Hi All,
Im getting this error-error message while running the payroll-no entry found in table t54c1.What is the reason for this error?
How doi solve it?Hello
From the description of your problem above, your cumulation calender has not been generated for that month.
Please take necessary action to ensure that calendar type is assigned to pay period in payroll area, by maintaining the payroll period which is represented by Date modifier and period modifier in view maintainance for table T54C1.
Entries for this table are generated with the program RPUCTP10. (You should not have to create manual entries in this table.)
Thanks and Kind Regards
Ramana -
Error in Sales Order idoc - No appropriate entry found in table ADRT
Hello SAP Gurus,
When I am retriggering a sales order idoc I am getting the following error message.
No appropriate entry found in table ADRT
How can I resolve this issue.
Thanks,
Narayan.Hello Lakshmipati,
I have checked up the customer master. There was no communication method maintained for any of the customers.
But even then the order idoc is triggered to our XI system.
For the one that failed I have maintained the communication method and retriggered again. It had the same failure message.
Any helpful thoughts is highly appreciated.
Thanks & Regards,
Narayan. -
How to populate multiple entries to Bapi Table
Hi all,
How to populate multiple entries to Bapi Table.....
Here is the code(in component controller)
Z_Recr_Apply_Point_Input request = new Z_Recr_Apply_Point_Input(WDModelScopeType.TASK_SCOPE);
int size = wdContext.nodeApplicants().size();
for(int i = 0 ; i < size ; i++)
String isselected = wdThis.wdGetContext().nodeApplicants().getElementAt(i).getAttributeAsText("Appl_Number");
if(isselected == "true")
com.models.veteranpoint.Zrecr_Aplno appid = new
com.models.veteranpoint.Zrecr_Aplno();
appid.setAppl_Number(wdContext.nodeApplicants().
getApplicantsElementAt(i).getAppl_Number());
request.addApplicants(appid);
I want to pass the selected input field to bapi..
Please tel me where i pass the input field...
Please correct my code...
Thanks & regards
Mathi sHi,
Steps to insert multiple entries to BAPI table.
1.Create an instance for BAPI input
2.Bind the instance to the Node of the BAPI input
3.Create instance of the Structure(BAPI table) to which input has to be added.
4.Set the input values to the Structure instance.
5.Add the instance to the BAPI input.
6.Execute
From the given example,I assume Z_Recr_Apply_Point_Input is the BAPI Input and com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno as Structure
Step 1:
Z_Recr_Apply_Point_Input request = new Z_Recr_Apply_Point_Input(WDModelScopeType.TASK_SCOPE);
Step 2:
<b>wdContext.nodeZ_Recr_Apply_Point_Input.bind(request);</b>
Steps 3 & 4:
int size = wdContext.nodeApplicants().size();
for(int i = 0 ; i < size ; i++)
String isselected = wdThis.wdGetContext().nodeApplicants().getElementAt(i).getAttributeAsText("Appl_Number");
if(isselected == "true")
com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno appid = new
com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno();
appid.setAppl_Number(wdContext.nodeApplicants().
getApplicantsElementAt(i).getAppl_Number());
<b>wdContext.currentZ_Recr_Apply_Point_InputElement().modelObject().addRecr_Aplno(appid);</b>
Step 5:
<b>wdContext.currentZ_Recr_Apply_Point_InputElement().modelObject().execute();</b>
Regards,
Viji Priya -
BPM question - Delete all entries in a table and Insert data
Hello,
I'm new to PI BPM and have this scenario to implement.
I'm supposed to delete all entries in a table and then insert data to the same table.
Is BPM necessary? If it is, what is the best practice to implement my scenario?
I want to make sure that all entries were successfully deleted before insert data.
How do I check if all entries in the table were deleted successfully before
initiating insert.
Thank you.
-WonHi Won,
Yes, this is possible without BPM.
You have to create 2 separate mappings, each for deleting & inserting the records.
You will have 2 different Interface mappings as well.
But in ID, create a single interface determination.
In that, configure Deletion interface mapping first and in the second row, configure Insertion interface mapping.
Please make sure that the parameter 'Mainain Order At runtime' is checked in interface determination.
-Supriya. -
Unable to create PR with Service Line & also no entry in ESLH table using
Hi Experts,
I am using BAPI => BAPI_REQUISITION_CREATE to create PR and it is successful to create PR but when I try to create PO is become fail (proably missing entry in ESLH table).
Now my requirement is to create PR with Service Line and an entry in ESLH table (should be filled by SAP automatically). I have been passing the service related/account assigment tables into BAPI but still not working.
Will you please give a solution to create PR with Service Line and also need an entry in ESLH table (its important to my req)?
Also provide some input on Service Line, if possible(How to check Service Line for PR + Account Assignment to Service Line + etc.)?
Note that: If I create PR manually then there have entry in ESLH and hence I can create PO.
Definately the quick solution help me lot...
Thanks
AKGHi Experts,
I am using BAPI => BAPI_REQUISITION_CREATE to create PR and it is successful to create PR but when I try to create PO is become fail (proably missing entry in ESLH table).
Now my requirement is to create PR with Service Line and an entry in ESLH table (should be filled by SAP automatically). I have been passing the service related/account assigment tables into BAPI but still not working.
Will you please give a solution to create PR with Service Line and also need an entry in ESLH table (its important to my req)?
Also provide some input on Service Line, if possible(How to check Service Line for PR + Account Assignment to Service Line + etc.)?
Note that: If I create PR manually then there have entry in ESLH and hence I can create PO.
Definately the quick solution help me lot...
Thanks
AKG -
Unable to delete last entry in Custom table
Hi,
I have one custom table which allows only some specific entries to be maintained in the table.I have used a standard table as a check table for dis.I found no issue while maintaining entries in the table.But when i try to delete the last entry in the table i get the message "No entry exist".Long textNo entries were found when importing data from the database.
Kindly help.Hi,
If it is not possible through table maintainence then write a small Z program to delete the entries in devlopment system and then if then if you want you can transfer those to other systems.
delete from ZTABLE where {give your condition for the last record}.
Regards,
Sandipan -
CUA: Wrong entries in the table USZBVSYS
Hi All,
While searching a particular user access to the child systems via SUIM - > Users by system, the report given output that the user have access to so and so system. Whereas that user already deleted and there is no user account in CUA and the respective child system.
When i search in the table USZBVSYS, that user having a entry to that child system with status S.
May be due to some old IDOC get processed and made an entry in this table but physical the changes were not made either in CUA or in child system.
Now my concern is how to delete such type of entries in the table USZBVSYS?
SAP recommended not to use the report RSUSR_CUA_CLEANUP_USZBVSYS and i think it can be resolve only by manually method to create and delete.
Kindly let me know you opinion pls.Hi,
RSUSR_CUA_CLEANUP_USZBVSYS cannot work in this case, as you have 'S'-entries for the user section in uszbvsys. The report will clean up only entries with D,A or X entry for the user entry.
So there seems to be no automated standard report for your query.
I suggest to collect the user-IDs you need to remove, copy them into SU10, recreate them for the required systems and delete them
afterwards again.
Make sure, that nobody processes cua-idocs manually in any of your systems of the cua. Only use scul.
b.rgds, Bernhard -
Is there any system table available to check no. of entries in the table?.
Hi
Is there any system table available to check the no of entries in the table.
Note : the table may be whether SAP table or Z-table.(All tables)
Regards
Raja.Hi Raja,
I don't think so. Instead, try to perform
SELECT count(*) FROM dbtab.
...to get the number of records of the table dbtab.
I hope this helps. Kind regards,
Alvaro -
Insert delete or update entry in Custom table from KONV entry changed
Hi All,
I have custom table ZKONV with only few required columns and should have same number of records as KONV has at any point in time.
KONV is a cluster table so its not readable from ORACLE level. So ZKONV is created. But I dont know how to keep these both tables in sync.
I need to perform insert delete or update entry in Custom table if insert delete or update happens on cluster table KONV from any transactions.
As KONV is a cluster table and does not have changed time stamp I am not able to know the number of records changed in perticulat time period.
Thanks,Thanks for reply,
There is a Outside SAP system which needs to read KONV data to feed into their system, but as KONV is cluster table they are not able to read it from ORACLE level.
To solve this we are thinking to create a transparent Z-table and will fill it with KONV and catch Update, delete or Insert statement and do same on ZKONv.
Is this possible some how? by some database event or something....
Maybe you are looking for
-
Low Memory Footprint JVM needed, Please suggest.
Hi guys, I want a light weight (low memory footprint) Java Virtual Machine compatible with Java 1.5. It should be open source. Can anybody suggest me please. I've googled and tried to use some JVMs like Kaffe and SableVM. But I want some reliable VM.
-
Fax and voice solution technical details!
can any body send me the links or details in the Oracle Colloboraion suit OCS explanation about the How to Fax and technical detail about that .It would be nice if I got the general and both technical detail VOICE and FAX solution of OCS? Thanks in A
-
Periodic Alert-How to send all the records returned from the SQL in a mail?
Hello all, I have defined a Periodic Alert, my SQL query returns more than one record whenever I run it. I also defined an action to send an email with the message consisting of the output variables from the SQL. Whenever i run this alert, a mail is
-
Panic-can't move FCE project to DVD
Help. I have completed a FCE sequence, saved it, but when I attempt to export it to a quicktime self-contained movie I get an "General error #34" Message. The original video is from a Flip camera in the AVI format. I used Streamclip to convert the fo
-
J1iex -part capture for job work order
HI, in Ecc 6.0 ,While capturing the part2 for the subcontracting material in J1iex ,the system display both parent and child materials ,how to avoid the display of child materials in J1iex? Regards, Renuga.A