How To Do a Select with TimeSet???
Hi,
I want to make a select consult but I have a lot of problems. The idea of the query is that it must return the pre months of that the user select.
For example, If the user select in the enviorement 2009.MAY, the query must returns 2009.JUN,2009.FEB,2009MAR,2009.APR,2009.MAY.
I want to put it in a Default.lgx source, and when an user send a data to BPC System, it make the query.
Could you give me some idea to trie to do it ??
thanks for all
Hi ,
I try to do this source and the loggic debuger show me that it is correct but the problem starts when I execute it in the Default.lgx by Excel , because it doesn´t do it:
*SELECT (%MON%, CAST ( AS INTEGER), TIME, "[ID]='%TIME_SET%'")
*SELECT(%YEA%, "[YEAR]", TIME, "[ID]='%TIME_SET%'")
*SELECT(%MYVAR%, "[ID]", TIME, "[HLEVEL]='3' AND ='%YEA%' AND CAST( AS INTEGER)<='%MON%'")
*FOR %ThisMeses%=%MYVAR%
// but %MYVAR% it doesnt work correctly , because if I put in this source 2009.JAN,2009.FEB,2009.MAR,2009.APR....and it works correctly.
*WHEN INDICADOR
*IS *
*REC(TIME=%ThisMeses%,DATASRC="Trimestral",EXPRESSION=5)
*ENDWHEN
*NEXT
*COMMIT
Similar Messages
-
How to avoid select with in a loop.
Hi friends,
can any tell how to avoid the select with in a loop for the following code, since it badly effecting my performance. if possible with code
SELECT matnr werks
FROM marc
INTO TABLE it_marc
FOR ALL ENTRIES IN it_ausp_1
WHERE matnr = it_ausp_1-objek AND
werks = p_werks
AND mmsta LE 60.
SORT it_marc BY matnr.
CLEAR wa_ausp_1.
CLEAR wa_tabix.
LOOP AT it_ausp_1 INTO wa_ausp_1.
wa_tabix = sy-tabix.
READ TABLE it_marc INTO wa_marc WITH
KEY matnr = wa_ausp_1-objek
BINARY SEARCH.
IF sy-subrc EQ 0.
ELSE.
DELETE it_ausp_1 INDEX wa_tabix.
ENDIF.
ENDLOOP. " LOOP AT it_ausp_1 INTO wa_ausp_1.
APPEND LINES OF it_ausp_1 TO it_tal.
IF it_tal[] IS NOT INITIAL.
LOOP AT t_plan_order INTO fs_plan_order.
SELECT r~rsnum
r~rspos
r~matnr
r~nomng
r~meins
r~plnum
r~bdter
r~ewahr
r~alprf
r~posnr
r~baugr
m~dispo
INTO TABLE t_resb
FROM resb AS r
INNER JOIN marc AS m
ON rbaugr = mmatnr
AND rwerks = mwerks
FOR ALL ENTRIES IN it_tal
WHERE r~rsnum = fs_plan_order-rsnum
AND r~matnr = it_tal-objek
AND r~xloek = ' '
AND r~werks = p_werks.
APPEND LINES OF t_resb TO t_tacl.
ENDLOOP.SELECT r~rsnum r~rspos r~matnr r~nomng r~meins r~plnum r~bdter r~ewahr r~alprf r~posnr r~baugr m~dispo
INTO TABLE t_resb
FROM resb AS r
INNER JOIN marc AS m
ON r~baugr = m~matnr
AND r~werks = m~werks
FOR ALL ENTRIES IN it_tal
WHERE r~rsnum = fs_plan_order-rsnum
AND r~matnr = it_tal-objek
AND r~xloek = ' '
AND r~werks = p_werks.
The logic of this select is completely weird. Whcih order of the db-tables should be used, which indexes?
On RESB matnr, werks and xloek are in one index, but rsnum not.
Are the conditions in fs_plan_order and it_tal connected or independent?
It is probably much faster, to leave the fs_plan_order condition away and check it on the result.
SELECT r~rsnum r~rspos r~matnr r~nomng r~meins r~plnum r~bdter r~ewahr r~alprf r~posnr r~baugr m~dispo
INTO TABLE t_resb
FROM resb AS r
INNER JOIN marc AS m
ON m~matnr = r~baugr
AND m~werks = r~werks
FOR ALL ENTRIES IN it_tal
WHERE AND r~matnr = it_tal-objek
AND r~xloek = ' '
AND r~werks = p_werks.
sort fs_plan_order by rsnum.
loop at it_tal in wa.
read table fs_plan_order
with key rsnum = wa-rsnum
binary search.
if sy-subrc eq 0.
append ...
endif.
endloop.
Siegfried -
Hi
I want to create a app redirecting to my mebsite.This app permit to select a "area" selected on a UICollectionViewController, and an "event" selected with a UITableViewController.
I need to integer both informations on the FinalViewController (called in my app AnnoncesViewController) =>
The fisrst array is selected on CollectionViewController:@"http://carnet-du-jour.com/index.php/component/ohanah/?option=com_ohanah&view=e vents&Itemid=0&ohanah_venue_id=21"
The second array is selected onUITableViewController:@"&ohanah_category_id=1&textToSearch="
The final array must be:http://carnet-du-jour.com/index.php/component/ohanah/?option=com_ohanah&view=eve nts&Itemid=0&ohanah_venue_id=21&ohanah_category_id=1&textToSearch=
How can I integer these 2 NSArray to obtain this result to link to a UIWebView as FinalViewController?
Thank you for your help!!
My App is on Drobox:https://www.dropbox.com/s/43l1p2hj5bqamvn/Carnet%20du%20Jour.zip
Gracefully
RémySpehlerHi
I want to create a app redirecting to my mebsite.This app permit to select a "area" selected on a UICollectionViewController, and an "event" selected with a UITableViewController.
I need to integer both informations on the FinalViewController (called in my app AnnoncesViewController) =>
The fisrst array is selected on CollectionViewController:@"http://carnet-du-jour.com/index.php/component/ohanah/?option=com_ohanah&view=e vents&Itemid=0&ohanah_venue_id=21"
The second array is selected onUITableViewController:@"&ohanah_category_id=1&textToSearch="
The final array must be:http://carnet-du-jour.com/index.php/component/ohanah/?option=com_ohanah&view=eve nts&Itemid=0&ohanah_venue_id=21&ohanah_category_id=1&textToSearch=
How can I integer these 2 NSArray to obtain this result to link to a UIWebView as FinalViewController?
Thank you for your help!!
My App is on Drobox:https://www.dropbox.com/s/43l1p2hj5bqamvn/Carnet%20du%20Jour.zip
Gracefully
RémySpehler -
Hello
Simple problem - don,t know how to solve it.
With Premiere CC when I try to do a selection (click... drag... release the click) very often it stop way before the end of the move I'm swinging the Magic Mouse. I taught that the mouse clicking was defective and went to get a new Magic Mouse after lots of frustration. Today, I have an edit to do it it does the SAME thing !!
I was like ????#$%?&*(???
Opened all the lights and taught I've trow the new mouse to the garbage and was using the defective mouse again... no !! - ??
Actually, the bran new mouse is doing the same thing. What I understand after investigating on the motion and watching carefully my fingers !! - is that when I click I have to keep my finger at the EXACT same place on the mouse... drag and release and it's fine. If I click by pushing on the mouse and my finder is moving of a 1/32th of a millimeter, it will release and my selection will be to redo. You can understand my frustration ! - 75$ later... same problem, but I know that if I click with about 5 pounds of pressure and trying to pass my finger through the plastic of the mouse, it you stay steady and make it !
The problem is that scrolling is enable while clicking and it bugs.
How to disable it ??
Simple question - can't find the answer !Helllooo !?
sorry but the Magic Mouse is just useless with the new Adobe Premiere CC and since I'm not the only one but can't find answer this is really disappointing. This mouse is just fantastic and now I have to swap from a USB mouse to the Magic Mouse every times I do some editing. My USB mouse if hurting my hand somehow and I want to got back to the Magic Mouse asap. Please - for sure there is a simple solution !
Thanks !! -
How in 12.1.0.50 can I select a playlist to copy onto my devices from my iMac? On the older version, I could click on each list, then check "sync only checked playlists" and I'd have different playlists on different devices (iPhone 6, iPod nano). How do I do it with this version? Thank you!
Same way.
Select the device, click Music tab and select the playlists to sync. -
I have 2? How do I sync selected photos from my IPad to my IMac w/o losing all photos on my IPad which will be replaced with the photos on my IMac.You see I have two IMacs with different sets of photos. Also want to convert all Apple works docs to pages docs on my IMac. Is there and app available to do the former. many thanks. b
The iPad and related software is designed to sync with only one computer. I suggest transferring the photos from one of your iMacs to the other so that all photos are on one Mac. Same for all other files you want to sync over.
To get those AppleWorks files to the iPad you'll have to determine if Pages will open them. If it will then use the file sharing feature of iTunes to copy them to Pages on your pad.
If Pages will not open the AppleWorks files directly you'll have to save them in some format that Pages will read. These include but may not be limited to Pages and Word formats. -
How to populate table rows with selected listbox items?
Hello,
I am trying to populate a table with selected listbox items. Each item should be a new row in the table. The picture below is the listbox and table I am using. I need to get the selected name to populate the Attendee column of the table when the user clicks the Add button. How do you do this with mutltiple attendees selected?
Thank you,
AngieSo you're considering the fact the if the user clicks the button twice, the name will appear twice and you don't want this, right?
Then you must check if any value is the same than the one you are about to add in the row..
for (var i = 0 ; i < ListBox1.length; i++){
if (ListBox1.getItemState(i) == true){
for (var x = 0 ; x < Table1._Row1.count; x++){
var boNewAttendee = true;
var strAttendee = Table1.resolveNode("Row1[" + x.toString() + "]").txtAttendee;
var newAttendee = ListBox1.getDisplayItem(i);
if (strAttendee.rawValue == newAttendee){
boNewAttendee = false;
break;
if (boNewAttendee){
txtAttendee.rawValue = ListBox1.getDisplayItem(i); -
How to handle multiple selection in the Spark List control with checkbox as itemrenderer?
Hi All,
I am using checkbox as an ItemRenderer in spark list.
I have a query.
how to handle multiple selection in the Spark List control with checkbox as itemrenderer?
how to retrieve the selected item label?
Thank you in advance.Hi there, I'll tweak your code a little bit to something like this:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical">
<mx:Script>
<![CDATA[
import mx.events.ListEvent;
import mx.controls.CheckBox;
[Bindable]
private var mySelectedIndexes:ArrayCollection=new ArrayCollection();
private function onChange(e:ListEvent):void
if(CheckBox(e.itemRenderer).selected){
mySelectedIndexes.addItem(e.rowIndex);
}else{
mySelectedIndexes.removeItemAt(mySelectedIndexes.getItemIndex(e.rowIndex));
chkList.selectedIndices=mySelectedIndexes.toArray();
]]>
</mx:Script>
<mx:ArrayCollection id="collection">
<mx:Object label="Test A"/>
<mx:Object label="Test B"/>
<mx:Object label="Test C"/>
<mx:Object label="Test D"/>
<mx:Object label="Test E"/>
<mx:Object label="Test F"/>
<mx:Object label="Test G"/>
</mx:ArrayCollection>
<mx:List id="chkList" dataProvider="{collection}" itemRenderer="mx.controls.CheckBox" itemClick="onChange(event);" allowMultipleSelection="true"/>
</mx:Application> -
how to make a selection of a layer delete content and paste another content with Photoshop scripting..?
There is a more specific Forum …
Photoshop Scripting -
How to Upload different Material with Different Selection View
Hello Experts!
Iu2019m new in ABAP and trying to understand methods of LSMW. Now I get a question for you guys. Let say I need to upload 10 different materials. Now for instance.
1st material has Basic data 1 and Basic data 2.
2nd material has Basic data 1, Purchasing and Purchase Order text
3rd material has Basic data 1, Classification, Purchasing, MRP 1, MRP 2 & MRP 3.
4th material has Basic data 1 & Basic data 2.
5th material has Basic data 1, Classification, Purchasing, MRP 1, MRP 2 & MRP 3.
And so on. Now here Iu2019ve notice that every material has different INDUSTRY SECTOR, MATERIAL TYPE AND SELECTION VIEWS. I understand that Industry Sector, Material Type and other data I can specify in my file but how I can control SELECTION VIEWS for different materials. Because for different Selection view coming screens will become different accordingly.
So can somebody can please tell me how I can control different select views for different material and upload it in SAP.
Thanks.Hi
I understand that you are performing LSMW on MM01 transaction code..and are uploading through batch input in LSMW.
Actually, for a tcode like MM01 I dont think you should use LSMW, instead you can go with the BAPI: BAPI_MATERIAL_SAVEDATA.
The views is a serious problem with MM01 when performing using batch input..
So, go through the documentation in SE37 tcode for the BAPI...
The information you get there will help you on how to proceed.
Regards,
Vishwa. -
How to build this query with the minumum number of sub-selects?
The question I am trying to answer is analogous to this:
Give me all projects that: (have no employees assigned and are small) or (have only employees with the the last name = "Smith")
Thanks,
RomanThank you :
1- I am in 9.0.4.8 version and can not use allOf expression (availible in beta version)
2- I not find .notIn(subQuery) operator in 9.0.4.8 version and i replace it by .in(subQuery).not() !
My new query retrieve Customer who have 0 (zéro) Orders !
How to retrieve only customer (with orders + with orders without "television") ?
My new query is :
<div align="left" class="java">
<font color="#7f0055"><b>static </b></font><font color="#7f0055"><b>void </b></font><font color="#000000">findCustNoComputer </font><font color="#000000">(){</font>
<font color="#ffffff"> </font><font color="#000000">ClientSession cs = TopLinkSession.acquireClientSession</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"></font>
<font color="#ffffff"></font>
<font color="#ffffff"> </font><font color="#000000">ReadAllQuery query = </font><font color="#7f0055"><b>new </b></font><font color="#000000">ReadAllQuery</font><font color="#000000">(</font><font color="#000000">Customer.</font><font color="#7f0055"><b>class</b></font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">ExpressionBuilder queryBuilder = query.getExpressionBuilder</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"></font>
<font color="#ffffff"> </font><font color="#000000">ExpressionBuilder subqueryBuilder = </font><font color="#7f0055"><b>new </b></font><font color="#000000">ExpressionBuilder</font><font color="#000000">(</font><font color="#000000">Customer.</font><font color="#7f0055"><b>class</b></font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">ReportQuery subQuery = </font><font color="#7f0055"><b>new </b></font><font color="#000000">ReportQuery</font><font color="#000000">(</font><font color="#000000">Customer.class, subqueryBuilder</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">subQuery.addAttribute</font><font color="#000000">(</font><font color="#2a00ff">"id"</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">subQuery.setSelectionCriteria</font><font color="#000000">(</font><font color="#000000">subqueryBuilder.anyOf</font><font color="#000000">(</font><font color="#2a00ff">"Orders"</font><font color="#000000">)</font><font color="#000000">.anyOf</font><font color="#000000">(</font><font color="#2a00ff">"OrderItems"</font><font color="#000000">)</font><font color="#000000">.get</font><font color="#000000">(</font><font color="#2a00ff">"product"</font><font color="#000000">)</font><font color="#000000">.get</font><font color="#000000">(</font><font color="#2a00ff">"productName"</font><font color="#000000">)</font><font color="#000000">.equal</font><font color="#000000">(</font><font color="#2a00ff">"Computer"</font><font color="#000000">))</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">query.setSelectionCriteria</font><font color="#000000">(</font><font color="#000000">queryBuilder.get</font><font color="#000000">(</font><font color="#2a00ff">"id"</font><font color="#000000">)</font><font color="#000000">.in</font><font color="#000000">(</font><font color="#000000">subQuery</font><font color="#000000">)</font><font color="#000000">.not</font><font color="#000000">())</font><font color="#000000">;</font>
<font color="#ffffff"></font>
<font color="#ffffff"> </font><font color="#000000">Vector allCustomers = </font><font color="#000000">(</font><font color="#000000">Vector</font><font color="#000000">)</font><font color="#000000">cs.executeQuery</font><font color="#000000">(</font><font color="#000000">query</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">Iterator allCustomersIterator = allCustomers.iterator</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#7f0055"><b>while </b></font><font color="#000000">(</font><font color="#000000">allCustomersIterator.hasNext</font><font color="#000000">()) </font>
<font color="#ffffff"> </font><font color="#000000">{</font>
<font color="#ffffff"> </font><font color="#000000">Customer tempCustomer = </font><font color="#000000">(</font><font color="#000000">Customer</font><font color="#000000">)</font><font color="#000000">allCustomersIterator.next</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">System.out.println</font><font color="#000000">(</font><font color="#000000">tempCustomer</font><font color="#000000">)</font><font color="#000000">;</font>
<font color="#ffffff"> </font><font color="#000000">}</font>
<font color="#ffffff"> </font><font color="#000000">cs.release</font><font color="#000000">()</font><font color="#000000">;</font>
<font color="#000000">}</font>
<font color="#ffffff"></font>
<font color="#ffffff"></font>
Sql of query :
SELECT
t0.CUST_LAST_NAME, t0.CUST_FIRST_NAME, t0.CREDIT_LIMIT, t0.CUST_EMAIL, t0.CUSTOMER_ID, t0.PHONE_NUMBER2, t0.PHONE_NUMBER1, t0.CUST_STREET_ADDRESS1, t0.CUST_CITY, t0.CUST_STREET_ADDRESS2, t0.CUST_STATE, t0.CUST_POSTAL_CODE
FROM TL_CUSTOMER t0
WHERE NOT (
(t0.CUSTOMER_ID IN
(SELECT DISTINCT t1.CUSTOMER_ID
FROM TL_CUSTOMER_ORDER t4, TL_ORDER_ITEM t3, TL_PRODUCT t2, TL_CUSTOMER t1
WHERE (
(t2.PRODUCT_NAME = ?) AND
((t2.PRODUCT_ID = t3.PRODUCT_ID) AND
((t3.ORDER_ID = t4.ORDER_ID) AND (t4.CUSTOMER_ID = t1.CUSTOMER_ID)))))))
Regards -
How to associate a button with the selection/unselection of a JTable?
hi,
how to associate a button with JTable in this manna? i want to disable a button once there is no selection in the JTable, and enable the button when there is a selection. to associate the selection it is easy: just make an eventAction for the button on the click in the JTable and check whether there is a selection. but how to do this with the unselection? hope anyone can give me any hint. thanx!import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
public class Test extends JFrame {
String[] head = {"One","Two","Three"};
String[][] data = {{"1-1","1-2","1-3"},{"2-1","2-2","2-3"},{"3-1","3-2","3-3"}};
JTable jt = new JTable(data,head);
public Test() {
setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
Container content = getContentPane();
content.add(new JScrollPane(jt));
jt.getSelectionModel().addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent lse) {
if (lse.getValueIsAdjusting()) return;
if (jt.getSelectionModel().isSelectionEmpty()) {
System.out.println("Nothing Selected");
} else {
System.out.println("Something Selected");
setSize(500,500);
show();
public static void main( String args[] ) { new Test(); }
} -
How to display the selection screen with icons as well as with text element
How to display the selection screen with icons as well as with texts (written in text elements) for PlantDate, OrderType,WareHouse..
Report zex33.
type-pools: icon.
selection-screen begin of line.
selection-screen comment 1(20) text_001.
parameters: p_werks type marc-werks.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(20) text_002.
parameters: p_whouse(10).
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(20) text_003.
parameters: p_auart like vbak-auart.
selection-screen end of line.
initialization.
write ICON_PLANT as icon to text_001.
concatenate text_001 text-001 into text_001 separated by space.
write ICON_WAREHOUSE as icon to text_002.
concatenate text_002 text-002 into text_002 separated by space.
write ICON_ORDER as icon to text_003.
concatenate text_003 text-003 into text_003 separated by space. -
How to declare and work with select-option in screen painter?
hello there,
can anybody plz suggest me ,how to declare and work with select-option in screen painter?
neonHi Blue,
Please check these threads which will help you a lot..
module pool programming " to add selection-option on screen"
Re: Select option in Dialog program screen
Re: SELECT-OPTIONS in Screen
Good luck
Narin -
How to Fill Internal Table with contents of Select-Option
Hi all:
There is a select-option s_matnr on the self-made screen. An internal table t_int is declared in the program. The requirement is that users makes selection with multiple material numbers. I want to put the values of s_matnr into internal table t_int directly. Would you please tell me how?
Thank you very much in advance.
Edited by: dongdong guo on Jun 13, 2008 3:40 AMHi,
Select option works like an internal table only.
For table selection you can use it directly using IN operator in where clause
eg : where matnr IN s_matnr.
Before that you may need to validate the content of the select-option. For that also you need to transfer the content to a new internal table.
u can loop at the select-option.
eq: loop at s_matnr.
if s_matnr-low = 'MAT1'.
condition.
endif.
endloop.
if you just want to check whether any single valid material number exist in your user screen, then u can use a select single option with s_matnr directly.
select single matnr from mara
where matnr in s_matnr.
select-option s_matnr behaves like an internal table with four fields.
sign, option, low, high.
Maybe you are looking for
-
Subscription and volume licensed Office 365 C2R App-V packages on the same computer
I'm interested if anyone has come across a similar scenario to what we have at the organisation I am currently working for. The organisation has signed up for an E3 subscription to Office 365, however would like to continue to using their volume lice
-
I downloaded Masterchef Season 2 thinking it was a the current season. Can I get a refund? I haven't watched it and it isn't likely that I will.
-
My Apps are not updating on my iPad just showing "waiting" why?
My apps are not updating and just showing "waiting" why? Anything I can do?
-
Why does iTunes 64-bit install in the 32-bit Program Files folder?
If "iTunes 8.2.1 for Windows (64 bit)" is really a 64 bit application then why does the installer want to put the program into C:\Program Files (x86)\ on Vista 64-bit instead of C:\Program Files\? Is this just sloppy work by the Apple programmers or
-
I pre-ordered a copy of The Sims 3, which arrived today. I quickly found that I need 10.5.7 (Leopard to run the game. My machine: iMac Mac OS X Version 10.4.11 2.8 Ghz Intel Core 2 Duo 2 Gb 667 MHz DDR2 RAM Graphics Card: ATI Radeon X2600. As far as