How to use open cursor and iner join in one statement
Hello All,
Could any one post the code for the below question?
How to use open cursor and iner join in one statement
Regards,
Lisa
OPEN CURSOR c FOR SELECT carrid connid fldate bookid smoker
FROM sbook innerjoin shook
ORDER BY carrid connid fldate smoker bookid.
Pls reward if helpful.
Similar Messages
-
Hi experts, how to use open sql to read data from one " maintenance view"?
i want to use this part of data within report ,so how to use open sql statement to read data from one " maintenance view"?
Hi
You can't use OPEN SQl statements to fetch data from maintenance view
You have to use only Database views
see the different types of views and the difference
The followings are different types of views:
- Database View (SE11)
Database views are implement an inner join, that is, only records of the primary table (selected via the join operation) for which the corresponding records of the secondary tables also exist are fetched. Inconsistencies between primary and secondary table could, therefore, lead to a reduced selection set.
In database views, the join conditions can be formulated using equality relationships between any base fields. In the other types of view, they must be taken from existing foreign keys. That is, tables can only be collected in a maintenance or help view if they are linked to one another via foreign keys.
- Help View ( SE54)
Help views are used to output additional information when the online help system is called.
When the F4 button is pressed for a screen field, a check is first made on whether a matchcode is defined for this field. If this is not the case, the help view is displayed in which the check table of the field is the primary table. Thus, for each table no more than one help view can be created, that is, a table can only be primary table in at most one help view.
- Projection View
Projection views are used to suppress or mask certain fields in a table (projection), thus minimizing the number of interfaces. This means that only the data that is actually required is exchanged when the database is accessed.
A projection view can draw upon only one table. Selection conditions cannot be specified for projection views.
- Maintenance View ( SE54 )
Maintenance views enable a business-oriented approach to looking at data, while at the same time, making it possible to maintain the data involved. Data from several tables can be summarized in a maintenance view and maintained collectively via this view. That is, the data is entered via the view and then distributed to the underlying tables by the system.
Please have a look at below link. It will help you.
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
for more detailed info look on:
http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&
Reward points for useful Answers
Regards
Anji -
How i use start with and rollup both in one query
hi master
sir i use rollup function for subtotal but rollup not give tree
for tree i want to use start with and connect by function
but that query give error
sir how i use both rollup and start with connect by in one query
for tree wise subtotal
please give me idea
thanking youhi master
thank for your reply
sir i get accid and title from master table and balance from detial table then system give me error
sir i send me all table and data with query and error
Sir this is my master table
SQL> desc chartofacc;
Name Null? Type
PARENT NUMBER
CHILD NUMBER
ACCID NOT NULL VARCHAR2(15)
TITLE VARCHAR2(99)
CAMPID VARCHAR2(2)
ACTIVE NUMBER
FSTATUS NUMBER
Data
Parent child accid
1 K1
1 11 K11
11 1101 K1101
11 1102 K1102
11 1103 K1103
11 1104 K1104
11 1105 K1105
11 1106 K1106
11 1107 K1107
11 1108 K1108
11 1109 K1109
11 1110 K1110
11 1111 K1111
11 1112 K1112
11 1113 K1113
11 1114 K1114
1 12 K12
12 1201 K1201
12 1202 K1202
12 1203 K1203
1 13 K13
13 1301 K1301
1301 130101 K130101
1301 130102 K130102
1301 130103 K130103
1301 130104 K130104
1301 130105 K130105
1301 130106 K130106
1301 130107 K130107
1301 130108 K130108
1301 130109 K130109
1301 130110 K130110
1301 130111 K130111
1301 130112 K130112
1301 130113 K130113
1301 130114 K130114
1301 130115 K130115
13 1302 K1302
1302 130201 K130201
1302 130202 K130202
1302 130203 K130203
1302 130204 K130204
1302 130205 K130205
13 1303 K1303
1303 130301 K130301
1303 130302 K130302
1303 130303 K130303
13 1304 K1304
1304 130401 K130401
1304 130402 K130402
1304 130403 K130403
1304 130404 K130404
1304 130405 K130405
1304 130406 K130406
1304 130407 K130407
1304 130408 K130408
13 1305 K1305
1305 130501 K130501
1305 130502 K130502
13 1306 K1306
1306 130601 K130601
13 1307 K1307
1307 130701 K130701
1307 130702 K130702
1307 130703 K130703
1307 130704 K130704
13 1308 K1308
1308 130801 K130801
1308 130802 K130802
1308 130803 K130803
1308 130804 K130804
1308 130805 K130805
1308 130806 K130806
1308 130807 K130807
1308 130808 K130808
1308 130809 K130809
1308 130810 K130810
1308 130811 K130811
1308 130812 K130812
1308 130813 K130813
13 1309 K1309
13 1310 K1310
13 1311 K1311
1311 131101 K131101
2 K2
2 21 K21
21 2101 K2101
2101 210101 K210101
2101 210102 K210102
2101 210103 K210103
2101 210104 K210104
21 2102 K2102
2102 210201 K210201
2102 210202 K210202
2102 210203 K210203
2102 210204 K210204
21 2103 K2103
2103 210301 K210301
2103 210302 K210302
2103 210303 K210303
2103 210304 K210304
21 2104 K2104
2104 210401 K210401
2104 210402 K210402
2104 210403 K210403
2104 210404 K210404
2 22 K22
22 2201 K2201
2201 220101 K220101
2201 220102 K220102
2201 220103 K220103
2201 220104 K220104
2201 220105 K220105
22 2202 K2202
2202 220201 K220201
2202 220202 K220202
2202 220203 K220203
2202 220204 K220204
22 2203 K2203
2203 220301 K220301
2203 220302 K220302
2203 220303 K220303
2203 220304 K220304
22 2204 K2204
2204 220401 K220401
2204 220402 K220402
2204 220403 K220403
22 2205 K2205
2205 220501 K220501
2205 220502 K220502
220502 22050201 K22050201
220502 22050202 K22050202
220502 22050203 K22050203
220502 22050204 K22050204
22 2206 K2206
2206 220601 K220601
2206 220602 K220602
2206 220603 K220603
2206 220604 K220604
2 23 K23
23 2301 K2301
2301 230101 K230101
2301 230102 K230102
2301 230103 K230103
2301 230104 K230104
2301 230105 K230105
2301 230106 K230106
2301 230107 K230107
2301 230108 K230108
23 2302 K2302
2302 230201 K230201
2302 230202 K230202
2302 230203 K230203
2302 230204 K230204
23 2303 K2303
2303 230301 K230301
2303 230302 K230302
23 2304 K2304
2304 230401 K230401
2304 230402 K230402
2304 230403 K230403
23 2305 K2305
2305 230501 K230501
23 2306 K2306
2306 230601 K230601
2306 230602 K230602
2306 230603 K230603
2306 230604 K230604
23 2307 K2307
23 2308 K2308
2308 230801 K230801
2308 230802 K230802
2308 230803 K230803
23 2309 K2309
2309 230901 K230901
2309 230902 K230902
2309 230903 K230903
2309 230904 K230904
23 2310 K2310
2310 231001 K231001
2310 231002 K231002
2310 231003 K231003
23 2311 K2311
2311 231101 K231101
2311 231102 K231102
2311 231103 K231103
23 2312 K2312
2312 231201 K231201
2312 231202 K231202
2312 231203 K231203
2312 231204 K231204
23 2313 K2313
2313 231301 K231301
2313 231302 K231302
2313 231303 K231303
2313 231304 K231304
2313 231305 K231305
2313 231306 K231306
2313 231307 K231307
2313 231308 K231308
2313 231309 K231309
2313 231310 K231310
2313 231311 K231311
2313 231312 K231312
2313 231313 K231313
2313 231314 K231314
2313 231315 K231315
23 2314 K2314
2314 231401 K231401
2314 231402 K231402
2314 231403 K231403
2314 231404 K231404
2314 231405 K231405
2314 231406 K231406
2314 231407 K231407
23 2315 K2315
23 2316 K2316
2316 231601 K231601
2316 231602 K231602
23 2317 K2317
23 2318 K2318
23 2319 K2319
2319 231901 K231901
2319 231902 K231902
2319 231903 K231903
2319 231904 K231904
2319 231905 K231905
2319 231906 K231906
23 2320 K2320
2320 232001 K232001
3 K3
3 31 K31
31 3101 K3101
31 3102 K3102
31 3103 K3103
31 3104 K3104
31 3105 K3105
3 32 K32
32 3201 K3201
32 3202 K3202
32 3203 K3203
32 3204 K3204
32 3205 K3205
32 3206 K3206
32 3207 K3207
4 K4
4 41 K41
41 4101 K4101
4101 410101 K410101
4101 410102 K410102
4101 410103 K410103
4101 410104 K410104
4101 410105 K410105
4101 410106 K410106
4101 410107 K410107
4101 410108 K410108
4101 410109 K410109
4101 410110 K410110
4101 410111 K410111
4101 410112 K410112
4101 410113 K410113
4101 410114 K410114
4101 410115 K410115
4101 410116 K410116
4101 410117 K410117
4101 410118 K410118
4101 410119 K410119
4101 410120 K410120
4101 410121 K410121
4101 410122 K410122
4101 410123 K410123
4101 410124 K410124
4101 410125 K410125
4101 410126 K410126
4101 410127 K410127
4101 410128 K410128
4101 410129 K410129
4101 410130 K410130
4101 410131 K410131
4101 410132 K410132
41 4102 K4102
41 4103 K4103
41 4104 K4104
4104 410401 K410401
4104 410402 K410402
4104 410403 K410403
4104 410404 K410404
41 4105 K4105
41 4106 K4106
41 4107 K4107
41 4108 K4108
4108 410801 K410801
4108 410802 K410802
4108 410803 K410803
41 4109 K4109
4109 410901 K410901
4109 410902 K410902
4109 410903 K410903
41 4110 K4110
41 4111 K4111
4111 411101 K411101
4111 411102 K411102
4111 411103 K411103
41 4112 K4112
4112 411201 K411201
41 4113 K4113
4113 411301 K411301
41 4114 K4114
4114 411401 K411401
4114 411402 K411402
5 K5
5 51 K51
51 5101 K5101
51 5102 K5102
51 5103 K5103
51 5104 K5104
51 5105 K5105
51 5106 K5106
51 5107 K5107
51 5108 K5108
51 5109 K5109
51 5110 K5110
51 5111 K5111
51 5112 K5112
51 5113 K5113
51 5114 K5114
6 K6
6 61 K61
7 K7
7 71 K71
7 72 K72
7 73 K73
7 74 K74
7 75 K75
7 76 K76
This is my detil table
SQL> desc accbal;
Name Null? Type
ACCID VARCHAR2(15)
YEARID NUMBER
CRBAL NUMBER
DRBAL NUMBER
ENTDATE DATE
BALID NUMBER
Data in detail
K1101 46291132
K1102 13182173
K1103 23784045
K1107 10001795
K1108 9083529
K1110 4224350
K1112 6696832
K1113 7963381
K1114 742766
K1201 1486082
K130104 1977616
K130106 736266
K130107 396673
K130108 42751
K130109 298362
K130110 187696
K130111 537
K130112 942
K130113 987
K130114 1272
K130115 40000
K130205 259941
K130303 177716
K130406 809719
K130408 1786091
K130701 301000
K130702 151200
K130703 7570
K130704 34400
K1308
K130801 5400
K130802 45000
K130803 10856
K130807 24300
K130808 16500
K130810 104500
K130811 60000
K130812 181000
K130813 1750000
K1309 1225565
K1310 2176259
K1311
K131101 788780
K410101 24926
K410102 9545
K410103 28500
K410104 8192
K410105 847
K410106 37100
K410107 2332
K410108 9844
K410109 7843
K410110 9313
K410111 1425
K410112 6089
K410113 15497
K410114 5790
K410115 4251
K410116 22293
K410117 855
K410118 6497
K410119 14996
K410120 124214
K410121 6713
K410122 1567
K410123 75821
K410124 5085
K410125 7125
K410126 4342
K410127 21485
K410128 641111
K410129 589
K410130 50
K410131 163900
K410132 3849
K4105 3946489
K4107 100000
K410801 972011
K410802 1707806
K410803 116450
K4110 13113874
K411101 98335
K411102 32454
K411103 53569
K411201 25327406
K411301 7143103
K411401 4500000
K411402 12754
K5102 2120031
K5103 13543810
K5107 4596103
K5108 5604493
K5110 2008401
K5112 2182778
K5113 4748537
K5114 556914
K61 43297680
Sir I use this query
select lpad(' ',2*(level-1)) || to_char(child),title,sum(drbal),sum(crbal),
from chartofacc, accbal
where chartofacc.accid=accbal.accid(+)
start with parent is null
connect by prior child = parent
group by rollup(substr(mas.accid,2,1),substr(mas.accid,3,1),substr(mas.accid,4,2),substr(mas.accid,6,2) ,chartofacc.accid,title,fstatus);
sir this query not give me result and give me error this
SQL> /
from chartofacc, accbal
ERROR at line 2:
ORA-00936: missing expression
Please give me idea how I get tree type subtotal tribalance
Thanking you
Aamir -
VBPA and VBAK query using OPEN CURSOR... anyway to skip buffer?
Hi all,
I have a query which VBPA inner join VBAK. In this query, I am using VBPA-KUNNR and VBPA-PARVW to query out data. I know VBPA holds a lot of data and querying in this way will be very heavy.
So I use OPEN CURSOR to query the SELECT .. INNER JOIN for these two tables...
It's fast for partners with few sales document.
But, i noticed the query will do a buffer before it process the query...
So my question is, is there a way to by-pass the buffer so it can immediately query?
Thanks,
William WilstrothHi Sandeep,
I did put the BYPASSIUNG BUFFER syntax in the query. The result is still the same...
I wonder if it's just querying by VBPA-KUNNR and VBPA-PARVW is causing it? On the other hand, I think it's not because I am using VBPA-PARVW key field...
Hmmm... I wonder why in the first time query, it will go to buffer and it takes out some time...
Thanks,
William Wilstroth -
I have dreamweaver in my adobe cre4atove cloud suite. How do I open it and use it
I have dreamweaver in my adobe cloud suite. How do I open it and use it
If you have installed it, it will be in your Program Files (PC) or Applications (Mac) folder.
If you haven't installed it, you will need to open the Creative Cloud Application and click the Install button next to Dreamweaver under the Apps tab. -
How to use direct select and insert or load to speedup the process instead of cursur
Hi friends,
I have stored procedure .In SP i am using cursur to load data from Parent to several child table.
I have attached the script with this message.
And my problem is how to use direct select and insert or load to speedup the process instead of cursur.
Can any one please suggest me how to change this scripts pls.
USE [IconicMarketing]
GO
/****** Object: StoredProcedure [dbo].[SP_DMS_INVENTORY] Script Date: 3/6/2015 3:34:03 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <ARUN,NAGARAJ>
-- Create date: <11/21/2014>
-- Description: <STORED PROCEDURE FOR DMS_INVENTORY>
-- =============================================
ALTER PROCEDURE [dbo].[SP_DMS_INVENTORY]
@Specific_Date varchar(20) ,
@DealerNum Varchar(6),
@Date_Daily varchar(50)
AS
BEGIN
SET NOCOUNT ON;
--==========================================================================
-- INVENTORY_CURSUR
--==========================================================================
DECLARE
@FileType varchar(50),
@ACDealerID varchar(50),
@ClientDealerID varchar(50),
@DMSType varchar(50),
@StockNumber varchar(50),
@InventoryDate datetime ,
@StockType varchar(100),
@DMSStatus varchar(50),
@InvoicePrice numeric(18, 2),
@CostPack varchar(50),
@SalesCost numeric(18, 2),
@HoldbackAmount numeric(18, 2),
@ListPrice numeric(18, 2),
@MSRP varchar(max),
@LotLocation varchar(50),
@TagLine varchar(max),
@Certification varchar(max),
@CertificationNumber varchar(max),
@VehicleVIN varchar(50),
@VehicleYear bigint ,
@VehicleMake varchar(50),
@VehicleModel varchar(50),
@VehicleModelCode varchar(50),
@VehicleTrim varchar(50),
@VehicleSubTrimLevel varchar(max),
@Classification varchar(max),
@TypeCode varchar(100),
@VehicleMileage bigint ,
@EngineCylinderCount varchar(10) ,
@TransmissionType varchar(50),
@VehicleExteriorColor varchar(50),
@VehicleInteriorColor varchar(50),
@CreatedDate datetime ,
@LastModifiedDate datetime ,
@ModifiedFlag varchar(max),
@InteriorColorCode varchar(50),
@ExteriorColorCode varchar(50),
@PackageCode varchar(50),
@CodedCost varchar(50),
@Air varchar(100),
@OrderType varchar(max),
@AgeDays bigint ,
@OutstandingRO varchar(50),
@DlrAccessoryRetail varchar(50),
@DlrAccessoryCost varchar(max),
@DlrAccessoryDesc varchar(max),
@ModelDesc varchar(50),
@Memo1 varchar(1000),
@Memo2 varchar(max),
@Weight varchar(max),
@FloorPlan numeric(18, 2),
@Purchaser varchar(max),
@PurchasedFrom varchar(max),
@InternetPrice varchar(50),
@InventoryAcctDollar numeric(18, 2),
@VehicleType varchar(50),
@DealerAccessoryCode varchar(50),
@AllInventoryAcctDollar numeric(18, 2),
@BestPrice varchar(50),
@InStock bigint ,
@AccountingMake varchar(50),
@GasDiesel varchar(max),
@BookValue varchar(10),
@FactoryAccessoryDescription varchar(max),
@TotalReturn varchar(10),
@TotalCost varchar(10),
@SS varchar(max),
@VehicleBody varchar(max),
@StandardEquipment varchar(max),
@Account varchar(max),
@CalculatedPrice varchar(10),
@OriginalCost varchar(10),
@AccessoryCore varchar(10),
@OtherDollar varchar(10),
@PrimaryBookValue varchar(10),
@AmountDue varchar(10),
@LicenseFee varchar(10),
@ICompany varchar(max),
@InvenAcct varchar(max),
@Field23 varchar(max),
@Field24 varchar(max),
@SalesCode bigint,
@BaseRetail varchar(10),
@BaseInvAmt varchar(10),
@CommPrice varchar(10),
@Price1 varchar(10),
@Price2 varchar(10),
@StickerPrice varchar(10),
@TotInvAmt varchar(10),
@OptRetail varchar(max),
@OptInvAmt varchar(10),
@OptCost varchar(10),
@Options1 varchar(max),
@Category varchar(max),
@Description varchar(max),
@Engine varchar(max),
@ModelType varchar(max),
@FTCode varchar(max),
@Wholesale varchar(max),
@Retail varchar(max),
@Draft varchar(max),
@myerror varchar(500),
@Inventoryid int,
@errornumber int,
@errorseverity varchar(500),
@errortable varchar(50),
@errorstate int,
@errorprocedure varchar(500),
@errorline varchar(50),
@errormessage varchar(1000),
@Invt_Id int,
@flatfile_createddate datetime,
@FtpDate date,
@Inv_cur varchar(1000),
@S_Year varchar(4),
@S_Month varchar(2),
@S_Date varchar(2),
@Date_Specfic varchar(50),
@Param_list nvarchar(max),
@Daily_Date Varchar(50);
--====================================================================================
--DECLARE CURSUR FOR SPECIFIC DATE (OR) DEALER-ID WITH SPECIFIC DATE (OR) CURRENT DATE
--====================================================================================
set @Date_Specfic = Substring(@Specific_Date,1,4) +'-'+Substring(@Specific_Date,5,2)+'-'+Substring(@Specific_Date,7,2);
set @Daily_Date = SUBSTRING(@Date_Daily,14,4) + '-' + SUBSTRING(@Date_Daily,18,2)+ '-' + SUBSTRING(@date_Daily,20,2)
IF @Daily_Date IS NOT NULL
BEGIN
Delete From [dbo].[DMS_INVENTORY_DETAILS]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[DMS_INVENTORY_AMOUNT]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[ICONIC_INVENTORY_VEHICLE]
Where DMSInventoryVehicleID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[DMS_INVENTORY_VEHICLE]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[ICONIC_EQUITY_INVENTORY_COMPARE]
Where InventoryVehicleId in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
Delete From [dbo].[DMS_INVENTORY]
Where ID in(select ID from [dbo].[DMS_INVENTORY] where CONVERT (date,FtpDate)=CONVERT (date,GETDATE()));
DECLARE Inventory_Cursor CURSOR FOR
SELECT * from [dbo].[FLATFILE_INVENTORY] where
CONVERT (date,flatfile_createddate) = CONVERT (date,GETDATE()) order by flatfile_createddate;
END
Else
BEGIN
if (@Date_Specfic IS NOT NULL AND @DealerNum != '?????')
BEGIN
Delete From [dbo].[DMS_INVENTORY_DETAILS]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[DMS_INVENTORY_AMOUNT]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[ICONIC_INVENTORY_VEHICLE]
Where DMSInventoryVehicleID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[DMS_INVENTORY_VEHICLE]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[ICONIC_EQUITY_INVENTORY_COMPARE]
Where InventoryVehicleId in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
Delete From [dbo].[DMS_INVENTORY]
Where ID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic AND DMSDealerID='ACTEST' + @DealerNum);
DECLARE Inventory_Cursor CURSOR FOR
SELECT * from [dbo].[FLATFILE_INVENTORY] where FtpDate=@Date_Specfic AND ACDealerID='ACTEST' + @DealerNum;
END
ELSE
BEGIN
Delete From [dbo].[DMS_INVENTORY_DETAILS]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[DMS_INVENTORY_AMOUNT]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[ICONIC_INVENTORY_VEHICLE]
Where DMSInventoryVehicleID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[DMS_INVENTORY_VEHICLE]
Where DMSInventoryID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[ICONIC_EQUITY_INVENTORY_COMPARE]
Where InventoryVehicleId in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
Delete From [dbo].[DMS_INVENTORY]
Where ID in(select ID from [dbo].[DMS_INVENTORY] where FtpDate=@Date_Specfic);
DECLARE Inventory_Cursor CURSOR FOR
SELECT * from [dbo].[FLATFILE_INVENTORY] where FtpDate=@Date_Specfic;
END
END
OPEN Inventory_Cursor
FETCH NEXT FROM Inventory_Cursor
INTO
@FileType ,
@ACDealerID ,
@ClientDealerID ,
@DMSType ,
@StockNumber ,
@InventoryDate ,
@StockType ,
@DMSStatus ,
@InvoicePrice ,
@CostPack ,
@SalesCost ,
@HoldbackAmount ,
@ListPrice ,
@MSRP ,
@LotLocation ,
@TagLine ,
@Certification ,
@CertificationNumber ,
@VehicleVIN ,
@VehicleYear ,
@VehicleMake ,
@VehicleModel ,
@VehicleModelCode ,
@VehicleTrim ,
@VehicleSubTrimLevel ,
@Classification ,
@TypeCode ,
@VehicleMileage ,
@EngineCylinderCount ,
@TransmissionType ,
@VehicleExteriorColor ,
@VehicleInteriorColor ,
@CreatedDate ,
@LastModifiedDate ,
@ModifiedFlag ,
@InteriorColorCode ,
@ExteriorColorCode ,
@PackageCode ,
@CodedCost ,
@Air ,
@OrderType ,
@AgeDays ,
@OutstandingRO ,
@DlrAccessoryRetail ,
@DlrAccessoryCost ,
@DlrAccessoryDesc ,
@ModelDesc ,
@Memo1 ,
@Memo2 ,
@Weight ,
@FloorPlan ,
@Purchaser ,
@PurchasedFrom ,
@InternetPrice ,
@InventoryAcctDollar ,
@VehicleType ,
@DealerAccessoryCode ,
@AllInventoryAcctDollar ,
@BestPrice ,
@InStock ,
@AccountingMake ,
@GasDiesel ,
@BookValue ,
@FactoryAccessoryDescription ,
@TotalReturn ,
@TotalCost ,
@SS ,
@VehicleBody ,
@StandardEquipment ,
@Account ,
@CalculatedPrice ,
@OriginalCost ,
@AccessoryCore ,
@OtherDollar ,
@PrimaryBookValue ,
@AmountDue ,
@LicenseFee ,
@ICompany ,
@InvenAcct ,
@Field23 ,
@Field24 ,
@SalesCode ,
@BaseRetail ,
@BaseInvAmt ,
@CommPrice ,
@Price1 ,
@Price2 ,
@StickerPrice ,
@TotInvAmt ,
@OptRetail ,
@OptInvAmt ,
@OptCost ,
@Options1 ,
@Category ,
@Description ,
@Engine ,
@ModelType ,
@FTCode ,
@Wholesale ,
@Retail ,
@Draft ,
@flatfile_createddate,
@FtpDate;
WHILE @@FETCH_STATUS = 0
BEGIN
--==========================================================================
-- INSERT INTO INVENTORY (PARENT TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY]
DMSDealerID,
StockNumber,
DMSType,
InventoryDate,
FtpDate
VALUES (@ClientDealerID,@StockNumber,@DMSType,@InventoryDate,@FtpDate);
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errortable = 'DMS_INVENTORY',
@errorstate = ERROR_STATE(),
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXEC [SP_DMS_INVENTORY_ERROR] @FileType,@ACDealerID,@ClientDealerID,@DMSType,@StockNumber,@InventoryDate,@StockType,@DMSStatus,@InvoicePrice,@CostPack,
@SalesCost,@HoldbackAmount,@ListPrice,@MSRP,@LotLocation,@TagLine,@Certification,@CertificationNumber,@VehicleVIN,@VehicleYear,@VehicleMake,@VehicleModel,@VehicleModelCode,
@VehicleTrim,@VehicleSubTrimLevel,@Classification,@TypeCode,@VehicleMileage,@EngineCylinderCount,@TransmissionType,@VehicleExteriorColor,@VehicleInteriorColor,
@CreatedDate,@LastModifiedDate,@ModifiedFlag,@InteriorColorCode,@ExteriorColorCode,@PackageCode,@CodedCost,@Air,@OrderType,@AgeDays,@OutstandingRO,
@DlrAccessoryRetail,@DlrAccessoryCost,@DlrAccessoryDesc,@ModelDesc,@Memo1,@Memo2,@Weight,@FloorPlan,@Purchaser,@PurchasedFrom,@InternetPrice,
@InventoryAcctDollar,@VehicleType,@DealerAccessoryCode,@AllInventoryAcctDollar,@BestPrice,@InStock,@AccountingMake,@GasDiesel,@BookValue,
@FactoryAccessoryDescription,@TotalReturn,@TotalCost,@SS,@VehicleBody,@StandardEquipment,@Account,@CalculatedPrice,@OriginalCost,@AccessoryCore,
@OtherDollar,@PrimaryBookValue,@AmountDue,@LicenseFee,@ICompany,@InvenAcct,@Field23,@Field24,@SalesCode,@BaseRetail,@BaseInvAmt,@CommPrice,@Price1,
@Price2,@StickerPrice,@TotInvAmt,@OptRetail,@OptInvAmt,@OptCost,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
-- PRINT @errornumber;
-- PRINT @errorseverity;
-- PRINT @errortable;
-- PRINT @errorprocedure;
-- PRINT @errorline;
-- PRINT @errormessage;
-- PRINT @errorstate;
set @myerror = @@ERROR;
-- This -- PRINT statement -- PRINTs 'Error = 0' because
-- @@ERROR is reset in the IF statement above.
-- PRINT N'Error = ' + @myerror;
set @Inventoryid = scope_identity();
-- PRINT @Inventoryid;
--==========================================================================
-- INSERT INTO DMS_INVENTORY_DETAILS (CHILD TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY_DETAILS]
DMSInventoryID,
StockType,
DMSStatus,
LotLocation,
TagLine,
Certification,
CertificationNumber,
CreatedDate,
LastModifiedDate,
ModifiedFlag,
PackageCode,
OrderType,
AgeDays,
OutstandingRO,
Memo1,
Memo2,
Purchaser,
PurchasedFrom,
DealerAccessoryCode,
InStock,
AccountingMake,
SS,
Account,
AccessoryCore,
ICompany,
InvenAcct,
Field23,
Field24,
SalesCode,
Draft,
FTCode,
FtpDate
VALUES (
@InventoryID,
@StockType,
@DMSStatus,
@LotLocation,
@TagLine,
@Certification,
@CertificationNumber,
@CreatedDate,
@LastModifiedDate,
@ModifiedFlag,
@PackageCode,
@OrderType,
@AgeDays,
@OutstandingRO,
@Memo1,
@Memo2,
@Purchaser,
@PurchasedFrom,
@DealerAccessoryCode,
@InStock,
@AccountingMake,
@SS,
@Account,
@AccessoryCore,
@ICompany,
@InvenAcct,
@Field23,
@Field24,
@SalesCode,
@Draft,
@FTCode,
@FtpDate
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errorstate = ERROR_STATE(),
@errortable = 'DMS_INVENTORY_DETAILS',
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXECUTE [SP_DMS_INVENTORY_ERROR] @FileType,@ACDealerID,@ClientDealerID,@DMSType,@StockNumber,@InventoryDate,@StockType,@DMSStatus,@InvoicePrice,@CostPack,
@SalesCost,@HoldbackAmount,@ListPrice,@MSRP,@LotLocation,@TagLine,@Certification,@CertificationNumber,@VehicleVIN,@VehicleYear,@VehicleMake,@VehicleModel,@VehicleModelCode,
@VehicleTrim,@VehicleSubTrimLevel,@Classification,@TypeCode,@VehicleMileage,@EngineCylinderCount,@TransmissionType,@VehicleExteriorColor,@VehicleInteriorColor,
@CreatedDate,@LastModifiedDate,@ModifiedFlag,@InteriorColorCode,@ExteriorColorCode,@PackageCode,@CodedCost,@Air,@OrderType,@AgeDays,@OutstandingRO,
@DlrAccessoryRetail,@DlrAccessoryCost,@DlrAccessoryDesc,@ModelDesc,@Memo1,@Memo2,@Weight,@FloorPlan,@Purchaser,@PurchasedFrom,@InternetPrice,
@InventoryAcctDollar,@VehicleType,@DealerAccessoryCode,@AllInventoryAcctDollar,@BestPrice,@InStock,@AccountingMake,@GasDiesel,@BookValue,
@FactoryAccessoryDescription,@TotalReturn,@TotalCost,@SS,@VehicleBody,@StandardEquipment,@Account,@CalculatedPrice,@OriginalCost,@AccessoryCore,
@OtherDollar,@PrimaryBookValue,@AmountDue,@LicenseFee,@ICompany,@InvenAcct,@Field23,@Field24,@SalesCode,@BaseRetail,@BaseInvAmt,@CommPrice,@Price1,
@Price2,@StickerPrice,@TotInvAmt,@OptRetail,@OptInvAmt,@OptCost,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
--==========================================================================
-- INSERT INTO DMS_INVENTORY_AMOUNT (CHILD TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY_AMOUNT]
DMSInventoryID,
AllInventoryAcctDollar,
OtherDollar,
PrimaryBookValue,
AmountDue,
LicenseFee,
CalculatedPrice,
OriginalCost,
BookValue,
TotalReturn,
TotalCost,
DlrAccessoryRetail,
DlrAccessoryCost,
DlrAccessoryDesc,
InternetPrice,
InventoryAcctDollar,
BestPrice,
Weight,
FloorPlan,
CodedCost,
InvoicePrice,
CostPack,
SalesCost,
HoldbackAmount,
ListPrice,
MSRP,
BaseRetail,
BaseInvAmt,
CommPrice,
Price1,
Price2,
StickerPrice,
TotInvAmt,
OptRetail,
OptInvAmt,
OptCost,
Wholesale,
Retail,
FtpDate
VALUES (
@InventoryID,
@AllInventoryAcctDollar,
@OtherDollar,
@PrimaryBookValue,
@AmountDue,
@LicenseFee,
@CalculatedPrice,
@OriginalCost,
@BookValue,
@TotalReturn,
@TotalCost,
@DlrAccessoryRetail,
@DlrAccessoryCost,
@DlrAccessoryDesc,
@InternetPrice,
@InventoryAcctDollar,
@BestPrice,
@Weight,
@FloorPlan,
@CodedCost,
@InvoicePrice,
@CostPack,
@SalesCost,
@HoldbackAmount,
@ListPrice,
@MSRP,
@BaseRetail,
@BaseInvAmt,
@CommPrice,
@Price1,
@Price2,
@StickerPrice,
@TotInvAmt,
@OptRetail,
@OptInvAmt,
@OptCost,
@Wholesale,
@Retail,
@FtpDate
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errortable = 'DMS_INVENTORY_AMOUNT',
@errorstate = ERROR_STATE(),
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXEC [SP_DMS_INVENTORY_ERROR] @FileType,@ACDealerID,@ClientDealerID,@DMSType,@StockNumber,@InventoryDate,@StockType,@DMSStatus,@InvoicePrice,@CostPack,
@SalesCost,@HoldbackAmount,@ListPrice,@MSRP,@LotLocation,@TagLine,@Certification,@CertificationNumber,@VehicleVIN,@VehicleYear,@VehicleMake,@VehicleModel,@VehicleModelCode,
@VehicleTrim,@VehicleSubTrimLevel,@Classification,@TypeCode,@VehicleMileage,@EngineCylinderCount,@TransmissionType,@VehicleExteriorColor,@VehicleInteriorColor,
@CreatedDate,@LastModifiedDate,@ModifiedFlag,@InteriorColorCode,@ExteriorColorCode,@PackageCode,@CodedCost,@Air,@OrderType,@AgeDays,@OutstandingRO,
@DlrAccessoryRetail,@DlrAccessoryCost,@DlrAccessoryDesc,@ModelDesc,@Memo1,@Memo2,@Weight,@FloorPlan,@Purchaser,@PurchasedFrom,@InternetPrice,
@InventoryAcctDollar,@VehicleType,@DealerAccessoryCode,@AllInventoryAcctDollar,@BestPrice,@InStock,@AccountingMake,@GasDiesel,@BookValue,
@FactoryAccessoryDescription,@TotalReturn,@TotalCost,@SS,@VehicleBody,@StandardEquipment,@Account,@CalculatedPrice,@OriginalCost,@AccessoryCore,
@OtherDollar,@PrimaryBookValue,@AmountDue,@LicenseFee,@ICompany,@InvenAcct,@Field23,@Field24,@SalesCode,@BaseRetail,@BaseInvAmt,@CommPrice,@Price1,
@Price2,@StickerPrice,@TotInvAmt,@OptRetail,@OptInvAmt,@OptCost,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
--==========================================================================
-- INSERT INTO DMS_INVENTORY_VEHICLE (CHILD TABLE)
--==========================================================================
BEGIN TRY
INSERT INTO [dbo].[DMS_INVENTORY_VEHICLE]
DMSInventoryID,
InteriorColorCode,
ExteriorColorCode,
Air,
ModelDesc,
VehicleType,
VehicleVIN,
VehicleYear,
VehicleMake,
VehicleModel,
VehicleModelCode,
VehicleTrim,
VehicleSubTrimLevel,
Classification,
TypeCode,
VehicleMileage,
FtpDate,
EngineCylinderCount
VALUES (
@InventoryID,
@InteriorColorCode,
@ExteriorColorCode,
@Air,
@ModelDesc,
@VehicleType,
@VehicleVIN,
@VehicleYear,
@VehicleMake,
@VehicleModel,
@VehicleModelCode,
@VehicleTrim,
@VehicleSubTrimLevel,
@Classification,
@TypeCode,
@VehicleMileage,
@FtpDate,
@EngineCylinderCount
END TRY
BEGIN CATCH
SELECT
@errornumber = ERROR_NUMBER(),
@errorseverity = ERROR_SEVERITY(),
@errortable = 'DMS_INVENTORY_VEHICLE',
@errorstate = ERROR_STATE(),
@errorprocedure = ERROR_PROCEDURE(),
@errorline = ERROR_LINE(),
@errormessage = ERROR_MESSAGE();
--==========================================================================
-- INSERT ERRORS INTO DMSLOG_INVENTORY_ERROR
--==========================================================================
EXEC [SP_DMS_INVENTORY_ERROR] @FileType,@ACDealerID,@ClientDealerID,@DMSType,@StockNumber,@InventoryDate,@StockType,@DMSStatus,@InvoicePrice,@CostPack,
@SalesCost,@HoldbackAmount,@ListPrice,@MSRP,@LotLocation,@TagLine,@Certification,@CertificationNumber,@VehicleVIN,@VehicleYear,@VehicleMake,@VehicleModel,@VehicleModelCode,
@VehicleTrim,@VehicleSubTrimLevel,@Classification,@TypeCode,@VehicleMileage,@EngineCylinderCount,@TransmissionType,@VehicleExteriorColor,@VehicleInteriorColor,
@CreatedDate,@LastModifiedDate,@ModifiedFlag,@InteriorColorCode,@ExteriorColorCode,@PackageCode,@CodedCost,@Air,@OrderType,@AgeDays,@OutstandingRO,
@DlrAccessoryRetail,@DlrAccessoryCost,@DlrAccessoryDesc,@ModelDesc,@Memo1,@Memo2,@Weight,@FloorPlan,@Purchaser,@PurchasedFrom,@InternetPrice,
@InventoryAcctDollar,@VehicleType,@DealerAccessoryCode,@AllInventoryAcctDollar,@BestPrice,@InStock,@AccountingMake,@GasDiesel,@BookValue,
@FactoryAccessoryDescription,@TotalReturn,@TotalCost,@SS,@VehicleBody,@StandardEquipment,@Account,@CalculatedPrice,@OriginalCost,@AccessoryCore,
@OtherDollar,@PrimaryBookValue,@AmountDue,@LicenseFee,@ICompany,@InvenAcct,@Field23,@Field24,@SalesCode,@BaseRetail,@BaseInvAmt,@CommPrice,@Price1,
@Price2,@StickerPrice,@TotInvAmt,@OptRetail,@OptInvAmt,@OptCost,@Options1,@Category,@Description,@Engine,@ModelType,@FTCode,@Wholesale,@Retail,@Draft,
@ERRORNUMBER,@ERRORSEVERITY,@ERRORTABLE,@ERRORSTATE,@ERRORPROCEDURE,@ERRORLINE,@errormessage,@FtpDate
END CATCH
--==========================================================================
-- MOVE CURSUR TO NEXT RECORD
--==========================================================================
FETCH NEXT FROM Inventory_Cursor
INTO @FileType ,
@ACDealerID ,
@ClientDealerID ,
@DMSType ,
@StockNumber ,
@InventoryDate ,
@StockType ,
@DMSStatus ,
@InvoicePrice ,
@CostPack ,
@SalesCost ,
@HoldbackAmount ,
@ListPrice ,
@MSRP ,
@LotLocation ,
@TagLine ,
@Certification ,
@CertificationNumber ,
@VehicleVIN ,
@VehicleYear ,
@VehicleMake ,
@VehicleModel ,
@VehicleModelCode ,
@VehicleTrim ,
@VehicleSubTrimLevel ,
@Classification ,
@TypeCode ,
@VehicleMileage ,
@EngineCylinderCount ,
@TransmissionType ,
@VehicleExteriorColor ,
@VehicleInteriorColor ,
@CreatedDate ,
@LastModifiedDate ,
@ModifiedFlag ,
@InteriorColorCode ,
@ExteriorColorCode ,
@PackageCode ,
@CodedCost ,
@Air ,
@OrderType ,
@AgeDays ,
@OutstandingRO ,
@DlrAccessoryRetail ,
@DlrAccessoryCost ,
@DlrAccessoryDesc ,
@ModelDesc ,
@Memo1 ,
@Memo2 ,
@Weight ,
@FloorPlan ,
@Purchaser ,
@PurchasedFrom ,
@InternetPrice ,
@InventoryAcctDollar ,
@VehicleType ,
@DealerAccessoryCode ,
@AllInventoryAcctDollar ,
@BestPrice ,
@InStock ,
@AccountingMake ,
@GasDiesel ,
@BookValue ,
@FactoryAccessoryDescription ,
@TotalReturn ,
@TotalCost ,
@SS ,
@VehicleBody ,
@StandardEquipment ,
@Account ,
@CalculatedPrice ,
@OriginalCost ,
@AccessoryCore ,
@OtherDollar ,
@PrimaryBookValue ,
@AmountDue ,
@LicenseFee ,
@ICompany ,
@InvenAcct ,
@Field23 ,
@Field24 ,
@SalesCode ,
@BaseRetail ,
@BaseInvAmt ,
@CommPrice ,
@Price1 ,
@Price2 ,
@StickerPrice ,
@TotInvAmt ,
@OptRetail ,
@OptInvAmt ,
@OptCost ,
@Options1 ,
@Category ,
@Description ,
@Engine ,
@ModelType ,
@FTCode ,
@Wholesale ,
@Retail ,
@Draft ,
@flatfile_createddate,
@FtpDate;
END
CLOSE Inventory_Cursor;
DEALLOCATE Inventory_Cursor;
SET ANSI_PADDING OFF
END
Arunraj KumarThank you.
And another question if the data is already there in the child table if i try to load alone it must delete the old data in the child tablee and need to get load the new data and
How to do this ?
Arunraj Kumar
You can do that with an IF EXISTS condition
IF EXISTS (SELECT 1
FROM YourChildTable c
INNER JOIn @temptable t
ON c.Bkey1 = t.Bkey1
AND c.Bkey2 = t.Bkey2
DELETE t
FROM YourChildTable c
INNER JOIn @temptable t
ON c.Bkey1 = t.Bkey1
AND c.Bkey2 = t.Bkey2
INSERT INTO YourChildTable
where Bkey1,Bkey2 etc forms the business key of the table
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
How to use open data set in SAP
Hi SAP Gurus,
Could anyone help, how to use open data set in SAP.
I need to upload a file from Application server (ZSAPUSAGEDATA) to internal table (IT_FINAL).
Thanks & Regards,
Krishnau2026Hi Krishna.
These are the steps you need to follow.
tables: specify the table.
data: begin of fs_...
end of fs_ " Structure Field string.
data: t_table like
standard table
of fs_...
data:
w_file TYPE string.
data:
fname(10) VALUE '.\xyz.TXT'.
select-options: if any.
PARAMETERS:
p_file LIKE rlgrap-filename.
w_file = p_file.
select .... statement
OPEN DATASET fname FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
*OPEN DATASET fname FOR OUTPUT IN BINARY MODE.
LOOP AT t_... INTO fs_....
write:/ .....
TRANSFER fs_... TO fname.
or
TRANSFER t_... TO fname
ENDLOOP.
CLOSE DATASET fname.
Reward points wisely and if you are benefitted or ask for more detailed explanation if problem not solved.
Regards Harsh. -
How to use parrallel cursor in this code
hi can anyone expalin me how to use parallel cursor for this code ...
loop at itabkpf.
read table ibsegpar_fu with key
belnr = itabkpf-belnr
gjahr = itabkpf-gjahr
bschl = '25' .
Start insert by Pradeep 20082008
sort: itabkpf by belnr,
itabsegpar by belnr.
End insert by Pradeep 20082008
if sy-subrc = 0. "Deleted by pradeep 20082008
select bukrs belnr gjahr bschl koart lifnr wrbtr
wskto pswbt zfbdt augbl augdt sgtxt rebzg rebzj
into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = itabkpf-bukrs and
belnr = itabkpf-belnr and
gjahr = itabkpf-gjahr and
augbl <> itabkpf-belnr and
rebzg <> space and
bschl = '25'.
loop at ibsegpar_fu_1.
Start insert by Pradeep 20082008
sort ibsegpar_fu_1 by belnr.
End insert by Pradeep 20082008
move-corresponding ibsegpar_fu_1 to itabseg.
move ibsegpar_fu_1-belnr to itabseg-augbl.
move ibsegpar_fu_1-rebzg to itabseg-belnr.
move ibsegpar_fu_1-rebzj to itabseg-gjahr.
*********to include code to pick the description for partical payment
select single * from bseg where
bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-belnr and
gjahr = ibsegpar_fu_1-gjahr and
augbl <> ibsegpar_fu_1-belnr and
rebzg = space and
bschl <> '25'.
move bseg-sgtxt to itabseg-sgtxt.
clear bseg.
*********end of code
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-rebzg and
gjahr = ibsegpar_fu_1-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
endloop.
endif. "Deleted by Pradeep 20082008
endloop.
loop at ibsegpar_fu.
sort ibsegpar_fu by belnr. " insert by pradeep
move-corresponding ibsegpar_fu to itabseg.
select bukrs belnr gjahr bschl koart lifnr wrbtr
rebzg rebzj sgtxt into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = ibsegpar_fu-bukrs and
gjahr = ibsegpar_fu-gjahr and
augbl = ibsegpar_fu-belnr and " Pradeep 20082008 Delete
augbl <> ibsegpar_fu-belnr and " Pradeep 20082008 Insert
rebzg = space and
bschl = '25'.
if sy-subrc = 0.
loop at ibsegpar_fu_1.
move ibsegpar_fu_1-rebzg to itabseg-rebzg.
move ibsegpar_fu_1-rebzj to itabseg-rebzj.
endloop.
move ibsegpar_fu-belnr to itabseg-augbl.
move itabseg-rebzg to itabseg-belnr.
move itabseg-rebzj to itabseg-gjahr.
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu-bukrs and
belnr = itabseg-rebzj and
gjahr = itabseg-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
read table itabseg with key
belnr = itabseg-rebzg
gjahr = itabseg-rebzj
bschl = '31' .
if sy-subrc = 0.
delete itabseg index sy-tabix. "Deleted by Pradeep 20082108
endif.
endif.
endloop.
Start insert by Pradeep 20082008
loop at itabseg.
if itabseg-belnr = itabseg-augbl.
delete itabseg.
elseif itabseg-belnr = ' '.
delete itabseg.
endif.
endloop.
End insert by Pradeep 20082008hi can anyone expalin me how to use parallel cursor for this code ...
loop at itabkpf.
read table ibsegpar_fu with key
belnr = itabkpf-belnr
gjahr = itabkpf-gjahr
bschl = '25' .
Start insert by Pradeep 20082008
sort: itabkpf by belnr,
itabsegpar by belnr.
End insert by Pradeep 20082008
if sy-subrc = 0. "Deleted by pradeep 20082008
select bukrs belnr gjahr bschl koart lifnr wrbtr
wskto pswbt zfbdt augbl augdt sgtxt rebzg rebzj
into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = itabkpf-bukrs and
belnr = itabkpf-belnr and
gjahr = itabkpf-gjahr and
augbl <> itabkpf-belnr and
rebzg <> space and
bschl = '25'.
loop at ibsegpar_fu_1.
Start insert by Pradeep 20082008
sort ibsegpar_fu_1 by belnr.
End insert by Pradeep 20082008
move-corresponding ibsegpar_fu_1 to itabseg.
move ibsegpar_fu_1-belnr to itabseg-augbl.
move ibsegpar_fu_1-rebzg to itabseg-belnr.
move ibsegpar_fu_1-rebzj to itabseg-gjahr.
*********to include code to pick the description for partical payment
select single * from bseg where
bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-belnr and
gjahr = ibsegpar_fu_1-gjahr and
augbl <> ibsegpar_fu_1-belnr and
rebzg = space and
bschl <> '25'.
move bseg-sgtxt to itabseg-sgtxt.
clear bseg.
*********end of code
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu_1-bukrs and
belnr = ibsegpar_fu_1-rebzg and
gjahr = ibsegpar_fu_1-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
endloop.
endif. "Deleted by Pradeep 20082008
endloop.
loop at ibsegpar_fu.
sort ibsegpar_fu by belnr. " insert by pradeep
move-corresponding ibsegpar_fu to itabseg.
select bukrs belnr gjahr bschl koart lifnr wrbtr
rebzg rebzj sgtxt into corresponding
fields of table ibsegpar_fu_1 from bseg
where bukrs = ibsegpar_fu-bukrs and
gjahr = ibsegpar_fu-gjahr and
augbl = ibsegpar_fu-belnr and " Pradeep 20082008 Delete
augbl <> ibsegpar_fu-belnr and " Pradeep 20082008 Insert
rebzg = space and
bschl = '25'.
if sy-subrc = 0.
loop at ibsegpar_fu_1.
move ibsegpar_fu_1-rebzg to itabseg-rebzg.
move ibsegpar_fu_1-rebzj to itabseg-rebzj.
endloop.
move ibsegpar_fu-belnr to itabseg-augbl.
move itabseg-rebzg to itabseg-belnr.
move itabseg-rebzj to itabseg-gjahr.
itabseg-wrbtr = itabseg-wrbtr * -1.
itabseg-pswbt = itabseg-pswbt * -1.
select single budat into lsdat from
bkpf where bukrs = ibsegpar_fu-bukrs and
belnr = itabseg-rebzj and
gjahr = itabseg-rebzj.
if sy-subrc = 0.
move lsdat to itabseg-zfbdt.
endif.
append itabseg.
read table itabseg with key
belnr = itabseg-rebzg
gjahr = itabseg-rebzj
bschl = '31' .
if sy-subrc = 0.
delete itabseg index sy-tabix. "Deleted by Pradeep 20082108
endif.
endif.
endloop.
Start insert by Pradeep 20082008
loop at itabseg.
if itabseg-belnr = itabseg-augbl.
delete itabseg.
elseif itabseg-belnr = ' '.
delete itabseg.
endif.
endloop.
End insert by Pradeep 20082008 -
Logging with whereabouts using open source and freeware
You can find the html version of this at:
http://www.acelet.com/whitepaper/loggingWithWhereabouts.html
Logging with whereabouts using open source and freeware
The purpose of logging is to find out what had happened when needed. When the
time comes to read log messages, you want to know both the log message and its
whereabouts (class name, method name, file name and line number). So you need
to hard code whereabouts.
But hard coded whereabouts are very difficult to maintain: when you modify your
source code, line number changes; when you copy and paste a line, its class name
and method name change. If whereabouts are wrong, you introduce bugs in your logging
logic and the log messages are useless at the best.
This article shows you an example of using freeware Redress tool to rectify whereabouts
programmatically in your Makefile or Ant build file. So your whereabouts are always
correct for both Java and JSP source file.
Redress tool is part of SuperLogging at http://www.ACElet.com. SuperLogging also
provides an open source wrapper Alog.java, which redirects log method calls to
your favorite logging package. Redress tool can rectify whereabouts information
on all Alog's method calls in your application. So, if you call Alog's log methods,
these calls will be rectified by Redress.
JDK 1.4 introduces a new utility package java.util.logging. The example in this
article is based on JDK logging. Log4J is a cousin of JDK logging. Log4J users
should have no difficulties to modify this example for Log4J. Both JDK logging
and Log4J are excellent logging software for single JVM.
Note: Redress tool rectifies method calls on Alog, not JDK logging. You need to
call Alog instead of JDK logging in your application.
Source code of Alog.java
The following is the source code of Alog's JDK logging version. It serves as an
library file and should be on your CLASSPATH:
* Copyright Acelet Corp. 2000. All rights reserved
* License agreement begins >>>>>>>>>> <br>
* This program (com.acelet.opensource.logging.Alog) ("Software") is an
* open source software. <p>
* LICENSE GRANT. The Software is owned by Acelet Corporation ("Acelet").
* The Software is licensed to you ("Licensee"). You are granted a
* non-exclusive right to use, modify, distribute the Software for either
* commercial or non-commercial use for free, as long as: <br>
* 1. this copyright paragraph remains with this file. <br>
* 2. this source code (this file) must be included with distributed
* binary code.<br>
* NO WARRANTY. This comes with absolutely no warranty. <p>
* <<<<<<<<<< License agreement ends <p><p>
* The purpose of releasing this open source program is to prevent vendor
* lock in. <p>
* You can code your program using this class to indirectly use Acelet
* SuperLogging (com.acelet.logging). If later you want to swith to other
* logging package, you do not need to modify your program. All you have
* to do is: <p>
* 1. modify this file to redirect to other logging packages. <br>
* 2. replace existing com.acelet.opensource.Alog with your modified one. <br>
* 3. you may have to reboot your EJB server to make the changes effect.<br>
* <p>
* This program is just a wrapper. For detail information about the methods
* see documents of underline package, such as com.acelet.logging.Logging.
* <p>
* Visit http://www.ACElet.com for more information.
* <p>
* This file is a modified for using JDK logging as an EXAMPLE.
* <br>
* You can use Redress tool to keep your whereabouts information
* always correct. See http://www.ACElet.com/freeware for detail.
* <p>
* Please see http://www/ACElet.com/opensource if you want to see the
* original version.
package com.acelet.opensource.logging;
import java.util.logging.*;
public final class Alog {
* Log level value: something will prevent normal program execution.
public static int SEVERE = 1000;
* Log level value: something has potential problems.
public static int WARNING = 900;
* Log level value: for significant messages.
public static int INFO = 800;
* Log level value: for config information in debugging.
public static int CONFIG = 700;
* Log level value: for information such as recoverable failures.
public static int FINE = 500;
* Log level value: for information about entering or returning a
* method, or throwing an exception.
public static int FINER = 400;
* Log level value: for detail tracing information.
public static int FINEST = 300;
static Logger logger;
static {
logger = Logger.getLogger("");
public Alog() {
public static void alert(String subject, String message) {
public static void error(String text, int level, String fullClassName,
String methodName, String baseFileName, int lineNumber) {
String[] para = {lineNumber + "", baseFileName};
logger.logp(getLevel(level), fullClassName, methodName, text, para);
public static Level getLevel(int levelValue) {
if (levelValue == SEVERE)
return Level.SEVERE;
else if (levelValue == WARNING)
return Level.WARNING;
else if (levelValue == INFO)
return Level.INFO;
else if (levelValue == CONFIG)
return Level.CONFIG;
else if (levelValue == FINE)
return Level.FINE;
else if (levelValue == FINER)
return Level.FINER;
else if (levelValue == FINEST)
return Level.FINEST;
else
return Level.ALL;
public static void log(String text, int level, String fullClassName,
String methodName, String baseFileName, int lineNumber) {
String[] para = {lineNumber + "", baseFileName};
logger.logp(getLevel(level), fullClassName, methodName, text, para);
public static void sendMail(String to, String from, String subject,
String text) throws Exception {
public static void sendMail(String to, String cc, String bcc, String from,
String subject, String text) throws Exception {
Test program
The simple test program is Test.java:
import com.acelet.opensource.logging.Alog;
public class Test {
public static void main(String argv[]){
Alog.log("Holle world", Alog.SEVERE, "wrongClassName", "wrongMethod",
"wrongFileName", -1);
How to run the test program
1. Compile Alog.java (JDK 1.4 or later, not before):
javac Alog.java
2. Download freeware Redress tool from http://ACElet.com/freeware.
3. Run Redress tool:
java -cp redress.jar Test.java
4. Check Test.java. The Alog.log method call should be rectified.
5. Run test program:
java Test
You should see log message with correct class name and method name.Hi;
I found this code and would like to share it with you :
JCoDestination destination = JCoDestinationManager
.getDestination(DESTINATION_NAME2);
JCoFunction function = destination.getRepository().getFunction(
"RFC_FUNCTION_SEARCH");
if (function == null)
throw new RuntimeException("RFC_FUNCTION_SEARCH not found in SAP.");
function.getImportParameterList().setValue("FUNCNAME", "*");
function.getImportParameterList().setValue("GROUPNAME", "*");
try {
function.execute(destination);
JCoTable funcDetailsTable = function.getTableParameterList()
.getTable("FUNCTIONS");
int totalNoFunc = funcDetailsTable.getNumRows();
if (totalNoFunc > 0) {
for (int i = 0; i < totalNoFunc; i++) {
System.out.println("Function Name: "
+ funcDetailsTable.getValue(i));
} catch (AbapException e) {
System.out.println(e.toString());
return;
System.out.println("RFC_FUNCTION_SEARCH finished");
It is working and retrieving FM.
Regards
Anis -
How to use dynamically column_name and column_name value in plsql procedure
hi,
how to use dynamically column_name and column_name value in plsql procedure.
for example, i have one table with column col1.i want write plsql code with dynamically execute the insert one schema to another schema.
by
sivaDECLARE
CURSOR C
IS
SELECT cc_cd
FROM TEMP1 WHERE s_flg ='A' AND b_num IN('826114');--,'709537','715484');
CURSOR D
IS
SELECT * FROM cONSTRAINTS_test ORDER BY SRL_NUM;
STMT VARCHAR2(4000);
p_target_schema VARCHAR2(30):='schema1';
p_source_schema VARCHAR2(30):='schema2';
BEGIN
FOR REC IN C
LOOP
FOR REC1 IN D
LOOP
STMT := 'INSERT INTO '||p_target_schema||''||'.'||''||REC1.CHILD_TABLE||' SELECT * FROM '||p_source_schema||''||'.'||''||REC1.CHILD_TABLE||' where '||REC1.COLUMN_NAME||'='||REC.cntrct_cd||'';
Dbms_Output.Put_Line('THE VALUE STMT:'||STMT);
END LOOP;
END LOOP;
END;
cc_cd='434se22442ss3433';
cc_t_ms is parent table-----------------------pk_cc_cd is primary key
cc_cd is column name
CONSTRAINTS_test table
CHILD_TABLE NOT NULL VARCHAR2(30)
CONSTRAINT_NAME NOT NULL VARCHAR2(30)
COLUMN_NAME NOT NULL VARCHAR2(400)
R_CONSTRAINT_NAME VARCHAR2(30)
CONSTRAINT_TYPE VARCHAR2(1)
PARENT_TABLE NOT NULL VARCHAR2(30)
SRL_NUM NUMBER(4)
CHILD_TABLE CONSTRAINT_NAME COLUMN_NAME R_CONSTRAINT_NAME CONSTRAINT_TYPE PARENT_TABLE SRL_NUM
a aaa cc_CD pk_cc_CD R cc_t_MS 1
bb bbb Cc_CD PK_CC_CD R cc_t_MS 2
bb_v bb_vsr S_NUM PK_S_NUM R bb_v 3
cC_HS_MS cc_hs_CD cc_CD PK_CC_CD R cc_t_MS 4
cC_HS_LNK cc_HIS_LNK_CD H_CD PK_HS_HCD R cC_hs_ms 5
cC_D_EMP cc_d_EMP Cc_CD PK_CC_CD R cc_t_MS 6
i want insert schema1 to schema2 with run time of column_name and column value.the column_name and values should dynamically generated
with refential integrity.is it possible?
can any please quick solution.its urgent
by
siva -
How To Find Opening Stock And Value For a Material
Hi Experts,
How To Find Opening Stock And Value For a Material in Given Dates
Moderator Message: Search.
Edited by: kishan P on Sep 15, 2010 4:05 PMThanks For Answering.....
But I Need Any Function Module To Get Opening Stock And Value For Given Material With in Dates. -
Please, I have a PDF attachment in an email on Russian language, how can I open it and convert to WORD (doc.) on Russian?
Hi Senior gal,
If you have purchased the ExportPDF subscription, then just save the PDF to your desktop and follow any of the two mathod mentioned in the article below to convert the PDF to word
http://forums.adobe.com/docs/DOC-2412
~Pranav -
How to use radioButton(s) and image controls on windows phone 8.1
how to use radioButton(s) and image controls on windows phone 8.1
Hi aspirantme,
>>how to use radioButton(s) and image controls on windows phone 8.1
Which version of your app is? Runtime or Silverlight?
For Runtime version, please see the following articles:
#RadioButton class
https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.radiobutton(v=win.10).aspx
#How to add radio buttons (XAML)
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868200.aspx
#Image class
https://msdn.microsoft.com/library/windows/apps/br242752.aspx
For Silverlight version, please refer to the following documents and guidelines:
#RadioButton Class
https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.radiobutton(v=vs.105).aspx
#RadioButton control design guidelines for Windows Phone
https://msdn.microsoft.com/en-us/library/windows/apps/hh202881(v=vs.105).aspx
#Image Class
https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.image(v=vs.105).aspx
#Quickstart: Images for Windows Phone
https://msdn.microsoft.com/en-us/library/windows/apps/jj206957(v=vs.105).aspx
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to use SQL OVER and PARTITION BY in OBIEE Expression Builder??
Hi there,
I want to create a new logical coulmn with the following SQL query.
SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE )/SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C )
How to use the OVER and PARTITION BY in OBIEE Expression Builder??
Thanks in Advancehi bipin,
We cant use by in Expression builder(rpd) .But use the same formula like this in Fx of answers
SUM(Inventory Detail.Qty) OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C,Inventory Detail.D,MyDATE )/SUM(Inventory Detail.Qty) >OVER(PARTITION BY Inventory Detail.A,Inventory Detail.B,Item.C )SUM(Inventory Detail.Qty by Detail,ITEM,Mydate)/SUM(qty by detail,item)
First check the numerator whether it was giving correct results or not then go with denominator
compare the results with sql that u have
Let me know if that does work
thanks,
saichand.v
Edited by: Saichand Varanasi on Jul 27, 2010 9:27 PM
Edited by: Saichand Varanasi on Jul 27, 2010 9:28 PM -
Gantt chart: Don't know how to use the tooltipkeys and toolkeylabel
I have a problem. Don't know how to use the tooltipkeys and toolkeylabel. I used jquery to select the gantt bars and on mouse over i was getting the task id "tid" then passing it to adf bean with serverlistener and showing a popup that is adf component with javascript. For positioning of the popup I used a button that has width and height 0 and has position absolute and gets the coordinates of the mouse.
"div[et]" is a jquery selector that selects all the elements that have attribute et. I noticed that all the bars have that attribute as a few other attributes as well "part"...
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
<af:document title="untitled1.jsf" id="d1">
<af:resource type="javascript" source="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"/>
<af:resource type="javascript" source="resources/js/home.js"/>
<af:messages id="m1"/>
<af:form id="f1">
<af:commandButton text="commandButton 1" id="cb1" inlineStyle="visibility:hidden; width:0; height:0" />
<af:popup id="noteWindow" contentDelivery="lazyUncached" binding="#{homeBean.popup}">
<af:noteWindow id="popupWindow">
<af:panelFormLayout id="pfl2">
<af:panelLabelAndMessage label="Task id" id="plam5">
<af:outputText value="#{homeBean.taskId1}" id="ot64"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="Start Location Name" id="plam6">
<af:outputText value="#{homeBean.startLocation}" id="ot7"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="Stop Location Name" id="plam7">
<af:outputText value="#{homeBean.stopLocation}" id="ot8"/>
</af:panelLabelAndMessage>
<af:panelLabelAndMessage label="tasktype" id="pla2m7">
<af:outputText value="#{homeBean.taskType}" id="ot9"/>
</af:panelLabelAndMessage>
</af:panelFormLayout>
</af:noteWindow>
</af:popup>
<af:serverListener type="jsServerListener" method="#{homeBean.serverEventHandler}"/>
<dvt:schedulingGantt id="gantt1" value="#{bindings.PersonView1.schedulingGanttModel}" var="row"
startTime="2011-07-04 00:00:00" endTime="2011-07-04 23:00:00" summary="gsg"
showMenuBar="false" showToolbar="false" iconPlacement="left"
showTasksAsDailyBar="false">
<f:facet name="major">
<dvt:timeAxis scale="days" id="ta1"/>
</f:facet>
<f:facet name="minor">
<dvt:timeAxis scale="hours" id="ta2"/>
</f:facet>
<f:facet name="nodeStamp">
<af:column sortProperty="#{bindings.PersonView1.hints.PersonId.name}" sortable="false"
headerText="#{bindings.PersonView1.hints.PersonId.label}" id="c1">
<af:outputText value="#{row.PersonId}" id="ot1">
<af:convertNumber groupingUsed="false"
pattern="#{bindings.PersonView1.hints.PersonId.format}"/>
</af:outputText>
</af:column>
</f:facet>
</dvt:schedulingGantt>
</af:form>
</af:document>
</f:view>javascript:
$(document).ready(bindEvents());
function bindEvents() {
$("div[et]").live('mouseover', function (e) {
$('#cb1').css("position", 'absolute');
$('#cb1').css("top", e.pageY-4);
$('#cb1').css("left", e.pageX);
var popup = AdfPage.PAGE.findComponentByAbsoluteId("noteWindow");
var element = AdfPage.PAGE.findComponent("f1");
var taskIdToPass = null;
if ($(this).attr("tid") !=undefined) {
taskIdToPass = $(this).attr('tid').toString();
} else {
taskIdToPass = $(this).parent().attr('tid').toString();
var param = { taskId : taskIdToPass };
AdfCustomEvent.queue(element, "jsServerListener", param, true);
if (!popup.isPopupVisible()) {
var hints = {};
hints[AdfRichPopup.HINT_LAUNCH_ID] = "cb1";
hints[AdfRichPopup.HINT_ALIGN_ID] = "cb1";
hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_AFTER_START;
popup.show(hints);
}).live("mouseout", function () {
var popup = AdfPage.PAGE.findComponentByAbsoluteId("noteWindow");
popup.hide();
};My bean that is session bean:
package view;
import oracle.adf.model.BindingContext;
import oracle.adf.model.binding.DCDataControl;
import oracle.adf.view.rich.component.rich.RichPopup;
import oracle.adf.view.rich.render.ClientEvent;
import oracle.jbo.ApplicationModule;
import oracle.jbo.Key;
import oracle.jbo.Row;
import oracle.jbo.RowSetIterator;
import oracle.jbo.ViewObject;
public class HomeBean {
private RichPopup popup;
private String taskId1;
private String startLocation;
private String stopLocation;
private long taskId;
private String taskType;
public HomeBean() {
super();
public void serverEventHandler(ClientEvent clientEvent) {
String taskIdString = clientEvent.getParameters().get("taskId").toString();
this.taskId = Long.parseLong(taskIdString);
DCDataControl dc1 = BindingContext.getCurrent().findDataControl("AppModuleDataControl");
ApplicationModule am = dc1.getApplicationModule();
ViewObject vo = am.findViewObject("PdTrfDayView1");
RowSetIterator rowSetIterator = vo.createRowSetIterator(null);
Row[] rows = rowSetIterator.findByKey(new Key(new Object[] {taskId}), 1);
Row row = rows[0];
this.taskId1 = row.getAttribute("PdTrfDayId").toString();
this.startLocation = row.getAttribute("StartLocation").toString();
this.stopLocation = row.getAttribute("StopLocation").toString();
this.taskType = row.getAttribute ("PdTrfTypeId").toString();
RichPopup.PopupHints ph = new RichPopup.PopupHints();
vo.closeRowSetIterator();
public long getTaskId() {
return taskId;
public void setPopup(RichPopup popup) {
this.popup = popup;
public RichPopup getPopup() {
return popup;
public String getTaskId1() {
return taskId1;
public String getStartLocation() {
return startLocation;
public String getStopLocation() {
return stopLocation;
public String getTaskType() {
return taskType;
}I am wondering If i can use setCurrentRow on the iterator that i create and use it for displaying on the popup instead of binding startLocation and stopLocation to the bean and if there is any benefit of that at all...
Edited by: 897833 on Nov 24, 2011 11:37 AMHi,
To use tooltipkeys and tooltiplabel in gantt, you can add following code in managed bean
public String[] getTooltipKeys()
return new String[]{"columnA", "columnB", "StartDate", "EndDate"};
public String[] getTooltipLabels()
return new String[]{"A", "B", "Start Date", "End Date"};
where , the string array in the ToolTipKeys represents the columns, of the table you have in the gantt component , and the string array in TooltipLabels displays the label you want to display for the table columns.
In the jsff, you could call the bean methods as follows:
tooltipKeys="#{GanttBean.tooltipKeys}"
tooltipKeyLabels="#{GanttBean.tooltipLabels}"
Maybe you are looking for
-
I have old family movies on VHS tape that I want to edit on iMovie. What is the best CODEC format to have these tapes converted for use in iMovie?
-
my time machine will not complete because the file was and contines to be in use
-
Hi, I want generate report of KT Character Style with Page numbers. But it showing some error, please anyone help me for this. Thanks in advance, Brave heart
-
FND_stats.gather_schema_stats error
I follow ORACLE document and tried to run FND_STATS.XXX, but i got error. sqlplus apps/apps SQL*Plus: Release 10.2.0.3.0 - Production on Thu Apr 23 14:27:45 2009 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. Connected to: Oracle Database 10g
-
I am trying to get a notification via syslog when someone enters configuration changes on a switch. I am using 12.4 ios with AAA and ACS. I know that I can see this information under the acs reports but I'd like it in syslog also. I have tried the fo