Extract Call Detail Record from CME
Hi,
How can I extract the CDR from a CME, if i don't have a CVM. I wanna use it with a mySQL Database.
Thank you.
Thanks for the plug, David.
I'm the author of qqCDR. It is capable of pulling from CallManager, but not CME (unless there is a SQL interface that I don't know of - somebody emailed me asking just this question, I'm looking into a way to possibly code a solution around CME once I get a little more info. The last I knew, CME could only spit out CDR to syslog, for later parsing. Has this changed?
Similar Messages
-
Hello,
One of my Lync 2013 standard front-end servers is frequently logging this error:
Log Name: Lync Server
Source: LS Data Collection
Date: 28/12/2012 10:04:05
Event ID: 56208
Task Category: (2271)
Level: Warning
Keywords: Classic
User: N/A
Computer: LYNC-FE2.mydomain.local
Description:
Insertion of an error report was throttled to prevent flooding of the Call Detail Recording (CDR) database.
Component: CDR Adaptor
Cause: This is an expected condition if too many error reports of the same type were reported at the same time.
Resolution:
No action is needed. A large enough number of error reports of this type have already been inserted into the database and can be used for troubleshooting and reporting. Additional errors are not inserted to avoid flooding of the database with redundant information.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="LS Data Collection" />
<EventID Qualifiers="35039">56208</EventID>
<Level>3</Level>
<Task>2271</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2012-12-28T10:04:05.000000000Z" />
<EventRecordID>10745</EventRecordID>
<Channel>Lync Server</Channel>
<Computer>LYNC-FE2.mydomain.local</Computer>
<Security />
</System>
<EventData>
<Data>CDR Adaptor</Data>
</EventData>
</Event>
I don't appear to have any problems or issues with Lync at all. Full Enterprise Voice is in use at this site.
Anyone know why this may be occuring?
Thanks,
BenDid you check any additional errors? I'm seeing the same issue and linked it to this actual error message that seems to point towards a broken data model or bugged type casting/checking in the interface:
Failed to execute a stored procedure on the back-end.
Component: CDR Adaptor
Stored Procedure: RtcReportError
Error: System.Data.SqlClient.SqlException (0x80131904): Error converting data type varchar to float.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Rtc.Common.Data.DBCore.Execute(SprocContext sprocContext, SqlConnection sqlConnection, SqlTransaction sqlTransaction)
ClientConnectionId:xxxxxxxxxxxxx
Cause: Configuration issues, an unreachable back-end or an unexpected condition has resulted in the error.
Resolution:
Verify the back-end is up and this Lync Server has connectivity to it. If the problem persists, notify your organization's support team with the relevant details. -
View detail records from interactive report with button press
Hi I want to create a intractive report that will have a + sign for the user to expand the detail region below the record.
Thanks.
PKPthanks kartik,
I did exectly what is there in there. But I am having problem in display. I have put my application in
http://apex.oracle.com/pls/apex/f?p=44031:1
login as GUEST/password
select Company Accounts Management from Application Menu --> setup tab -> Companies from setup menu
the detail record is not displaying. correctly. -
Calling multiple records from SP
Hi,
I tried to use a CallabaleStatement to call an SP that would return multiple records but wasn't successful.
The Problem is the 'cstmt.executeQuery()' statement returns NULL. How to solve this?
I have tested the SP and it works fine. Pls help! And thanks. (Btw, I am using JDBC:ODBC driver and accessing Oracle database.)
Below are the methods that I used to set the IN parameters and the methods I used to register OUT parameters:-
ResultSet rs = null;
//call to the SP.
CallableStatement cstmt = con.prepareCall("{ call artmovby_date (?,?,?,?,?,?) }");
//based on the SP, the following set methods are used.
cstmt.setInt (1, pLanguage);
cstmt.setString (2, pCustomerCode);
cstmt.setString (3, pStartDate);
cstmt.setString (4, pEndDate);
//based on the SP, the following are the JDBC
// types registered for OUT parameters
cstmt.registerOutParameter(5, java.sql.Types.NUMERIC, 0);
cstmt.registerOutParameter(6, java.sql.Types.OTHER);
//using executeQuery since the SP
//contains 'select' statement only.
try { rs = cstmt.executeQuery(); } catch (Exception e) { e.printStackTrace(); }
Below is the information of the package and SP created in the database:-
CREATE OR REPLACE PACKAGE FetchData is
-- The purpose of the package is just define the recordset.
Define Record Types
TYPE ArtMoveOneRecTyp is RECORD
( Article SDGPOS.ARTNR%TYPE,
Shipment_No SDGPOS.SDGNR%TYPE,
Customer_Ref SDGPOS.KUNDENREF%TYPE,
Shipment_Date SDG.BELDATUM%TYPE,
In_Or_Out SDGPOS.FUNKTION%TYPE,
Quantity1 SDGPOSMG.MENGE%TYPE,
Quantity2 SDGPOSMG.MENGE%TYPE,
LineNr SDGPOS.NR%TYPE,
UnitLoad1 SDGPOSMG.RANG%TYPE,
UnitLoad2 SDGPOSMG.RANG%TYPE);
-- Define PL/SQL Table --
TYPE ArtMoveRecTyp IS TABLE OF ArtMoveOneRecTyp
INDEX BY BINARY_INTEGER;
END FetchData;
create or replace procedure artmovby_date
language IN number,
customerid IN varchar2,
startdate IN varchar2,
enddate IN varchar2,
p_size out number,
p_array out FetchData.ArtMoveRecTyp
) is
cursor get_art_mov_by_date
(p_language number,
p_customerid varchar,
p_startdate varchar,
p_enddate varchar) is
SELECT P.ARTNR, P.SDGNR, P.KUNDENREF, SDG.BELDATUM, P.FUNKTION,
M1.MENGE, M2.MENGE, P.NR, M1.RANG, M2.RANG
FROM
SDG,
SDGPOS P,
SDGPOSSTATUS S,
STATI_TEXTE ST,
ARTIKEL A,
LHM,
LHMTEXTE L,
MONITURENST MO, MONITURENTEXTE MOT,
SDGPOSMG M1, ARTMENGENEINH AE1, EINHEITENTEXTE E1,
SDGPOSMG M2, ARTMENGENEINH AE2, EINHEITENTEXTE E2
WHERE
P.KUNDENNR = S.KUNDENNR(+)
AND P.FUNKTION = S.FUNKTION(+)
AND P.SDGNR = S.SDGNR(+)
AND P.NR = S.SDGPOSNR(+)
AND 'J' = S.AKTIV(+)
AND 'SDGPOS' = ST.TYP(+)
AND p_language = ST.SPRACHE(+)
AND S.STATUS = ST.STATUS(+)
AND S.FUNKTION = ST.FUNKTION(+)
AND P.KUNDENNR = A.KUNDENNR(+)
AND P.ARTNR = A.NR(+)
AND P.LHMNR = LHM.NR(+)
AND P.LHM = L.NR(+)
AND p_language = L.SPRACHE(+)
AND P.MONITUR = MO.NR(+)
AND MO.NR = MOT.NR(+)
AND p_language = MOT.SPRACHE(+)
AND P.KUNDENNR = M1.KUNDENNR(+)
AND P.FUNKTION = M1.FUNKTION(+)
AND P.SDGNR = M1.SDGNR(+)
AND P.NR = M1.SDGPOSNR(+)
AND 1 = M1.RANG(+)
AND P.KUNDENNR = AE1.KUNDENNR(+)
AND P.ARTNR = AE1.ARTNR(+)
AND 1 = AE1.RANG(+)
AND AE1.MGEHNR = E1.NR(+)
AND p_language = E1.SPRACHE(+)
AND P.KUNDENNR = M2.KUNDENNR(+)
AND P.FUNKTION = M2.FUNKTION(+)
AND P.SDGNR = M2.SDGNR(+)
AND P.NR = M2.SDGPOSNR(+)
AND 2 = M2.RANG(+)
AND P.KUNDENNR = AE2.KUNDENNR(+)
AND P.ARTNR = AE2.ARTNR(+)
AND 2 = AE2.RANG(+)
AND AE2.MGEHNR = E2.NR(+)
AND p_language = E2.SPRACHE(+)
AND SDG.NR = P.SDGNR(+)
AND SDG.KUNDENNR = P.KUNDENNR(+)
AND SDG.FUNKTION = P.FUNKTION
AND ( P.KUNDENNR = p_customerid )
AND ( SDG.BELDATUM BETWEEN TO_DATE( p_startdate ,'DD/MM/YYYY' )
AND TO_DATE( p_enddate , 'DD/MM/YYYY' ))
AND S.STATUS >= 35
ORDER BY P.ARTNR ASC, SDG.BELDATUM ASC;
begin
p_size :=0;
open get_art_mov_by_date (language, customerid, startdate, enddate);
loop
fetch get_art_mov_by_date into p_array(p_size);
exit when get_art_mov_by_date%NOTFOUND;
p_size := p_size +1;
end loop;
close get_art_mov_by_date;
end;
/like for other structure we set occurence as 0 to unbound if we wanna send multiple messages ...
If you want to send multiple records u r occurence must be 0 to unbound in RFC also..
check that for your RFC ?
Regards
Rao
Edited by: PT Rao on Jun 12, 2008 5:13 PM
Edited by: PT Rao on Jun 12, 2008 5:17 PM -
No ringback when calling a cellphone from CME
I have CME running on a 3845 router with the latest CME code and correct IOS.
When a user dials out to a cell phone they do not hear any ringback but are able to connect to the cell phone and voice call proceeds fine. The VoIP user just never hears any ringback.
Is there a bug or something that Telco has to fix?
SethNo, this site is using all BRI.
Here is the output from debug isdn q931. The first is for a call to cell phone and the second is a call to a land line.
2d16h: ISDN BR2/0/1 Q931: Applying typeplan for sw-type 0xC is 0x0 0x0, Calling
num 3025
2d16h: ISDN BR2/0/1 Q931: TX -> SETUP pd = 8 callref = 0x04
Bearer Capability i = 0x8090A2
Standard = CCITT
Transfer Capability = Speech
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0x81
Preferred, B1
Keypad Facility i = '18045551212'
Calling Party Number i = 0x0080, '3025'
Plan:Unknown, Type:Unknown
2d16h: ISDN BR2/0/1 Q931: RX <- CALL_PROC pd = 8 callref = 0x84
Channel ID i = 0x89
Exclusive, B1
Locking Shift to Codeset 5
Codeset 5 IE 0x2A i = 0x80880B, '18045551212', 0x8001098001148001148001
14
2d16h: ISDN BR2/0/1 Q931: RX <- INFORMATION pd = 8 callref = 0x84
Called Party Number i = 0x80, '18043477539'
Plan:Unknown, Type:Unknown
Locking Shift to Codeset 5
Codeset 5 IE 0x2A i = 0x808300800114800114800114800114
2d16h: ISDN BR2/0/1 Q931: RX <- CONNECT pd = 8 callref = 0x84
Progress Ind i = 0x8482 - Destination address is non-ISDN
Nov 12 08:24:52 EST: %ISDN-6-CONNECT: Interface BRI2/0/1:1 is now connected to 1
8043477539 N/A
2d16h: ISDN BR2/0/1 Q931: TX -> CONNECT_ACK pd = 8 callref = 0x04
new_lexington_res#
Nov 12 08:24:58 EST: %ISDN-6-CONNECT: Interface BRI2/0/1:1 is now connected to 1
8043477539 N/A
Nov 12 08:25:07 EST: %ISDN-6-DISCONNECT: Interface BRI2/0/1:1 disconnected from
18045551212 , call lasted 14 seconds
2d16h: ISDN BR2/0/1 Q931: TX -> DISCONNECT pd = 8 callref = 0x04
Cause i = 0x8090 - Normal call clearing
2d16h: ISDN BR2/0/1 Q931: RX <- RELEASE pd = 8 callref = 0x84
2d16h: ISDN BR2/0/1 Q931: TX -> RELEASE_COMP pd = 8 callref = 0x04
new_lexington_res#
2d16h: ISDN BR2/0/1 Q931: Applying typeplan for sw-type 0xC is 0x0 0x0, Calling
num 3025
2d16h: ISDN BR2/0/1 Q931: TX -> SETUP pd = 8 callref = 0x03
Bearer Capability i = 0x8090A2
Standard = CCITT
Transfer Capability = Speech
Transfer Mode = Circuit
Transfer Rate = 64 kbit/s
Channel ID i = 0x81
Preferred, B1
Keypad Facility i = '18045551211'
Calling Party Number i = 0x0080, '3025'
Plan:Unknown, Type:Unknown
2d16h: ISDN BR2/0/1 Q931: RX <- CALL_PROC pd = 8 callref = 0x83
Channel ID i = 0x89
Exclusive, B1
Locking Shift to Codeset 5
Codeset 5 IE 0x2A i = 0x80880B, '18045551211', 0x8001098001148001148001
14
2d16h: ISDN BR2/0/1 Q931: RX <- ALERTING pd = 8 callref = 0x83
Progress Ind i = 0x8288 - In-band info or appropriate now available
Signal i = 0x01 - Ring back tone on
2d16h: ISDN BR2/0/1 Q931: RX <- CONNECT pd = 8 callref = 0x83
Signal i = 0x3F - Tones off
Nov 12 08:23:38 EST: %ISDN-6-CONNECT: Interface BRI2/0/1:1 is now connected to 1
8045551211 N/A
2d16h: ISDN BR2/0/1 Q931: TX -> CONNECT_ACK pd = 8 callref = 0x03
Nov 12 08:23:44 EST: %ISDN-6-CONNECT: Interface BRI2/0/1:1 is now connected to 1
8045551211 N/A
Nov 12 08:23:51 EST: %ISDN-6-DISCONNECT: Interface BRI2/0/1:1 disconnected from
18043597070 , call lasted 12 seconds
2d16h: ISDN BR2/0/1 Q931: TX -> DISCONNECT pd = 8 callref = 0x03
Cause i = 0x8090 - Normal call clearing
2d16h: ISDN BR2/0/1 Q931: RX <- RELEASE pd = 8 callref = 0x83
2d16h: ISDN BR2/0/1 Q931: TX -> RELEASE_COMP pd = 8 callref = 0x03 -
Call details frame from master frame in report 10g
Hi
I have i am using oracle 10g reports
i have two frame one for State master(Main Frame Name : M_G_state_name,Repeatig Fram name : G_State)
and other for city master(Main Frame Name : M_G_city_name,Repeatig Fram name : G_city)
in state master frame two feild State code and State Name and in city Master Frame three feild as city_code,city_name,State_code
i want that when i click on State_code of State master Frame then it show City details city master Frame of selected state.
i have no idea how can do these.please help me
thanx in advanceHello,
http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwwhthow/whatare/reports/webrpt/fa_hyperhtml.htm
Reports output in HTML format can include the following types of Web links:
A link from an object to another object within the same report, or to another HTML or PDF document (a hyperlink).
Regards -
A programme that will extract particular records from a file
Let's assume that there is a text file containing arround 50 records in the following format:
ABCDEFGH:AB:12345:-09876:567:876
The file to be read by the programme consist of a sequence of records each of which is split into fields using separator characters just like as we have in the Unix. The command line arguments should be given to execute the programme
The most important part of the programme is that the condition for extracting a particular record from that file will be that specified fields shall contain a particular string of characters.
The command line arguments to be given are:
-tx This flag specifies the field separator character "x"
-<num> This flag introduces a match requirement for field "num". Fields are numbered starting at 1. This flag may be followed by further flags and then by the string to look for.
-f Fold case. I.e. string matching is not case sensitive.
-t Transposition match. A match is recorded even if the strings differ provided the difference consists of just 2 characters transposed so that, for example: "compiler and complier" will be recorded as a match.
-d A differ match. A match is recorded even if the two strings differ by one letter. For example: "gest and rest" will be recorded as a match.
The file to be processed will be specified in the final command line argument.
If match requirements are specified for more than one field the implication is that all fields specified must separately satisfy their individual match requirements. If any fields referred to in the match requirements are missing from a particular record then the record will not satisfy the overall match requirements.And your question is??
-
File content conversion - sender adapter for Header and detail records
Hi Experts,
I am receiving a field of fixed length content format.(Header)The first line of the file will follow the structure X having some fields and (DetailRecord)subsequent lines in the file will follow structure Y having somes fields.There is no record identifier for Header and Detail records.In one file first line is Header records and remaining subsequent line is DetailRecord.What are the parameters we have to set for sender file content conversion parameters as i donot have any key field and key field value.And in one file we have only one header records ( first line) and n number of detail records from 2nd line onwards.
Thanks
DeepakHi
Refer the below fourm link,
Flat file whitout id
Regards
Ramg. -
Mix overview and detail records in same report
Hello, in substance I need to mix results from overview table and records from details table in same report.
For creating the scenario:
CREATE TABLE ALPHA
ALPHA_ID NUMBER,
ALPHA_NR NUMBER,
ALPHA_TOTCT NUMBER,
ALPHA_FUND NUMBER
ALTER TABLE ALPHA ADD (
CONSTRAINT ALPHA_PK PRIMARY KEY (ALPHA_ID));
ALTER TABLE ALPHA ADD (
CONSTRAINT ALPHA_NR_UNI UNIQUE (ALPHA_NR));
INSERT INTO ALPHA(ALPHA_ID, ALPHA_NR)
VALUES( 1, 7 );
INSERT INTO ALPHA(ALPHA_ID, ALPHA_NR)
VALUES( 2, 11 );
INSERT INTO ALPHA(ALPHA_ID, ALPHA_NR)
VALUES( 3, 15 );
INSERT INTO ALPHA(ALPHA_ID, ALPHA_NR)
VALUES( 4, 17 );
CREATE TABLE HIST
HIST_ID NUMBER,
HIST_NR NUMBER,
HIST_ALPHA_NR NUMBER,
HIST_CT NUMBER,
HIST_VAL NUMBER,
HIST_DATE DATE
ALTER TABLE HIST ADD (
CONSTRAINT HIST_PK PRIMARY KEY (HIST_ID));
ALTER TABLE HIST ADD (
CONSTRAINT HIST_NR_UNI UNIQUE (HIST_NR));
ALTER TABLE HIST ADD (
CONSTRAINT HIST_ALPHA_NR_FK FOREIGN KEY (HIST_ALPHA_NR) REFERENCES ALPHA ( ALPHA_NR ) );
TRUNCATE TABLE HIST;
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 1 ,1 ,7 ,1 ,10 , TO_DATE('01.02.2009' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 2 ,6 ,7 ,1 ,10 , TO_DATE('01.05.2009' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 3 ,3 ,7 ,3 ,30 , TO_DATE('01.02.2010' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 4 ,4 ,11 ,1 ,10 , TO_DATE('01.03.2009' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 5 ,5 ,11 ,-2 ,-20 , TO_DATE('01.06.2010' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 6 ,8 ,11 ,1 ,10 , TO_DATE('01.02.2011' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 7 ,2 ,15 ,2 ,20 , TO_DATE('01.03.2009' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 8 ,7 ,15 ,5 ,50 , TO_DATE('01.06.2010' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 9 ,9 ,15 ,-4 ,-40 , TO_DATE('01.02.2011' , 'dd.mm.yyyy' ) );
INSERT INTO HIST( HIST_ID ,HIST_NR ,HIST_ALPHA_NR ,HIST_CT ,HIST_VAL ,HIST_DATE )
VALUES ( 10 ,10 ,17 ,1 ,10 , TO_DATE('01.03.2011' , 'dd.mm.yyyy' ) );For updating the overview table, I used a view
CREATE OR REPLACE VIEW HIST_AGG ( HIST_ALPHA_NR, TOT_CT , TOT_VAL )
AS
SELECT HIST_ALPHA_NR
,SUM ( NVL(HIST_CT, 0 ) ) TOT_CT
,SUM( NVL(HIST_VAL, 0) ) TOT_VAL
FROM HIST
GROUP BY HIST_ALPHA_NR;
DECLARE
CURSOR cur
IS
SELECT
HIST_ALPHA_NR
,TOT_CT
,TOT_VAL
FROM HIST_AGG
BEGIN
FOR rec IN cur
LOOP
UPDATE ALPHA
SET ALPHA_TOTCT = rec.TOT_CT
, ALPHA_FUND = rec.TOT_VAL
WHERE ALPHA_NR = rec.HIST_ALPHA_NR;
END LOOP;
END;First report should the overview line from table alpha followed by all detail records from
table HIST, and this for each alpha_nr. At the end of the report a total from the overview
table alpha.
"SUMMARY";"ALPHA_NR";"ALPHA_TOTCT";"ALPHA_FUND";
;7;5;50;
;7;1;10;01.02.2009
;7;1;10;01.05.2009
;7;3;30;
;11;0;0;
;11;1;10;01.03.2009
;11;-2;-20;01.06.2010
;11;1;10;01.02.2011
;15;3;30;
;15;2;20;01.03.2009
;15;5;50;01.06.2010
;15;-4;-40;01.02.2011
;17;1;10;
;17;1;10;01.03.2011
"TOTAL_ALPHA_NR";4;9;90;Second report should display the overview per time period (year), but the records from
e.g. year 2009 start counting in year 2010. At the end of each year again a summary for
the actual status.
"YEAR";"ALPHA_NR";"ALPHA_TOTCT";"ALPHA_FUND"
2009;7;0;0
;11;0;0
;15;0;0
;17;0;0
"Total 2009";4;0;0
2010;7;2;20
;11;1;10
;15;2;20
;17;0;0
"Total 2010";4;5;50
2011;7;5;50
;11;-1;-10
;15;7;70
;17;0;0
"Total 2011";4;11;110
2012;7;5;50
;11;0;0
;15;3;30
;17;1;10
"Total 2012";4;9;90Hi,
This is quite a different problem from what you first posted.
wucis wrote:
This is what I want to get
ALPHA_DATE ALPHA_NAME ALPHA_NR ALPHA_TOTCT ALPHA_FUND TRANS_DATE
01.01.2009 seven 7 5 50
7 1 10 01.02.2009
7 1 10 01.05.2009
7 3 30 01.02.2010
01.03.2009 eleven 11 0 0
11 1 10 01.03.2009
11 -2 -20 01.06.2010
11 1 10 01.02.2011
03.05.2010 twelve 12 0 0
02.02.2009 fifteen 15 3 30
15 2 20 01.03.2009
15 5 50 01.06.2010
15 -4 -40 01.02.2011
10.10.2010 seventeen 17 1 10
17 1 10 01.03.2011
TOTAL_ALPHA_NR 5 9 90
Do you really want to include alphr_nr=12? If so, what do you mean when you say
I have an approach but there are "unnecessary" rows ( the line with just alpha_nr = 12 ) and why don't you want alpha_nr=13?
so my join is buggyExactly! The join
... from hist, alpha b
WHERE b.alpha_nr = hist.hist_alpha_nr (+) ...means "include all rows from alpha, whether of not they have any corresponding rows in hist or not". If you want to exclude alpha_nrs 12 and 13, you probably want to do an inner join there.
You don't need any sub-queries to do that:
SELECT CASE
WHEN GROUPING (h.hist_alpha_nr) = 0
AND GROUPING (h.hist_date) = 1
THEN MAX (a.alpha_date)
END AS alpha_date
, CASE
WHEN GROUPING (h.hist_alpha_nr) = 1
THEN 'TOTAL_ALPHA_NR'
WHEN GROUPING (h.hist_date) = 1
THEN MAX (a.alpha_name)
END AS alpha_name
, CASE
WHEN GROUPING (h.hist_alpha_nr) = 0
THEN h.hist_alpha_nr
ELSE COUNT (DISTINCT (alpha_nr))
END AS alpha_nr
, SUM (h.hist_ct) AS alpha_totct
, SUM (h.hist_val) AS alpha_fund
, h.hist_date AS trans_date
FROM hist h
, alpha a
WHERE h.hist_alpha_nr = a.alpha_nr
AND a.active = 'Y'
GROUP BY ROLLUP ( hist_alpha_nr
, hist_date
ORDER BY GROUPING (h.hist_alpha_nr)
, h.hist_alpha_nr
, GROUPING (h.hist_date) DESC
, h.hist_date
;Output:
ALPHA ALPHA ALPHA
ALPHA_DATE ALPHA_NAME _NR _TOTCT _FUND TRANS_DATE
01.01.2009 seven 7 5 50
7 1 10 01.02.2009
7 1 10 01.05.2009
7 3 30 01.02.2010
01.03.2009 eleven 11 0 0
11 1 10 01.03.2009
11 -2 -20 01.06.2010
11 1 10 01.02.2011
02.02.2009 fifteen 15 3 30
15 2 20 01.03.2009
15 5 50 01.06.2010
15 -4 -40 01.02.2011
10.10.2010 seventeen 17 1 10
17 1 10 01.03.2011
TOTAL_ALPHA_NR 4 9 90If this is not what you want (e.g., if you want alpha_nr=12 in the results) then point out where these results are wrong, post the correct results, and explain how you get the correct results in those places. -
How to fetch first 4 records from database.
hi experts.i am inexperience in this field.
please tell me suppose i want to extract only 4 records from the database ,
what is the select statement for this .
best regards.
subhasis.Hi
use this program as example.
u wil get solution.
REPORT ZSEN_ABAP_TABLE .
Tables : mara.
data : wa_mara type mara,
it_mara type table of mara.
SELECT * UP TO 4 ROWS FROM MARA INTO TABLE it_mara.
loop at it_mara into wa_mara.
Write : / wa_mara-MATNR,
wa_mara-MTART,
wa_mara-BISMT.
endloop.
Thanks
Senthil -
Hi All,
I was trying to extract the data using 0HR_PY_1 Data Source (HR-Payroll related). When I use Full update in BW, it extracts all the records from R/3 but when I use Init load to extract the data, it is not extracting all the records(some records are missing).
So I dont know what exactly is happening. I also checked RSA7 and deleted the entry for this data source (this entry was created because we tried to do some test delta in the past).
When I goto RSA3(Extractor Checker) and use update mode "F" (along with some selection criteria employee#284), it shows 550 records which is the correct number.But when I use the update mode "C"(Initialization of the delta transfer), I just get 490 records only.
So I am thinking is there anything I need to do to reset the initialization tables somewhere on r/3 side or do some kind of settings on r/3 by which I can extract all the records by using INIT load.I noticed a weird thing in RSA3,
I tested this without any selection criteria.
Using "F" update mode, the total number of records were 173,654
Using "C" update mode, the total number of records were 176,205
So, even though I was getting less number of records by using "Full" update mode, I was able to see the latest data I wanted. But When I use "C" update mode, even though the number of records is more, still I could not see the latest data (6/2007)???
So dont know what exactly is happening!! -
System Extract - Incrementing a sequence number in detail record layout
I have a system extract for a bank that requires a file header, batch header, detail, batch trailer and file trailer record. The detail record is at the run result level as I am looking to choose all records for a particular deduction (savings bonds) and I also have to put employee ssn and full name. This is working fine. I also have to put a sequence number, ie. detail record layout is record type, length 2, string, record sequence number, 5, ?????, employee SSN, length 9, field, employee full name, length 9, field. I need to increment the record sequence number by one for each detail record in the file. Ie. detail record 1 has record sequence number of 00001, detail record 2 has record sequence number of 00002.
What type of data element would I set up? For this particular field, I don't need to go against a database field, I only need to keep track of the previous record's sequence number so that I can keep incrementing by 1 until all detail records have been written. The batch trailer has a record count of the number of detail lines and that works fine because I've set that up as a type 'total' with a 'count' of the detail records. I also have in the batch trailer a sum of the pay values from each of the detail records and that works fine as subtrailers allow total data elements where detail records do not.You can use any of the below mentioned 2 options in the ctl (Control) file:
1. SEQUENCE(1,1)
2. "xxcust_autoinv_seq.nextval"
where xxcust_autoinv_seq is a database sequence.
Thanks,
Angelica. -
Use field from file header record in detail records
Hi,
I receive a file with different records type (transmission header, file header, detail records, file footer). The fields in each record type are different. The transmission header tells me who the sender of the file is. I need this information, because I am merging data of various senders into one table.
When processing the files, I need to split each file according to recordtype. (I can not use the same logic for each recordtype). How can I populate an extra column in the detail files with the value from the header record?
What I tried so far is the following:
- Populate a global variable using a script: This does not seem to work in the context of dataflows.
- Create a 'join' between header record and detail record. However there are no fields I can join, so Data Services is not happy with that.
- Store the field value from the header record in a DS (I chose a cache datastore, memory datastore did not work in batch scenario. I feel I can get this to work, but it seems quite an elaborate and expensive solution: First Filter the header record from the file, write the required field to the cache datastore, then read the same file but now filter the detail records, and join this with the datastore.
Is there a better way to do this? I was hoping I could just use a script and read the first line of my file and move the value to a global variable....
It would be great if someone could give me some tips...
Many thanks,
Jan.Hi Werner,
I am not sure if I understand you correctly.
I have declared $State as a global variable, not as a parameter.
When I check my custom function I do get a warning that a variable is called which is not declared.
I thought I did not have to worry about this as the variable does exist within the job where the function is called.
It looks like I can not set a value to a global variable in a custom function.
Is that correct, or is there something wrong with my syntax?
Really the only reason I call a custom function is to set the global variable, so I could even make my function as simple as this:
$State = 'NSW';
Return 0;
It still doesn't work...
Any idea why?
Thanks,
Jan. -
How to extract master data attribute from r/3 to bw give steps details
how to extract master data attribute from r/3 to bw give steps details screenshots
Hi
Go through the below process to extract Master Data Attribute from R/3
Hi,
Maintaining Generic DataSources
Use
Regardless of the application, you can create and maintain generic DataSources for transaction data, master data attributes or texts from any transparent table, database view or SAP Query InfoSet, or using a function module. This allows you to extract data generically.
Procedure
Creating Generic DataSources
1. Select the DataSource type and specify a technical name.
2. Choose Create.
The screen for creating a generic DataSource appears.
3. Choose the application component to which you want to assign the DataSource.
4. Enter the descriptive texts. You can choose any text.
5. Select the datasets from which you want to fill the generic DataSource.
a. Choose Extraction from View if you want to extract data from a transparent table or a database view. Enter the name of the table or the database view.
After you generate the DataSource, you have a DataSource with an extraction structure that corresponds to the database view or transparent table.
For more information about creating and maintaining database views and tables, see the ABAP Dictionary Documentation.
b. Choose Extraction from Query if you want to use a SAP Query InfoSet as the data source. Select the required InfoSet from the InfoSet catalog.
Notes on Extraction Using SAP Query
After you generate the DataSource, you have a DataSource with an extraction structure that corresponds to the InfoSet.
For more information about maintaining the InfoSet, see the System Administration documentation.
c. Choose Extraction Using FM if you want to extract data using a function module. Enter the function module and extraction structure.
The data must be transferred by the function module in an interface table E_T_DATA.
Interface Description and Extraction Process
For information about the function library, see the ABAP Workbench: Tools documentation.
d. With texts you also have the option of extracting from fixed values for domains.
6. Maintain the settings for delta transfer, as required.
7. Choose Save.
When performing extraction, note SAP Query: Assigning to a User Group.
Note when extracting from a transparent table or view:
If the extraction structure contains a key figure field that references a unit of measure or a currency unit field, this unit field has to be included in the same extraction structure as the key figure field.
A screen appears on which you can edit the fields of the extraction structure.
8. Edit the DataSource:
○ Selection
When you schedule a data request in the BI scheduler, you can enter the selection criteria for the data transfer. For example, you can determine that data requests are only to apply to data from the previous month.
If you set the Selection indicator for a field within the extraction structure, the data for this field is transferred in correspondence with the selection criteria in the scheduler.
○ Hide field
You set this indicator to exclude an extraction structure field from the data transfer. The field is no longer available in BI when you set the transfer rules or generate the transfer structure.
○ Inversion
Reverse postings are possible for customer-defined key figures. Therefore inversion is only active for certain transaction data DataSources. These include DataSources that have a field that is marked as an inversion field, for example, the update mode field in DataSource 0FI_AP_3. If this field has a value, the data records are interpreted as reverse records in BI.
If you want to carry out a reverse posting for a customer-defined field (key figure), set the Inversion indicator. The value of the key figure is transferred to BI in inverted form (multiplied by 1).
○ Field only known in exit
You can enhance data by extending the extraction structure for a DataSource by adding fields in append structures.
The Field Only Known in Exit indicator is set for the fields of an append structure; by default these fields are not passed to the extractor from the field list and selection table.
Deselect the Field Only Known in Exit indicator to enable the Service API to pass on the append structure field to the extractor together with the fields of the delivered extract structures in the field list and in the selection table.
9. Choose DataSource ® Generate.
The DataSource is saved in the source system.
Maintaining Generic DataSources
● Change DataSource
To change a generic DataSource, in the initial screen of DataSource maintenance, enter the name of the DataSource and choose Change.
You can change the assignment of a DataSource to an application component or change the texts of a DataSource. Double-click on the name of the table, view, InfoSet or extraction structure to get to the appropriate maintenance screen. Here you make the changes to add new fields. You can also completely swap transparent tables and database views, though this is not possible with InfoSets. Return to DataSource maintenance and choose Create. The screen for editing a DataSource appears. To save the DataSource in the SAP source system, choose DataSource ® Generate.
If you want to test extraction in the source system independently of a BI system, choose DataSource ® Test Extraction.
● Delta DataSource
On the Change Generic DataSource screen, you can delete any DataSources that are no longer relevant. If you are extracting data from an InfoSet, delete the corresponding query. If you want to delete a DataSource, make sure it is not connected to a BI system.
NR -
How get all record from master and matching record from detail
hi master
sir i have master detail table
i have many record in master table but some record in detail table how i get
all record from master and matching record from detail
such as
select m.accid,m.title,d.dr,d.cr from master m, detail d where m.accid=d.accid
this query not work that get only related record i need all record from master
please give me idea
thanking you
aamirhi master
sir i have master detail table
i have many record in master table but some record in
detail table how i get
all record from master and matching record from
detail
such as
select m.accid,m.title,d.dr,d.cr from master m,
detail d where m.accid=d.accid
this query not work that get only related record i
need all record from master
please give me idea
thanking you
aamir
select m.accid,m.title,d.dr,d.cr
from master m, detail d
where m.accid=d.accid (+)The outer join operator (+) will get you all the details from master and any details from the detail if they exist, but the master details will still be got even if there are not details.
Note: Oracle 10g now supports ANSI standard outer joins as in:
select m.accid,m.title,d.dr,d.cr
from master m LEFT OUTER JOIN detail d on m.accid=d.accid
Maybe you are looking for
-
Hi Friends I am getting the following message while doing delivery. Create delivery" not allowed (Sys. status Cost, object VB7061100198000010) Can anyone explain me this and help me to solve this problem.
-
Best Deals on Purchasing a MacBook Pro
I'm doing research on finding the best price for a MacBook Pro 2.2 (refurbished, clearance) and 2.4 (new). I found out that a discount is available for federal government employees on new and clearance models, but not on refurbished. So, far I've fou
-
Can I use two different HD's to backup my Mac?
I was thinking how to make my backups more resilient. At the moment I take one weekly backup from my Mac using Time Machine - I then store the TM hard-disk away somewhere safe. (BTW - the reason I don't leave the TM disk connected all the time and ru
-
Restart -- Magic Mouse does not auto-reconnect
After I updated OS from 10.6.4 to 10.6.5 with the combo updater, upon restart my Magic Mouse no longer auto-reconnect via Bluetooth. I even applied the combo updater for the second time. But, every time I restart my Mac, I have to use a USB mouse to
-
Can't use full mirror function for apple tv after downloading mountain lion
I've just downloaded mountain lion, and don't seem to be able to use the full mirror funtion to my apple tv (software 5.0.2) i can only mirror videos playing in my itunes like before the update. I've looked at videos on youtube, and i don't seem to h