SD PRICING: How to identify the last call of a Condition Value Formula
Hello Experts.
I'm working on a condition value formula, and because a Group Condition, I need to do a calculation in the last call of the formula. The formula is called 5 times and I couldn't identify any flag to diferentiate the last 3 calls.
I could use a counter in a static variable per position, but I think there must be another way to identify the last call.
Thanks in advance and best regards
Matías
Hi,
Define a counter say w_ii type I in your routine.
Whenever you enter the routine use 'IMPORT' to get the last value of w_ii. If sy-subrc ne 0 its first time so increment the counter w_ii = w_ii + 1 & 'EXPORT' it. If sy-subrc = 0 check the value of w_ii to decide if it's the last time.If yes do whatever you want to do
else increment w_ii i.e. w_ii = w_ii + 1 & 'EXPORT' it which in turn will be used during next 'IMPORT'.
I hope this helps,
Regards
Raju chitale
Similar Messages
-
How to identify the last changes made in the smartform ?
Hi Form Experts,
My smartform's General attribute shows that there is some change performed 2 months back, Which is not reflected in my production server.
Could any one advice how to track the last performed changes in the system, I did not find version management for smartforms.
Regards
PrasathHi,
1.Go to smartforms->give formaneme>display>Utilities>Forminformation.
2.Go to smartforms->give formaneme>display-->General attributes.
Regards,
If helpful reward with points(Don't forget).
Edited by: shiva kumar on Apr 11, 2008 6:22 AM -
How to identify the last instance of a dynamic table row
Hi all,
I am trying to figure out how to create an action for my form in Livecycle Designer ES2 that will affect the most recent instance of a dynamic table row. I have a table with a repeatable row where the user will enter information about a purchased part and I have buttons that allow the user to add and remove rows. I need to create an additional add row button that will add a new instance of the repeatable table row (this is not an issue) and will disable and change the background color of the first cell in the added row. The problem I am having is how to have an action that affects the last instance of a row.
If anyone knows how to do this in Javascript I would appreciate some advice/help.Hi,
I think this is beyond what an action will provide. You will a have to write some JavaScript directly. When you call the addInstance method it returns the new row, so you can do something like;
var row = Table1._Row1.addInstance();
row.TextField1.border.fill.color.value = "255,0,0";
row.TextField1.access = "protected";
To find the last row and do the same thing you can do something like;
var row = Table1.resolveNode("Row1[" + (Table1._Row1.count - 1) + "]");
row.TextField1.border.fill.color.value = "255,0,0";
row.TextField1.access = "protected";
Regards
Bruce -
How to identify the last usage of 8i database?
Hi All,
We are in process of decommissioning our old databases. I need to know the last usage of a 8i database.
Is the any v$ views or DBA views to identify that?
Thanks
ArunaIf you are on Unix , "ipcs -mt" should show the time of the last attach to the shared memory segment.
When a user session connects to the SGA via a dedicated server process, it actually "attaches" to the shared memory segment.
Check the man pages (with "man ipcs") for the command line options on your particular platform.
Hemant K Chitale
http://hemantoracledba.blogspot.com -
Identify the last data package in start routine
Hi Everyone
We have a start routine in transformations. We require to do some special processing in the start routine only when the last data package is executing. How can we determine in the start routine that current package is last one or not ? Any pointers in this direction are appreciated.Hi,
You can get packet Id from datapackid in start routine and end routine. But I'm not so sure how to identify the last packet ID, alternatively you can store this packet id in some where else and read the same value in End routine if your logic(processing) permits to do this in End routine instead of Start routine.
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.
hope it helps...
regards.
Raju -
How to get the last 3 digits of a Delivery Number
Hi All,
On the Transfer Order Collective form, the Delivery Number is printed. But I need to capture the last 3 digits of that delivery number and make the 3 digits to be printed on the same form with bigger font size. I would like to know how to capture the last 3 digits.If so, your form(subroutine) can look like this.
form get_last_3_digits tables co_sym_using structure itcsy
co_set_symbols structure itcsy.
data: xvbeln type likp-vbeln.
* Get the USING Values
read table co_sym_using with key name = 'LIKP-VBELN'.
check sy-subrc eq 0.
shift co_sym_using-value left deleting leading space.
xvbeln = co_sym_using-value.
* make sure it is internal format
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = xvbeln
importing
output = xvbeln.
* Update the value
read table co_set_symbols index 1.
co_set_symbols-value = xvbeln+7(3).
modify co_set_symbols index 1.
endform.
Regards,
Rich Heilman -
How to get the last day according to fiscal period input in selection scree
Hello expert
how to get the last day of fiscal period input.
the fiscal period inculdes 1-16
when fiscal period is greater than 12, only calculate the last day of 12nd month
your solution will be apprecaited, FM existing?
thank you
KevinHi,
when you give a particular date in any month
the following fm will give you the last date of that month
here you can give
R_FDATE-HIGH as 01 and month as the period you wnat and year for current year
concatenates '01' month year into r_fdate-high separated by '.'.
then it will give g_ltdt for that month and year which wil be the last date of that month
CALL FUNCTION 'RP_LAST_DAY_OF_MONTHS'
EXPORTING
DAY_IN = R_FDATE-HIGH
IMPORTING
LAST_DAY_OF_MONTH = G_LTDT
EXCEPTIONS
DAY_IN_NO_DATE = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
thanks & regards,
Venkatesh -
HELP! How te retrieve the last row in MYSQL database using Servlet!
Hi ,
I am new servlets. I am trying to retireve the last row id inserted using the servlet.
Could someone show me a working sample code on how to retrieve the last record inserted?
Thanks
MY CODE
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class demo_gr extends HttpServlet {
//***** Servlet access to data base
public void doPost (HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
String url = "jdbc:mysql://sql2.njit.edu/ki3_proj";
String param1 = req.getParameter("param1");
PrintWriter out = resp.getWriter();
resp.setContentType("text/html");
String semail, sfname, slname, rfname, rlname, remail, message;
int cardType;
sfname = req.getParameter("sfname");
slname = req.getParameter("slname");
rfname = req.getParameter("rfname");
rlname = req.getParameter("rlname");
semail = req.getParameter("semail");
remail = req.getParameter("remail");
message = req.getParameter("message");
//cardType = req.getParameter("cardType");
cardType = Integer.parseInt(req.getParameter("cardType"));
out.println(" param1 " + param1 + "\n");
String query = "SELECT * FROM greeting_db "
+ "WHERE id =" + param1 + "";
String query2 ="INSERT INTO greeting_db (sfname, slname ,semail , rfname , rlname , remail , message , cardType ,sentdate ,vieweddate) values('";
query2 = query2 + sfname +"','"+ slname + "','"+ semail + "','"+ rfname + "','"+ rlname + "','"+ remail + "','"+ message + "','"+ cardType + "',NOW(),NOW())";
//out.println(" query2 " + query2 + "\n");
if (semail.equals("") || sfname.equals("") ||
slname.equals("") || rfname.equals("") ||
rlname.equals("") || remail.equals("") ||
message.equals(""))
out.println("<h3> Please Click the back button and fill in <b>all</b> fields</h3>");
out.close();
return;
String title = "Your Card Has Been Sent";
out.println("<BODY>\n" +
"<H1 ALIGN=CENTER>" + title + "</H1>\n" );
out.println("\n" +
"\n" +
" From " + sfname + ", " + slname + "\n <br> To "
+ rfname + ", " + rlname + "\n <br>Receiver Email " + remail + "\n<br> Your Message "
+ message + "\n<br> <br> :");
if (cardType ==1)
out.println("<IMG SRC=/WEB-INF/images/bentley.jpg>");
else if(cardType ==2) {
out.println("<IMG SRC=/WEB-INF/images/Bugatti.jpg>");
else if(cardType ==3) {
out.println(" <IMG SRC=/WEB-INF/images/castle.jpg>");
else if(cardType ==4) {
out.println(" <IMG SRC=/WEB-INF/images/motocross.jpg>");
else if(cardType ==5) {
out.println(" <IMG SRC=/WEB-INF/images/Mustang.jpg>");
else if(cardType ==6) {
out.println("<IMG SRC=/WEB-INF/images/Mustang.jpg>");
out.println("</BODY></HTML>");
try {
Class.forName ("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection
( url, "*****", "******" );
Statement stmt = con.createStatement ();
stmt.execute (query2);
//String query3 = "SELECT LAST_INSERT_ID()";
//ResultSet rs = stmt.executeQuery (query3);
//int questionID = rs.getInt(1);
System.out.println("Total rows:"+questionID);
stmt.close();
con.close();
} // end try
catch (SQLException ex) {
//PrintWriter out = resp.getWriter();
resp.setContentType("text/html");
while (ex != null) {
out.println ("SQL Exception: " + ex.getMessage ());
ex = ex.getNextException ();
} // end while
} // end catch SQLException
catch (java.lang.Exception ex) {
//PrintWriter out = resp.getWriter();
resp.setContentType("text/html");
out.println ("Exception: " + ex.getMessage ());
} // end doGet
private void printResultSet ( HttpServletResponse resp, ResultSet rs )
throws SQLException {
try {
PrintWriter out = resp.getWriter();
out.println("<html>");
out.println("<head><title>jbs jdbc/mysql servlet</title></head>");
out.println("<body>");
out.println("<center><font color=AA0000>");
out.println("<table border='1'>");
int numCols = rs.getMetaData().getColumnCount ();
while ( rs.next() ) {
out.println("<tr>");
for (int i=1; i<=numCols; i++) {
out.print("<td>" + rs.getString(i) + "</td>" );
} // end for
out.println("</tr>");
} // end while
out.println("</table>");
out.println("</font></center>");
out.println("</body>");
out.println("</html>");
out.close();
} // end try
catch ( IOException except) {
} // end catch
} // end returnHTML
} // end jbsJDBCServletI dont know what table names and fields you have but
say you have a table called XYZ which has a primary
key field called keyID.
So in order to get the last row inserted, you could
do something like
Select *
from XYZ
where keyID = (Select MAX(keyID) from XYZ);
Good Luckwhat gubloo said is correct ...But this is all in MS SQL Server I don't know the syntax and key words in MYSQL
This works fine if the emp_id is incremental and of type integer
Query:
select *
from employee e, (select max(emp_id) as emp_id from employee) z
where e.emp_id = z.emp_id
or
select top 1 * from employee order by emp_id descUday -
How to download the last s/w of 5800 to pc
how to download the last s/w of 5800 to pc then installing to mobile phone
without connecting mobile to pc the download it
without direct connection mobile to internetWhat you are asking is not possible.
Nokia Software Updater requires that your phone be connected when you run it so that it can identify the precise model (there are literally hundreds of subtly different 5800s) and pull down the matching software.
Was this post helpful? If so, please click on the white "Kudos!" star below. Thank you! -
How to find the Last modified date and time of a package
Hi,
We need a clarification on how to find the Last modified date and time of a package in Oracle. We used the example below to explain our scenario,
Lets consider the following example
Let A, B be two packages.
Package A calls the package B. So A is dependent on B.
When A is compiled the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS gets updated.
Now there a modification in package B so it is compiled. There is no modification in package A.
Now when the package A is executed the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS gets updated but we did not make any change in Package A. Now we need to find last modified date and time of the package A . So we can not rely on the TIMESTAMP,LAST_DDL_TIME in USER_OBJECTS . Can u please tell us any other solution to get last modified date and time of the package A .
Regards,
Vijayanand.CHere is an example:
SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
2 WHERE OBJECT_NAME = ANY('A','B');
OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
A 20-MAY-2004 10:57:32 20-MAY-2004 10:57:32 2004-05-20:10:57:32 VALID
B 20-MAY-2004 10:58:22 20-MAY-2004 10:59:04 2004-05-20:10:59:04 VALID
SQL> CREATE OR REPLACE PROCEDURE A AS
2 BEGIN
3 NULL;
4 NULL;
5 END;
6 /
Procedure created.
SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
2 WHERE OBJECT_NAME = ANY('A','B');
OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
A 20-MAY-2004 10:57:32 20-MAY-2004 11:01:28 2004-05-20:11:01:28 VALID
B 20-MAY-2004 10:58:22 20-MAY-2004 10:59:04 2004-05-20:10:59:04 INVALID
SQL> EXEC B
PL/SQL procedure successfully completed.
SQL> SELECT OBJECT_NAME,CREATED,LAST_DDL_TIME,TIMESTAMP,STATUS FROM USER_OBJECTS
2 WHERE OBJECT_NAME = ANY('A','B');
OBJECT_NAM CREATED LAST_DDL_TIME TIMESTAMP STATUS
A 20-MAY-2004 10:57:32 20-MAY-2004 11:01:28 2004-05-20:11:01:28 VALID
B 20-MAY-2004 10:58:22 20-MAY-2004 11:01:53 2004-05-20:11:01:53 VALID
Note that the date under the column 'created' only changes when you really create or replace the procedure.
Hence you can use the column 'created' of 'user_objects'. -
How to identify the locks in oracle db objects? i dont have access to check
How to identify the locks in oracle db objects? i dont have access to check the v$lock or v$ objects. i dont have dba access. what are the symptoms for table, row or objects lock? how v guess it would be lock?
Thanks in advance friends..I believe you will have to call your DBA on the phone in that case.
You can query something with a select ... for update nowait.
If it raises an exception you can handle it within a when section.
-- Running in one session
SQL> create table t1 as select 1 col1 from dual;
Table created
SQL> select * from t1 for update nowait;
COL1
1
SQL>
-- now running in a different session
SQL> select * from t1 for update nowait;
select * from t1 for update nowait
ORA-00054: resource busy and acquire with NOWAIT specified
SQL> set serveroutput on
SQL>
SQL> DECLARE
2 CURSOR cur1 IS
3 SELECT col1 FROM t1 FOR UPDATE NOWAIT;
4 v_col1 NUMBER;
5 locking_error EXCEPTION;
6 PRAGMA EXCEPTION_INIT(locking_error, -00054);
7 BEGIN
8 OPEN cur1;
9 EXCEPTION
10 WHEN locking_error THEN
11 dbms_output.put_line('Busted locking my rows!');
12 END;
13 /
Busted locking my rows!
PL/SQL procedure successfully completed
SQL> Now, surely you won't be able to tell anything else other than there was something locked there.
But none of the details you would find in the views. -
How to identify the installed Weblogic Server and JDK are 32bit or 64bit?
Hi everyone,
I have a question ~
Both Weblogic Server and JAVA JDK are installed on the server already, but I only know the Weblogic Server is 10.3.4.0 and JAVA JDK version is 1.6.0_25.
I know the 64bit Weblogic Server installation file is a wlsXXXX_generic.jar package and 64bit JAVA JDK needed also.
But, since the Weblogic installed already, there are no such installation files on the Linux Server now.
I have tried the "java -version" for java version and check the Weblogic version from Weblogic console.
How to identify the installed Weblogic Server and JDK are 32bit or 64bit with Linux command? Or is there any way to check it?What you can try to do is use WLST (or an MBean browser, such as JConsole or JRockit Mission Control) and connect to the adminserver.
For example when using WLST:
# set the environment by using setWLSEnv.sh (located in the ${WL_HOME}/server/bin directory).
# start WLST by using: java weblogic.WLST
# connect to the adminserver
connect('adminusername','adminpassword');
# change to the serverruntime environment
serverRuntime();
# show the attributes
ls();
# Here an attribute is shown called WebLogicVersion that shows the version of WebLogic
-r-- WeblogicVersion WebLogic Server 10.3.5.0 Fri Apr 1 20:20:06 PDT 2011 1398638
# Note that this does not show if is 32 bits or 64 bits to retrieve this information you have obtain the JVM version
# change the directory
cd('JVMRuntime/AdminServer');
# show the attributes
ls();
-r-- Version R28.0.1-21-133393-1.6.0_20-20100512-2126-linux-x86_64
# when you have something like x86 at the you are running a 32 bit version, if you have something like x86_64 you are running a 64 bits versionAs mentioned above you can also retrieve this information by using a MBean browser. -
Serious Issue - CRM 2007 issue - How to identify the Log in CRM
Hi Experts,
How to identify the Billing Account Deletion log. Some billing accounts has been deleted from BUT000 table. We have to find out -who has deleted and when ???
Please help us to identify the log. I think in SAP log should be maintained somewhere in CRM.
Thanks & Regards,
Amit Nanda
9999795569hi, I remeber the there is a function name like CRMXXDocumentXXlock which is be called in standard program to maintain order.
I can't login a crm server, can't offer you the accurate name, you can do a search in system. -
How to identify the the cellphone compagny (Fido, AT
How to identify the cellphone compagny (At&t, telus, rogers ...) of an iphone 4 without a sim card?
Call Apple Support and give them the serial number of the phone.
-
How to get the last day of the week?
Hii
i can get the calender week number for any given date using
SELECT to_char(to_date('04/04/2011','MM/DD/YYYY'),'WW') FROM dual
can any body tell me, how to get the last day of that week ?
and the answer should be 04/08/2011(8th april )
thanks
San
Edited by: sandeep9 on Apr 4, 2011 3:50 AMHi, San,
Here's one way:
WITH sample_data AS
SELECT DATE '2011-04-04' AS dt
FROM dual
SELECT dt
, TO_CHAR (dt, 'WW') AS week_num
, NEXT_DAY ( dt - 1
, TO_CHAR ( TRUNC (dt, 'YEAR') - 1
, 'Day'
) AS end_o_week
FROM sample_data;Another way is to use date arrithmetic:
WITH sample_data AS
SELECT DATE '2011-04-09' AS dt
FROM dual
SELECT dt
, TO_CHAR (dt, 'WW') AS week_num
, TRUNC (dt, 'YEAR')
+ (7 * CEIL ( (dt - (TRUNC (dt, 'YEAR') - 1))
/ 7
- 1 AS using_date_arithmetic
FROM sample_data;
Maybe you are looking for
-
Before when I scanned a photo, it would automatically save and ask to scan another photo. Now, the photo is not saving and it doesn't ask to scan again. Help?
-
Hi Experts, Can anyone please tell me about the sy-ucomm for message button in ME22N transaction and then one more button Repeat Output. My requirement is i have to re send an IDOC when someone changes the PO and press the repeat output. For this i a
-
How to auto open PDF after saving a file?
Hi!!! How y'll doing? I just switch to Mac recently. So can you guys kindly advise how do set auto open PDF file after save as a PDF file. What am I trying to say is that, I have a excel file and I want it to auto open after I save as PDF file.
-
When I am using HBOGO, I only get audio out of the AppleTV and no video??
HboGo on the iPad only runs audio through the Apple TV? how do you get the video to show?
-
Help! How to display everything on projector?
Hello, How to display everything in ipad on projector?