How to specify a constant value in external tables??
Create table cp_portfolio_ext
rec_type varchar2(1),
acct_nbr varchar2(23),
acct_title varchar2(50),
prod_type_cd varchar2(5),
acct_desc varchar2(35),
country_code varchar2(2),
acct_ref_ccy_cd varchar2(3),
nom_accr_int_amt number(20,4),
ineligible_cash number(20,4),
pldg_amt number(20,4),
posn_as_of_dt date,
moody_rating varchar2(5),
sp_rating varchar2(4),
mat_dt date,
anl_pct_rt number(20,6),
acct_pp_cd varchar2(10),
filler varchar2(229),
process_status char(1)
Organization External
type oracle_loader
default directory TEST_DIR
access parameters
records delimited by newline
fields
REC_TYPE POSITION(1:1),
ACCT_NBR POSITION(2:24),
ACCT_TITLE POSITION(25:74),
PROD_TYPE_CD POSITION(75:79),
ACCT_DESC POSITION(80:114),
COUNTRY_CODE POSITION(115:116),
ACCT_REF_CCY_CD POSITION(117:119),
NOM_ACCR_INT_AMT POSITION(120:139),
INELIGIBLE_CASH POSITION(140:159),
PLDG_AMT POSITION(160:179),
POSN_AS_OF_DT POSITION(180:187) DATE "DDMMYYYY" NULLIF POSN_AS_OF_DT ='00000000',
MOODY_RATING POSITION(188:192),
SP_RATING POSITION(193:196),
MAT_DT POSITION(197:204) DATE "DDMMYYYY" NULLIF MAT_DT = '00000000',
ANL_PCT_RT POSITION(205:215),
ACCT_PP_CD POSITION(216:225),
FILLER POSITION(226:454),
process_status
location('ODS_CP_DAILY_EXTRACT.DAT')
)reject limit unlimited;I wont recieve process_status from feed file ,but I would like to have a default value 'N' to be provided.How to achieve this??I tried using defaultif but it doesnt work him.
I know it can be donw using CONSTANT keywork using sqlloader.But how about in external tables.??
Edited by: 792353 on Sep 30, 2010 9:21 PM
I think it should helpful to you
http://jiri.wordpress.com/2010/03/29/oracle-external-tables-by-examples-part-4-column_transforms-clause-load-clob-blob-or-any-constant-using-external-tables/
kanish
Similar Messages
-
How to Assign a Constant Value to a Dim. Member when pulling Master Data?
BPC Gurus:
I am trying load Vendor and Customer Master data into BPC dimension. My Dimesnion has memebrs: ID, EVDESCRIPTION, PARENTH1, TYPE. I have successfully pulled the ID and the description from 0CUSTOMER and 0VENDOR. However, I
need to have a ttext value for 'PARENTH1' and 'TYPE'. For Customers, I want to add a FIXED value "'CUSTOMER' for every
Customer ID pulled in and also for "TYPE", I want a value of "CUSTOMER". When I maintainthe Dimension, I want to see
th followingvalues:
ID EVDESCRIPTION PARENTH1 TYPE
0000000001 WALMART CUSTOMER CUSTOMER
0000000002 TARGET CUSTOMER CUSTOMER
and so ON
Since we have Vendor Numbers in the same Diemsnion, when I pull Vendors, I need to have similar values as:
ID EVDESCRIPTION PARENTH1 TYPE
0000005050 ABC Supply Inc. VENDOR VENDOR
0000005051 BASF VENDOR VEDOR
and so ON
How can assign a Fixed value to the member Propert? Can I achieve it in Conversion file....?
( My atempts failed...).
Any suggestion recommendation would be gretaly appreciated.
Munna.Hi,
For adding fixed values to the properties, you can use the transformation file. In the mapping section, you can specify a constant value. This value will be written to properties of all the members while importing master data. However, for parenth, its a bit different. First thing is that, you need to have a member called CUSTOMER, then only you can have CUSTOMER in the parenth column. Even if you add it and use the mapping section for this purpose, then it will write CUSTOMER to parenth for all the members (even to CUSTOMER member). And this will be wrong. So, you will need to write it manually.
Hope you got the idea. -
How can i pass calculated value to internal table
Hi
i have to pass calculated value into internal table
below field are coming from database view and i' m passing view data into iznew1
fields of iznew1
LIFNR LIKE EKKO-LIFNR,
EBELN LIKE EKKO-EBELN,
VGABE LIKE EKBE-VGABE,
EBELP LIKE EKBE-EBELP,
BELNR LIKE EKBE-BELNR,
MATNR LIKE EKPO-MATNR,
TXZ01 LIKE EKPO-TXZ01,
PS_PSP_PNR LIKE EKKN-PS_PSP_PNR,
KOSTL LIKE EKKN-KOSTL,
NAME1 LIKE LFA1-NAME1,
NAME2 LIKE LFA1-NAME2,
WERKS LIKE EKPO-WERKS,
NETWR LIKE EKPO-NETWR,
KNUMV LIKE EKKO-KNUMV,
GJAHR LIKE EKBE-GJAHR,
and now i want to pass
one field ED1 which i has calculated separatly and i want to pass this value into iznew1
but error is coming that iznew1 is a table with out header line has no component like ED1.
so how can i pass calculated value to internal table iznew1,When you declare your internal table , make an addtion occurs 0
eg . data : begin of iznew occurs 0 ,
fields ...
add the field here ed1.
end of iznew.
now when you are calculating the value of ed1,
you can pass the corresponding value of ed1 and modify table iznew.
eg
loop at iznew.
iznew-ed1 = ed1.
modify iznew.
endloop. -
How to assign select-option values to internal table
hi all,
how to assign select-option values to internal table
thanks in advance.Hi,
You just need to loop at your select-option field and take the values from low and high fields.
for. e.g
loop at s_werks .
move:s_werks-low to <your itab>
if not s_werks-high is initial .
move: s_werks-high to <youritab>
endif .
append <your itab>
endloop .
OR use select statement.
regards,
Omkar.
Message was edited by:
Omkaram Yanamala
Message was edited by:
Omkaram Yanamala -
How to add a running value from external field in a repeating table of SharePoint list
I'me creating an infopath form that will display a SharePoint list. I want to add a link control in a repeating table using the value of the first column per row but I'm getting an issue. the link control displays only the first row. thanks in advance.
Hi,
I found a similar thread posted by you here:
http://social.technet.microsoft.com/Forums/en-US/e1fa36c1-cb5c-456d-ba40-2f26301913d2/how-to-loop-through-each-row-in-a-repeating-table-using-sharepoint-workflows?forum=sharepointgeneralprevious
I suppose both the threads are reuqesting the method to get values from repeating table via workflow, so we can focus on the issue on the other case. If there is more requestment here, let me know.
Regards,
Rebecca Tu
TechNet Community Support -
How to get custom field value in vbkd table using "SD_SALESDOCUMENT_CREATE" bapi
Hi Experts,
Need your help . In one program Iam using SD_SALESDOCUMENT_CREATE bapi .
i/p for my report is am excel.
excel is having below formatt.
To create salesdoc we are using SD_SALESDOC_CREATE bapi.
but After execution of the program we are unable to find the ZZFV_SBCNT (which is custom field) in VBKD w.r.t salesdocument.
Need your help what we need to do to reflect the value in vbkd table.
Here temp will contains the data from excel
1)
FORM f_move_header_data .
wg_header-doc_type = wg_temp-auart . "Order type
wg_header-sales_org = wg_temp-vkorg . "Sales Organization
wg_header-distr_chan = wg_temp-vtweg . "Distribution Channel
wg_header-division = wg_temp-spart. "Division
wg_header-sales_off = wg_temp-vkbur . "Sales Office
wg_header-sales_grp = wg_temp-vkgrp . "Sales Group
wg_header-purch_no_c = wg_temp-bstnk . "Customer purchase order number
wg_header-pymt_meth = wg_temp-zlsch . "Payment Method
wg_header-zzychan_role = wg_temp-zzychan_role_i. "Channel Role
wg_header-zzysub_role = wg_temp-zzysub_role . "Submitter Role
wg_header-zzy_inv_for_opt = wg_temp-zzinv_format . "Invoice Format Optio
wg_header-ord_reason = wg_temp-augru . "Order Reason Code
wg_header-bill_block = wg_temp-faksp. "Billing Block
wg_headerx-doc_type = c_set . "Order type
wg_headerx-sales_org = c_set . "Sales Organization
wg_headerx-distr_chan = c_set . "Distribution Channel
wg_headerx-division = c_set. "Division
wg_headerx-sales_off = c_set . "Sales Office
wg_headerx-sales_grp = c_set . "Sales Group
wg_headerx-purch_no_c = c_set . "Customer purchase order number
wg_headerx-pymt_meth = c_set . "Payment Method
wg_headerx-zzychan_role = c_set. "Channel Role
wg_headerx-zzysub_role = c_set . "Submitter Role
wg_headerx-zzy_inv_for_opt = c_set . "Invoice Format Option
wg_headerx-ord_reason = c_set . "Order Reason Code
wg_headerx-bill_block = c_set. "Billing Block
ENDFORM. " F_MOVE_HEADER_DATA
2)
FORM f_move_item_data .
wg_item-itm_number = g_itmnumber. "Item number
wg_item-material = wg_process-matnr . "Material
wg_item-target_qty = wg_process-target_qty. "Targeted Qty
wg_item-item_categ = wg_process-pstyv. "Sales document item category
wg_item-zzylegal_i = wg_process-zzlegal. "Legal Contract
**********Added this line for vbkd-ZZFV_SBCNT****************************
wg_item-zzfv_sbcnt = wg_process-zzfv_sbcnt.
APPEND wg_item TO i_item.
wg_itemx-material = c_set . "Material
wg_itemx-target_qty = c_set. "Targeted Qty
wg_itemx-item_categ = c_set. "Sales document item category
wg_itemx-zzylegal_i = c_set. "Legal Contract
wg_itemx-zzsteady_date = c_set . "Amortization Start Date
wg_itemx-zzsteady_end_dat = c_set. "Amortization Stop Date
**********Added this line for vbkd-ZZFV_SBCNT****************************
wg_itemx-ZZFV_SBCNt = c_set. "
APPEND wg_itemx TO i_itemx.
CLEAR : wg_itemx.
endform.
3)
FORM f_move_head_ext
wg_extension-structure = c_ext_vbak.
wg_ext_vbak-zzinv_format = wg_temp-zzinv_format.
wg_ext_vbak-zzychan_role = wg_temp-zzychan_role_i.
wg_ext_vbak-zzysub_role = wg_temp-zzysub_role.
wg_extension+30 = wg_ext_vbak.
APPEND wg_extension to i_extension.
CLEAR wg_extension.
wg_extensionx-structure = c_ext_vbakx.
wg_ext_vbakx-zzinv_format = c_set.
wg_ext_vbakx-zzlegal = c_set.
wg_ext_vbakx-zzychan_role = c_set.
wg_ext_vbakx-zzysub_role = c_set.
wg_extensionx+30 = wg_ext_vbakx.
APPEND wg_extensionx TO i_extensionx.
CLEAR wg_extensionx.
ENDFORM. " F_MOVE_HEAD_EXT
*& Form F_MOVE_ITEM_EXT
* Item Extension
4)
FORM f_move_item_ext .
* Structure for BAPI parameter Extension
wg_extension-structure = c_ext_vbap.
wg_ext_vbap-posnr = g_itmnumber.
wg_ext_vbap-zzsteady_date = wg_process-zzsteady_date . "Amortization Start Date
wg_ext_vbap-zzsteady_end_dat = wg_process-zzsteady_end_dat. "Amortization Stop Date
wg_ext_vbap-zzlegal = wg_process-zzlegal. "Legal Contract
wg_extension+30 = wg_ext_vbap.
APPEND wg_extension to i_extension.
* Structure for BAPI parameter Extension - Update Indicator Fields
wg_extensionx-structure = c_ext_vbapx.
wg_ext_vbapx-posnr = g_itmnumber.
wg_ext_vbapx-zzsteady_date = c_set .
wg_ext_vbapx-zzsteady_end_dat = c_set.
* wg_ext_vbapx-zzlegal = c_set.
*wg_process-zzfv_sbcnt = c_set.
wg_extensionx+30 = wg_ext_vbapx.
APPEND wg_extensionx TO i_extensionx.
CLEAR wg_extensionx.
and bapi calling is like below.
CALL FUNCTION 'SD_SALESDOCUMENT_CREATE'
EXPORTING
sales_header_in = wg_header
sales_header_inx = wg_headerx
logic_switch = wg_logic_switch
business_object = fp_bus_obj
status_buffer_refresh = 'X'
IMPORTING
salesdocument_ex = g_sorder
TABLES
return = i_return
sales_items_in = i_item
sales_items_inx = i_itemx
sales_partners = i_partner
sales_conditions_in = i_cond
sales_conditions_inx = i_condx
sales_text = i_text
extensionin = i_extension
extensionex = i_extensionx.
still we are not getting ZZFV_SBCNT value in VBKD table w.r.t created salesdoc(g_sorder)
Please help me from this issue.
Thank You..Hi,
Please let me know how to add custom fields in the characteristic list, My clients wants department and profit center grouping.
Please tell me how to solve it..
Thanks & Regards,
Reena.. -
Report query not returning the field value from external table
hi
I have an issue regarding reports. I have a query having 4 fields from external table and remaining from db tables. the report query returns all the fields from the db tables and only 2 fields from external table. but the same query if I tried in plsql developer it returns all the fields values.
Can anyone please help me in this issue.
Thanks and Regards
kkDuplicate post?
value not displaying in report whereas it returns in plsql developer
value not displaying in report whereas it returns in plsql developer
Please log a SR if you do not get any reply to your thread instead of creating new one.
Thanks,
Hussein -
How to transform data while populating an external table
Hi Folks,
I have to populate the first four fields of my external table from the data in a csv file. While the last field should have the "SYSDATE". My code to create an external table (and to populate the first four fields) is as follows
create table T_XT
(PNODE VARCHAR2(10),
NODE VARCHAR2(15),
SUB_NODE VARCHAR2(12),
NODE_COUNT NUMBER,
CREATE_DATE DATE
organization external
(type oracle_loader
default DIRECTORY topology
access parameters
(records delimited by NEWLINE
characterset US7ASCII
badfile 'TOPOLOGY':'Modem_Count.bad'
discardfile 'TOPOLOGY':'Modem_Count.dis'
logfile 'TOPOLOGY':'Modem_Count.log'
fields terminated by ','
optionally enclosed by "'"
location ('Modem_Count.csv')
reject limit unlimited parallel;
Can somebody please let me know where this data transformation (for the last field) should be specified ? And the syntax to do so.
Thanks in advance
rogers42Hi,
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6790030213850#59876418675556
You'd rather just:
select pnode,
node,
sub_node,
node_count,
sysdate
from t_xt; -
How to insert filename as column in external table.
I have an external table that is made up by number of different files. I would like to add a new column in the table to store the actual external filename. How can this be done?
thanks in advancedThat's going to be a problem, then. The ISO 8859-1 character set doesn't support that character, so you cannot store a ™ in a CHAR or VARCHAR2 column in your database.
Potentially, you could use an NCHAR or NVARCHAR2 column, depending on your national character set. Using the national character set, though, can cause other problems, particularly for front-end applications that may not fully support those data types.
You could also potentially change your existing character set to something that does support that character, but that may be a rather involved sort of change.
Justin -
How to capture the row value in Advanced Table on OAF ?
Hi:
I was wondering, if anyone has any idea as to how to capture a row value on an advanced table on a OAF Page.
I am currently trying to capture the Expense Report Number ( first column) on the Track Expenses Reports table on the page /oracle/apps/ap/oie/webui/HomePG.
Any idea would be helpful ?
Thank YouHi,
856070 wrote:
This is what I am looking for :
Default Functionality
On the expenses home page there is a table for the Submitted expenses Table ( advanced table) with multiple Expense Number rows , which has a link associated with every expense number. When the user clicks the expense number link , EBS takes you to a more detail information page. ---As per default functionality :::whene ever user clicks on link it will takes u to details info page based expense no right.
---Check the property of the Destination URL of the ExpensionNumber column.
---In this property u can find the page path and paramam ex:pexpencenumber.
Customized functionality
I would like to capture the Expense number on the detailed page to call another application based on the expense number. The expense number on the
detailed page is not available on the request-parameter or on the VO.
I was thinking of capturing the ExpenseNumber when the user clicks it and save the expense number on a >transientvalue to retrieve it on the detaile dpage..but unable to do so.---Here get the paramereter pexpencenumber and pass it to another appilcation.
Regards
Meher Irk -
How to implement row level security using external tables
Hi All Gurus/ Masters,
I want to implement row level security using external tables, as I'm not sure how to implement that. and I'm aware of using it by RPD level authentication.
I can use a filter condition in my user level so that he can access his data only.
But when i have 4 tables in external tables
users
groups
usergroups
webgrups
Then in which table I need to give the filter conditions..
Pl let me know this ...You pull the Group into a repository variable using a session variable init block, then reference that variable in the data filters either in the LTS directly or in the security management as Filters. You reference it with the syntax VALUEOF("NQ_SESSION.Variable Name")
Hope this helps -
How could I assigning object values to internal table?
CREATE DATA dref TYPE TABLE OF (table).
ASSIGN dref->* TO <intab>.
SELECT * FROM (table) INTO CORRESPONDING FIELDS OF TABLE <intab>.
I have create a internal table intab1.
obviously, the expressing "intab1 = <intab> " is wrong.
then,how should intab1 get the value of <intab>?Hi
If you need only to transfer all data: <b>INTAB1[] = <INTAB>[]</b>. But INTAB1 has to be as <INTAB>.
If the structure of INTAB1 is different, you have to use the field-symbols:
LOOP AT <INTAB> ASSIGNING <WA>.
ASSIGN COMPONENT SY-INDEX OF STRUCTRE <WA> TO <VAL_F>.
IF SY-SUBRC <> 0. EXIT. ENDIF.
ASSIGN COMPONENT SY-INDEX OF STRUCTRE INTAB1 TO <VAL_T>.
IF SY-SUBRC <> 0. EXIT. ENDIF.
<VAL_T> = <VAL_F>.
ENDLOOP.
So how to transfer the data depends on the structures of INTAB1 and <INTAB>.
Max -
How to derive logic from values in a table
Hi,
I am using collection to retrieve multiple records being returned by a business rule.
I am inserting all the returned values into a table
T_ELIGIBLE (owner varchar2(10), eligible varchar2(1), qty number(10));
then, I was wondering how I do this:
if all the records (owners) in T_ELIGIBLE have value for eligible = 'Y' then, final output to be 'Y'.
Thanks,Hi,
Thanks for your response.
By output - I meant as a parameter. What I am trying to do is to - some how loop through all the values for each owner and some up with AND logic.
If owner1's eligibility = 'Y'
and if owner2's eligibility = 'Y' then p_eligible = 'Y'
else 'N'
I would also like to know how to capture this while looping through the code.
Here is the basic structure of my code. Thank you,
create or replace procedure pp1
p_item_no IN varchar2,
p_project_no IN varchar2,
p_entity IN varchar2,
p_baan_id IN varchar2,
p_eligible IN OUT varchar2,
p_qty IN OUT number)
is
cursor the_owner_code is
select t.item_type, t.dtt_limited_flag, dtt_owner_code
from wm_item t
where item_no in (select component_item_no
from wm_kit_bom t
where kit_item_no = p_item_no
and end_date is null)
and project_no = p_project_no
and entity = p_entity;
type owners_t is table of wm_item.dtt_owner_code%type
index by binary_integer;
v_owner_names owners_t; -- to capture owner names
type limited_flag is table of wm_item.dtt_limited_flag%type;
v_limited_flag limited_flag := null; -- to capture limited flag
type item_type is table of wm_item.item_type%type;
v_item_type item_type := null; -- to item type
begin
execute immediate('truncate table t_limit');
execute immediate('truncate table t_eligible');
open the_owner_code;
fetch the_owner_code bulk collect into v_item_type, v_limited_flag, v_owner_names;
for indx in v_owner_names.first .. v_owner_names.last
loop
select a.ownl_max_limit, a.ownl_unit into l_ownl_max_limit, l_ownl_unit
from dtt_owner_ranking a, dtt_agency_ranking b
where b.agr_owner_code = a.ownl_owner_code
and b.agr_ranking_code = a.ownl_ranking_code
and b.agr_baan_id = p_baan_id
and b.agr_owner_code = v_owner_names(indx);
insert into t_limit values(l_ownl_unit, l_ownl_max_limit);
insert into t_eligible values (v_owner_names(indx), 'Y',l_remaining_qty); commit;
end loop;
close the_owner_code;
end; -
How to pass line item values in the table paramer of FM
Hi all,
When i will give the import of the FM as VBELN"sales order number.
I want to display all the line items for "PO Quantity in the out put of the FM.
For this i thnk i have to pass the line item values in the table parameter of the FM.
Can any body please tell me how to pass the values for the line items in the table parameter fo teh FM.
Please give a example.
ThanksSub pLoopThroughPivotFields()
Dim oItem As Excel.PivotItem
Dim oField As Excel.PivotField
Set oField = ThisWorkbook.Worksheets("Sheet1").PivotTables("Pivot Table name").PivotFields("field name")
For Each oItem In oField.PivotItems
oField.CurrentPage = oItem.Name
'Put your copy code here
DoEvents
Next oItem
End Sub
Felipe Costa Gualberto - http://www.ambienteoffice.com.br -
How to insert comma delimited values into a table
I have a variable holding values like,
'A,Ba,Ccc' OR
'1,2,3,4'
I want to know how to convert and insert these values in oracle table as seperate rows like,
A
Ba
Ccc[ OR ]
1
2
3
4
Thanks,
PrevinAnswered (I guess) in this dbms_utility.comma_to_table.
Cheers, the ever helpful APC
Maybe you are looking for
-
Trnasfer My music from my mini to my nano
I have a mini but I get A nano and new computer as well so I instal the Nano sofwer in the computer, but now I like to see how I can put all the music that I have in the mini in to the nano library? Can some one help?
-
10g export error on windows client
Hi Friends I tried to run 10g windows client exp (export database backup) on my 10g database residing on IBM AIX 5L...but i got the following error: EXP-00056: ORACLE error 6550 encountered ORA-06550: line 1, column 41: PLS-00302: component 'SET_NO_O
-
Upgrade grdi infrastructure 11.2.0.1
Hello gurus. I have Grid Infrastructure version 11.2.0.1 with ASM running on linux vm and 3 stand alone databases version 11.2.0.1. I need to know if it's possible to upgrade both Grid Infrastructure and databases to version 11.2.0.3. I researched an
-
Cannot install Photoshop CS3 - Installer just dissappeared
I have an issue installing Photoshop CS3 as follow: I have removed all Photoshop CS3 Beta manually (Use control panel, deleted files and registries) as instructed in this web and get rid of all thing involved Adobe out of my computer. When I clicked
-
The Apple web site page for the Airport Express mentions using the unit to create a wireless network in a hotel room. It mentions that the Airport Express can have up to 5 profiles stored for different locations, using "it's setup software". However,