How to perform DML Operations on Spatial Table Using ADF
Hi
I have an urgent requirement. I have a table with Spatial column. I have generated Business components based on Spatial Table.
Now I have to perform Create,Read,Update and Delete operations using ADF Business Components on Spatial Table.
I have written custom create(),read(),update() and delete() methods in my Application Module and i have to implement those methods.
Can any one help me out how to acheive above four functionalities using ADF Business Components.
Thanks in Advance
HI,
see this example.
u can do like this.
DATA: BEGIN OF seats OCCURS 0,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
seatsocc TYPE sflight-seatsocc,
END OF seats.
DATA seats_tab LIKE HASHED TABLE OF seats
WITH UNIQUE KEY carrid connid with header line.
SELECT carrid connid seatsocc
FROM sflight
INTO table seats.
loop at seats.
COLLECT seats INTO seats_tab.
endloop.
LOOP AT seats_tab.
write:/ seats_tab-carrid,seats_tab-connid,seats_tab-seatsocc.
ENDLOOP.
rgds,
bharat.
Similar Messages
-
How to perform aritmetic operations on interna table's fields ?
i have an internal table containing entries from ekpo table.
while displaying the internal table's entries i would like to add the field containing net price for the same po numbers.
so, how do i perform arithmetic operations on this itab ? plz help..HI,
see this example.
u can do like this.
DATA: BEGIN OF seats OCCURS 0,
carrid TYPE sflight-carrid,
connid TYPE sflight-connid,
seatsocc TYPE sflight-seatsocc,
END OF seats.
DATA seats_tab LIKE HASHED TABLE OF seats
WITH UNIQUE KEY carrid connid with header line.
SELECT carrid connid seatsocc
FROM sflight
INTO table seats.
loop at seats.
COLLECT seats INTO seats_tab.
endloop.
LOOP AT seats_tab.
write:/ seats_tab-carrid,seats_tab-connid,seats_tab-seatsocc.
ENDLOOP.
rgds,
bharat. -
I've been following the
Field Engineer example project from the Windows Development Center to guide into mapping many-to-many relationships on my model. What's been bothering me is how to insert entries into many-to-many relationships.
Take my model as example:
An Organization can have many Users.
An User can belong to many Organizations.
My model class for User looks like this:
public class User
public User()
this.Organizations = new HashSet<Organization>();
public int Id { get; set; }
public string Email { get; set; }
public string Password { get; set; }
public string PasswordSalt { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public bool Active { get; set; }
public string Picture { get; set; }
public string PictureMimeType { get; set; }
public bool Confirmed { get; set; }
public string ConfirmationKey { get; set; }
[JsonIgnore]
public virtual ICollection<Organization> Organizations { get; set; }
My UserDTO class is this:
public class UserDTO : EntityData
public string Email { get; set; }
public string Password { get; set; }
public string PasswordSalt { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public bool Active { get; set; }
public string Picture { get; set; }
public string PictureMimeType { get; set; }
public bool Confirmed { get; set; }
public string ConfirmationKey { get; set; }
My Organization class:
public class Organization
public Organization()
this.Users = new List<User>();
public string Id { get; set; }
public string Title { get; set; }
public string LegalName { get; set; }
public string TaxReference { get; set; }
[JsonIgnore]
public virtual ICollection<User> Users { get; set; }
My OrganizationDTO class:
public class OrganizationDTO : EntityData
public string Title { get; set; }
public string LegalName { get; set; }
public string TaxReference { get; set; }
public virtual ICollection<UserDTO> Users { get; set; }
With those classes in mind I created the controller classes, I mapped the DTO and the Model classes using AutoMapper as follows:
cfg.CreateMap<Organization, OrganizationDTO>()
.ForMember(organizationDTO => organizationDTO.Id,
map => map.MapFrom(organization => MySqlFuncs.LTRIM(MySqlFuncs.StringConvert(organization.Id))))
.ForMember(organizationDTO => organizationDTO.Users,
map => map.MapFrom(organization => organization.Users));
cfg.CreateMap<OrganizationDTO, Organization>()
.ForMember(organization => organization.Id,
map => map.MapFrom(organizationDTO => MySqlFuncs.LongParse(organizationDTO.Id)))
.ForMember(organization => organization.Users,
map => map.Ignore());
Using Fluent API, I defined the relationship between these two entities using an EntityTypeConfiguration class like this:
public class UserEntityConfiguration : EntityTypeConfiguration<User>
public UserEntityConfiguration()
this.Property(u => u.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
this.HasMany<Organization>(u => u.Organizations).WithMany(o => o.Users).Map(uo =>
uo.MapLeftKey("UserId");
uo.MapRightKey("OrganizationId");
uo.ToTable("OrganizationsUsers");
I created a TableController class to handle UserDTO and OrganizationDTO, I have no problem inserting new Users or new Organizations, but the endpoints from each TableController class only allows me to add Users or Organizations individually as far as I understand.
To create an entry into the OrganizationsUser table, how can I achieve this?
I was thinking a PATCH request should be a way to do this, but is it the right way? Do I have to define a TableController for this? How can I expose the Insert, Update, Select and Delete operation for the elements in this relationship? What would be the JSON
to be sent to the endpoints?Hi,
if you accept lists to hold the LOV data, then here is an example : http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples --> sample 70
Frank -
How to fetch corresponding records from 2 tables using ADF Toplink & EJB
Hi,
I am unable to fetch records from 2 tables, which has a foregin key.Used the custom query in toplink, But the output is the cartition of the first table draged and the first row of the second table.The output required should be in the form of ADF Table. I am able to find the output in JSF data table.
Two tables:
Table name:Solutions
sol_id varchar2(PK)
sol_name varchar2
Table name:Solution_details
sol_id varchar2(FK)
common_asum_id varchar2(PK)
common_detail varchar2
Output Required:
sol_id,sol_name,common_asum_id,common_detail
Custom query:
SELECT * FROM solutions a
,solution_details b
WHERE a.sol_id=b.sol_idHi,
I am unable to fetch records from 2 tables, which has a foregin key.Used the custom query in toplink, But the output is the cartition of the first table draged and the first row of the second table.The output required should be in the form of ADF Table. I am able to find the output in JSF data table.
Two tables:
Table name:Solutions
sol_id varchar2(PK)
sol_name varchar2
Table name:Solution_details
sol_id varchar2(FK)
common_asum_id varchar2(PK)
common_detail varchar2
Output Required:
sol_id,sol_name,common_asum_id,common_detail
Custom query:
SELECT * FROM solutions a
,solution_details b
WHERE a.sol_id=b.sol_id -
Problem in Performing DML Operations
Hi,
I am performing DML operations(add,edit,delete) on some table 'X'.
Question:
After i perform a create operation for the first time, it works fine.
Now if i tried to perform second consequitive create operation all the fields have first create operations data.
How will i clear the data in this field.
Same thing is happening for update operation also.
This is same even when i use cancel operation followed by create operation.
How shall i resolve this UI issue.
Thanks,
MithunretainAM - If true, all the cached application modules will be retained. If false, all the cached application modules will be released. Developers must use this parameter to control the release behavior of the cached appplication modules. This method will ignore any retainAM=true or retainAM=false as a URL parameter or as part of parameters.
You should not set retainAM to false in all the cases that can cause performance issue as the AM cache has to be recreated for every navigation. But in your case, it's acceptable.
Best scenarios for retainAM = true
1. When you open a page in update mode from List page.
2. When you want the current values to be retained, after any navigation.
3. When you add bradcrumb, it is recommended to use reatainAM to true.
Best scenarios for retainAM = false
1. When you don't want to retain the AM cache since everytime it should be created. or you want to release manually.
2. Your current case.
3. To reset the form values. But this should be the last option.
Basically, reatainAM parameter is used to tell the OA Caching Framework to retain the current AM cache when the new AM cache gets created by navigating to new page.
Please set the thread to answered if your issue is solved. -
Why we cannot perform DML operations against complex views directly.
hi
can any tell me why we cannot perform DML operations against complex views directly.Hi,
It is not easy to perform DML operations on complex views which involve more than one table as said by vissu. The reason being you may not know which columns to be updated/inserted/deleted on the base tables of the views. If it is a simple view containing a single table it is as simple as performing actions on the table.
For further details visit this
http://www.orafaq.com/wiki/View
cheers
VT -
Cannot perform dml operation inside a query
I have created a function which does some dml opration.
when I use it in a through a transformation operator, and execute the map,
it throws the following error:
cannot perform dml operation inside a query
how to handle this?Hi,
if you want to execute the dml within a mapping, use the pre or post mapping procress operator. Or use a sql*plus activity in the process flow.
Regards,
Carsten. -
Hi all,
I have a workbook with a set of scheduled refreshes (powerquery via the gateway from web api). I've modified it by adding a new source from the azure marketplace. I've successfully added it to the DMG
I've uploaded the new report and I'm able to browse it successfully in powerbi
But when I try to schedule a refresh I get the following error against all the data connections
We can't perform this operation because this workbook uses unsupported features. Correlation ID: 42e1a475-20ea-41ae-9d8d-e1889d4c2d77
Also get the error if I uncheck the new data source
Below is my PQ query for the new data source. Which unsupported feature am I using?
let
Source = Marketplace.Subscriptions(),
#"https://api.datamarket.azure.com/Data.ashx/BoyanPenev/DateStream/v1/" = Source{[ServiceUrl="https://api.datamarket.azure.com/Data.ashx/BoyanPenev/DateStream/v1/"]}[Feeds],
ExtendedCalendar1 = #"https://api.datamarket.azure.com/Data.ashx/BoyanPenev/DateStream/v1/"{[Name="ExtendedCalendar"]}[Data],
#"Filtered Rows" = Table.SelectRows(ExtendedCalendar1, each [YearKey] >= 2010 and [YearKey] <= 2020),
#"Inserted End of Month" = Table.AddColumn(#"Filtered Rows", "EndOfMonth", each Date.EndOfMonth([DateKey]), type datetime),
#"Inserted End of Quarter" = Table.AddColumn(#"Inserted End of Month", "EndOfQuarter", each Date.EndOfQuarter([DateKey]), type datetime),
#"Inserted End of Week" = Table.AddColumn(#"Inserted End of Quarter", "EndOfWeek", each Date.EndOfWeek([DateKey]), type datetime),
#"Renamed Columns" = Table.RenameColumns(#"Inserted End of Week",{{"DateKey", "Date"}}),
#"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Date", type date}, {"EndOfMonth", type date}, {"EndOfQuarter", type date}, {"EndOfWeek", type date}}),
#"Renamed Columns1" = Table.RenameColumns(#"Changed Type",{{"YearKey", "CalendarYear"}}),
#"Inserted FiscalYear" = Table.AddColumn(#"Renamed Columns1", "FiscalYear", each Date.Year(Date.AddMonths([Date],6)), type number),
#"Inserted FiscalMonth" = Table.AddColumn(#"Inserted FiscalYear", "FiscalMonthSortId", each Date.ToText(Date.AddMonths([Date],6),"MM"), type number),
#"Inserted Month" = Table.AddColumn(#"Inserted FiscalMonth", "FiscalMonth", each Date.ToText([Date],"MMMM"), type text),
#"Inserted Month1" = Table.AddColumn(#"Inserted Month", "CalendarMonthSortId", each Date.ToText([Date],"MM"), type number),
#"Added Custom" = Table.AddColumn(#"Inserted Month1", "DateIsWeekDay", each if [DayOfWeekMon] > 5 then "no" else "yes"),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "HoursPerWeekDay", each if [DateIsWeekDay] = "yes" then 7.5 else 0.0),
#"Changed Type1" = Table.TransformColumnTypes(#"Added Custom1",{{"DateIsWeekDay", type text}, {"HoursPerWeekDay", type number}}),
#"Added Custom2" = Table.AddColumn(#"Changed Type1", "Custom", each Function.Invoke(DateTimeZone.UtcNow,{})),
#"Split Column by Delimiter" = let #"Changed Type" = Table.TransformColumnTypes(#"Added Custom2", {{"Custom", type text}}, "en-AU"),
#"Split Column by Delimiter" = Table.SplitColumn(#"Changed Type","Custom",Splitter.SplitTextByDelimiter(" +"),{"Custom.1", "Custom.2"})
in #"Split Column by Delimiter",
#"Changed Type2" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Custom.1", type datetime}, {"Custom.2", type time}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type2",{"Custom.2"}),
#"Renamed Columns2" = Table.RenameColumns(#"Removed Columns",{{"Custom.1", "RefreshDateUtc"}}),
#"Added Custom3" = Table.AddColumn(#"Renamed Columns2", "RefreshDateLocal", each [RefreshDateUtc] + #duration(0,10,30,0)),
#"Changed Type3" = Table.TransformColumnTypes(#"Added Custom3",{{"RefreshDateLocal", type text}}),
#"Added Custom4" = Table.AddColumn(#"Changed Type3", "RefreshDate", each [RefreshDateLocal] & " (UTC + 10.5)"),
#"Changed Type4" = Table.TransformColumnTypes(#"Added Custom4",{{"DateInt", Int64.Type}, {"CalendarYear", Int64.Type}, {"HalfYearKey", Int64.Type}, {"QuarterKey", Int64.Type}, {"MonthKey", Int64.Type}, {"MonthOfYear", Int64.Type}, {"MonthOfHalfYear", Int64.Type}, {"MonthOfQuarter", Int64.Type}, {"QuarterOfYear", Int64.Type}, {"QuarterOfHalfYear", Int64.Type}, {"HalfYearOfYear", Int64.Type}, {"DayOfYear", Int64.Type}, {"DayOfHalfYear", Int64.Type}, {"DayOfQuarter", Int64.Type}, {"DayOfMonth", Int64.Type}, {"DayOfWeekMon", Int64.Type}, {"DayOfWeekSun", Int64.Type}, {"WeekOfYearISO", Int64.Type}, {"FiscalYear", Int64.Type}, {"FiscalMonthSortId", Int64.Type}, {"CalendarMonthSortId", Int64.Type}}),
#"Added Custom5" = Table.AddColumn(#"Changed Type4", "CalendarMonthId", each [DateInt]/100),
#"Round Down" = Table.TransformColumns(#"Added Custom5",{{"CalendarMonthId", Number.RoundDown}}),
#"Changed Type5" = Table.TransformColumnTypes(#"Round Down",{{"CalendarMonthId", Int64.Type}}),
#"Added Custom6" = Table.AddColumn(#"Changed Type5", "Custom", each Date.ToText([Date],"ddd")),
#"Renamed Columns3" = Table.RenameColumns(#"Added Custom6",{{"Custom", "DayName"}}),
#"Added Custom7" = Table.AddColumn(#"Renamed Columns3", "PastMonthFilter", each if [CalendarMonthId] < Number.FromText(DateTimeZone.ToText(Function.Invoke(DateTimeZone.UtcNow,{}),"yyyyMM")) then 1 else 0)
in
#"Added Custom7"
Jakub @ Adelaide, Australia BlogI don't think that's it. I deleted all the powerview reports and worksheets containing pivot tables/charts, and the refresh worked with the function.invoke() call.
The only reason that's in there is because the execution stops there when I dont have it and i have to manually click an 'invoke' button. If there's a way to get around that i'll happily try that instead.
Hmm.. i think I found it, but i'll need to do some testing next year after the holidays to verify
I had added two text boxes (name and desc) to one of my worksheets. I was able to test connection/schedule and run a refresh once I had deleted them.
Weird, because o365 excel services had no problem displaying the worksheet containing the text boxes, but it looks like workbooks that contain text boxes don't work on a scheduled refresh
Jakub @ Adelaide, Australia Blog -
How to update the data in sqlserver table using procedure in biztalkserver
Hi,
Please can any one answer this below question
how to update the data in sqlserver table using procedure in biztalkserver
while am using executescalar,typedprocedure getting some warning
Warning:The adapter failed to transmit message going to send port "SendtoSql1" with URL "mssql://nal126//MU_Stage2?". It will be retransmitted after the retry interval specified for this Send Port. Details
Please send me asap....
Thanks...Hi Messip,
A detailed error would have helped us to answer you more appropriately but
You can follow the post which has step by step instructions, to understand how to use Stored Procedure:
http://tech-findings.blogspot.in/2013/07/insert-records-in-sql-server-using-wcf.html
Maheshkumar
S Tiwari|User
Page|Blog|BizTalk
2013: Inserting RawXML (Whole Incoming XML Message) in SQL database -
How to find out the Non Partitioned Tables used 2Gb on oracle
Hi team
how to find out the Non Partitioned Tables used > 2Gb on oracle where not is sys & system
regardsheres 1 I made earlier
set pagesize 999
set linesize 132
col owner format a25
col segment_name format a60
select owner,segment_name,segment_type,(bytes/1024/1024)"MB size"
from dba_segments
where owner not in ('SYS','SYSTEM','XDB','MDSYS','SYSMAN') -- edit for taste
and segment_type = 'TABLE'
having (bytes/1024/1024) > 2000
group by bytes, segment_Type, segment_name, owner
order by 4 asc -
How to find function module's and tables used for the particulat screen or TCODE?
Hello Nation,
I would like to know how to find the function modules and tables used for the particular screen or TCODE or program.
Example : I would like know the function module used in the program RDBGFT?
How can i find that?
Thanks in advance ,Awaiting your reply.Make use of Find function with the keyword "CALL FUNCTION".
Make use of the same find function with the keyword "Select" to know the database tables used.
Regards,
Philip. -
How to fetch what are all the tables used in this TR no and Package name of
Hi Friends,
I have input of Transport Request no (E070-TRKORR).
How to fetch what are all the tables used in this TR no and Package name of this Table.HI,
FYI
SELECT E071OBJECT_NAME, E070MDEVCLASS
FROM E071, E070M
WHERE TRKORR = YOU REQUEST NO. -
How can we report on R/3 tables using SAP BO
How can we report on R/3 tables using SAP BO.
ThanksHi
you can use the CR Designer and build CR reports that access your R/3 system. Another option is to use the R/3 connector for the Data Federator which is available in the Innovation Center. Still this connector is not a product rather can be used on your own risk.
Regards,
Stratos
PS: Accessing directly the tables of the underlying database(e.g oracle) using universes and Web Intelligence is not recommended. You will not be able to decode all contents of the database tables you are accessing since in some cases R/3 encodes the data before storing them in the actual database tables. -
How to set default value of a table using sequence number
Dear all,
Does any body know that how to set default value of a table
using sequence number.
But I don't want to use trigger to do that.
Please help!!!!
EldonAndrew is essentially correct. You can get around the trigger,
but not the sequence, if (and this may be a very big if) you can
guarantee that every time an insert is done into the table, from
whatever source, the statement looks something like
INSERT INTO tbl VALUES (sequence.nextval,other_columns_values) -
How to read XML message present in Table using PL/SQL?
Hi,
How to read XML content present in Table using PL/SQL .And is it possible to parse the xml uisng xslt and insert xml output in same table again ?
Thanks!Late reply, but hopefully better late than never.
You can possibly do it all via a single SQL statement, such as {message:id=4232077}
XMLTable Syntax can be found at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions228.htm#CIHGGHFB (for 10.2 users) else find your correct version at http://www.oracle.com/technology/documentation/index.html
Maybe you are looking for
-
Can I share my iCloud calendar with someone not using iCloud but has a mac?
I would like to share one of my calendars with someone else also using a mac but doesn't use iCloud. I would like them to be able to read/write on this calendar
-
when I try to log into facetime I recieve a message that says the server encountered an error processing registration please try again later. I have been trying to facetime for days this just happened a few days ago, how do I get around this ?
-
hi, i use the new debugger (in ecc5) and i have internal table with 10,000 employee and the employee that i wont to check in loop is place in 4200 , there is way to put the number of employee and jump into it ? Regards
-
Simple query but for me it is difficult
Hi, Table: Aircraft Rec_type Doc_type A6ERA G PO A6ERB M PO A6ERA G RO A6ERD M SC A6ERF N MC A6ERL M RO A6ERM G EK Now I want to get all the rows i.e., Select * from table Condition: REC_TYPE='G' and DOC_TYPE are not equal to 'PO/RO/MC' We can write
-
SAP DBM: Shop type level profit center
Hi SAP DBM Experts, At our client there is business process of various shop types within each plant such as small service, large service & Body / paint repair. There is a requirement to determine the profit center at the level of Shop type level. As