How to copy flatfile data
i want the code of how flatfile data is put in tables
For that U need to use the sqlldr utility...
First create a control file
and then use sqlldr to transfer data from flat file to database table.
control file looks like:
load data
infile "D:\emp.txt"
append into table emp
fields terminated by "," optionally enclosed by '"' Trailing nullcols
EMPNO,
ENAME,
JOB,
MGR,
HIREDATE date "MM/DD/YYYY",
SAL,
COMM,
DEPTNO
and at command promt use:
sqlldr scott/tiger control=loader.ctl
Similar Messages
-
How to copy actual data into current forecast period
Hi gurus.
I need your guidance on how to copy actual data into current forecast period.
This is my case. Let's say I have the following figures for my actuals:
January 2007 Actual = $110,000.
February 2007 Actual = $120,000.
March 2007 Actual = $80,000.
April 2007 Actual = $100,000.
Now, my user want to choose any month as the basis for her forecast for the remaining periods. Let's say, she wanted to choose April 2007 Actual as the basis for the remaining forecast periods, so I should be able to display the following figures in my planning folder:
May 2007 Forecast = $100,000.
June 2007 Forecast = $100,000.
July 2007 Forecast = $100,000.
August 2007 Forecast = $100,000.
September 2007 Forecast = $100,000.
October 2007 Forecast = $100,000.
November 2007 Forecast = $100,000.
December 2007 Forecast = $100,000.
Can someone guide me on how to do that?
Points will be given to good and best answers.
Thanks.Hi Fulham,
Technical answer:
First, you need to allow your user to indicate wich month is the reference for the copy. I suggest you to add a new key figure in your actual layout (a 'customizing' layout) that your user will use as a flag:
January 2007 Actual = $110,000
January 2007 Flag = 0
February 2007 Actual = $120,000
February 2007 Flag = 0
March 2007 Actual = $80,000
March 2007 Flag = 0
April 2007 Actual = $100,000
April 2007 <b>Flag = 1</b>
<i>(Help to a fox or an abap exit you can check that only one month is 'flagged')</i>
Then, in the corresponding level for the data input, you use a function exit in Abap, which will:
- read the previous customizing layout help to API_SEMBPS_GETDATA so you can get the flagged month and its actual amount ($100,000)
- generate the news rows into the table XTH_DATA which will be automatically posted in the level with the actual amount
Is that clear?
Regards, -
How to copy table data from onde DB to another DB using clipboard
HI,
i copied table data from one DB to another DB, but it displays an error as "policy with check option violation" when inserting the table data.. so how to resolve the proble.. thanks in advance.DECLARE
log_utl_dir VARCHAR2(100) :=('/apps/home/cmsftp/log/gaa');
CURSOR tb_compy_cur is
select tb.compy_acronym
-- QC 158113 - added below
,tb.ivr_plan_num
from tb_fc_compy tb,tb_xop_entitlements te
where tb.grant_award_accept_flag = 'Y'
and tb.ivr_plan_num = te.ivr_plan_num
and te.entitle_name = 'GAA_RECONCILED'
union all
select compy_acronym
-- QC 158113 - added below
,tb.ivr_plan_num
from tb_fc_compy tb
where tb.res_stock_flag = 'Y'
--and (tb.res_auto_lapse_flag = 2 OR
--tb.res_auto_lapse_flag = 3)
and exists (select entitle_name from tb_xop_entitlements te
where tb.ivr_plan_num = te.ivr_plan_num
and te.entitle_name = 'GAA_RES_FLAG'
and te.optionee = 'Y'
and te.psrep = 'Y'
and te.sponsor = 'Y'
and te.advisor = 'Y');
v_xopgrantz_insertcount NUMBER := 0;
-- QC 158113 - added below
v_xopgrantz_accpt_count NUMBER := 0;
v_user_id VARCHAR2(30);
insert_file_id UTL_FILE.FILE_TYPE;
insert_log_file varchar2(45) := 'xop_grantz_insertstats.log';
BEGIN
DBMS_OUTPUT.PUT_LINE('success1');
insert_file_id := UTL_FILE.fopen(log_utl_dir,insert_log_file,'w');
UTL_FILE.put_line(insert_file_id,'Starting the Process at '|| CURRENT_TIMESTAMP);
UTL_FILE.put_line(insert_file_id,'INSERTING ROWS FOR Companies turned on for GAA_RECONCILE and GAA/RESSTOCK');
for compy_rec in tb_compy_cur loop
v_user_id := 'CMS'||compy_rec.compy_acronym||'_USER';
ctx_set_session.set_user_session(v_user_id);
dbms_output.put_line ('success2'||''|| v_user_id);
INSERT into xop_grantz(grant_num,
user_id,
last_user_id,
restrict_grant,
child_symbol,
parent_grant_flag,
bulking_overide_flag,
exerrestrict_code,
rounding_method,
exercisiable_dt,
def_res_units_flag,
opt_gain_def_elig_flag,
opt_gain_deferred_flag,
opt_gain_deferred_dt,
opts_accepted,
lst_updtby_usercd,
accepted_type,
GAA_eligible,
GAA_LST_UPDTBY)
select g.grant_num,
v_user_id,
'GRNTACCPT',
'N',
'N',
(sel ect code
from tb_xop_exerrestrict_codes
where cash_allowed = 'Y'
and cashlesshold_allowed = 'Y'
and cashlesssell_allowed = 'Y'
and stockswap_allowed = 'Y'
and restricted_allowed = 'Y'
and sar_allowed = 'Y'
and cashmargin_allowed = 'Y'
and cashpartial_allowed = 'Y'
and sarsale_allowed = 'Y'),
NULL,
'N',
'N',
'N',
NULL,
NULL,
NULL,
'N',
NULL,
NULL
from grantz g
where not exists(select 1
from xop_grantz xg
where xg.grant_num = g.grant_num);
v_xopgrantz_insertcount := SQL%ROWCOUNT;
dbms_output.put_line ('1');
-- QC158113 - Optimisation fix--starts
DELETE FROM gt_xop_grant_accpt_type;
INSERT INTO gt_xop_grant_accpt_type
SELECT g.grant_num,e.ivr_plan_num,
pk_xop_grntaccpt.fn_get_accpt_type (v_user_id,
g.plan_num,
g.grant_dt,
g.opt_num,
g.grant_cd,
g.plan_type,
'Y'
FROM grantz g,tb_xop_entitlements e
WHERE plan_type IN (2, 4, 5, 7, 8)
and g.user_id = v_user_id
and e.ivr_plan_num = compy_rec.ivr_plan_num
and entitle_name = 'GAA_RES_FLAG' ;
dbms_output.put_line ('success3');
v_xopgrantz_accpt_count := SQL%ROWCOUNT;
UTL_FILE.put_line(insert_file_id,'Inserted count in gt_xop_grant_acceptance '|| v_user_id||v_xopgrantz_accpt_count);
-- QC158113 - Optimisation fix--ends
COMMIT;
UTL_FILE.put_line(insert_file_id,'Inserted count in XOP_GRANTZ for USER_ID '|| v_user_id||v_xopgrantz_insertcount);
ctx_set_session.set_user_session('');
dbms_output.put_line ('process completed');
end loop;
UTL_FILE.fclose(insert_file_id);
EXCEPTION
when others then
rollback;
dbms_output.put_line ('Code '||SQLCODE||':'||SQLERRM||' at '||v_user_id||' .pr_xopgrantz_insert');
pr_xop_log_errors('Code '||SQLCODE||':'||SQLERRM||' at '||v_user_id||' .pr_xopgrantz_insert');
pr_xop_log_errors('Code '||SQLCODE||':'||SQLERRM||'INSERTING into xop_grantz for ALL grants');
END;
i received this error when running the procedure also, so the table gt_xop_grant_accpt_type is not populated
{Code -28115:ORA-28115: policy with check option violation at CMSFB_USER .pr_xopgrantz_insert} -
How to copy game data from one device to another
I downloaded Injustice: Gods Among Us onto an iPhone 5 and I wanted to have all of my save data copied onto the iPhone 5. The same iCloud account is used on both devices and I recently backed up my iPhone 4. I want to know how to copy (if there is a way) my game data onto the iPhone 5. Is there a way I can just copy the game data and nothing else to the iPhone 5?
There is no way to just copy the game data. Game data is saved as part of the backup, and the only way to transfer it is to restore the new phone from a backup of the old phone. Just remember, anything that you have done on the new phone since the backup of the old phone will be deleted.
-
SFC label not readable how to copy the data to new SFC in panel product
We have one SFC label that is not readable. We know the serial number but how to re-label the product with new SFC and copy the data from the previous one?
Problem is that the SFC is for panel product with three locations and all locations have assembly and NC data.
Any ideas?I would suggest to test using the SFC Reassignment activity or Re-label activities.
-
How to Copy customizing data from one company code to another company code
Hi
Big Boss opened a new company, we need to implement SAP system for this new company. this new company has same business with our one old company. so, we may almost use old the company customizing data for this new company. anybody can tell me how to copy the customizing data.
Regads
HenryHi, Paraschand G
Thank your very good solution as BC Sets. I had general knowledge on Rollout and BC Sets now.
How ever, I have a problem on creating my first BC Sets. Should I creat a BC Sets as my template via copy existing customizing data? I seen some existing BC Sets which arenot I want. We implemented big5 modules for some company codes. I want to copy one of them as my BC Sets template. I won't create it manually because I worried about I will miss some data if I select these data one by one. I cannot find out a Full-BC Sets template contains all customizing data. Could you please give me some guide. I cannot ensure my understanding of BC Sets. Please correct it if I have wrong idea.
Regards
Henry -
How to copy the data in a cube to another cube
Hi ,I created one cube by copying.Now I want the data available in earlier cube to Copied Cube.Plz can any one help in this.
Thanx in Advacnce
VasuYou can use the export datasource option to copy the data.
Another option is:
The steps for copying the contents of one cube to another:
1. Go to Manage -> Recontruct of the new cube.
2. Select the "selection button"(red , yellow, blue diamond button).
3.In the selection screen you can give the technical name of the old cube, requests ids you want to load, from & to date.
4.Execute and the new cube would be loaded.
Its all that easy!!!!!!
Refer this link:
Copying the structure of an Infocube -
How to copy the Data From Oracle Table To SAP Table
Hi Friends,
We need to copy the data from Oracle Database Table to SAP Table. The data should be updated simultaneously in both tables . Should I write a program that contains the native sql statement like EXEC SQL PERFORMING WRITE,....
I appreciate any suggestions regarding this.
Regards
CSM ReddyHi,
since you posted this question in the DB2 forum I assume that you are using a DB2 database for your SAP system.
To access a table from a legacy ORACLE database you may use the DBSL multiconnect feature. I.e. you open a secondary connecction in the SAP system to your ORALE database. You can then ready the data from the ORACLE database into an ABAP internal table and insert it afterwards into the DB2 table on the main connection.
Another way to access an ORACLE table from a DB2 database is to use the DB2 federated database feature. This requires a little bit more DB2 skill. With this feature you can make the ORACLE table visible within the DB2 database. To copy data you can then simply use a "INSERT ... SELECT" statement.
Regards
Frank -
How to copy the data from one database to another database without DB link
Good Day,
I want to copy the data from one database to another database with out DB link but the structure is same in both.
Thanks
NiharYou could use SQL*Plus' COPY command
http://technology.amis.nl/blog/432/little-gold-nugget-sqlplus-copy-command
http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/apb.htm#sthref3702
Edited by: Alex Nuijten on Sep 16, 2009 8:13 AM -
How to copy the data of one node to another of the same context
hi experts,
i need to copy the data of one node to the other node of the same context.
the source node is a model node ( i.e comming from <b>RFC</b> ) and the destination node is a value node which i have creted.
what i have done is.
i have read the source node using wizard
do.
elem_t_p0591 = node_t_p0591->get_element(
index = sy-index ).
IF ( elem_t_p0591 IS INITIAL ).
EXIT.
ENDIF.
elem_t_p0591->get_static_attributes(
IMPORTING
static_attributes = stru_t_p0591 ).
IF stru_t_p0591 IS NOT INITIAL.
wa_p0591 = stru_t_p0591.
APPEND wa_p0591 TO itab_p0591.
ENDIF.
ENDDO.
and then i am trying to read the destination node so the tha data i have got by above method can be binded to the destination node.
but when i am trying to get the child node it is giving me a dump saying that
<b>'Access via 'NULL' object reference not possible' </b> i understand this because when i debug my value node is becoming <b>initial</b>, and when i am trying to access the destination node using this <b>initial</b> node it will give me a dump,
but what is the work aroud for this.
Plz help.
Regards,
Santosh.Hi Santosh,
I tried replicating your behaviour in my system. This is what my context structure looks like:
Node_Test (c-> 0:n)
Name(attribute)
Node_Test2 (c-> 0:1)
Name2(attribute)
Now when i try to access Node_Test2 then it returns me (initial) i.e. no reference and i believe the reason is that my parent node, Node_Test, is of type table( because of the cardinality) so I am expected to perform an operation on my sub node, Node_Test2, based on the node i have selected, or have specified via index .. 1 is taken by default, in Node_Test.. which in WDDOINIT is initial as i havent got access to my view yet.. so instead what you can do is bind data to your parent node, relevant data ofcourse, and then bind the recieved data to your child node i.e. Node3.
I am pasting the code here for your reference :
method WDDOINIT .
DATA:
node_test TYPE REF TO if_wd_context_node,
elem_test TYPE REF TO if_wd_context_element,
stru_test TYPE wd_this->element_test ,
lt_table LIKE TABLE OF stru_test,
item_test_1 LIKE stru_test-test_1.
navigate from <CONTEXT> to <TEST> via lead selection
node_test = wd_context->get_child_node( name = wd_this->wdctx_test ).
@TODO handle not set lead selection
IF ( node_test IS INITIAL ).
ENDIF.
get element via lead selection
elem_test = node_test->get_element( ).
@TODO handle not set lead selection
IF ( elem_test IS INITIAL ).
ENDIF.
stru_test-test_1 = 'Anoop'.
APPEND stru_test to lt_table.
stru_test-test_1 = 'Avi'.
APPEND stru_test to lt_table.
stru_test-test_1 = 'Sid'.
APPEND stru_test to lt_table.
CALL METHOD node_test->bind_table
EXPORTING
new_items = lt_table
set_initial_elements = ABAP_TRUE
index =
DATA:
node_t2 TYPE REF TO if_wd_context_node,
elem_t2 TYPE REF TO if_wd_context_element,
stru_t2 TYPE wd_this->element_t2 ,
item_t2_1 LIKE stru_t2-t2_1.
navigate from <CONTEXT> to <TEST> via lead selection
node_test = wd_context->get_child_node( name = wd_this->wdctx_test ).
@TODO handle not set lead selection
IF ( node_test IS INITIAL ).
ENDIF.
<b>* navigate from <TEST> to <T2> via lead selection
node_t2 = node_test->get_child_node( name = wd_this->wdctx_t2 ).</b>
<b>* alternative navigation via index
Node_T2 = Node_Test->get_Child_Node(
Name = `T2` Index = 1 ).</b>
@TODO handle non existant child
if ( Node_T2 is initial ).
endif.
get element via lead selection
elem_t2 = node_t2->get_element( ).
get single attribute
elem_t2->get_attribute(
EXPORTING
name = `T2_1`
IMPORTING
value = item_t2_1 ).
endmethod.
I hope this helps.
Regards,
Anoop -
How to copy the Data from BW 3.X to BI 7.0?
Hi,
Once the objects have been migrated to the BI 7.0 System from BW 3.x, How the data will be copied to the BI 7.0 System from BW 3.x?
Thanks,
Veerendra.You can't copy data from one version to another version after Upgrade.
What is your system/landscape scenarios? Did you upgrade 3x to BI 7 on same system or different system?
If same system - data is there after upgrade also. Just migrate and test.
If different system and you did not do a system copy, you need to load data again.
Talk to your basis guy and aks how tghey upgraded.
Hope it helps.. -
How to copy EXIF data for a single photo?
Hello,
I post photographs to a few different photo forums for community comment and critique. Including the basic technical data for each photograph is common and having to type it in manually is tedious. Is there a quick and easy way to copy or extract basic EXIF data (exposure, focal length, EV, ISO, exposure program, metering, make, model, lens) for a single photo to the clipboard? The information is all over LR I just can't determine how to get it out quickly.
Thanks for your help!
Best,
EricI don't see anyone provided you with an answer.
The hard way is to export the metadata to the file and use an external program. There are many programs that manipulate metadata. I haven't wanted to export it in the way you describe.
What operating system are you on? -
How to copy automation data between projects?
I can copy regions from one project to another, but not automation data (e.g. volume curves). Why? How to work around this?
Cheers,
ConorIn project one, open the Automation Event List for the region in question, select all, goto project two, do the same but use paste instead.
Slightly awkward perhaps, but it works. It would have been easier if the automation would just follow the regions when you drag them between projects.
Edit: the Automation Event List is only available as a KC, Ctrl + Cmd + E as default.
/juhani
Message was edited by: juhani h. -
How to copy my data as an extra user on another machine while on the road?
Hi,
Am going on the road for a while, but do not want to bring my valuable MacBook Pro. So I copied my home-directory to the old iBook of my mother as an extra user and I copied her stuff to mine, using SilverKeeper from LaCie, the same software I use to make back-ups with.
But apparently it is not that simple. I can login as the other user on the respective computers and all the data is there, but the system does not know that the data is actually linked to the respective users. I get errors that I don't have the priviliges to access that data.
I need to do something extra to tell the machine that that new user I created is the same as the one who owns the data, but what? Something scary in NetInfo Manager? Could you hold my hand by pointing me to or writing me some instructions?
Surprisingly, no issues similar to mine in the first 100 postings I saw in this forum...
It goes without saying that in a few weeks I want to synchronise the machines again and all should work as before.
Thank you very much in advance!
MacBook Pro Mac OS X (10.4.10) 2.16 GHz, 2 GB, 120GB
MacBook Pro Mac OS X (10.4.10) 2.16 GHz, 2 GB, 120GBFrom an administrator account, open the Terminal in the /Applications/Utilities/ folder and run the following:
sudo chown -R username
where username is the short name of the account you created. Next, drag the home folder into the Terminal window, press Enter, and provide your password; nothing will appear in the Terminal window while the password is being typed. Before pressing Enter, ensure that there are no extraneous characters on the line.
(23049) -
How to Copy Personal data from ESS to Reference Personel Numbers
When users with multiple personel numbers (employees with multiple contracts) change bank data address data or personal data in ESS, the data is not copied to the reference personel numbers. Whilst, if the data is changed in R/3 al data is copied properly to the reference pers. numbers.
Is there a switch or a customizing setting to enable this for ESS?
joost
Edited by: J. Weemhoff on Jul 17, 2008 2:01 PMWhen users with multiple personel numbers (employees with multiple contracts) change bank data address data or personal data in ESS, the data is not copied to the reference personel numbers. Whilst, if the data is changed in R/3 al data is copied properly to the reference pers. numbers.
Is there a switch or a customizing setting to enable this for ESS?
joost
Edited by: J. Weemhoff on Jul 17, 2008 2:01 PM
Maybe you are looking for
-
Every Time I Open iMovie It Freezes
The other day, I imported an event into iMovie '11. During the optimizing phase, the loading bar froze and the spinning rainbow wheel appeared. I waited for a couple of minutes to see if the problem would fix itself but it didn't so I decided to forc
-
IMAC 2009 THUNDERBOLT Pegasus R6 EXTERNAL MONITOR
I have an imac late 2009 and i would like to know if it is possible to connect a thunderbolt cable from the mini display port to a promise pegasus R6 which is then connected to an external monitor ? Thank you
-
Selection criteria and application on selection criteria
Hi all, a)Deletion indicator in pur : Existing report takes values of either blank or x values on input screen for field Deletion indicator in purchase. If x is chosen, report will show PO item details for only deleted items. If blank(no valu
-
Please could anybody tell me whether it is possible to create a User Defined Field on the Country file OCRY via the menu option 'Manage User Fields'? I cannot find it in the available options.
-
My photo stream-need to sync across all devices, that's the purpose right?
We have iPhone 5Cs, an iPad, and a computer that runs windows 7. We used to be able to use the My Photo Stream across devices just fine. When I took a picture on my iPhone it would automatically sync to My Photo Stream on my computer. When we took