How to get the previous record in the select statement
I am trying to update the parent part number as a parent for component part number. I can assign the main part with level 1 as a parent and it looks like this.
PART_NUMBER PART_LEVEL PART_PARENT
1140000000T 3 1140001755L
1140001755D 2 1140001755L
1140001755L 1
A1010000139 5 1140001755L
A1010015001 4 1140001755L
A1010000139I 4 1140001755L
A40210062 2 1140001755L
A1010001579 4 1140001755L
but, I need to assign the previous level part as the parent part instead of level 1. I can add a new column to store this value. I need the structure as
PART_NUMBER PART_LEVEL PART_PARENT
1140001755L 1
1140001755D 2 1140001755L
A40210062 2 1140001755L
1140000000T 3 A40210062
A1010015001 4 1140000000T
A1010000139I 4 1140000000T
A1010001579 4 1140000000T
A1010000139 5 A1010001579
We might have multiple parts at the same level, so I need to make sure that correct parent is assigned to the part. Anybody has any idea?
Thanks
spooHi,
How to do that depends on your data.
Post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data (formatted, within \ tags), if it's not the reuslts you already posted. If you can show what your problem is using commonly available tables (like scott.emp), then you don't have to post any sample data; just the results.
Post your existing query, too;. Always say what version of Oracle you're using.
It looks like you're currently doing something like this:SELECT ename
, LEVEL
, CONNECT_BY_ROOT ename AS root_ename
FROM scott.emp
START WITH mgr IS NULL
CONNECT BY mgr = PRIOR empno
which produces this output:ENAME LEVEL ROOT_ENAME
KING 1 KING
JONES 2 KING
SCOTT 3 KING
ADAMS 4 KING
FORD 3 KING
SMITH 4 KING
BLAKE 2 KING
ALLEN 3 KING
WARD 3 KING
MARTIN 3 KING
TURNER 3 KING
JAMES 3 KING
CLARK 2 KING
MILLER 3 KING
where the last column shows the ancestor *farthest* above the current row.
If I understand you, you want to have output that shows the *nearest* anacestor, like this:NAME LEVEL PARENT_ENA
KING 1
JONES 2 KING
SCOTT 3 JONES
ADAMS 4 SCOTT
FORD 3 JONES
SMITH 4 FORD
BLAKE 2 KING
ALLEN 3 BLAKE
WARD 3 BLAKE
MARTIN 3 BLAKE
TURNER 3 BLAKE
JAMES 3 BLAKE
CLARK 2 KING
MILLER 3 CLARK
You can do that by changing a single line:SELECT ename
, LEVEL
, PRIOR ename AS parent_ename -- Changed
FROM scott.emp
START WITH mgr IS NULL
CONNECT BY mgr = PRIOR empno
Similar Messages
-
How to Get Top 10 records using SQL select statement.
:-) Hiee E'body,
I want to generate a sql report in which I only want the top 10 records based on the numeric value of a column.
For Example,
To generate a Location Wise, Employee Wise Years of Service Report.
Here I need the Top 10 Employees according to their No. of Years of Service for all the existing locations using a single query.
eg.
Location Emp No. YOS
India - 22 30
212 28
819 24 ...
US 123 40
312 33
90 33
144 30 ...
UK 77 20
79 20
331 18
109 16 ...
Every Location should display their respective Top 10 Employees
regarding their No. of Years of Service.
Please let me the know the solution to this.
Have a nice day.
Thanking You,
Vivek Kapoor.For example if the table contained (India rows only shown) :
India 202 30
India 212 28
India 819 24
India 820 24
India 900 20
India 920 18
India 922 17
India 925 16
India 926 15
India 927 14
India 928 13
India 929 13
India 930 12
do you want to see
India 202 30
India 212 28
India 819 24
India 820 24
India 900 20
India 920 18
India 922 17
India 925 16
India 926 15
India 927 14
or
India 202 30
India 212 28
India 819 24
India 820 24
India 900 20
India 920 18
India 922 17
India 925 16
India 926 15
India 927 14
India 928 13
India 929 13
Also if the India rows were
India 202 30
India 212 30
India 819 30
India 820 30
India 900 30
India 920 30
India 922 30
India 925 30
India 926 30
India 927 30
India 928 30
India 929 30
do you want to see
India 202 30
India 212 30
India 819 30
India 820 30
India 900 30
India 920 30
India 922 30
India 925 30
India 926 30
India 927 30
or
India 202 30
India 212 30
India 819 30
India 820 30
India 900 30
India 920 30
India 922 30
India 925 30
India 926 30
India 927 30
India 928 30
India 929 30
Please clarify.
Thanks,
Partha -
Get three previous records of the current record
Hi,
I need to get three previous records of the current record in an Oracle Form
Sorry for the lengthy explanation:
I have a table name: ARCHIVE_DATA with column name: coll_time and its data type DATE.
SQL> SELECT COLL_TIME FROM ARCHIVE_DATA;
COLL_TIME
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
10 rows selected.
SQL> select to_char(coll_time,'dd-mon-yyyy:HH:MI:SS') from ARCHIVE_DATA;
TO_CHAR(COLL_TIME)
12-aug-2005:02:42:00
12-aug-2005:02:43:00
12-aug-2005:02:44:00
12-aug-2005:02:45:00
12-aug-2005:02:46:00
12-aug-2005:02:47:00
12-aug-2005:02:48:00
12-aug-2005:02:49:00
12-aug-2005:02:50:00
12-aug-2005:02:51:00
10 rows selected.
This is the Requirement:
In a Form's Block(BLK1), for example: the current_record is the fifth record from the top
(i.e. 12-aug-2005:02:46:00)
When the fifth record is the current_record and When I click a button, three previous records of the
current_record should be populated on the screen.
See what I did:
I created another table same as the first table(ARCHIVE_DATA) and its name is: THREE_RECS.
I am inserting three records from the first table(ARCHIVE_DATA) into the second table: THREE_RECS
which are less than the current record and ORDER BY DESC.
CANVAS:
Two blocks (BLK1, BLK2) based on ARCHIVE_DATA and THREE_RECS are on the same CANVAS.
But the first block (BLK1) which is based on the first table:ARCHIVE_DATA is populated with one record and the
second block (BLK2) is empty.
So when I click a particular button (ex: prev_recs), the second block(BLK2) should be populated with
three previous records of the current record( :BLK1.COLL_TIME)
(off course :BLK2 populates with one record and use arrows or scrollbar to get the other two records)
This is the code I wrote in the trigger and followed by the error:
1 BEGIN
2 DECLARE
3 cursor c1 IS
4 SELECT MONITOR_ID,
5 SAMPLE_ID,
6 COLL_TIME,
7 DEW_POINT
8 FROM ARCHIVE_DATA;
9 cursor c2(passing_date IN date) IS
10 SELECT MONITOR_ID,
11 SAMPLE_ID,
12 COLL_TIME,
13 DEW_POINT
14 FROM (SELECT MONITOR_ID,
15 SAMPLE_ID,
16 COLL_TIME,
17 DEW_POINT
18 FROM ARCHIVE_DATA
19 ORDER BY COLL_TIME desc)
20 WHERE COLL_TIME < passing_date;
21 BEGIN
22 FOR cur_rec in c1
23 LOOP
24 IF (cur_rec.COLL_TIME = to_date(:BLK.COLL_TIME,'dd-mon-yyyy:HH24:mi:ss')) then
25 FOR second_cur_rec in c2(second_cur_rec.COLL_TIME)
26 LOOP
27 IF c2%rowcount < 4 then
28 BEGIN
29 INSERT INTO THREE_RECS
30 values(second_cur_rec.MONITOR_ID,
31 second_cur_rec.SAMPLE_ID,
32 second_cur_rec.COLL_TIME,
33 second_cur_rec.DEW_POINT);
34 COMMIT;
35 END IF;
36 END LOOP;
37 END IF;
38 END LOOP;
39 END;
40 END;
This is the error I am getting:
Error 103 at line 14
Encountered the symbol "(" when expecting one of the following
a PL/SQL variable or double quoted string
an expanded name
an expanded name link
a table reference __expression
a key word
Resuming parse at line 126, column 46
Thanks in advanceWhy not just a simple select that doesn't involve a second table and PL/SQL?
sql>select * from t1 order by dt;
DT
08/12/2005 02:42:00am
08/12/2005 02:43:00am
08/12/2005 02:44:00am
08/12/2005 02:45:00am
08/12/2005 02:46:00am
08/12/2005 02:47:00am
08/12/2005 02:48:00am
08/12/2005 02:49:00am
08/12/2005 02:50:00am
08/12/2005 02:51:00am
10 rows selected.
sql>select dt
2 from (select dt, row_number() over (order by dt desc) rn
3 from t1
4 where dt < to_date('12-aug-2005:02:46:00', 'dd-mon-yyyy:hh:mi:ss'))
5 where rn <= 3
6 order by dt;
DT
08/12/2005 02:43:00am
08/12/2005 02:44:00am
08/12/2005 02:45:00am
3 rows selected.If the use of an analytical function (row_number()) is a problem with Forms, then the query can also be done as:
sql>select dt
2 from (select dt
3 from (select dt
4 from t1
5 where dt < to_date('12-aug-2005:02:46:00', 'dd-mon-yyyy:hh:mi:ss')
6 order by dt desc)
7 where rownum <= 3)
8 order by dt;
DT
08/12/2005 02:43:00am
08/12/2005 02:44:00am
08/12/2005 02:45:00am
3 rows selected. -
Get three previous records of the current record in an Oracle Form
Hi,
I need to get three previous records of the current record in an Oracle Form
Sorry for the lengthy explanation:
I have a table name: ARCHIVE_DATA with column name: coll_time and its data type DATE.
SQL> SELECT COLL_TIME FROM ARCHIVE_DATA;
COLL_TIME
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
12-AUG-05
10 rows selected.
SQL> select to_char(coll_time,'dd-mon-yyyy:HH:MI:SS') from ARCHIVE_DATA;
TO_CHAR(COLL_TIME)
12-aug-2005:02:42:00
12-aug-2005:02:43:00
12-aug-2005:02:44:00
12-aug-2005:02:45:00
12-aug-2005:02:46:00
12-aug-2005:02:47:00
12-aug-2005:02:48:00
12-aug-2005:02:49:00
12-aug-2005:02:50:00
12-aug-2005:02:51:00
10 rows selected.
This is the Requirement:
In a Form's Block(BLK1), for example: the current_record is the fifth record from the top
(i.e. 12-aug-2005:02:46:00)
When the fifth record is the current_record and When I click a button, three previous records of the
current_record should be populated on the screen.
See what I did:
I created another table same as the first table(ARCHIVE_DATA) and its name is: THREE_RECS.
I am inserting three records from the first table(ARCHIVE_DATA) into the second table: THREE_RECS
which are less than the current record and ORDER BY DESC.
CANVAS:
Two blocks (BLK1, BLK2) based on ARCHIVE_DATA and THREE_RECS are on the same CANVAS.
But the first block (BLK1) which is based on the first table:ARCHIVE_DATA is populated with one record and the
second block (BLK2) is empty.
So when I click a particular button (ex: prev_recs), the second block(BLK2) should be populated with
three previous records of the current record( :BLK1.COLL_TIME)
(off course :BLK2 populates with one record and use arrows or scrollbar to get the other two records)
This is the code I wrote in the trigger and followed by the error:
1 BEGIN
2 DECLARE
3 cursor c1 IS
4 SELECT MONITOR_ID,
5 SAMPLE_ID,
6 COLL_TIME,
7 DEW_POINT
8 FROM ARCHIVE_DATA;
9 cursor c2(passing_date IN date) IS
10 SELECT MONITOR_ID,
11 SAMPLE_ID,
12 COLL_TIME,
13 DEW_POINT
14 FROM (SELECT MONITOR_ID,
15 SAMPLE_ID,
16 COLL_TIME,
17 DEW_POINT
18 FROM ARCHIVE_DATA
19 ORDER BY COLL_TIME desc)
20 WHERE COLL_TIME < passing_date;
21 BEGIN
22 FOR cur_rec in c1
23 LOOP
24 IF (cur_rec.COLL_TIME = to_date(:BLK.COLL_TIME,'dd-mon-yyyy:HH24:mi:ss')) then
25 FOR second_cur_rec in c2(second_cur_rec.COLL_TIME)
26 LOOP
27 IF c2%rowcount < 4 then
28 BEGIN
29 INSERT INTO THREE_RECS
30 values(second_cur_rec.MONITOR_ID,
31 second_cur_rec.SAMPLE_ID,
32 second_cur_rec.COLL_TIME,
33 second_cur_rec.DEW_POINT);
34 COMMIT;
35 END IF;
36 END LOOP;
37 END IF;
38 END LOOP;
39 END;
40 END;
This is the error I am getting:
Error 103 at line 14
Encountered the symbol "(" when expecting one of the following
a PL/SQL variable or double quoted string
an expanded name
an expanded name link
a table reference __expression
a key word
Resuming parse at line 126, column 46
Thanks in advanceChange C2 to:
cursor c2(passing_date IN date) IS
SELECT MONITOR_ID, SAMPLE_ID,
COLL_TIME, DEW_POINT
FROM ARCHIVE_DATA
WHERE COLL_TIME < passing_date
ORDER BY COLL_TIME desc;And rather than populating a table with the three records, you could just select the three records using: where COLL_TIME between Prev3_time and Prev1_time -
How to get first 10 records from the database using JSP
i want ot get first 10 records from the database and then after clicking the next button in the page,it must show the next precceding 10 records from the database.i am getting the first 10 records .but how to post to the same page to get another preceeding 10 record.
Search the forums - this has been asked a lot. I usually recommend experimenting with tops and order bys until you're satisfied.
Kind regards,
Levi -
HOW TO COPY THE PREVIOUS RECORD TO THE CURRENT RECORD
Hi all,
i am using form 6i.
i have one multi record block. the user has to enter all the values and store it to the table.
My requirement is - if user is in some blank record, if user clicks the button then all the previous record values should be coppied to the record where the user has placed the cursor.
please help me..
Thanks..user13329002 wrote:
Except these columns all other columns should be copied when i press the button.So? Use duplicate_record and set the columns you don't want to copy to null or a value you want?
duplicate_record;
:my_block.creation_date := sysdate;
:my_block.modiefied_date := null;cheers -
How to get Most current record in the reporting
Hi All,
I have reporting requiremnt like to get the most recent record.
Please see the below example we have 3 records but with 2 different sales represtentatives assigened to the same document.but i need to get most recently assigned sales representative record that is number 2(10726056 and status open).
Now i am geeting the 2 open records .Need to get only one.we do not have any other difference in the records to keep track of the sales representatives assignment to get the new sales rep id other than request id.
Can any one tell me most rcurrent data varibles under the request id do.Will it solves my issues o r any other ideas please welcome.
Customer No Sales rep Doc number Status Request id
0000613086 10726056 9000783660 C REQU_1
0000613086 10726056 9000783660 O REQU_1
0000613086 10182679 9000783660 O REQU_2Hi Sirisha,
it seems to be a problem of the kind "exception aggregation" , but let me say it can result in a very complex solution.
What about using a Virtual Infoprovider with servicecs to solve the issue?
You should create an additional InfoCube that reads form the basic one (where you have data) and then you should "delete" invalid records considering the request number.
By the way time stamp seems to be the easier solution.
Hope it helps
GFV -
Update the previous records for the same customer.
Hi All,
I want to update the columns when the status = 'Processed'. And for the last 4 months.
Create table
cust_loans
( cust_id number(12),
year_month varchar2(20),
status varchar2(20),
c_info varchar2(20)
address varchar2(20),
loan_type varchar2(20),
vin_num varchar2(20)
cust_id year_month Status c_info address loan_type vin_num
456789 201005 W
456789 201006 N
456789 201007 Y
456789 201008 Y
456789 201009 N
456789 201010 Processed Austin Auto ajkd3323
456789 201011 Processed Austin Auto ajkd3324
456789 201012 Processed Austin Auto ajkd3325
256712 201005 W
256712 201006 N
256712 201007 Y
256712 201008 Y
256712 201009 N
256712 201010 Y
256712 201011 Processed Minnesota Auto erer334
256712 201012 Processed Minnesota Auto erer335
Output Expected
456789 201005 W
456789 201006 N Austin Auto ajkd3323
456789 201007 Y Austin Auto ajkd3324
456789 201008 Y Austin Auto ajkd3325
456789 201009 N Austin Auto ajkd3326
456789 201010 Processed Auto ajkd3323
456789 201011 Processed Austin Auto ajkd3324
456789 201012 Processed Austin Auto ajkd3325
256712 201005 W
256712 201006 N
256712 201007 Y Minnesota Auto erer334
256712 201008 Y Minnesota Auto erer335
256712 201009 N Minnesota Auto erer336
256712 201010 Y Minnesota Auto erer337
256712 201011 Processed Minnesota Auto erer334
256712 201012 Processed Minnesota Auto erer335Thanks.
Edited by: AJR on Mar 26, 2011 12:03 PM
Edited by: AJR on Mar 26, 2011 12:03 PMHi Try this and see if you get your output,
UPDATE cust_loans cl1
SET vin_num = NVL ((SELECT vin_num FROM (SELECT * FROM (SELECT year_month,cust_id,vin_num
,MIN (year_month) OVER (PARTITION BY cust_id) ym
FROM cust_loans WHERE status = 'Processed')
WHERE year_month = ym) cl2
WHERE cl1.cust_id = cl2.cust_id AND cl1.c_info IN ('Y', 'N')
AND TO_DATE (cl1.year_month, 'YYYYMM') >= ADD_MONTHS (TO_DATE (cl2.year_month, 'YYYYMM'), -4)
AND TO_DATE (cl1.year_month, 'YYYYMM') < TO_DATE (cl2.year_month, 'YYYYMM')),cl1.vin_num)
WHERE cl1.year_month > (SELECT NVL (MAX (year_month), cl1.year_month)
FROM cust_loans cl3
WHERE NVL (c_info, 'W') = 'W' AND NVL (status, 'x') != 'Processed' AND cl1.cust_id = cl3.cust_id)
AND NVL (status, 'x') != 'Processed'G. -
UDF: how to get a value in the previous record when lopping over records?
Hello
I have this challenge:
Source message:
<row>
<ID>111</ID>
<Score>200</Score>
<Date>2010-01-01</Date>
</row>
<row>
<ID>111</ID>
<Score>230</Score>
<Date>2010-01-02</Date>
</row>
<row>
<ID>112</ID>
<Score>230</Score>
<Date>2010-01-03</Date>
</row>
etc...
Now the case is, that IF the value of ID of the current record (row) is equal to the value of the ID of the previous record AND the Score value of the current record is bigger than the Score value of the previous record THEN a record in the target message must be created with these values:
Target Message:
<row>
<ID_target> value of source ID </ID_target>
<Score_yesterday> Score value of previous record (day) </Score_yesterday>
<Score_current_date> Score value of current record </Score_current_date>
<Date_current> Date of current record </Date_current>
</row>
I am thinking of using GlobalContainer to store the previous values but am note sure how to maintain these previous values. In addition, I am thinking about using a UDF on the target row record, which will just create the row, if conditions are met (result.addValue("");) and then just make a simple mapping of the ID_target, Score_current_date and Date_current fields and make an other UDF for the Score_yesterday field where I get the Score for the previous record using the GlobalContainer value, that I stored in the other UDF.
BUT:
Should I use "All values of context" or "All values of Queues" in the UDF used on the row record and how do I make sure, that the Score_yesterday global container value is maintained correctly? I am planning of setting it in the UDF used on the Target row record but will it then be in sync with the consuming UDF of the Score_yesterday field?
Java code to go into the UDF would be very much appreciated
Mikaelint tmp1;
int tmp2;
int len = ID.length;
for(int i =0;i< len;i++)
if( i!= len-1)
tmp1 = Integer.parseInt(Score<i>);
tmp2 = Integer.parseInt(Score[i+1]);
if(tmp2 >tmp1)
if (TARGET[0].equals("ROW"))
result.addValue("");
else if (TARGET[0].equals("ID_TARGET"))
result.addValue(ID[0]);
else if (TARGET[0].equals("SCORE_YDAY"))
result.addValue(Score<i>);
else if (TARGET[0].equals("SCORE_CDAY"))
result.addValue(Score[i+1]);
else
result.addValue(DT[i+1]);
I got the following results for the set of data that you provided.
Target-XML
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_TestingTGT xmlns:ns0="http://monsanto.com/CIC">
<Row>
<ID_TARGET>571515198310502207</ID_TARGET>
<SCORE_YDAY>1000</SCORE_YDAY>
<SCORE_CDAY>1010</SCORE_CDAY>
<CURRENT_DATE>2010-03-02 00:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502207</ID_TARGET>
<SCORE_YDAY>1000</SCORE_YDAY>
<SCORE_CDAY>1050</SCORE_CDAY>
<CURRENT_DATE>2010-03-04 00:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502207</ID_TARGET>
<SCORE_YDAY>1050</SCORE_YDAY>
<SCORE_CDAY>1080</SCORE_CDAY>
<CURRENT_DATE>2010-03-05 00:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502108</ID_TARGET>
<SCORE_YDAY>2000</SCORE_YDAY>
<SCORE_CDAY>2040</SCORE_CDAY>
<CURRENT_DATE>2010-03-03 05:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310502108</ID_TARGET>
<SCORE_YDAY>2000</SCORE_YDAY>
<SCORE_CDAY>2040</SCORE_CDAY>
<CURRENT_DATE>2010-03-05 05:00</CURRENT_DATE>
</Row>
<Row>
<ID_TARGET>571515198310302203</ID_TARGET>
<SCORE_YDAY>3000</SCORE_YDAY>
<SCORE_CDAY>3020</SCORE_CDAY>
<CURRENT_DATE>2010-03-05 00:00</CURRENT_DATE>
</Row>
</ns0:MT_TestingTGT> -
How can I get the previous record's field value in a VO
Hi I would like to know how can I get the previous record's field value in a VO
For example : I have a VO porequisitionlinesvoimpl, and it contains 5 records (porequisitionlinesvoimpl.getRowCount() = 5). How can I search all records in the VO and get the field (attribute3) for all records?
Many thanks anyone can help
LawrenceHi ,
U can loop through the VO to get the value of attribute3,
need to extend the controller ,use below code
OAViewObject vo = (OAViewObject)oawebbean.getApplicationModule (VO1);
OARow row = null;
int fetchedRowCount = vo.getFetchedRowCount();
RowSetIterator Iter = vo.createRowSetIterator("Iter");
if (fetchedRowCount > 0)
Iter .setRangeStart(0);
Iter .setRangeSize(fetchedRowCount);
for (int i = 0; i < fetchedRowCount; i++)
row = (OARow)Iter .getRowAtRangeIndex(i);
String value = (String)row.getAttribute("Atrribute3");
Thanks
Pratap -
How to get the previous record value in the current record plz help me...
In my sql how to get the previous record value...
in table i m having the field called Date i want find the difference b/w 2nd record date value with first record date... plz any one help me to know this i m waiting for ur reply....
Thanx in Advance
with regards
kotreshFirst of this not hte mysql or database forum so don;t repeate again.
to get diff between two date in mysql use date_format() to convert them to date if they r not date type
then use - (minus)to get diff. -
I'm attempting to sync several albums from itunes to iphoto. When select to sync all albums it copies over the previous recorded album. I tried to sync the Albums individually and the same thing happens. Any ideas on how to sync my albums?
Hi NWL1,
Thanks for the question. If I understand correctly, the iPhone won't update and is stuck. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support
Thanks for using Apple Support Communities.
Have a great day,
Mario -
How to get the previous price of the list price in a order
Hi All,
I need to get the previous price of the condition type in an order to calculate the %change of price.
for ex: the conditon ZXXX has price 600 and its changed to 400 now .( by changing the quantity etc ).
when the price value is changing to 400 , I need to capture the value of 600 in another condition type.
how can i acheive this ? Any idea?
Please provide some pointers on it.
Thanks in advance.
Swapna.Hi Viraylab,
check <b>VBAP-NETPR</b> field of table <b>VBAP</b>
It gives the net price corresponding to a line item.
Goto Tcode VA03.See the <b>item overview</b> tab U will get <b>Net Price</b> field for indivisual line item.
Reward points if helpful.
Regards,
Hemant -
HT1491 How do I get a previous version of the Kindle app?
How do I get a previous version of the Kindle app?
If you don't already have a previous copy backed up somewhere on your computer, you can't. The iTunes Store will have only the most recent version of any app.
Regards. -
How to move to next record of the databank file using custom code
hi,
can someone please tell me how to move to next or the previous record the Databank file. i found a funtion setcurrentdatabankrecord(), but i am not able to use it.
thanks in advance...Hi,
I recently had the same problem, here's my solution:
"setCurrentDataBankRecord" is available only to External Program Control.
I used the VB of an empty Word2002 Document.
1. you have to reference the webAnlyst.exe in the object-catalogue
2. create a module via the menue
3. type in the code
This is the code I used - some of the code is just for control
Private Sub TestSetDBRec()
Dim pdtest As webanlst.ProgT
Set pdtest = New webanlst.ProgT
Dim currDBI, numRecsCurrDB As String
' Workspace öffnen
pdtest.play.OpenWorkspace "VBTest"
' Script öffnen
pdtest.play.openScript "BM2B_VK_Änderung"
' DB-Abfragen
numRecsCurrDB = CStr(pdtest.play.getDataBankSize)
currDBI = pdtest.play.currentDatabankIndex
pdtest.play.setCurrentDataBankRecord (2)
currDBI = pdtest.play.currentDatabankIndex
' jetzt das Script abspielen
pdtest.play.doScript "BM2B_VK_Änderung"
End Sub
This works! You can also looping through the database by getting the current value and set the value back increased by e.g. one
Hope it is helpful!
Maybe you are looking for
-
After compaing many prducts in the category I went with Forms Central because overall it looked like it had the potential to be the best, and I still think that, but I am now very dependent on it and need a few answers if possible. First of all Form
-
I am trying to use motion tracking to have text follow a section of the background.The text box follows the motion path, but the text just sits there. What am I doing wrong?
-
How to call PL/SQL function from php
I have one function define in package,like below >> create or replace package body Intg$Label_DB as Future constant date := to_date ('21990101', 'YYYYMMDD'); Max_Annotation_Len integer := 3995; function Get_Tagged_Label (Product_Name varchar2,Branch_
-
What is the Role of R/3 BASIS administrator in SAP-APO
Hi can any one tell me, what is the role of a BASIS admin. in SAP-APO. Please list the responsibilities. Thanks in advance. Regards, bompally.
-
I have tried to delete and reinstall, but it gives me the same issue. Any suggestions? Regards Jonas