How to apply data into 2 tables AND to more than one record in same table?
Hello,
I am trying to apply/insert data into 2 tables AND at the same time apply data to more than one record (in the same table). How would I do this in APEX?
I have updated using one table with no problem, however, when I try updating with the two tables/ multiple record sets, I get errors.
I appreciate the help.
Thanks.
Linda
You can achieve what you want using PL/SQL. Can you post ur code?
Similar Messages
-
How to extract data into excel file from more than one internal table
Hi Guys
I want to extract the data from module pool screen.
In screen there are two internal tables
1. header
2. items.
I want to extract the data as same format looking in the screen.
With simple Download FM we cannot do this one, because in this we will display as continuous rows.
<b> But my requirement is saving as table with heading, date, header details</b>
Note that it is not the simple down load . Suggest me with example codingHi Guys,
I think it depends on which software you will use to see the result.
If U are using Excel, it's very easy to achieve it.
1. Define a structure as string, the lenth depend on your need.And use the structure to define a internal table, supposed is as A..
2. Concatenate the head data using some separator, for ex. a comma; and then add this into A.
3. The above step's concatenate is depend on your format for request;For ex, you want to place the date at the 4th cell in excel, that means you should put three separator before the date field.
4 Concatenate the item data into the download table.
5. Download the table to file.
6. Display the file, using your defined separator.
Hope this helpful.
Bob -
Search Help on Table Control - Fill more than one field in the table?
Hey everyone,
I have built a screen with a Table Control on it... the fields of the table control are linked to an internal table... The internal table has the line type of a structure I've defined in the data dictionary. Within that structure in the data dictionary, I've linked some fields to search helps (For example, a MATNR and CUSTOMER search help)... I've defined in the structure definition which fields from the search help are to be returned to which fields in the structure.
The problem is, even though I have the search help set to export both the customer number and location when using the search help on the customer field, it still does not fill the location field within the table. Is this a limitation of using search helps within table controls?
I'm also finding that by defining the search help through the structure, instead of directly within the screen, the search help round button does not show up on the field, yet I can still press F4 to bring up the search help. Is there a reason why it's not showing the search help clickable button even though it works fine using F4?
For doing search helps in Table Controls, is it better to just build the search help, attach it directly to the field in the table, and then after the user picks the single field, use the PAI to run a select and fill the rest of the fields required?
Thanks,
DallasHi Dallas,
(1)
What i understood is that you added a search help by defining it in the internal table type for a field customer number..in the search help you have 2 fields customer number and location...user press the search help ..then you need to fill 2 different fields or 1 field?
if you need to fill the customer location or location (only one) then you need to set the "import" in the search help for whichever is required.....
if you need to fill 2 or more different fields..then you can use the technique you have mentioned last , to do a select in PAI and fill the fields....but this you can use if the combination for the fields is unique...eg: u have customer number and location..if customer X can be mapped to location X and location Y..when a select statement is done there are 2 options..so in such cases it is better to leave the option to the user otherwise if there is a clear mapping like customer X can be mapped only to location X then you can use the select..
(2)
usually when you define it as a type in the internal table the icon doesn't show up..but you can do alternative like mentioned..go to the table,find the search help for the required field if present or create a new one if required and place the search help mentioned in the screen itself..so as to see the icon...sometimes users are adamant that they need the search help icon to be seen..so it depends on if your user
(3)
as in the example of customer number and location mentioned we can provide them different search helps and do the needful processing in PAI to fill the fields
Table controls may be used for different purposes and requirements....even a checkbox,push button can be placed as a field in table control and used,but yes most of the time requirements are like what is mentioned in your case...
Regards
Byju -
One Table more than one Relationship to same Table
Hello,
I have the following scenario.
One Table called Hotel and one Table Called Competitor. Each hotel can have several competitors. So i structured the tables in my Azure SQL database like this:
Hotel:
HotelID (int, Primary Key)
Name (String)
etc.
Competitor Table:
ComeptitorID (int identity Primary Key)
HotelID int
CompetitorHotelID int
When i import the tables in my LS Project i get some issues, like the autocomplete box are not filled up.
Is there a problem if a table has two references to the same table.
Thank you so much for amy helpHi, this setup works in LightSwitch built in the intrinsic data source.
Hotel <Zero_or_1-to-Many> Competitor <Many-to-Zero_or_1> Hotel
So a hotel can have many competitors and a competitor can compete with many hotels.
Is it possible for you to switch to this?
Cheers
Dave
Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer. -
How to return more than one record through OUT parameter in procedure
Hi,
I want to create a procedure which accepts one input and returns more than one record as output.
example:
Input = DeptNo
Output= Empno,ename,sal,comm,job
Scenario:
There can be more than one employee in department we pass as the IN parameter. OUT parameter has to return all the records of the corresponding employee details in that department.
Thanks in advance for your help
Regards,
K.Vijay-- I think you can try something like this using ref cursor:
-- create a package for the type ref cursor and execute
CREATE OR REPLACE PACKAGE PACK_REFCURSOR_FOR_TABLES AS
TYPE DATA_TableRows IS REF CURSOR;
END;
-- after executing the package above, create your procedure:
CREATE OR REPLACE PROCEDURE GET_EMP (
IN_nDeptNo IN number,
OUT_Emp OUT PACK_REFCURSOR_FOR_TABLES.DATA_TableRows)
IS
BEGIN
-- leave query open (implicit) as this will return data
OPEN OUT_Emp FOR
SELECT *
FROM tblEmp
WHERE DeptNo = IN_nDeptNo;
END;
--execute the procedure and you're done -
How to bring the more than one rows from the table into the script
Hi
I have to bring more than one rows from the table into the Main windows of the script. so plz help me out.
Thanks in Advance
AnanyaHi Ananya,
Bring more than one row into main window of script.
For this you need to do some changes for data which you pass to main window.At a time you need to pass more than one row,so for this you need to define one structure.See below code.
Types:begin of ty_rows,
include structure (your row_structure),
include structure (your row_sturcture),
Types:end of ty_rows.
for example....
If i need to pass 2 vendor details at a time to main window then the structure should be like this.
Types:begin of ty_rows,
vendor1 like lfa1-lifnr,
vendor1_name like lfa1-name1,
vendor2 like lfa1-lifnr,
vendor2_name like lfa1-name1,
end of ty_rows.
Data:i_main type standard table of ty_rows,
wa_main type ty_rows.
Based on condition you can pass more than one rows of your actual internal table data to i_main internal table.
Then you can pass i_main internal table to your main window.
I think this will help you.
Cheers,
Bujji -
How to load and unload more than one external swf files in different frames?
I do not have much experience on Adobe Flash or Action Script 3, but I know the basics.
I am Arabic language teacher, and I design an application to teach Arabic, I just would like to learn how to load and unload more than one external swf files in different frames.
ThanksLook into using the Loader class to load the swf files. If you want to have it happen in different frames then you can put the code into the different frames.
-
How do you select and move more than one bookmark at a time?
Shift+Click does not select multiple items that are next to one another in a list because the items open in firefox before this happens.Use the bookmarks library. You may use Shift +Click, and Ctrl + Click to create groupings of selected bookmarks to drag and drop.
* one method of opening the bookmarks library is keyboard shortcut <br /> Ctrl+Shift+B (Windows)
*see also [[How to use bookmarks to save and organize your favorite websites]]
*and [[Use bookmark folders to organize your bookmarks]] -
How do I "Select All" in a Pages document. I would like to copy and paste more than one paragraph at a time.
I just tab and hold untill the loop shows then let go and I get the menu with select all in it
-
How to create a table cell occupy more than one row using PDF.
Hi,
I want create a pdf report,which contains a table cell occupied more than one line.
just like html language: <rowspan = 2>
merge cells in one row is allowed,we can use merge cells command(like colspan in html).
but how to mege cells in one column?Hi,
I want create a pdf report,which contains a table cell occupied more than one line.
just like html language: <rowspan = 2>
merge cells in one row is allowed,we can use merge cells command(like colspan in html).
but how to mege cells in one column? -
How to select and copy more than one field in SMARTFORMS
Hello, I have about 60 fields in my smartforms, I need to copy them and paste once more at the same page. There is a problem, I can not select and copy more than one field. Is there some trick to copy and paste more than one element simultanicly?
Hi,
There is no way to copy multiple elements in smartform.
you have to do one by one only -
Fetching more than one row from a table after selecting one value from the dropdown
Hi Experts,
How can we fetch more than one row from a table after selecting one value from the dropdown.
The scenario is that I have some entries in the dropdown like below
A B C
11256 VID 911256
11256 VID 811256
11256 SONY 11256
The 'B' values are there in the dropdown. I have removed the duplicate entries from the dropdown so now the dropdownlist has only two values.for eg- 'VID' and'SONY'. So now, after selecting 'VID' from the dropdown I should get all the 'C' values. After this the "C' values are to be passed to other methods to fetch some data from other tables.
Request your help on this.
Thanks,
Preeetam Narkhede.Hi Preetam!
I hope I understand your request proberly, since this is more about Java and less about WebDynpro, but if I'm wrong, just follow up on this.
Supposed you have some collection of your original table data stored in variable "origin". Populate a Hashtable using the values from column "B" (let's assume it's Strings) as keys and an ArrayList of whatever "C" is (let's assume String instances, too) as value (there's a lot of ways to iterate over whatever your datasource is, and since we do not know what your datasource is, maybe you'll have to follow another approach to get b and c vaues,but the principle should remain the same):
// Declare a private variable for your Data at the appropriate place in your code
private Hashtable temp = new Hashtable<String, ArrayList<String>>();
// Then, in the method you use to retrieve backend data and populate the dropdown,
// populate the Hashtable, too
Iterator<TableData> a = origin.iterator();
while (a.hasNext()) {
TableData current = a.next();
String b = current.getB();
String c = current.getC();
ArrayList<String> values = this.temp.get(b);
if (values == null) {
values = new ArrayList<String>();
values.add(c);
this.temp.put(b, values);
So after this, you'll have a Hashtable with the B values als keys and collections of C values of this particular B as value:
VID --> (911256, 811256)
SONY --> (11256)
Use
temp.keySet()
to populate your dropdown.
After the user selects an entry from the dropdown (let's say stored in variable selectedB), you will be able to retrieve the collection of c's from your Hashtable
// In the metod you handle the selection event with, get the c value collection
//and use it to select from your other table
ArrayList<String> selectedCs = this.temp.get(selectedB);
// now iterate over the selectedCs items and use each of these
//to continue retrieving whatever data you need...
for (String oneC : selectedCs) {
// Select Data from backend using oneC in the where-Clause or whatever...
Hope that helps
Michael -
How to show more than one record at a form-like style report?
Hi All,
I developed a form-like style report
I want it to show more than one record at once (At the same page)
I tried that by setting the value to "Maximum records per page" property for the repeating frame to 10
but when I close the property palete and open it agian the value is returned to 1 !!!
how to show more than one record at the same page?????
Thank uHi,
there's perhaps another property like "page protect". If than 2 records didn't fit at one page there's a page break. Or is there any object inside the repeating frame with page-break properties? Sorry .. it's like looking into a chrystal ball ...
Regards
Rainer -
How to deploy a Webapplication on WAS more than one times on same server?
Hi all,
I 've a special problem:
In our web-app (some DC's) also stored propertie-Files. Now we would to deploy this application more than one times at same server using different WebContentRoots. (f.e. http://server/app1 and http://server/app2 a.s.o.)
We know, that we must create different EAR-Projects and refer the web-Module and configure the application.
But in the second application there it's recommended to change some properties.
How we can handle this in JDI without copy the web-application?
I hope my question can be understood.
Best Regards
Sven Rickelt
Using Netweaver + WAS 6.40 2004 SP 13Hi Sven,
as I'm new to NWDI, I cannot give you a 100 percent, field-tested solution. But have you already thought about using the Configuration-Adapter?
If you can change the source of your web-app, you could maintain the data formerly stored in property files using the configuration adapter of visual administrator. The SC <a href="http://help.sap.com/saphelp_nw04/helpdata/en/45/e7e14b517b42788a1c166f9f32455e/content.htm">configuration</a> allows you to access this data.
With this approach you can stick to one web-application and do the configuration work separately for each deployed application.
Best regards,
Frank -
How to find out which sub query returns more than one row
Hi all,
Can any one give me clue ,how to find out which sub query returns more than one row in the following query .
/* Formatted on 2011/05/17 19:22 (Formatter Plus v4.8.8) */
SELECT a.*, ROWNUM AS rnm
FROM (SELECT DISTINCT '1' AS "Page View", ou.org_unit_name AS "Org",
prxm.mbr_idntfr AS "Beneficiary ID",
md.last_name
|| ', '
|| md.first_name AS "Beneficiary Name",
pci.idntfr AS "Tracking No.",
TO_CHAR (TRUNC (req.pa_rqst_date),
'MM/dd/yyyy'
) AS "Request Date",
sts.status_name AS "Status",
req.pa_rqst_sid AS "Request #",
prxm.mbr_sid AS "Mbr_sid",
TO_CHAR
(TRUNC (req.pa_revision_date),
'MM/dd/yyyy'
) AS "Last Updated",
TO_CHAR (psd.TO_DATE, 'MM/dd/yyyy') AS "TO_DATE",
prxpl.prvdr_lctn_iid AS "PRVDR_LCTN_IID",
pd.prvdr_sid AS "PRVDR_SID", 'Y' AS "State View",
DECODE
((SELECT DISTINCT pd.national_prvdr_idntfr
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid =
req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
0, (SELECT prxplo.prvdr_lctn_idntfr
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
NULL, (SELECT prxplo.prvdr_lctn_idntfr
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
(SELECT DISTINCT pd.national_prvdr_idntfr
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid =
req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR')
) AS "NPI/ID",
DECODE
((SELECT pd.org_bsns_name
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
NULL, (SELECT pd.last_name
|| ', '
|| pd.first_name
|| ' '
|| pd.middle_name
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
(SELECT pd.org_bsns_name
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR')
) AS "Prvdr Name",
TO_CHAR (psd.from_date,
'MM/dd/yyyy'
) AS "Srvc From Date",
TO_CHAR (req.validity_start_date,
'MM/DD/YYYY'
) AS "Due Date",
(fn_get_busniess_days (TRUNC (req.validity_start_date))
) AS "Days<br>Left",
req.pa_mode_type_lkpcd AS "Source",
TO_CHAR (TRUNC (wmdtl.rtng_date),
'MM/dd/yyyy'
) AS "Assigned On",
NVL (wmdtl.assigned_to_user_name,
'Not Assigned'
) AS "Assigned To",
req.org_unit_sid AS "OrgUnitSid",
TO_CHAR
(wmdtl.modified_date,
'MM/dd/yyyy hh24:mi:ss'
) AS "WTRD_MODIFIED_DATE",
TO_CHAR (wmdtl.rtng_date,
'MM/dd/yyyy'
) AS "WTRD_RTNG_DATE",
req.status_cid AS "PA_STATUS_CID",
TO_CHAR (req.modified_date,
'MM/dd/yyyy'
) AS "PA_REQ_MODIFIED_DATE",
prs.state_pa_srvc_type_code
AS "STATE_PA_SRVC_TYPE_CODE",
wmdtl.wm_pa_task_rtng_dtl_sid
AS "WM_TASK_RTNG_DTL_SID",
wmdtl.assigned_to_user_acct_sid
AS "WTRD_Assigned_to_user_acct_sid",
(fn_get_busniess_days (TRUNC (req.validity_start_date))
) AS "Days<br>LeftSort",
wmdtl.assigned_to_org_unit_sid
AS "WTRD_Assigned_to_OrgUntSid",
DECODE
((SELECT COUNT (*)
FROM pa_request_status prs
WHERE prs.pa_rqst_sid = req.pa_rqst_sid
AND prs.status_cid = 5
AND prs.oprtnl_flag = 'I'),
0, 'N',
'Y'
) AS "SHOW_UTILIZATION"
FROM pa_request req,
pa_certification_identifier pci,
status sts,
pa_request_x_member prxm,
wm_pa_task_routing_detail wmdtl,
pa_service_date psd,
org_unit ou,
pa_request_service prs,
pa_request_x_provider_location prxpl,
provider_location pl,
provider_detail pd,
provider p,
mbr_dmgrphc md
WHERE req.oprtnl_flag = 'A'
AND req.status_cid NOT IN
(20, 30, 70, 25, 80, 96, 85, 5, 97, 98, 101)
AND req.org_unit_sid IN
(3057, 3142, 3058, 3143, 3059, 3144, 3060, 3145,
3061, 3146, 3062, 3147, 3063, 3148, 3064, 3149,
3065, 3150, 3066, 3151, 3067, 3152, 3068, 3153,
3069, 3154, 3070, 3155, 3071, 3156, 3072, 3157,
3073, 3158, 3074, 3159, 3075, 3160, 3076, 3161,
3077, 3162, 3078, 3163, 3079, 3164, 3080, 3165,
3081, 3166, 3082, 3167, 3083, 3168, 3084, 3169,
3085, 3170, 3086, 3171, 3087, 3172, 3088, 3173,
3089, 3174, 3090, 3175, 3091, 3176, 3092, 3177,
3093, 3178, 3094, 3179, 3095, 3180, 3096, 3181,
3097, 3182, 3098, 3183, 3099, 3184, 3100, 3185,
3101, 3186, 3102, 3187, 3103, 3003, 75000104,
75000108, 2006, 75000103, 75000102, 75000113,
75000111, 75000109, 2001, 2009, 75000105,
75000107, 2004, 2010, 2013, 2014, 2005, 2011,
75000112, 2002, 1001, 2012, 75000106, 2007,
75000101, 2003, 75000110, 2008, 3001, 3002, 3019,
3104, 3020, 3105, 3021, 3106, 3022, 3107, 3023,
3108, 3024, 3109, 3025, 3110, 3026, 3111, 3027,
3112, 3028, 3113, 3029, 3114, 3030, 3115, 3031,
3116, 3032, 3117, 3033, 3118, 3034, 3119, 3035,
3120, 3036, 3121, 3037, 3122, 3038, 3123, 3039,
3124, 3040, 3125, 3041, 3126, 3042, 3127, 3043,
3128, 3044, 3129, 3045, 3130, 3046, 3131, 3047,
3132, 3048, 3133, 3049, 3134, 3050, 3135, 3051,
3136, 3052, 3137, 3053, 3138, 3054, 3139, 3055,
3140, 3056, 3141)
AND req.pa_rqst_sid = prs.pa_rqst_sid
AND prs.oprtnl_flag = 'A'
AND prs.pa_rqst_srvc_sid = psd.pa_rqst_srvc_sid
AND psd.oprtnl_flag = 'A'
AND req.pa_rqst_sid = pci.pa_rqst_sid
AND pci.oprtnl_flag = 'A'
AND req.pa_rqst_sid = prxm.pa_rqst_sid
AND prxm.oprtnl_flag = 'A'
AND md.oprtnl_flag = 'A'
AND md.status_cid = 2
AND TRUNC (SYSDATE) BETWEEN md.from_date AND md.TO_DATE
AND prxm.mbr_sid = md.mbr_sid
AND ou.org_unit_sid = req.org_unit_sid
AND ou.oprtnl_flag = 'A'
AND req.pa_rqst_sid = prxpl.pa_rqst_sid
AND prxm.pa_rqst_sid = prxpl.pa_rqst_sid
AND pci.pa_rqst_sid = prxm.pa_rqst_sid
AND pci.pa_rqst_sid = wmdtl.subsystem_task_sid
AND pci.pa_rqst_sid = prxpl.pa_rqst_sid
AND prxpl.pa_prvdr_type_lkpcd = 'RR'
AND prxpl.oprtnl_flag = 'A'
AND req.status_cid = sts.status_cid
AND sts.status_type_cid = 3
AND sts.oprtnl_flag = 'A'
AND prxpl.prvdr_lctn_iid = pl.prvdr_lctn_iid
AND p.prvdr_sid = pd.prvdr_sid
AND p.prvdr_sid = pl.prvdr_sid
AND pd.oprtnl_flag = 'A'
AND pd.status_cid = 2
AND TRUNC (SYSDATE) BETWEEN pd.from_date AND pd.TO_DATE
AND wmdtl.subsystem_task_sid = req.pa_rqst_sid
AND wmdtl.subsystem_lkpcd = 'PA'
AND wmdtl.oprtnl_flag = 'A'
AND req.pa_rqst_date > (SYSDATE - 365)
ORDER BY TO_DATE ("Request Date", 'MM/dd/yyyy hh24:mi:ss') DESC,
"Beneficiary Name" ASC) a
WHERE ROWNUM < 102;regards,
P Prakash
Edited by: BluShadow on 17-May-2011 15:01
added {noformat}{noformat} tags around the code833560 wrote:
Can any one give me clue ,how to find out which sub query returns more than one row in the following query .This is why smaller, simpler queries are easier to work with than huge ones - when something like this goes wrong smaller queries are much eaiser to debug. Unfortunately using smaller, easier-to-work with queries is not always an option
Ganesh is right - you will have to dissect the big query bit by bit until you find the offending subquery. If there is another way I would like to find out about it too.
The easiest way to do this is probably to use block comments to isolate parts of the query bit by bit until you find the offending part. If you carefully examine the subqueries you might be able to figure out which one is returning multiple rows without commenting everything
Good luck!
Maybe you are looking for
-
Hi all Ihave installed solution manager4.0 with java addin,all of the sudden iam unable to start the j2ee engine,work process got ended Please find the log below E:\usr\sap\ABC\DVEBMGS01\work DEV_DISP:log ========= trc file: "dev_disp", trc le
-
We are in the process of developing an ASP.NET web application which will be used to raise requests for user and role creations in SAP. We will be making use of Sonic ESB to update SAP through IWAY SAP adapter. IWAY SAP adapter supports RFCs, Bapis
-
In smartform text editor, cursor is coming very very large. huugeee
While doing smartform, in Text editor, cursor is coming in very very large size....I dont know how to reset it... for other texts created early also, in text editor cursor is much bigger... help me...i resetted the formatting...kept standard formatti
-
Requesting location information from a client device (7921G)
Hey gents, Can a client device such as the 7921G gather its own location? I think I remember a configuration example for location presence information on a client. But unfortunately I can't find the configuration guide anymore. Can anyone point me in
-
Why can't I preview menus in Encore CS3? It worked in CS2, but depite checking all the right boxes and settings nothing? Works fine in Pr and Ps CS3 too on the same PC. Is this a known feature?