Split R3 table's records into detailed set of records for extracting to BI
Hello, everybody,
In R3 table i have records:
<i>Document_numberA-Material_numberA-Date1-Date2-Date3-Amount1-Amount2---Amount3</i>
I have extract data to BI ODS in format:
<i>Document_numberA-Material_numberA-Date1---Amount1
Document_numberA-Material_numberA-Date2---Amount2
Document_numberA-Material_numberA-Date3---Amount3</i>
<i>Document_numberB-Material_numberB-Date1---Amount1</i>
How i have define extractor and loading mechanism?
Could you give me a suggestion?
Thanks in advance.
Best Regards,
Arunas Stonys
Hello, everybody,
I have created a START ROUTINE, but it doesn't replaces <b>YEARS</b> and <b>AMOUNTS</b>.
<b>Code:</b>
PROGRAM trans_routine.
CLASS routine DEFINITION
CLASS lcl_transform DEFINITION.
PUBLIC SECTION.
Attributs
DATA:
p_check_master_data_exist
TYPE RSODSOCHECKONLY READ-ONLY,
*- Instance for getting request runtime attributs;
Available information: Refer to methods of
interface 'if_rsbk_request_admintab_view'
p_r_request
TYPE REF TO if_rsbk_request_admintab_view READ-ONLY.
PRIVATE SECTION.
TYPE-POOLS: rsd, rstr.
Rule specific types
TYPES:
BEGIN OF tys_SC_1,
Field: BANFN Paraikos nume..
BANFN TYPE C LENGTH 10,
Field: BANFPO Paraikos pozc..
BANFPO TYPE N LENGTH 5,
Field: TXZ01 Pavadinimas.
TXZ01 TYPE C LENGTH 40,
Field: FISTL Lėų centras.
FISTL TYPE C LENGTH 16,
Field: FKBER Programa.
FKBER TYPE C LENGTH 16,
Field: FIPOS Biud.straips..
FIPOS TYPE C LENGTH 14,
Field: GEBER Finan. altinis.
GEBER TYPE C LENGTH 10,
Field: FIPEX Straipsnis.
FIPEX TYPE C LENGTH 24,
Field: ZZYEAR1 Metai 1.
ZZYEAR1 TYPE N LENGTH 4,
Field: ZZYEAR2 Metai 2.
ZZYEAR2 TYPE N LENGTH 4,
Field: ZZYEAR3 Metai 3.
ZZYEAR3 TYPE N LENGTH 4,
Field: ZZSUM1 Suma 1.
ZZSUM1 TYPE P LENGTH 7 DECIMALS 2,
Field: ZZSUM2 Suma 2.
ZZSUM2 TYPE P LENGTH 7 DECIMALS 2,
Field: ZZSUM3 Suma 3.
ZZSUM3 TYPE P LENGTH 7 DECIMALS 2,
Field: WAERS Valiuta.
WAERS TYPE C LENGTH 5,
Field: BSART Paraikos tipas.
BSART TYPE C LENGTH 4,
Field: ERDAT Pakeista.
ERDAT TYPE D,
Field: RECORD Record Number.
RECORD TYPE RSARECORD,
END OF tys_SC_1.
TYPES:
tyt_SC_1 TYPE STANDARD TABLE OF tys_SC_1
WITH NON-UNIQUE DEFAULT KEY.
$$ begin of global - insert your declaration only below this line -
... "insert your code here
$$ end of global - insert your declaration only before this line -
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.
METHODS
inverse_start_routine
IMPORTING
i_th_fields_outbound TYPE rstran_t_field_inv
i_r_selset_outbound TYPE REF TO cl_rsmds_set
i_is_main_selection TYPE rs_bool
i_r_selset_outbound_complete TYPE REF TO cl_rsmds_set
i_r_universe_inbound TYPE REF TO cl_rsmds_universe
CHANGING
c_th_fields_inbound TYPE rstran_t_field_inv
c_r_selset_inbound TYPE REF TO cl_rsmds_set
c_exact TYPE rs_bool.
ENDCLASS. "routine DEFINITION
$$ begin of 2nd part global - insert your code only below this line *
... "insert your code here
$$ end of 2nd part global - insert your code only before this line *
CLASS routine IMPLEMENTATION
CLASS lcl_transform IMPLEMENTATION.
Method start_routine
Calculation of source package via start routine
<-> source package
METHOD start_routine.
*=== Segments ===
FIELD-SYMBOLS:
<SOURCE_FIELDS> TYPE tys_SC_1.
DATA:
MONITOR_REC TYPE rstmonitor.
*$*$ begin of routine - insert your code only below this line *-*
... "insert your code here
DATA:
ls_SOURCE_PACKAGE type tys_SC_1,
lt_SOURCE_PACKAGE like table of ls_SOURCE_PACKAGE,
l_tabix like sy-tabix.
loop at SOURCE_PACKAGE into ls_SOURCE_PACKAGE.
l_tabix = sy-tabix.
ls_SOURCE_PACKAGE-BANFN = ls_SOURCE_PACKAGE-BANFN.
ls_SOURCE_PACKAGE-BANFPO = ls_SOURCE_PACKAGE-BANFPO.
ls_SOURCE_PACKAGE-TXZ01 = ls_SOURCE_PACKAGE-TXZ01.
ls_SOURCE_PACKAGE-FISTL = ls_SOURCE_PACKAGE-FISTL.
ls_SOURCE_PACKAGE-FKBER = ls_SOURCE_PACKAGE-FKBER.
ls_SOURCE_PACKAGE-FIPOS = ls_SOURCE_PACKAGE-FIPOS.
ls_SOURCE_PACKAGE-GEBER = ls_SOURCE_PACKAGE-GEBER.
ls_SOURCE_PACKAGE-FIPEX = ls_SOURCE_PACKAGE-FIPEX.
ls_SOURCE_PACKAGE-WAERS = ls_SOURCE_PACKAGE-WAERS.
ls_SOURCE_PACKAGE-BSART = ls_SOURCE_PACKAGE-BSART.
ls_SOURCE_PACKAGE-ERDAT = ls_SOURCE_PACKAGE-ERDAT.
ls_SOURCE_PACKAGE-RECORD = ls_SOURCE_PACKAGE-RECORD.
ls_SOURCE_PACKAGE-ZZYEAR1 = ls_SOURCE_PACKAGE-ZZYEAR1.
ls_SOURCE_PACKAGE-ZZSUM1 = ls_SOURCE_PACKAGE-ZZSUM1.
append ls_SOURCE_PACKAGE to lt_SOURCE_PACKAGE.
ls_SOURCE_PACKAGE-ZZYEAR1 = ls_SOURCE_PACKAGE-ZZYEAR2.
ls_SOURCE_PACKAGE-ZZSUM1 = ls_SOURCE_PACKAGE-ZZSUM2.
append ls_SOURCE_PACKAGE to lt_SOURCE_PACKAGE.
ls_SOURCE_PACKAGE-ZZYEAR1 = ls_SOURCE_PACKAGE-ZZYEAR3.
ls_SOURCE_PACKAGE-ZZSUM1 = ls_SOURCE_PACKAGE-ZZSUM3.
append ls_SOURCE_PACKAGE to lt_SOURCE_PACKAGE.
delete SOURCE_PACKAGE index l_tabix.
endloop.
move lt_SOURCE_PACKAGE[] to SOURCE_PACKAGE[].
*-- fill table "MONITOR" with values of structure "MONITOR_REC"
*- to make monitor entries
... "to cancel the update process
raise exception type CX_RSROUT_ABORT.
$$ end of routine - insert your code only before this line -
ENDMETHOD. "start_routine
Method inverse_start_routine
This subroutine needs to be implemented only for direct access
(for better performance) and for the Report/Report Interface
(drill through).
The inverse routine should transform a projection and
a selection for the target to a projection and a selection
for the source, respectively.
If the implementation remains empty all fields are filled and
all values are selected.
METHOD inverse_start_routine.
$$ begin of inverse routine - insert your code only below this line-
... "insert your code here
$$ end of inverse routine - insert your code only before this line -
ENDMETHOD. "inverse_start_routine
ENDCLASS. "routine IMPLEMENTATION
<b>Could you look at code and tell what is wrong?</b>
Thanks in advance!
Best Regards,
Arunas Stonys
Arunas Stonys
Similar Messages
-
MASTER DETAIL - SET DEFAULT VALUES FOR ITEMS
I have a master detail page where on the master I do things like updating the entered_by and entered_date fields
by applying functions to set the item level details and the setting them to read only.
On the detail portion of the page I'd like to do the same but I don't see the details items on the page - only the master items.
The details portion is for comments so I'd like to have the commenter_name and commenter_date set to defined values
when I hit the add row button on the details portion.
Where are the detail items?
I'm using APEX 3.2
Thanks
SteveHi,
When you use master detail form, APEX generate 'Detail portion' as report. So if you edit the page, you may not see actual items for 'detail portion'.
If you want to set any default values or want to format these items, you may need to do as follows
1> Edit 'report' of 'detail portion'
2> Click on report attributes
3> Click on column, you want to set default values
4> Now here, Under 'Tabular Form Element' section you can do this by setting proper values to 'default type' and 'default' fields.
Hope it helps
Cheers
Hari -
How do I scan a document into my computer? The instruction book does not go into detail
HP deskjet 2540 All-in-one
How do I scan a document into my computer? The instruction book does not go into detail
Window 7
Thanks for helping meHi @thea14,
Welcome to the HP Forums!
I noticed that you are wondering how to scan with your HP Deskjet 2540 on Windows 7, and I am happy to help!
Please take a look through this how to scan guide, Scan from Windows 7 With the Full Feature HP Software for HP Multifunction Printers.
Hope this guide answers your questions, and thank you for posting!
RnRMusicMan
I work on behalf of HP
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos Thumbs Up" to say “Thanks” for helping! -
Oracle rownum usage for splitting a Table into two equal parts.
Hi All,
I have a table which has like 1.2 billion records and i would have to split the table in two parts for my Archiving needs.Unfortunately that table does not have any unique key or primary key or data stamp which i can rely for.
I would have to use the rownum concept to divide the table.
I am using the below
SELECT * FROM (SELECT ENAME, SAL FROM EMP ORDER BY SAL DESC) WHERE ROWNUM < 5000000;
But the problem is that the table is taking forever to retrieve as it has to do a order by and then retrieve the data as per the where clause.
The question i have is that instead of using a orderby clause to get the same rownum for the row every time, can i directly rely on the fact that the database is read only and the Rownum would remain same even without oder by clause....
Thanks....WARNING! There is a bug in the code, see EDIT: at bottom of post for details
Justin,
It makes sense that Oracle could order over rowid without sorting, but I see a sort in the explain plan:
SQL> create table t as select 1 as data
2 from all_objects
3 where rownum <= 100000;
Table created.
SQL> explain plan for select *
2 from (select t.*, row_number() over (order by rowid) rn from t)
3 where rn < 50000;
Explained.
SQL> select * from table(DBMS_XPLAN.DISPLAY);
PLAN_TABLE_OUTPUT
Plan hash value: 327232321
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 99651 | 2530K| | 489 (3)| 00:00:07 |
|* 1 | VIEW | | 99651 | 2530K| | 489 (3)| 00:00:07 |
|* 2 | WINDOW SORT PUSHED RANK| | 99651 | 2432K| 7056K| 489 (3)| 00:00:07 |
| 3 | TABLE ACCESS FULL | T | 99651 | 2432K| | 31 (7)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter("RN"<50000)
2 - filter(ROW_NUMBER() OVER ( ORDER BY ROWID)<50000)875820,
What are you doing with the results of the select to archive the table in two pieces? If the archive is in the DB in two seperate tables, multi table insert would be an option:
SQL> create table archive_1 (data number);
Table created.
SQL> create table archive_2 (data number);
Table created.
SQL> explain plan for insert when mod(rn, 2) = 0 then into archive_2 (data) values (data)
2 else into archive_1 (data) values(data)
3 select rownum as rn, data
4 from t;
Explained.
SQL> select * from table(DBMS_XPLAN.DISPLAY);
PLAN_TABLE_OUTPUT
Plan hash value: 828723766
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | INSERT STATEMENT | | 99651 | 2530K| 31 (7)| 00:00:01 |
| 1 | MULTI-TABLE INSERT | | | | | |
| 2 | INTO | ARCHIVE_2 | | | | |
| 3 | INTO | ARCHIVE_1 | | | | |
| 4 | VIEW | | 99651 | 2530K| 31 (7)| 00:00:01 |
| 5 | COUNT | | | | | |
| 6 | TABLE ACCESS FULL| T | 99651 | 1265K| 31 (7)| 00:00:01 |
SQL> insert when mod(rn, 2) = 0 then into archive_2 (data) values (data)
2 else into archive_1 (data) values(data)
3 select rownum as rn, data
4 from t;
100000 rows created.Another option would be to use the last digit of rowid to split the table into two groups, but they will not be equal sized.
SQL> explain plan for select *
2 from t
3 where substr(rowid, length(rowid), 1) = upper(substr(rowid, length(rowid), 1))
4 or substr(rowid, length(rowid), 1) in ('0', '1', '2', '3', '4');
Explained.
SQL> select * from table(DBMS_XPLAN.DISPLAY);
PLAN_TABLE_OUTPUT
Plan hash value: 2153619298
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 59025 | 1441K| 98 (71)| 00:00:02 |
|* 1 | TABLE ACCESS FULL| T | 59025 | 1441K| 98 (71)| 00:00:02 |
Predicate Information (identified by operation id):
1 - filter(SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)='0
' OR SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)='1' OR
SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)='2' OR
SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)='3' OR
SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)='4' OR
SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)=UPPER(SUBSTR(ROW
IDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)))
Note
- dynamic sampling used for this statement
23 rows selected.
SQL> explain plan for select *
2 from t
3 where substr(rowid, length(rowid), 1) <> upper(substr(rowid, length(rowid), 1))
4 and substr(rowid, length(rowid), 1) not in ('0', '1', '2', '3', '4');
Explained.
SQL> select * from table(DBMS_XPLAN.DISPLAY);
PLAN_TABLE_OUTPUT
Plan hash value: 2153619298
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 40627 | 991K| 41 (30)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| T | 40627 | 991K| 41 (30)| 00:00:01 |
Predicate Information (identified by operation id):
1 - filter(SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)<>'
0' AND SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)<>'1' AND
SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)<>'2' AND
SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)<>'3' AND
SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)<>'4' AND
SUBSTR(ROWIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)<>UPPER(SUBSTR(RO
WIDTOCHAR(ROWID),LENGTH(ROWIDTOCHAR(ROWID)),1)))
Note
- dynamic sampling used for this statement
23 rows selected.
SQL> select count(*)
2 from t
3 where substr(rowid, length(rowid), 1) = upper(substr(rowid, length(rowid), 1))
4 or substr(rowid, length(rowid), 1) in ('0', '1', '2', '3', '4');
COUNT(*)
59242
SQL> select count(*)
2 from t
3 where substr(rowid, length(rowid), 1) <> upper(substr(rowid, length(rowid), 1))
4 and substr(rowid, length(rowid), 1) not in ('0', '1', '2', '3', '4');
COUNT(*)
40758
EDIT:
I realized that I screwed up above. In hind sight I don't know what I was thinking. I was attempting to use X = upper(X) to find the upper case characters A-Z. So the two queries to split rows based on the last character of rowid are not right. I don't have time to fix now, but wanted to leave a note of warning.
Edited by: Shannon Severance on Jul 29, 2011 1:34 AM -
How to Getting 10lack records from 2 tables and share into 10 tables
Hi Experts,
i have some special requirement about counting records before we we procees them in to intenal table.
here is the sample code .
**Needed to get users for ref users data
DATA: BEGIN OF gt_usr02 OCCURS 0,
bname LIKE usr02-bname,
END OF gt_usr02.
DATA:g_wa_usr02 LIKE LINE OF gt_usr02.
**Needed To get reference users data
DATA: BEGIN OF gt_usrefus OCCURS 0,
bname LIKE usrefus-bname,
refuser LIKE usrefus-refuser,
END OF gt_usrefus.
DATA:g_wa_usrefus LIKE LINE OF gt_usrefus.
SELECTION-SCREEN :BEGIN OF BLOCK blk1 WITH FRAME TITLE text-000.
SELECT-OPTIONS : s_user FOR usr02-bname.
SELECTION-SCREEN :END OF BLOCK blk1.
START-OF-SELECTION.
REFRESH:gt_usr02,gt_usrefus.
CLEAR:gt_usr02,gt_usrefus
CLEAR:g_wa_usr02,g_wa_usrefus ,
SELECT bname FROM usr02 INTO TABLE
gt_usr02 WHERE bname IN s_user. "say suppose "*" in s_user
1.Here i need to get no of records befor we are getting data from this select statement
basically i need to know the no of records (like count (sy-dbcnt) with same condition like below.
IF NOT gt_usr02 IS INITIAL.
SELECT bname refuser FROM usrefus INTO TABLE gt_usrefus
FOR ALL ENTRIES IN gt_usr02
WHERE bname = gt_usr02-bname AND refuser <> space.
ENDIF.
2.if i found no of records based on that i have to broke those records into diff tables
say i found 10,000 records ,that time i have spilt those 10,000 records into 10 tables(Similar strcture like table gt_usrefus ) with 1000 records each .
Can you help us.this requirement is for avoiding memory issues.Hi nagraju102,
- please try to post code formatted as code
- splitting a table of 10000 records into 10 tables of 1000 records will use not less memory at all, even a little bit more for the administrative overhead
- the numer of lines in an internal table can determinde used system function lines( itab )
- you can create an internal table of references and then create any number of internal tables,
data:
lt_tabref type table of ref to data.
field-symbols:
<table> type table,
<tabref> type ref to data.
DO 10 TIMES.
append initial line to lt_tabref assigning <tabref>.
create data <tabref> type table of usrefus.
assign <tabref>->* to <table>.
perform fill_table changing <table>."fill this table as you prefer
ENDDO.
Here you have 10 internal tables with USREFUS structure.
Regards,
Clemens -
Splitting Long Table Into Shorter Ones
I have a very long table in Pages and now I need to add a little text in between some of the rows. Is there any way to split the table into a bunch of smaller ones where I need to? Or am I going to have to recreate each new table individually somehow...?!
Thanks so much for any help!You could insert a row and put your text where you want it,
or
Duplicate the table and delete the parts you don't want.
Peter -
Selecting Records from 125 million record table to insert into smaller table
Oracle 11g
I have a large table of 125 million records - t3_universe. This table never gets updated or altered once loaded, but holds data that we receive from a lead company.
I need to select records from this large table that fit certain demographic criteria and insert those into a smaller table - T3_Leads - that will be updated with regard to when the lead is mailed and for other relevant information.
My question is what is the best (fastest) approach to select records from this 125 million record table to insert into the smaller table. I have tried a variety of things - views, materialized views, direct insert into smaller table...I think I am probably missing other approaches.
My current attempt has been to create a View using the query that selects the records as shown below. Then use a second query that inserts into T3_Leads from this View V_Market. This is very slow. Can I just use an Insert Into T3_Leads with this query - it did not seem to work with the WITH clause? My Index on the large table is t3_universe_composite and includes zip_code, address_key, household_key.
CREATE VIEW V_Market as
WITH got_pairs AS
SELECT /*+ INDEX_FFS(t3_universe t3_universe_composite) */ l.zip_code, l.zip_plus_4, l.p1_givenname, l.surname, l.address, l.city, l.state, l.household_key, l.hh_type as l_hh_type, l.address_key, l.narrowband_income, l.p1_ms, l.p1_gender, l.p1_exact_age, l.p1_personkey, e.hh_type as filler_data, 1.p1_seq_no, l.p2_seq_no
, ROW_NUMBER () OVER ( PARTITION BY l.address_key
ORDER BY l.hh_verification_date DESC
) AS r_num
FROM t3_universe e
JOIN t3_universe l ON
l.address_key = e.address_key
AND l.zip_code = e.zip_code
AND l.p1_gender != e.p1_gender
AND l.household_key != e.household_key
AND l.hh_verification_date >= e.hh_verification_date
SELECT *
FROM got_pairs
where l_hh_type !=1 and l_hh_type !=2 and filler_data != 1 and filler_data != 2 and zip_code in (select * from M_mansfield_02048) and p1_exact_age BETWEEN 25 and 70 and narrowband_income >= '8' and r_num = 1
Then
INSERT INTO T3_leads(zip, zip4, firstname, lastname, address, city, state, household_key, hh_type, address_key, income, relationship_status, gender, age, person_key, filler_data, p1_seq_no, p2_seq_no)
select zip_code, zip_plus_4, p1_givenname, surname, address, city, state, household_key, l_hh_type, address_key, narrowband_income, p1_ms, p1_gender, p1_exact_age, p1_personkey, filler_data, p1_seq_no, p2_seq_no
from V_Market;I had no trouble creating the view exactly as you posted it. However, be careful here:
and zip_code in (select * from M_mansfield_02048)
You should name the column explicitly rather than select *. (do you really have separate tables for different zip codes?)
About the performance, it's hard to tell because you haven't posted anything we can use, like explain plans or traces but simply encapsulating your query into a view is not likely to make it any faster.
Depending on the size of the subset of rows you're selecting, the /*+ INDEX hint may be doing your more harm than good. -
More than one Detail table in the Master Detail forms!
Hi,
I need to have more than one Detail table in Master Detail Forms.
I want to see the details of the rows of the first Detail table in the Second Detail table. Please guide me to do this.
Sincerely yours,
MozhdehYou can do one of two things
1) Depends on the nature of your data model. I was able to manage many to many
relationships using views and instead of triggers. This solution is somewhat complex but can work in certain situations.
2)Works for situations where master record exists. create a page with mulitple portlets syncronized on some related key.
create the following package to use on the md forms to place on the one page to be rendered.
-- this package will facilitate the storage and retrieval of keys used by the related forms.
create or replace package session_var
IS
session_parms portal30.wwsto_api_session;
g_domain varchar2(2000) := portal30.wwctx_api.get_user;
function get_id (id in varchar2) return number;
PROCEDURE SET_ID
(ID in VARCHAR2
,p_val in VARCHAR2
,P_URL in VARCHAR2
END SESSION_VAR;
create or replace package body session_var
IS
--pkg body
function get_id(id in varchar2) return number is
l_store_session portal30.wwsto_api_session;
l_id number;
begin
l_store_session := portal30.wwsto_api_session.load_session(
p_domain => session_var.g_domain,
p_sub_domain => 'your domain');
l_id := l_store_session.get_attribute_as_varchar2( p_name => id);
return l_id;
end get_id;
PROCEDURE SET_ID
(ID in VARCHAR2
,p_val in VARCHAR2
,P_URL in VARCHAR2
IS
l_store_session portal30.wwsto_api_session;
begin
l_store_session := portal30.wwsto_api_session.load_session(
p_domain => session_var.g_domain,
p_sub_domain => 'your domain');
l_store_session.set_attribute(
p_name => id,
p_value => p_val );
l_store_session.save_session;
* Redirect to the page using p_url;
portal30.wwv_redirect.url(P_URL);
end set_id;
END SESSION_VAR;
--the form master detail form, section before display page enter the following code and publish as portlet.
declare
l_fs varchar2(4000);
l_s varchar2(4000);
v_con_id number;
begin
v_con_id :=rfq.session_var.get_id('CON_ID'); -- primary key and key used to relate details
p_session.set_shadow_value( p_block_name => 'MASTER_BLOCK',
p_attribute_name => 'A_CON_ID', -- attribute on form related to primary key
p_value => '= '|| v_con_id,
p_language => portal30.wwctx_api.get_nls_language ,
p_index => 1
l_fs := p_session.get_value_as_varchar2(p_block_name => 'MASTER_BLOCK', p_attribute_name => '_FORM_STATE');
l_s := p_session.get_value_as_varchar2(p_block_name => 'MASTER_BLOCK', p_attribute_name => '_STATUS');
if l_fs = 'SAVE' and l_s is null then
WWV_MASTER_GENSYS_1(p_block_name => p_block_name,
p_object_name => p_object_name,
p_instance => p_instance,
p_event_type => p_event_type,
p_user_args => p_user_args,
p_session => p_session);
p_session.save_session;
end if;
if l_fs = 'QUERY_AND_SAVE' and l_s is null then
WWV_MASTER_GENSYS_1(p_block_name => p_block_name,
p_object_name => p_object_name,
p_instance => p_instance,
p_event_type => p_event_type,
p_user_args => p_user_args,
p_session => p_session);
p_session.save_session;
end if;
exception
when others then
PORTAL30.wwerr_api_error.add(PORTAL30.wwerr_api_error.DOMAIN_WWV,'app','generic','onLink', p1 => sqlerrm);
raise;
end;
--then create other md forms and publish as portlets in a similar manner.
-- create a form (form_session_vars) to call procedure session_vars and place the following code in the
addiontional pl/sql tab
WWV_GENSYS_1(
p_block_name => p_block_name ,
p_object_name => p_object_name,
p_instance => p_instance ,
p_event_type => p_event_type ,
p_user_args => p_user_args ,
p_session => p_session);
--then create a page and place the md forms created above as portlets on the page.
--create a link and target the form_session_vars and in the link target inputs
enter the values for your user parameters
id= CON_ID --"your primary key name"
p_url= url/page/"your_page"
--finally create a report (QBE or standard).
in the column formation section use the link created earlier to direct the user to the target page.
How it works.
When the link is selected the form_session_Var is called and automatically runs setting the primary key values
in the user session store. The step is required or the resulting page will not render properly. Then the user is redirected to the page where the portlets are rendered. The portlets start rendering, the before display page calls the session vars package to retrieve the key and put the form into query_update mode returning the data.
The portlets finish in query_and_save mode with details in update mode, the allowable insert, delete and none actions will be available for the details.
benefits: The session_Var package code is resuable as well as the form form_session_Var and the link. passing the key name and values are done at the report level and detailed in the report links. the md forms will need to reference their related keys. -
How do I split a table over two pages in Pages?
Hi
I'm trying to split a table in Pages so that the text in the two adjacent rows will fall on two separate pages but I cannot find a way to do this. This was something that is easy to do if using MS Word so I can't believe it would be a feature missing from Pages?
The document I'm working with is my resume and I had my jobs nicely formatted in a long table so it was easy to work with (job title, dates, achievements etc. in different cells). Since updating to Yosemite and Pages 5.5 I've noticed that I now have my career summary and 'Professional Experience' title on the first page but the table with all my job information is now starting on the second page - leaving just a lot of blank space on the first page. One of the jobs on the second page now also splits across pages 2 and 3. I can see that it is trying to keep everything in the table together and that what I need to do is just split the table at a certain point so that I can put the first part of the table back onto page 1 and the second part of it on page 2 - but it won't give me any option to do this.
Any ideas?Although this thread is several months old, I felt compelled to reply as I have just encountered this gaping hole in Pages functionality. Jerrold Green 1 is incorrect in asserting that the OP's problem is that Pages won't split a cell across pages. The OP clearly indicates that Pages is not moving rows that won't fit on the first page of the table, but rather it moves the whole table to the next page.
So for example, if I have a paragraph of text at the top of page 1, and then insert a table under this paragraph that contains more rows than will fit on the remainder of the page, rather than the rows that won't fit being moved to page 2, Pages moves the entire table to page 2 leaving a big blank space on page 1. But bizarrely if the table contains more rows than will fit on one whole page, then it will move the overflow rows onto the third page, making you wonder why it didn't just do this on page 1.
This is with the table arrangement set to Move with Text. If I set it to Stay on Page, the end of the table just flows over the footer and off the page into oblivion. If I set Text Wrap to None, it just plonks the table right on top of the other text. So it gives you the option to do something silly, but not the most sensible option.
If I am missing something, then can someone please correct me. Without this basic functionality Pages cannot be considered a professional Word Processor. I'll unfortunately have to go back to MS Word. -
To modify a field in a database table based record identification by primar
hi
i want to to modify a field in a database table based record identification by primary key filed and two more fields
ie customer (primary key
i want to modify record from intenal table the record existing with primary key field customer
the status field needs to be mofied as " value rolled"
the below code is happening
loop at it_record into wa_Record
wa_inv-customer (primary key) = wa_Record=custome
wa_inv-date = wa_Record-date
...so one
append wa_inv to it_invest
clear wa_inv
endloop.
if not it_invest is initial
modify TABle1 ( this table is data base table which needs to be mofified) based on the primary key field
and also date field and status field which is not primary key.
regards
aroraHi there.
Your requirement is to update a Z Database table from your internal table, right? You have several options:
LOOP AT it_invest INTO wa_inv.
UPDATE dbtable
SET date = wa_inv-date
WHERE prim_key = wa_inv-prim_key
AND any_field = wa_inv-any_field.
ENDLOOP.
or
LOOP AT it_invest INTO wa_inv.
UPDATE dbtable FROM wa_inv. "if wa_inv of same type of dbtable
ENDLOOP.
In the first example, I wrote any field because you can update dbase table, filtering for fields that don't belong to the primary key. However, remember that you will change all records that respect the key you used (so, in your case, use the primary key).
Regards.
Valter Oliveira. -
Table cntrol field to be display/Change only For each record
Hi all,
How to set a particular Field in table control either as display only or
change only for <b>each row</b> based on certain condition.I need to set this property for each record in table control not for the entire coloumn?.I know the procedure for setting up an entire coloumn in table control either as diplay or change only using <b>Loop at screen</b> statement.
Conditions:
If Material is batch managed:
itab-batch field has to be <b>Display only</b> mode.
if material is not batch managed:
itab-batch field has to be <b>change mode</b>.
<b>O/p of Table Control :</b>
Material Batch
1000 Display only
2000 Change only
8000 Change only
3500 Display only
3600 Display onlyHi Ravi,
Thanks for your reply.I have put the code as u said. It is modifying the whole coloumn insted of modifying Current row of the coloumn.
I have tried to modify the screen property using Table control attributes (TC-COLS).The following commented code is that logic.Even that also doing the same thing.Can yoy please tell me how to do it.
MODULE tc_get_lines OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'X_ZPINV-CHARG'.
IF fg_batch = ' '.
screen-input = 0.
ELSE.
screen-input = 1.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
LOOP AT tc-cols INTO tc_wa
WHERE screen-name = 'X_ZPINV-CHARG'.
IF x_zpinv-matnr IS NOT INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = x_zpinv-matnr
IMPORTING
output = v_matnr.
SELECT SINGLE * FROM marc WHERE matnr = v_matnr
AND werks = w_plant.
IF marc-xchar IS INITIAL.
tc_wa-screen-input = 0.
ELSE.
tc_wa-screen-input = 1.
ENDIF.
MODIFY tc-cols FROM tc_wa INDEX sy-tabix." transporting screen-input
ENDIF.
ENDLOOP.
ENDMODULE. "TC_GET_LINES OUTPUT -
How can I include a MySQL table and records with the PUT of my Dreamweaver site?
I am using .php to validate a user code against one of four codes that I am providing to potential clients. They enter that code, along with a default user id and the appropriate page is then displayed for them. Everything is working fine on the desktop. I need to have this table and the records created on my remote server. I tried saving the table in the Connections folder, but that didn't help. Everytime I enter a code (valid or invalid) on the live site, I get the following message: "Table 'boundsauctions_com.promocode' doesn't exist". Is there someway to include the table and records in my Dreamweaver folders for the site?
Thanks for any help that you can offer.You can't. Dreamweaver, or FTP for that matter has no connection to the MySQL database. If you have created a MySQL database locally and now wish to move/copy it to your server you'll need to create a back up of your local database and then log into your database on the server and then restore that back up.
An even easier way to do this, and if you are working with MySQL much at all a good investement is to get the commercial version of Navicat MySQL - this is the best MySQL administrator I've found to date and is well worth the few bucks to buy it. With Navicat you can connect to your local MySQL database and also create a connection to your remote database, then literally drag and drop your local database contents to copy them to your server. This function alone justifies buying Navicat. A huge time saver. And no I do not work for or have any share or ties to Navicat. I'd recommend something else if I knew of anything better, but so far I don't.
Hope this helps. If you need any more details let me know.
Lawrence Cramer - *Adobe Community Professional*
http://www.Cartweaver.com
Shopping Cart for Adobe Dreamweaver
available in PHP, ColdFusion
Stay updated - http://blog.cartweaver.com -
Can we split and fetch the records in Database Adapter
Hi,
I designed a Database Adapter to fetch the records from oracle Database. Some time, the Database Adapter need to fetch around 5000, or 10,000 records in single shot. In that case my BPEL process is choking and getting error as
java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
Could someone help me to resolve this?
In Database Adapter can we split and fetch the records, if number of records more then 1000.
ex. First 100 rec as one set and next 100 as 2nd set like this.
Thank you.You can send the records as batches useing the debatching feature of db adapter. Refer documentation for implementation details.
-
SPLIT ... AT '#' INTO ?
Hi,
I'm reading values from a CSV file using GUI_UPLOAD. The CSV file uses spaces as separators. The spaces appear in the internal table that contains the lines of the CSV file as '#'-symbols. Now I want to fill the lines from the internal table into a text record using SPLIT AT INTO. The problem is that using '#' as the separator character in SPLIT ... AT '#' INTO doesn't work. The entire line is simply filled into the first field of the text record and the remaining fields remain empty.
Any ideas how this problem can be solved?
Thanx, Oliver PlohmannHi,
while using gui_upload use HAS_FIELD_SEPARATOR = 'X'.
if you still getting '#', then you need to use
<b>split ... at CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB into...</b>
regards
vijay
But i hope if you provide HAS_FIELD_SEPARATOR = 'X' will solve your problem. -
Updated CCB records are extracted but not loaded into OBIU.
This is OBIU version 2.3.2 and CCB version 2.3.1
Records updated in CC&B are successfully added to the Change Log (CI_CHG_LOG). They are also extracted successfully by base extract program EXTACCT. However, when the data is loaded into OBIU (using OWB), the record update is not reflected into OBIU. This was tested for base object CD_ACCT.
The OWB mapping object only creates CD_ACCT records for those accounts in the Change Log with Change Type of 'I' (or Insert). The OWB mapping object does not process those with Change Type of 'U' (or Update). How does one get this Change Type to be processed ?
A new record (with a new effective date) should have been created that would have up-to-date values for its UDFs.
The update procedure was able to update the End Date and Job Number of the old record correctly. However, without the creation of a new effective record, all new fact records related to the Account record will no longer have an account related to it.
This makes the data inaccurate.
This does not just apply to CD_ACCT, but to other base tables/entities as well. No changes have been done to the DB trigger and OWB metadata of CD_ACCT. The extract program has a user-exit that populates some of the UDFs.
A custom user exit has been introduced to the extract program of CD_ACCT. DB trigger and OWB metadata have not been changed.
EXPECTED BEHAVIOR
The OWB mapping object is expected to process records with Change Type of 'U' (or Update). A new record (with a new effective date) should be created that would have up-to-date values for its UDFs.Hi,
Problem becasue of missing Industory sector setting in R/3 . This setting has to be done before filling the setuptable .For more information search the forums with BF11.
Re: 0PUR_C01
Re: Not getting data added to IC for 2LIS_12_VCITM
With rgds,
Anil Kumar Sharma .P
Message was edited by:
Anil Kumar Sharma
Maybe you are looking for
-
New iphone 5s will not connect wireless to itunes
I recently upgraded from 4s to 5s on 2 units. The 4s would sync wireless to airport but both new 5s will not. Neither my phone or my wife's phones will connect wireless but will when connected. I have checked 'Sync with this iPhone over Wi-Fi' un
-
To start from the beginning I originally kept my iTunes library on my internal hard drive. However, it was getting large and I needed to move it so I moved it to an external drive. Then I recently upgraded my internal hard drive to a 1 TB hard driv
-
Scrollable/scalable image with buttons on top of it?
Hey guys, I've had a few half-goes at doing this before but now have to do it for real in my project and I'm struggling to get something clean and I'm looking for pointers. I want to have an image (typically a schematic, or a map) which is scrollable
-
Why can't I place .psd files in Illustrator?
I will do my best to outline the situation. I am not very tech savvy and need some advice. Recently my motherboard crashed on my previous computer. I currently work for a nonprofit and but do quite a bit of graphic design. We have a tight deadline on
-
Combine PDF feature missing from right click option Acrobat Pro 9/Windows 7
I combine PDF's all day long and need this feature. I had it on my old computer and since moving over to the new computer I do not have the option to combine PDF's when right clicking on PDF documents. I have searched the forum and found other fixes,