How to map query data to workbook
Hi Freinds,
Hoping you have goodday, please let me know how to create workbook
and how to map query data to it.
Thanks
Chandan Kumar
Hello,
Execute a BEx Query and in the BEx toolbar you can see SAVE button, click that as select SAVE as Workbook.
If you want to insert more queries then first place the cursor where you want to insert the query, then Goto BEX toolbar, Select the Tool Icon and you can see a menu called Insert Query.
Thanks
Chandran
Similar Messages
-
How can I query data from XML file stored as a CLOB ?
Hi folks,
please see below sample of XML file, which is stored in "os_import_docs", column "document" as CLOB.
I would like to query this XML file using some SQL select.
How can I query data form below XML?
<?xml version="1.0" encoding="UTF-8"?>
<etd>
<header>
<AR>000000000</AR>
<AW>0</AW>
<CT>S</CT>
<CU>H</CU>
<CZ>SS48</CZ>
<BU>4</BU>
<CH>0032</CH>
<CK>2012-11-01</CK>
<CL>21:18</CL>
<CW>225</CW>
<CX>0</CX>
<CF>SS-CZL18</CF>
<DV>2</DV>
</header>
<account_group id="234">
<account id="234">
<invoice id="000742024">
<da>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>A</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>88754515</BS>
<AD>Mike Tyson</AD>
<AC>Mike Tyson</AC>
<AZ>CZ6521232465</AZ>
<AE/>
<CG>A</CG>
<AL>A</AL>
<BZ>.</BZ>
<AH>Some street</AH>
<AI/>
<AF>Some city</AF>
<AK>Kraj</AK>
<AG>CZ</AG>
<AJ>885 21</AJ>
<CR>21-11-2012</CR>
<AY>602718709</AY>
<AV>800184965</AV>
<AP/>
<AO/>
<AQ/>
<AN/>
</da>
<da>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>A</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>88754515</BS>
<AD>Mike Tyson</AD>
<AC>Mike Tyson</AC>
<AZ>CZ6521232465</AZ>
<AE/>
<CG>A</CG>
<AL>L</AL>
<BZ>Mike Tyson</BZ>
<AH>Some street</AH>
<AI/>
<AF>Some city</AF>
<AK>Kraj</AK>
<AG>CZ</AG>
<AJ>885 21</AJ>
<CR>21-11-2012</CR>
<AY/>
<AV>800184965</AV>
<AP/>
<AO/>
<AQ/>
<AN/>
</da>
<detaildc CH="0032" AB="234" BS="11888954" BB="32" BA="CZ" AT="" CI="7077329000002340342" AU="" DU="1Z48395" CB="CZK">
<dc>
<AW>0</AW>
<CT>D</CT>
<CU>C</CU>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<CV>8151</CV>
<BT>12111</BT>
<CJ>1</CJ>
<AM>0</AM>
<DR>PC</DR>
<DS/>
<DO>25-10-2012</DO>
<DQ>18:42</DQ>
<CE>1</CE>
<BH>8151</BH>
<CY>8151 SHELL MALKOVICE P</CY>
<DP>049336</DP>
<DT/>
<BQ/>
<BR>500000</BR>
<CN>30</CN>
<CM>030</CM>
<BO>160,00</BO>
<BF>38,900</BF>
<BC>6224,00</BC>
<BI>32,417</BI>
<CD>B</CD>
<BG>0,600</BG>
<BK>31,817</BK>
<BJ>0,000</BJ>
<DI>8</DI>
<BP>20,00%</BP>
<CC>CZK</CC>
<BM>5090,67</BM>
<BN>1018,13</BN>
<BL>6108,80</BL>
<BD>5090,67</BD>
<BE>1018,13</BE>
<DW>6108,80</DW>
<CO>Nafta</CO>
</dc>
</detaildc>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>1</DG>
<CN>30</CN>
<CM>030</CM>
<DF>160,00</DF>
<DH>litr</DH>
<DJ>20,00%</DJ>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA>P</DA>
<AX/>
<CQ/>
<CP/>
</dt>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>2</DG>
<CN/>
<CM/>
<DF>160,00</DF>
<DH>litr</DH>
<DJ/>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA/>
<AX/>
<CQ/>
<CP/>
</dt>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>19</DG>
<CN/>
<CM/>
<DF/>
<DH/>
<DJ/>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA/>
<AX/>
<CQ/>
<CP/>
</dt>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>8</DG>
<CN/>
<CM/>
<DF/>
<DH/>
<DJ/>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA/>
<AX/>
<CQ/>
<CP/>
</dt>
</invoice>
</account>
</account_group>
<footer>
<AR>999999999</AR>
<AW>0</AW>
<CT>S</CT>
<CU>T</CU>
<CZ>SS48</CZ>
<BU>4</BU>
<CH>0032</CH>
<CK>2012-11-01</CK>
<CL>23:04</CL>
<CW>225</CW>
<BX>1</BX>
<CS>7</CS>
<BW>0000000000000610880</BW>
</footer>
</etd>sample - not working:
select x.*
from os_import_docs d
,XMLTABLE('/etd/header'
PASSING httpuritype(d.document).getXML()
COLUMNS
response_status varchar2(50) PATH 'AR'
) x
where d.object_id = 2587058
and rownum = 1;
ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 6196, maximum: 4000)Many thanks,
TomasHello,
many thanks for the reply. Your examples are very usefull for me.
To answer your questions.
An XML structure:
/etd
/header - repeat in each row in output
/account_group/account
/invoice
/da - repeat for each details under "selected "invoice
/detaildc/dc - the lowest level
/detaildn/dn - the lowest level
/dt - repeat for each details under "selected "invoice
/footer - repeat in each row in outputI would like to to have a 1 row for each "record" in /detaildc section and include related nodes at higher levels.
Please see below XML file, which is simplified file of example in first post, but includes a complete xml structure which needs to be queried in db.
<?xml version="1.0" encoding="UTF-8"?>
<etd>
<header>
<AR>000000000</AR>
<CK>2012-10-31</CK>
<CF>SS-CZL19</CF>
</header>
<account_group id="234">
<account id="234">
<invoice id="EI08P4000">
<da>
<AR>EI08P4000</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildc DU="1Z56655" CB="EUR">
<dc>
<DO>16-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>1940,60</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="2Z55050" CB="EUR">
<dc>
<DO>17-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>1328,10</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="2Z90001" CB="EUR">
<dc>
<DO>27-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>185,10</BM>
<CO>Poplatek</CO>
</dc>
</detaildc>
<dt>
<AR>EI08P4000</AR>
<DG>8</DG>
</dt>
</invoice>
</account>
<account id="234">
<invoice id="EI13T7777">
<da>
<AR>EI13T7777</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildc DU="1Z48302" CB="EUR">
<dc>
<DO>26-10-2012</DO>
<CY>SANEF 07706 A 07704</CY>
<BM>232,10</BM>
<CO>Dalnicni poplatek</CO>
</dc>
</detaildc>
<detaildc DU="1Z48302" CB="EUR">
<dc>
<DO>20-10-2012</DO>
<CY>TEST A 07704</CY>
<BM>30,10</BM>
<CO>Poplatek</CO>
</dc>
</detaildc>
<dt>
<AR>EI13T7777</AR>
<DG>8</DG>
</dt>
</invoice>
</account>
<account id="234">
<invoice id="EI327744">
<da>
<AR>EI327744</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildn CI="707732 00000234" >
<dn>
<BY>30-10-2012</BY>
<BM>8,10</BM>
</dn>
</detaildn>
<detaildn CI="707732 00000234" >
<dn>
<BY>30-10-2012</BY>
<BM>399,50</BM>
</dn>
</detaildn>
<dt>
<AR>EI327744</AR>
</dt>
</invoice>
</account>
<account id="234">
<invoice id="EI349515">
<da>
<AR>EI349515</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildc DU="1Z56514" CB="EUR">
<dc>
<DO>29-10-2012</DO>
<CY>ALLAMI AUTOPALYAKEZE</CY>
<BM>1240,60</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="1Z56515" CB="EUR">
<dc>
<DO>19-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>7428,10</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="1Z56515" CB="EUR">
<dc>
<DO>12-10-2012</DO>
<CY>UK</CY>
<BM>954,10</BM>
<CO>Poplatek</CO>
</dc>
</detaildc>
<dt>
<AR>EI349515</AR>
<DG>8</DG>
</dt>
</invoice>
</account>
</account_group>
<footer>
<CZ>SS47</CZ>
<BU>4</BU>
<CH>0032</CH>
<CK>2012-10-31</CK>
<CL>01:25</CL>
</footer>
</etd>Expected output
AR CK CF AR4 AD DU CB DO CY BM CO AR5 DG CI BY BM6 CZ BU CH CK7 CL
0 41213 SS-CZL19 EI08P4000 Mickey Mouse 1Z56655 EUR 16-10-2012 ASFINAG POST_MAUT 1940,60 Dalnicni znamka EI08P4000 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI08P4000 Mickey Mouse 2Z55050 EUR 17-10-2012 ASFINAG POST_MAUT 1328,10 Dalnicni znamka EI08P4000 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI08P4000 Mickey Mouse 2Z90001 EUR 27-10-2012 ASFINAG POST_MAUT 185,10 Poplatek EI08P4000 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI13T7777 Mickey Mouse 1Z48302 EUR 26-10-2012 SANEF 07706 A 07704 232,10 Dalnicni poplatek EI13T7777 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI13T7777 Mickey Mouse 1Z48302 EUR 20-10-2012 TEST A 07704 30,10 Poplatek EI13T7777 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI327744 Mickey Mouse EI327744 707732 00000234 30-10-2012 8,10 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI327744 Mickey Mouse EI327744 707732 00000234 30-10-2012 399,50 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI349515 Mickey Mouse 1Z56514 EUR 29-10-2012 ALLAMI AUTOPALYAKEZE 1240,60 Dalnicni znamka EI349515 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI349515 Mickey Mouse 1Z56515 EUR 19-10-2012 ASFINAG POST_MAUT 7428,10 Dalnicni znamka EI349515 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI349515 Mickey Mouse 1Z56515 EUR 12-10-2012 UK 954,10 Poplatek EI349515 8 SS47 4 32 41213 01:25 -
How to use 'query data source Name ' property in a block
I want to create a block using query and want to show the columns on a form.
Could you please tell me how can I do this?
RegardsHi!
Create a new block manually.
Set the Query Data Source Type Property to FROM clause query.
In the Query Data Source Name Property write your query like you would
write it in sql*plus or toad but without a order by clause.
Set the DML Data Target Type Property to None.
Create items for the columns in your query.
May set the where clause and order by property of the block.
Build the form and execute a query in your new block.
Regards -
How to map bapimtcs-data to bapimatmra ?
Hello friends,
In order to implement the user exit z_uexit_material_vtl_status mentioned in Note Nr. 623026, I need a function which can convert (or map) bapimtcs-data to bapimatmra. This is necessary beacuse the standart code includes lines which contain syntax errors ("LS_BAPIMARA" and "LS_BAPISTRUCT-DATA" are not mutually convertible in a Unicode program. error) The conversion (mapping) of
bapimatmvk to bapimtcs is necessary, too. Here is the link leading to the problematic user exit. Any useful help would appreciated and rewarded.
Regards;
Özcan.Hi,
This MIGHT work, I am doing something similar in one of my user exits:
in your variable declarations put this:
DEFINE move_casting.
assign &1 to <unicode_x1> casting.
assign &2 to <unicode_x2> casting.
move <unicode_x1> to <unicode_x2>.
END-OF-DEFINITION.
And then at the point where you need to convert the data:
move_casting ls_bapimtcs-data ls_bapimatmra
I hope it helps!
Jeroen -
How to save Query in a workbook and Role
Hello All
What are this workbook and role?How to save the query into this and how it helps/use us.
can anyone tell about this?
regards
balajiHi,
You need to assign a role to a user. WHen this user enters the system s/he will be able to save queries under the role (the button 'Roles' will be seen).
See here an example of working with roles:
Re: How to protect Queries from being modified ?
Best regards,
Eugene
Message was edited by: Eugene Khusainov -
How to map Due date from Jdev to show in BPM Workspace
Hello,
Requirement:
Due date of the human tasks(that are set in jdev) should be visible in BPM Workspace .
I have added due date column in BPM workspace under process tracking and observed that the column is not reflecting the due date.
I found in a blog that we can map the variables that are required as flex fields to the systemManagedAttributes and then use them in BPM Workspace.
In our requirement, we have date as an input variable, for due date if i use "By Duration" and give 2 days then the date due will the "date which we will give as input+2days". So to map that due date to the systemManagedAttributes, which variables do i need to map so as to reflect the due date in workspace.
Please suggest any other ways of reflecting the due date of human task in BPM workspace.
Thanks,
Sravani.Hi Sravani,
I admire your innovative solution using flex fields, but there is a simpler way to show the deadlines in the Workspace's task list.
You can simply add the "Expires" column in the Workspace for your Inbox. That way it will automatically show your human task's deadline in the Expires column and you can avoid going the flex field route.
Dan -
How to Map XML data with XSD Schema in JAXB
Hello,
I am very much new to JAXB.
I am in need of someone help to go further in my dev.
I am having an XSD and i could able to do marshall and unmarshall using JAXB.
My problem is...
Consider followings are my Schema...
- <person id="general" help="USER.DOM.HELP.GENERAL" label="USER.DOM.LABEL.GENERAL" access="READWRITE">
<attribute id="Name" mandatory="true" type="STRING" access="READONLY" widget="NONE" />
<attribute id="login" label="USER.LABEL.LOGIN" help="USER.HELP.LOGIN" regexp="[A-a]" type="STRING" summary="true" access="WCREATE_RUPDATE" widget="TEXTFIELD" />
<attribute id="firstname" summary="true" label="USER.LABEL.FIRSTNAME" help="USER.HELP.FIRSTNAME" type="STRING" regexp="[A-a]" access="READWRITE" widget="TEXTFIELD" />
In this example a person contains set of attributes... some are mandatory(Name)...
In my application i will unmarshall the the schema file and show in GUI as a set of attributes when the operator want to create a person. And its very well working.
Now say for example, i am requesting my server to show all the created persons and its showing. when i click on the particular person the GUI will place the request to the server to get the corresponding date for the selected person.
But the response contains only the mandatory attribute.. i mean Name.... this may be because of the way my server working. So now i want to show the operator all the set of attributes for that person with the Name.
I mean i need to merge the schema with me resultant data and show it in the GUI.
My result is in the form of xml stream. And i will convert my schema also in the form of XML...
Now i need to merge both of this XMl and need to present in the GUI...
Any help please...
Thank You!!!Still i am not getting any reply :(
-
How to insert Query View into a WorkBook
Hi Experts,
Is it possible to insert a Query View into a workbook template . I know about how to insert Query into a workbook template but I am not aware of how to insert a Query view.Please help me in this regards.
Thanks & Regards,
Bala B...In ur analyzer u will get the design toolbar. Like u did for inserting query into workbook , same procedure u need to follow here-only difference being instead of query u select ur query view,while creating data provider.
Steps:
Goto design mode, b selecting 'design mode icon' in analyzer toolbar.
Double click on 'analysis grid' icon from ur analyzer toolbar.
In that create DP(data provider).
In that give a name for DP and select your query view in that screen.
Hope it helps.
let me know any issues
Regards,
Rathy -
How can Javascript in BW web template access query data
Hi All,
I want to access the BW query data from within Javascript within the BW Web template. Can you kindly share ideas how I can make my Javascript reach the query results returned by the dataprovider query in the BW template.
Your help is highly appreciated.
Thanks
KarenHi
The question is not using BW queries in Web templates I use them all the time. Within a BW web template I have Java script I want to access the BW query data from Javascript. The question is how to access query data within JavaScript.
Regards
Karen -
Execute query with in workbook
How to execute query with in workbook??
Regards,
Vivek
Please search the forum
Edited by: Pravender on Apr 26, 2011 1:03 PMHi Vivek,
Click on Addin Tab in Analyzer, Select the workbook from open workbook icon.
Once the workbook opened, click on variables icon. Then variables popup screen will come. Input the variables and click ok.
Hope this will help you...
Thanks,
Chenna. -
How can I insert Query in a Workbook
Hi,
I am new in BI 7.0. I am trying to insert a query in a workbook. but the tools button is not giving me the option to insert query like 3.X
How can i insert query in 7.0
Can anybody please give me the step by step instruction.
Thanks in Advance1. Open BEx ANalyzer.
2. Create new excel workbook by hitting the "New" icon in Excel.
3. Logon to a backend BI system.
4. Click the design mode icon.
5. Put your mouse on a cell and insert a table.
6. Assign a dataprovider to this table.
7. Switch off design mode.
Hope it Helps
Chetan
@CP.. -
How to delete some date in target table at a mapping?
How to delete some date in target table at a mapping?
I extract date from source tabel into target table,
but before extract date I want to delete some date from target?
how to do?Just to change a bit of terminology in the reply, within the mapping, click on operator properties and choose TRUNCATE/INSERT.
Note that truncate is dependent on constraints, so you probably must disable those before doing this. You can of course do DELETE/INSERT...
Jean-Pierre -
How to Get Missing Dates for Each Support Ticket In My Query?
Hello -
I'm really baffled as to how to get missing dates for each support ticket in my query. I did a search for this and found several CTE's however they only provide ways to find missing dates in a date table rather than missing dates for another column
in a table. Let me explain a bit further here -
I have a query which has a list of support tickets for the month of January. Each support ticket is supposed to be updated daily by a support rep, however that isn't happening so the business wants to know for each ticket which dates have NOT been
updated. So, for example, I might have support ticket 44BS which was updated on 2014-01-01, 2014-01-05, 2014-01-07. Each time the ticket is updated a new row is inserted into the table. I need a query which will return the missing dates per
each support ticket.
I should also add that I DO NOT have any sort of admin nor write permissions to the database...none at all. My team has tried and they won't give 'em. So proposing a function or storable solution will not work. I'm stuck with doing everything
in a query.
I'll try and provide some sample data as an example -
CREATE TABLE #Tickets
TicketNo VARCHAR(4)
,DateUpdated DATE
INSERT INTO #Tickets VALUES ('44BS', '2014-01-01')
INSERT INTO #Tickets VALUES ('44BS', '2014-01-05')
INSERT INTO #Tickets VALUES ('44BS', '2014-01-07')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-03')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-09')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-11')
So for ticket 44BS, I need to return the missing dates between January 1st and January 5th, again between January 5th and January 7th. A set-based solution would be best.
I'm sure this is easier than i'm making it. However, after playing around for a couple of hours my head hurts and I need sleep. If anyone can help, you'd be a job-saver :)
Thanks!!CREATE TABLE #Tickets (
TicketNo VARCHAR(4)
,DateUpdated DATETIME
GO
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-01'
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-05'
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-07'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-03'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-09'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-11'
GO
GO
SELECT *
FROM #Tickets
GO
GO
CREATE TABLE #tempDist (
NRow INT
,TicketNo VARCHAR(4)
,MinDate DATETIME
,MaxDate DATETIME
GO
CREATE TABLE #tempUnUserdDate (
TicketNo VARCHAR(4)
,MissDate DATETIME
GO
INSERT INTO #tempDist
SELECT Row_Number() OVER (
ORDER BY TicketNo
) AS NROw
,TicketNo
,Min(DateUpdated) AS MinDate
,MAx(DateUpdated) AS MaxDate
FROM #Tickets
GROUP BY TicketNo
SELECT *
FROM #tempDist
GO
-- Get the number of rows in the looping table
DECLARE @RowCount INT
SET @RowCount = (
SELECT COUNT(TicketNo)
FROM #tempDist
-- Declare an iterator
DECLARE @I INT
-- Initialize the iterator
SET @I = 1
-- Loop through the rows of a table @myTable
WHILE (@I <= @RowCount)
BEGIN
-- Declare variables to hold the data which we get after looping each record
DECLARE @MyDate DATETIME
DECLARE @TicketNo VARCHAR(50)
,@MinDate DATETIME
,@MaxDate DATETIME
-- Get the data from table and set to variables
SELECT @TicketNo = TicketNo
,@MinDate = MinDate
,@MaxDate = MaxDate
FROM #tempDist
WHERE NRow = @I
SET @MyDate = @MinDate
WHILE @MaxDate > @MyDate
BEGIN
IF NOT EXISTS (
SELECT *
FROM #Tickets
WHERE TicketNo = @TicketNo
AND DateUpdated = @MyDate
BEGIN
INSERT INTO #tempUnUserdDate
VALUES (
@TicketNo
,@MyDate
END
SET @MyDate = dateadd(d, 1, @MyDate)
END
SET @I = @I + 1
END
GO
SELECT *
FROM #tempUnUserdDate
GO
GO
DROP TABLE #tickets
GO
DROP TABLE #tempDist
GO
DROP TABLE #tempUnUserdDate
Thanks,
Shridhar J Joshi
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'> -
How to calculate First Date of Posting Period in BEx Query
Hi,
I have 2 reporting requirements as follows:
1) User will either enter a single posting period in a fiscal year or can enter a range of posting periods.
Based on user selection I need to display three key figures in a report.
Key figure 1 and Key Figure2 should be the summarized values for each posting period.
key Figure 3 should be the value on the first date of that particular posting period (in case user selects multiple posting periods i should derive the value of the first date of each posting period).
2) Also, in another report I need to display only top 8 values for one key figure in the report.
Please let me know the method or code required to get this Functionality.
Thanks in advance.First Report
1. Create Restricted KeyFigure 1 & 2 for the summarized values.
2. Create a Customer Exit Variable for getting the first date of the posting period, this should be of type Interval. Write code using FM FIRST_DAY_IN_PERIOD_GET to get. Read the selection variable to see the range of posting period and you have to insert that many first dates into this variable.
3. Create a new Restricted KeyFigure 3 and use the Customer Exit variable created in Step 2
Second Report
Use the Top N functionality of BEx and create a workbook. You can set the option Refresh query when the workbook is open so that the data is current when opened.
Hope this helps. -
How to calculate first date and end date of this year in Query
Hi Expert
I want to calculate following dates with inputted date in query.
I have no knowledge on ABAP and I just can create a query with simple logic.
Could you teach me how to calculate following date?
(If inputted date is April 12 2009)
- First date of this year (Ex January 1 2009)
- End date of this year (Ex December 31 2009)
- First date of last year (Ex January 1 2008)
- End date of last year (Ex December 31 2008)
- First date of this month (Ex April 1 2009)
Thank you!
TakeHR_JP_MONTH_BEGIN_END_DATE use this FM to get the begin and end date of the Date you are passing. eg when u give input as 04/12/2009, it will return
04/01/2009 as begin date
04/30/2009 as end date
pass the Year in this FM HR_E_GET_FISC_YEAR_DATES, you will get the Fiscal year Begin and End Dates
Abh
Maybe you are looking for
-
F-04 (Vendor Clearing using BAPI-BAPI_ACC_DOCUMENT_POST)
Hello all, i am using a BAPI - BAPI_ACC_DOCUMENT_POST for posting and clearing vendor payments but problem is that i m getting error that 'Account 3252995 in company code 5219 cannot be directly posted to', can anyone please help me? Regards saurabh.
-
"Are you sure you want to open 10 messages?" warning
When I highlight >10 messages to open at once, I get a warning to the effect of "Are you sure you want to open ## messages?" This is annoying, because I obviously highlighted >10 messages, and of course I want to open them all at once. My question is
-
This evening I went to call someone on my Pre Plus and my contacts were gone. Rebooted, they came back. Tried the speed dial again and it does not work. The contacts DO have the speed dials assigned. They worked yesterday....Anyone know what the
-
Pop-up message with table value
hello all, i have to display a pop-up message while saving invoice documents in FB60, i m using the customer exit for the same. but problem is that i have to display some values also in pop-up screen and there should be two pushbutton for user select
-
Emails beyond a week are disappearing. I have a gap from 2013 to July 3, 2015. I am not deleting them nor are my settings set to automatically delete emails. I use this for my business and emails from customers are disappearing.