Alternative of this
Hi All,
Can you provide me with the alternative Query for finding the maximum
Maxnu = 0.
Select * from <DB Table> where Field = Condition and Field = Condition.
Check DB Table-field > maxnu.
Maxnu = DB Table-field .
Endselect.
Thanks
Avi
Hullo,
there is a max function in the select clause:
SELECT MAX( <fieldname> ) FROM <db_table>
WHERE <field1> = <condition1>
AND <field2> = <condition2>.
Hope this helps.
Similar Messages
-
Is there an alternative to this MWST design?
My client is a SG company registered for VAT in a few member states in the EU. The Plant which we are using to do Third Party Sales buy/sell in those EU countries is assigned to a Company Code which Country is SG. As a result of this design, we use SG as the Departure Country in MWST and we end up relying on Customer Tax Classification as the only determinant for assigning output tax codes in Export Taxes for all the transactions in the EU.
For a particular Destination Country, we have only one Customer Tax Classification to be used for dispatches within the EU, i.e. non-taxable. So we will get into a fix when we have more than one ship-from location to the same Destination Country. For example, we are already using this value to determine the correct output VAT code when we ship from Hungary to Czech Republic. If we are also to ship from Italy to Czech Republic, we will not have anymore values to use since Customer Tax Classification is a key field in MWST.
Is there an alternative to this design? It does not make sense for us to keep adding values for Customer Tax Classification each time we ship from a new EU country. That does not seem to be SAP's intention of how MWST is to be used anyway.
Thank you.Test the headphones with another device.
The the device with other headphones.
If the headphones are broken replace them.
If the headphone jack in the device is broken you can purchase a replacement headphone jack and hold switch assembly. Make sure that the device otherwise appears to play tracks normally, i.e. you can select songs at random and the playback timer functions. Test in an iPod dock if you can.
tt2 -
Internal API DCTaskFlowBinding.. any alternative to this.
Hi All,
-- Jdev: 11.1.1.4
In a solution to get handle to the bindings inside a region from its parent I am using this API DCTaskFlowBinding.
This is Internal api.. Is there any alternative api for this ?
I know that we should avoid using internal api's but can use of DCTaskFlowBinding be seriously alarming.
Please note that I am using this api's ONLY to get handles to internal attribute bindings to read values form it.
Thanks
Amit
Edited by: Amit on Feb 7, 2012 10:16 AM
Edited class name..The API I use for DCBindingContainer imports
import oracle.adf.model.binding.DCBindingContainer;which doesnot look to me to be a internal class since it dosnot have internal anywhere in its package structure.
What is the complete class path that your code refers to ? -
Obvisously Apple doesn't care about G5 dual-core owners. Can't buy an upgrade video card. Spent $3000.00+ on a system with a graphics card designed for budget PC's. Someone at Apple should fire the engineers that suggested this card in the system. I would of bought the 7800 GT had it been available at time of purchase. What a crock of crap leaving us hanging with no upgrade options. Aperature runs like *** with this card. Apple get off your lazy ***** and do something about this crap. Show us you care.
Obvisously Apple doesn't care about G5 dual-core owners. Can't buy an upgrade video card. Spent $3000.00+ on a system with a graphics card designed for budget PC's. Someone at Apple should fire the engineers that suggested this card in the system. I would of bought the 7800 GT had it been available at time of purchase. What a crock of crap leaving us hanging with no upgrade options. Aperature runs like *** with this card. Apple get off your lazy ***** and do something about this crap. Show us you care.
-
Is there any alternative for this code to increase performance
hi, i want alternate code for this to increase performance.
DATA : BEGIN OF itab OCCURS 0,
matnr LIKE zcst-zmatnr,
checked TYPE i,
defected TYPE i,
end of itab.
SELECT DISTINCT zmatnr FROM zcst INTO TABLE itab WHERE
zmatnr IN s_matnr AND
zwerks EQ p_plant AND
zcastpd IN s_castpd AND
zcatg IN s_categ.
LOOP AT itab.
ind = sy-tabix.
SELECT COUNT( DISTINCT zcst~zcastn )
FROM zcst INNER JOIN zvtrans
ON ( zcstzcastn = zvtranszcastn AND
zcstzmatnr = zvtranszmatnr AND
zcstzwerks = zvtranszwerks AND
zcstgjahr = zvtransgjahr )
INTO itab-checked
WHERE
zcst~zmatnr = itab-matnr AND
zcst~zwerks EQ p_plant AND
zcastpd IN s_castpd AND
zcatg IN s_categ.
SELECT COUNT( DISTINCT zcst~zcastn )
FROM zcst INNER JOIN zvtrans
ON ( zcstzcastn = zvtranszcastn AND
zcstzmatnr = zvtranszmatnr AND
zcstzwerks = zvtranszwerks AND
zcstgjahr = zvtransgjahr )
INTO itab-defected
WHERE
zcst~zmatnr = itab-matnr AND
zcst~zwerks EQ p_plant AND
zcastpd IN s_castpd AND
zcatg IN s_categ AND
zvtrans~zdcode <> ' '.
MODIFY itab INDEX ind.
ENDLOOP.
i think, select within loop is reducing the performance
pls replyHi,
types : BEGIN OF t_itab ,
matnr LIKE zcst-zmatnr,
checked TYPE i,
defected TYPE i,
end of t_itab.
data : itab type table of t_itab,
wa_itab type t_itab.
and instead of looping as in ur code try to use for all entries and
use nested loop. -
Need better alternative to this query
I have a table A.
Table A
X Y
1 R
2 R
3 R
3 S
4 R
4 S
5 P
5 S
I want the result as follows ( record which has Y equals to R or S but if it has both R and S then just get the one with Y equals to R)
X Y
1 R
2 R
3 R
4 R
5 S
So my query is
Select * From A
Where Y = 'R'
UNION
SELECT * FROM TEST WHERE X IN(
Select X From Test
Minus
Select X From Test
Where Y = 'R'
AND Y = 'S';
It will get me the correct result but I feel there must be some other way that is much better than this query.
Thanks,
Samwith sample_data as (
select 1 x, 'R' y from dual union all
select 1, 'R' from dual union all
select 2, 'R' from dual union all
select 3, 'R' from dual union all
select 3, 'S' from dual union all
select 4, 'R' from dual union all
select 4, 'S' from dual union all
select 5, 'P' from dual union all
select 5, 'S' from dual)
select
x
,max(y) keep (dense_rank first order by y) y
from sample_data
where
y in ('R','S')
group by
x
order by
x
X Y
1 R
2 R
3 R
4 R
5 S It slightly more verbose than blue's solution, but gives you some more possibilites to influence the order than the simple max if necessary (e.g. NLS_SORT)
You want an example, wont you;-)
with sample_data as (
select 1 x, 'R' y from dual union all
select 1, 'R' from dual union all
select 2, 'R' from dual union all
select 3, 'r' from dual union all
select 3, 'S' from dual union all
select 4, 'R' from dual union all
select 4, 'S' from dual union all
select 5, 'P' from dual union all
select 5, 'S' from dual)
select
x
,min(y) my
,max(y) keep (dense_rank first order by nlssort(y,'NLS_SORT=LATIN')) y
from sample_data
where
y in ('R','S','r')
group by
x
order by
x
X MY Y
1 R R
2 R R
3 S r
4 R R
5 S S Edited by: chris227 on 14.09.2012 07:10 -
WS_EXECUTE is Obsolete .. What is alternative for this ??
Dear All,
I want to launch internet explorer to open a Fedex website, WS_EXECUTE is FM is used for this but I see in documentation help as this FM is obsolete. I wonder is there any new FM/BAPI to track Fedex Number.
Thank You for looking at.
Regards
MadhuTry the FM GUI_EXEC .
It replaces the FM WS_EXECUTE
call function 'GUI_EXEC'
exporting
command = DOSCMD.
Regards,
Santosh -
Like we have If Not Exists in T-SQL, Is there any alternative in MDX
Hi All,
I am a newbie in MDX. I am trying to execute MDX query through SSIS Execute SQL Task. I have set Single Row as a result set. Every thing is fine, But the problem arise when the query does not return any result.
Because , this is the property of Execute SQL Task that it fails , If result set is SET and query does not return any value.
This occurance is handle in T-SQL by used of If Not Exits/If Exists , Do we have something over here i.e. MDX ?
If not then what might be the alternative for this.Hi Shadab,
Try writing iif() (if and only if) to handle this situation.
Check this for syntax and examples:
http://msdn.microsoft.com/en-IN/library/ms145994(v=sql.105).aspx
If you have any issues please let me know.
Please vote as helpful or mark as answer, if it helps Regards, Anand -
I have an irritating problem with mail autofilling info in email addresses. Emails sent to me the from looks like this: Holiday in the United States <my email address>. I have no idea what this Holiday in the United States is or how it got to be there...How can I fix/change to my name?
I fixed the To: autofilling incorrectly by deleting my email address from the Previous Recipients List, but is there a way to stop that from coming up on emails that I receive?Have you checked your Mac address book? If your email is saved somewhere in your address book with the name "Holidays in the United States" it might be adding the name automatically in Mac Mail.
Alternatively, try this:
Delete an Email Address from Auto-Complete in Mac OS X Mail
To remove an email address from the auto-complete list in Mac OS X Mail:
Start typing the recipient's address or name in a new message.
Select the desired address from the auto-complete list as if you'd compose an email to them.
Click the small down arrow in the recipient.
Select Remove from Previous Recipients List from the menu.
You can also search for the unwanted address directly in the previous recipients list:
Select Window | Previous Recipients from the menu in Mac OS X Mail.
Highlight the address you want to remove.You can highlight multiple addresses by holding down the Command key.
Click Remove from List.
Source: About.com -
REJECT statment to break GET event is Obsolete in ECC 6.0 - Alternative?
Hi Developers,
REJECT statment is used to break from GET event (say GET PERNR event in Logical Database) used to process for an Employee.
This REJECT statement is Obsolete . Is there any alternative for this ?
If so, please reply at the earliest as it is very Urgent.
Regards,Hi Suma,
The REJECT statement was specially developed for leaving GET event blocks. Unlike CHECK and EXIT, REJECT always refers to the current GET event block. If CHECK and EXIT occur in a loop, they refer to the loop, and in a subroutine, they always refer to the subroutine. The REJECT statement, on the other hand, allows you to exit a GET event block directly from a loop or a called subroutine.
The statement
REJECT [dbtab].
always terminates the processing of the current line of the node of the logical database. Without the optional dbtabspecification, the logical database automatically reads the next line of the same node, and the next GET event at the same hierarchy level is triggered. If you use the optional dbtab specification, the logical database reads the next line of the node dbtab. The node dbtab must occur above the current node in the logical database hierarchy.
Example
The following executable program is connected to the logical database F1S.
REPORT EVENT_DEMO.
NODES: SPFLI, SFLIGHT, SBOOK.
GET SFLIGHT.
SKIP.
WRITE: / 'Carrid:', SFLIGHT-CARRID,
'Connid:', SFLIGHT-CONNID,
'Fldate:', SFLIGHT-FLDATE.
ULINE.
GET SBOOK.
PERFORM SUB.
FORM SUB.
WRITE: / 'Bookid:', SBOOK-BOOKID.
REJECT 'SFLIGHT'.
ENDFORM.
This program reads and displays only the first booking for each flight, since the logical database reads the next line of SFLIGHT after the REJECT statement. -
REJECT is obsolete in ECC 6.0 - Any Alternative?
Hi Developers,
REJECT statment is used to break from GET event (say GET PERNR event in Logical Database) used to process for an Employee.
This REJECT statement is Obsolete . Is there any alternative for this ?
If so, please reply at the earliest as it is very Urgent.
Regards,Use check statement.
Demo is as follows -
constants: c_1(1) type c value '1' .
Start-of-selection.
get pernr.
Read Infotype 0
rp-provide-from-last p0000 space pn-begda pn-endda.
check pnp-sw-found eq c_1. "it will check if record is there,if not it will go to next pernr -
Alternative payee for ATI "Temporary Allocation of Companies" group
Hey everybody,
May you please help me to define a solution to handle the following
situation?
There are many ATI group vendors, each of them is constituted by one assignee, different invoicing parties and one payment recipient corresponding to the assignee. Each invoicing party can belong to different ATI groups.
All the purchase orders issued to a vendor defined as a ATI group will have the invoicing party one of the Companies, but the payee will always be the assignee of the group. Our problem is to handle this circumstance.
One solution is to update all the invoicing parties master data of a ATI group, specifying the assignee of the ATI as a alternative payee; this for each ATI group.
This solution, viable because if the invoicing party accept at least one different payee the system allows to specify one of them during the invoice entering, is time-consuming to be handled, and it is not optimal because one invoicing party could have different alternative payees (if belonging to different ATI groups). Furthermore, these payees would be not controlled and during the invoice registration an incorrect alternative payee might still be selected.
The solution we would like to apply is to indicate in the ATI group vendor master data:
- the assignee (it could be a partner role defined ad-hoc)
- the list of the invoicing parties (partner function PI)
- the payment recipient (alternative payee / partner function AZ)
without updating all the invoicing parties master data.
During the invoice registration, relating to a purchase order issued to a ATI group vendor, the system should detect that an alternative payment recipient is indicated in the vendor master data and make possible to specify it, although it doesn't appear in the invoicing party master data.
We have tried to apply this solution, assigning also a partner schema to the purchase order, but it didnt work because the system shows the payee field in the transaction MIRO only if the invoicing party allows for an alternative one.
Is there any possibility to apply this solution?
Thank you very much for your help,
Jo-anneHi Jo Anne
I'm also facing same problem did u got any ans for this.
If u found please reply to me for this ID : [email protected]
Many thanks...
Satish H -
What are the alternatives to updating indicators using property nodes?
Hello,
I'm building a VI which needs to update several controls/indicators at multiple points throughout its execution. It also needs to be able to accept new values from the controls at any given time.
The problem with this is that all of these controls and indicators are on the front panel of another VI which is calling my VI. The current version of my program updates all of these controls and indicators using references and property nodes (each indicator/control that needs to be used has its own reference control on my VI, and these references are then sent into property nodes), which naturally makes it slow.
At the moment I'm considering rebuilding my VI in such a way that the main one is able to retrieve the data without using references, but this will be not only very time-consuming but also difficult and possibly even impossible without my code turning into a massive disorganized pile (especially since the lab computer is slow enough, and the main VI large enough, that pressing the 'clean/reorganize block diagram' button causes a crash).
Any alternatives to this? Queues?
Solved!
Go to Solution.This (my Event nugget) is the best general solution I came up so far.
Felix
www.aescusoft.de
My latest community nugget on producer/consumer design
My current blog: A journey through uml -
Alternative to Anonymous/Inner when Adding Behavior to Swing Elements?
Hello! I am new to Java and have been trying to teach myself the basics by writing a Swing "JApplet". In adding mouse-click behavior to elements, I have been able to get the desired results by using anonymous "inner" classes. However, I am wondering if there is an alternative way to do this, that may be neater. For example, is there a way to make a non-inner class to apply the behavior, and then use it multiple times? The catch is that I need to apply this behavior to dynamically generated elements, to it has to be able to access certain variables.
But enough talk, here is a link to the working applet:
[http://brockfanning.com/RandomCells.html|http://brockfanning.com/RandomCells.html]
And here is the working code:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class RandomCells extends JApplet
private JPanel mainPanel;
public void init()
// Set up main grid
mainPanel = new JPanel();
mainPanel.setLayout(new GridLayout(0,2));
getContentPane().add(mainPanel);
// add a specific mouse-click behavior for each of a random number of 1 to 10 cells
int randomNumber = (int)(10 * Math.random()) + 1;
for (int cell = 1; cell <= randomNumber; cell++)
JPanel newCell = new JPanel();
mainPanel.add(newCell);
newCell.add(new JLabel("Click to dislay the number " + Integer.toString(cell)));
// Make the "cell" variable "final" so it can be used in the following anonymous method
final int cellFinal = cell;
// Add mouseclick behavior to the cell
newCell.addMouseListener(new MouseAdapter()
public void mouseClicked(MouseEvent me)
JOptionPane.showMessageDialog(mainPanel, Integer.toString(cellFinal), "", JOptionPane.PLAIN_MESSAGE);
}Any help in an alternative to this anonymous inner class technique would be greatly appreciated!One more question if possible:
How would I reference the RandomCells class from the new separated class?
I'll post what I have below. But notice the "???????" in the new CellClick class. I'm not sure what to put here, as I need to reference the "mainPanel" field of the RandomCells class. Is there any way to do this without explicitly passing the mainPanel as a parameter?
RandomCells class:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class RandomCells extends JApplet
private JPanel mainPanel;
public void init()
// Set up main grid
mainPanel = new JPanel();
mainPanel.setLayout(new GridLayout(0,2));
getContentPane().add(mainPanel);
// add a specific mouse-click behavior for each of a random number of 1 to 10 cells
int randomNumber = (int)(10 * Math.random()) + 1;
for (int cell = 1; cell <= randomNumber; cell++)
JPanel newCell = new JPanel();
mainPanel.add(newCell);
newCell.add(new JLabel("Click to dislay the number " + Integer.toString(cell)));
// Make the "cell" variable "final" so it can be used in the following anonymous method
final int cellFinal = cell;
// Add mouseclick behavior to the cell
newCell.addMouseListener(new CellClick(cellFinal));
}CellClick class:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class CellClick extends MouseAdapter
// Fields
private int var1;
// Constructor
public CellClick(int var1)
this.var1 = var1;
// Methods
public void mouseClicked(MouseEvent me)
JOptionPane.showMessageDialog(???????, Integer.toString(this.var1), "", JOptionPane.PLAIN_MESSAGE);
} -
Alternative of BAPI_ALM_ORDER_MAINTAIN
Hi all,
The BAPI function module BAPI_ALM_ORDER_MAINTAIN is marked as obsolate in ECC6. If you know any alternative of this BAPI, Please let me know.
Thanks & regards,
Arnab.
Moderator message: please do more research before asking.
Edited by: Thomas Zloch on Mar 23, 2011 9:25 AMHi all,
The BAPI function module BAPI_ALM_ORDER_MAINTAIN is marked as obsolate in ECC6. If you know any alternative of this BAPI, Please let me know.
Thanks & regards,
Arnab.
Moderator message: please do more research before asking.
Edited by: Thomas Zloch on Mar 23, 2011 9:25 AM
Maybe you are looking for
-
Change database connection in SQL-Worksheet to a not connected db
Hi, change the active database connection of a SQL-Worksheet to a currently not connected database does not work. The login window pops up, but the password entry field cannot be activated to enter the password. On dragging the login window the scree
-
The technical name of 5GHz has high priority in dual band AP
Hi, As I know, when open dual radio on some Cisco's AP, and configure one dual wireless client associate with the AP, the AP will use 5GHz for wireless client to associate first. Does somebody know this technical or function name? I'm looking for the
-
I am vexed by the inability to change in-text swoosh sound.
For the life of me I cannot seem to change the sound the iPhone makes (which is updated and running iOS 7.0.4), and why on earth there doesn't seem to be any configurable options for this is beyond me. I have just sent a request to Apple asking them
-
How do I get audio back on YouTube after updating Firefox and Flash?
Last night I updated Firefox to 32.0.3. Today I noticed that YouTube has no audio, although video works fine. I updated Flash to 15.0.0.152. Still no audio. I tried to update Shockwave, but after hitting "download", it kept forwarding to the Crea
-
How to add "return to owner" to unlock screen
I just replaced my Palm Pilot with an iPod Touch and love it, but I haven't found how to add my name, phone number and email to the unlock screen background so that an honest person can return it to me when I lose it. Do I (gasp!) have do download an