Help in inserting data in msc_st_supplies
Hi,
I am trying to develop custom porgram to insert additional supplies into msc_st_supplies table. Customer wants th send the POs which are "In PROCESS" by end of the day before th a Plan gets executed so that it sees them as supply to avoid creation of duplicate supply.
To accomplish this, I am trying to add those POs as suuply in to msc_st_supplies before ODS Load .
I need data mapping for this table. I kind of figured all columns except the sr_mtl_supply_id column? ANy idea what value to map? Checked mtl_supply table in source instance and it is not mapping to this as well.
Any help is appreciated
Thanks
Maran
Hello Maran,
From ASPC responsibility, navigate to collection menu, and select the Self-service collection option. A window will open from which you can download AOTemplate files. These files will give you information about data that need to be loaded into staging tables, for example for Purchase orders.
Regards,
ct
Similar Messages
-
Hello Everybody
I have to insert data through excel sheets containing over 2,00,000 lakh records
I am using toad to insert data but the issue with toad is that it supports excel 97-2003 format and I have to divide the excel sheets again and again to insert the data
I can also use the pl/sql developer to insert the data but I don't know the process, plz suggest some gud ways to do that
Thanks & Regards
Peeyush SharmaHi,
Use the below script for control file:
load data
infile 'C:\Documents and Settings\abcd\Desktop\dat1.csv'
into table empz
fields terminated by "," optionally enclosed by '"'
(emp_id,emp_name,emp_sal)
{code}
there is a difference between .txt and csv loading. as we are using csv(comma seperated values)
fields terminated by : {code} fields terminated by "," optionally enclosed by '"' should be comma ( ,) . -
STUDENT HELP: SAMPLE INSERT DATA PROGRAM (DYNPRO)
Hello,
I am a current student working on a project for school, so assume I am a beginner.
I am asking for an example of a simple ABAP Dynpro (Not WebDynpro, we don't have access to that) program that will allow user to input, modify, and delete multiple records at once to a DB table.
The DB tables are set up like this:
Z_HBK
MANDT
HBK_ID
S_PLANT
R_PLANT
HBK_DATE
Z_HBK_DATA
MANDT
HBK_ID
DRIVER
CHECKER
CUSTOMER
PRODUCT
R2S_QTY
DAM_QTY
DEST_QTY
I need to be able to enter multiple records into the Z_HBK_DATA table, with the same HBK_ID. I have set the tables composite key to so the table can accept multiple HBK_ID entries:
MANDT
HBK_ID
DRIVER
CHECKER
CUSTOMER
PRODUCT
I have tried countless times to use table wizard, but have not been successful.
Please help my to create simple program that will enter multiple records at 1 time into the Z_HBK_DATA table.
Also, If anyone can help me to add a button onto the following program to allow user to email report from individual report output screen, that would be very helpful as well.
Thank you,
Mike
*& Report Z03_HBK_REPORT_ALL
REPORT Z03_HBK_REPORTS.
TYPES: BEGIN OF TY_HBK_DATA,
HBK_ID type Z03_HBK_DOC_NUM,
DRIVER type PERSNO,
CHECKER TYPE PERSNO,
CUSTOMER TYPE KUNNR,
PRODUCT TYPE MATNR,
R2S_QTY TYPE INT2,
DAM_QTY TYPE INT2,
DEST_QTY TYPE INT2,
END OF TY_HBK_DATA,
BEGIN OF TY_HBK_DATA_R2S,
HBK_ID type Z03_HBK_DOC_NUM,
DRIVER type PERSNO,
CHECKER TYPE PERSNO,
CUSTOMER TYPE KUNNR,
PRODUCT TYPE MATNR,
R2S_QTY TYPE INT2,
END OF TY_HBK_DATA_R2S,
BEGIN OF TY_HBK_DATA_DAM,
HBK_ID type Z03_HBK_DOC_NUM,
DRIVER type PERSNO,
CHECKER TYPE PERSNO,
CUSTOMER TYPE KUNNR,
PRODUCT TYPE MATNR,
DAM_QTY TYPE INT2,
END OF TY_HBK_DATA_DAM,
BEGIN OF TY_HBK_DATA_DEST,
HBK_ID type Z03_HBK_DOC_NUM,
DRIVER type PERSNO,
CHECKER TYPE PERSNO,
CUSTOMER TYPE KUNNR,
PRODUCT TYPE MATNR,
DEST_QTY TYPE INT2,
END OF TY_HBK_DATA_DEST.
DATA: IT_HBK_DATA TYPE TABLE OF TY_HBK_DATA,
WA_HBK_DATA TYPE TY_HBK_DATA,
IT_HBK_DATA_R2S TYPE TABLE OF TY_HBK_DATA_R2S,
WA_HBK_DATA_R2S TYPE TY_HBK_DATA_R2S,
IT_HBK_DATA_DAM TYPE TABLE OF TY_HBK_DATA_DAM,
WA_HBK_DATA_DAM TYPE TY_HBK_DATA_DAM,
IT_HBK_DATA_DEST TYPE TABLE OF TY_HBK_DATA_DEST,
WA_HBK_DATA_DEST TYPE TY_HBK_DATA_DEST.
SELECTION-SCREEN BEGIN OF SCREEN 100.
SELECT-OPTIONS: S_DATA FOR WA_HBK_DATA-HBK_ID.
SELECTION-SCREEN END OF SCREEN 100.
SELECTION-SCREEN BEGIN OF SCREEN 101.
SELECT-OPTIONS: S_R2S FOR WA_HBK_DATA_R2S-HBK_ID.
SELECTION-SCREEN END OF SCREEN 101.
SELECTION-SCREEN BEGIN OF SCREEN 102.
SELECT-OPTIONS: S_DAM FOR WA_HBK_DATA_DAM-HBK_ID.
SELECTION-SCREEN END OF SCREEN 102.
SELECTION-SCREEN BEGIN OF SCREEN 103.
SELECT-OPTIONS: S_DEST FOR WA_HBK_DATA_DEST-HBK_ID.
SELECTION-SCREEN END OF SCREEN 103.
PARAMETERS: HBK_DATA RADIOBUTTON GROUP ONE,
HBK_R2S RADIOBUTTON GROUP ONE,
HBK_DAM RADIOBUTTON GROUP ONE,
HBK_DEST RADIOBUTTON GROUP ONE.
IF HBK_DATA = 'X'.
CALL SELECTION-SCREEN 100 STARTING AT 10 10 ENDING AT 100 10.
PERFORM GET_HBK_DATA.
PERFORM DISP_HBK_DATA.
ELSEIF HBK_R2S = 'X'.
CALL SELECTION-SCREEN 101 STARTING AT 10 10 ENDING AT 100 10.
PERFORM GET_HBK_DATA_R2S.
PERFORM DISP_HBK_DATA_R2S.
ELSEIF HBK_DAM = 'X'.
CALL SELECTION-SCREEN 102 STARTING AT 10 10 ENDING AT 100 10.
PERFORM GET_HBK_DATA_DAM.
PERFORM DISP_HBK_DATA_DAM.
ELSEIF HBK_DEST = 'X'.
CALL SELECTION-SCREEN 103 STARTING AT 10 10 ENDING AT 100 10.
PERFORM GET_HBK_DATA_DEST.
PERFORM DISP_HBK_DATA_DEST.
ENDIF.
*& Form GET_HBK_DATA
* text
* --> p1 text
* <-- p2 text
FORM GET_HBK_DATA .
SELECT HBK_ID
DRIVER
CHECKER
CUSTOMER
PRODUCT
R2S_QTY
DAM_QTY
DEST_QTY FROM Z03_HBK_DATA INTO TABLE IT_HBK_DATA
WHERE HBK_ID IN S_DATA.
ENDFORM. " GET_HBK_DATA
*& Form DISP_HBK_DATA
* text
* --> p1 text
* <-- p2 text
FORM DISP_HBK_DATA .
LOOP AT IT_HBK_DATA INTO WA_HBK_DATA.
AT FIRST.
WRITE: /10'HAULBACK NUMBER',
30 'DRIVER ID',
50 'CHECKER ID',
70 'CUSTOMER ID',
90 'PRODUCT',
110 'R2S QTY',
130 'DAMAGED QTY',
150 ' DESTROY QTY'.
WRITE: /10 SY-ULINE.
ENDAT.
WRITE: /10 WA_hbk_data-HBK_ID,
30 WA_HBK_DATA-DRIVER,
50 WA_HBK_DATA-CHECKER,
70 WA_HBK_DATA-CUSTOMER,
90 WA_HBK_DATA-PRODUCT,
110 WA_HBK_DATA-R2S_QTY,
130 WA_HBK_DATA-dAM_QTY,
150 WA_HBK_DATA-DEST_QTY.
ENDLOOP.
ENDFORM. " DISP_HBK_DATA
*& Form GET_HBK_DATA_R2S
* text
* --> p1 text
* <-- p2 text
FORM GET_HBK_DATA_R2S .
SELECT HBK_ID
DRIVER
CHECKER
CUSTOMER
PRODUCT
R2S_QTY FROM Z03_HBK_DATA INTO TABLE IT_HBK_DATA_R2S
WHERE HBK_ID IN S_R2S.
ENDFORM. " GET_HBK_DATA_R2S
*& Form DISP_HBK_DATA_R2S
* text
* --> p1 text
* <-- p2 text
FORM DISP_HBK_DATA_R2S .
LOOP AT IT_HBK_DATA_R2S INTO WA_HBK_DATA_R2S.
AT FIRST.
WRITE: /10'HAULBACK NUMBER',
30 'DRIVER ID',
50 'CHECKER ID',
70 'CUSTOMER ID',
90 'PRODUCT',
110 'R2S QTY'.
WRITE: /10 SY-ULINE.
ENDAT.
WRITE: /10 WA_hbk_data_R2S-HBK_ID,
30 WA_HBK_DATA_R2S-DRIVER,
50 WA_HBK_DATA_R2S-CHECKER,
70 WA_HBK_DATA_R2S-CUSTOMER,
90 WA_HBK_DATA_R2S-PRODUCT,
110 WA_HBK_DATA_R2S-R2S_QTY.
ENDLOOP.
ENDFORM. " DISP_HBK_DATA_R2S
*& Form GET_HBK_DATA_DAM
* text
* --> p1 text
* <-- p2 text
FORM GET_HBK_DATA_DAM .
SELECT HBK_ID
DRIVER
CHECKER
CUSTOMER
PRODUCT
DAM_QTY FROM Z03_HBK_DATA INTO TABLE IT_HBK_DATA_DAM
WHERE HBK_ID IN S_DAM.
ENDFORM. " GET_HBK_DATA_DAM
*& Form DISP_HBK_DATA_DAM
* text
* --> p1 text
* <-- p2 text
FORM DISP_HBK_DATA_DAM .
LOOP AT IT_HBK_DATA_DAM INTO WA_HBK_DATA_DAM.
AT FIRST.
WRITE: /10'HAULBACK NUMBER',
30 'DRIVER ID',
50 'CHECKER ID',
70 'CUSTOMER ID',
90 'PRODUCT',
130 'DAMAGED QTY'.
WRITE: /10 SY-ULINE.
ENDAT.
WRITE: /10 WA_hbk_data_DAM-HBK_ID,
30 WA_HBK_DATA_DAM-DRIVER,
50 WA_HBK_DATA_DAM-CHECKER,
70 WA_HBK_DATA_DAM-CUSTOMER,
90 WA_HBK_DATA_DAM-PRODUCT,
130 WA_HBK_DATA_DAM-dAM_QTY.
ENDLOOP.
ENDFORM. " DISP_HBK_DATA_DAM
*& Form GET_HBK_DATA_DEST
* text
* --> p1 text
* <-- p2 text
FORM GET_HBK_DATA_DEST .
SELECT HBK_ID
DRIVER
CHECKER
CUSTOMER
PRODUCT
DEST_QTY FROM Z03_HBK_DATA INTO TABLE IT_HBK_DATA_DEST
WHERE HBK_ID IN S_DEST.
ENDFORM. " GET_HBK_DATA_DEST
*& Form DISP_HBK_DATA_DEST
* text
* --> p1 text
* <-- p2 text
FORM DISP_HBK_DATA_DEST .
LOOP AT IT_HBK_DATA_DEST INTO WA_HBK_DATA_DEST.
AT FIRST.
WRITE: /10'HAULBACK NUMBER',
30 'DRIVER ID',
50 'CHECKER ID',
70 'CUSTOMER ID',
90 'PRODUCT',
150 ' DESTROY QTY'.
WRITE: /10 SY-ULINE.
ENDAT.
WRITE: /10 WA_hbk_data_DEST-HBK_ID,
30 WA_HBK_DATA_DEST-DRIVER,
50 WA_HBK_DATA_DEST-CHECKER,
70 WA_HBK_DATA_DEST-CUSTOMER,
90 WA_HBK_DATA_DEST-PRODUCT,
150 WA_HBK_DATA_DEST-DEST_QTY.
ENDLOOP.
ENDFORM. " DISP_HBK_DATA_DEST
Thank you,
MikeMichael, you can adopt your needs using different technologies. If you tried it using a table-control (with wizard), that is something, I do not recommend. Try searching for "editable ALV grid", which will show your editable data that you can always just take from your internal table and pass it to the INSERT / UPDATE / MODIFY statement. You will find it much easier to use during your progress.
If you have more specific questions, go ahead and ask. But do not expect people will give you the whole code once you do not have the idea (that is the place where it comes to the learning part of it). -
Help! Inserting data into database
Hi,
I have problem in inserting new data into database.
This is my code used.
PROCEDURE insert_contact IS
BEGIN
GO_BLOCK('BLOCK3');
first_record;
LOOP
insert into LIMS_JOB_LEVEL
(JOB_LEVEL_CODE,JOB_LEVEL_DESC,LAST_UPD_ID,LAST_UPD_DATE)
values
('FAF','FDSAFS','FDSAF','1-1-01');
EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
next_record;
END LOOP;
END;
And I cannot insert the data.Can anyone help me to solve this
problem of mine.
Thanks a lot.I belive this got to do with the date format. There is another
posting about this after your posting and there are couple of
good solutions in there for the date formating. Please refer. -
Help for "insert data to variable tables"
hi, guys.
I want to make a tool to upload mass-data then insert the data to tables of SAP for integrative test.
for example, to input the object tablename "AAAA" from screen, the program willl find the information of this table then input the data to the "AAAA" tables.
But i have no idea how to define the internal table to suit various tables ( by define dynamic table? or any other ways) ,could you kindly give me some advice?
thanks a lot in advance.
Message was edited by:
huijuan zhaohi zhao,
welcome to sdn,
for your requirement u can use bdc to upload file to internal table then u can update these internal table fileds to sap tables.
or
use <b>gui_upload</b> function module to upload data to internal table then u can use just <b>insert</b> keyword to update sap tables.
see this sample code to update the database table <b>edpar</b>,
report zsd_edpar_update no standard page heading.
*&Purpose:
*& program will be used to update EDAPR table on a daily basis.
*& This update will be based on Customer Sold To / Ship To partner
*& functions assignment. Ship To customer(s) will be linked to
*& the appropriate Sold To customer using the ?Acct at Cust?
*& number as a reference. Then, Ship To customer(s) will be
*& set up withthe appropriate partner function with the Sold
*& To customer.it updated the DB tabel and gives the information
*& of customer level visibility t account receivable.
*define database tables...
tables: edpar,
knvv,
knvp.
*define types...
types: begin of t_tab_edpar,
mandt type mandt,
kunnr type kunnr,
parvw type parvw,
expnr type edi_expnr,
inpnr type edi_inpnr.
types: end of t_tab_edpar.
types: begin of t_tab_knvv,
kunnr type kunnr,
vkorg type vkorg,
vtweg type vtweg,
spart type spart,
eikto type eikto.
types: end of t_tab_knvv.
types: begin of t_tab_knvp,
kunnr type kunnr,
vkorg type vkorg,
vtweg type vtweg,
spart type spart,
parvw type parvw,
kunn2 type kunn2.
types: end of t_tab_knvp.
type-pools: slis.
*define data statments...
data: g_tab_edpar type standard table of t_tab_edpar,
g_wa_edpar like line of g_tab_edpar.
data: g_tab_edpar1 type standard table of t_tab_edpar,
g_wa_edpar1 like line of g_tab_edpar1.
data: g_tab_edpar2 type standard table of t_tab_edpar,
g_wa_edpar2 like line of g_tab_edpar2.
data: g_tab_knvv type standard table of t_tab_knvv,
g_wa_knvv like line of g_tab_knvv.
data: g_tab_knvp type standard table of t_tab_knvp,
g_wa_knvp like line of g_tab_knvp.
data: repid like sy-repid,
l_tab_fieldcat type slis_t_fieldcat_alv,
l_tab_fieldcat1 type slis_t_fieldcat_alv,
l_tab_fieldcat2 type slis_t_fieldcat_alv,
layout type slis_layout_alv,
events type slis_t_event,
events1 type slis_t_event,
wa_events like line of events,
l_pos type i.
*selection screen...
selection-screen begin of block b1 with frame title text-001.
select-options: s_cust for knvv-kunnr obligatory,
s_sorg for knvv-vkorg,
s_dcha for knvv-vtweg,
s_divi for knvv-spart,
s_parf for knvp-parvw.
selection-screen end of block b1.
*start-of-selection...
perform get_data.
*to update the db table edpar...
perform update_edpar.
*display alv block...
perform alv_block.
*& Form get_data
text
--> p1 text
<-- p2 text
form get_data .
select kunnr
vkorg
vtweg
spart
parvw
kunn2
from knvp
into table g_tab_knvp
where
kunnr in s_cust
and
vkorg in s_sorg
and
vtweg in s_dcha
and
spart in s_divi
and
parvw in s_parf.
loop at g_tab_knvp into g_wa_knvp.
move: g_wa_knvp-kunnr to g_wa_edpar-kunnr,
g_wa_knvp-kunn2 to g_wa_edpar-inpnr,
g_wa_knvp-parvw to g_wa_edpar-parvw.
append g_wa_edpar to g_tab_edpar.
endloop.
if not g_tab_knvp[] is initial.
select kunnr
vkorg
vtweg
spart
eikto
from knvv
into table g_tab_knvv
for all entries in g_tab_knvp
where
kunnr eq g_tab_knvp-kunnr
and
vkorg eq g_tab_knvp-vkorg
and
vtweg eq g_tab_knvp-vtweg
and
spart eq g_tab_knvp-spart.
loop at g_tab_knvp into g_wa_knvp .
sort g_tab_knvv by kunnr.
clear g_wa_knvv-eikto.
read table g_tab_knvv into g_wa_knvv with key kunnr = g_wa_knvp-kunnr.
if sy-subrc eq 0.
move: g_wa_knvv-eikto to g_wa_edpar-expnr.
modify g_tab_edpar from g_wa_edpar transporting expnr where kunnr eq g_wa_knvp-kunnr.
endif.
endloop.
endif.
sort g_tab_edpar by kunnr.
delete adjacent duplicates from g_tab_edpar comparing kunnr parvw.
endform. " get_data
*& Form update_edpar
text
--> p1 text
<-- p2 text
form update_edpar .
delete from edpar." FROM TABLE g_tab_delete.
call function 'DB_COMMIT'.
loop at g_tab_edpar into g_wa_edpar.
insert into edpar values g_wa_edpar.
if sy-subrc eq 0.
move-corresponding g_wa_edpar to g_wa_edpar1.
append g_wa_edpar1 to g_tab_edpar1.
else.
move-corresponding g_wa_edpar to g_wa_edpar2.
append g_wa_edpar2 to g_tab_edpar2.
endif.
endloop.
reward points if helpful,
regards,
seshu. -
Help with inserting Date into MySQL DB from registration form input
I'm trying to automatically input the registration date of a customer into my MySQL DB. Nothing seems to work. I've tried timestamp in a table field, I've tried a hidden field in the form. Any suggestions?
You can use NOW() in the insertion record code, it will display like a time stamp format (date + time). Otherwise u can use this if u just want to store the date, $today = date("j F Y "); . It will display like 21 May 2009. Further information about date() function you can get it HERE.
-
Helping in insert date as quarters
Hello world ,
i did this in transaction date and put in validation
IF TO_CHAR(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY')not in ('31/03/2010','30/06/2010','30/09/2010','31/12/2010','31/12/2009','30/09/2009') THEN
message('Invalid Date');
message('Invalid Date');
RAISE FORM_TRIGGER_FAILURE;
END IF;
here i have to define the date with the year .
i want not to define the year , i just want the user inert in quarter of a year in any year
for example
30/09/2007
30/09/2000
31/12/2002
which i dont need to define it in the codeSimply leave thema out of your TO_CHAR, like
IF TO_CHAR(:BLK1.EO_TRNX_DATE,'DD/MM')not in ('31/03','30/06','30/09','31/12') THEN
message('Invalid Date');
message('Invalid Date');
RAISE FORM_TRIGGER_FAILURE;
END IF; -
Help in inserting data to text item
I have a database item, iterval, which is CHAR type and values consist of
'SYSDATE+7','SYSDATE+1','SYSDATE+n/24'...where n is any number. I created a form with two text items, interval_l, which is a list item of CHAR type containing the values, EVERY WEEK, EVERY DAY, EVERY HOUR,etc. and I also have interval_num of NUM type which would contain n from interval. The problem that I am having is that I want to display the current value of interval, for example 'SYSDATE+5/24' as 'EVERY HOUR' in interval_l and '5' in interval_num. Do I need any triggers? I'm open to any suggestions.
Thanks in advance,
KristineYou use triggers to run when a specific event occurs. So I guess when you query your interval column from your DB table, then the right place to translate the value is in a post-query trigger on the block.
All you need is some pl/sql code to parse the values of Interval:
If substr(Interval,1,8) = 'SYSDATE+'
and substr(Interval,-3) = '/24' then
interval_l := 'EVERY HOUR';
interval_num := substr(Interval,9, length(Interval)-11 );
Else ... -
Inserting data in field of Supervisor Area Field
HI,
In my R/3 system ... In table of PA0001 (HR Master Record: Infotype 0001 (Org. Assignment)) Supervisor Area (MSTBR) field,
There is no data for Supervisor Area in table of PA0001.
How to insert into data for Supervisor Area (MSTBR).
I need to insert data into Supervisor Area .
plz help for inserting data for Supervisor Area .
Edited by: Srikanth Naidu on Feb 28, 2008 3:59 PMHi Srikant,
As the help describes that MSTBR is only meant for USA and canada, even than also if you want to maintaint that field than while hiring only you can mention the supervisors perner in that field or you can do so after hiring also through PA30.
Once you will maintain here table PA0001 will automatically get updated and then you can see that in SE11.
Regards,
Bhupesh -
Help with ORA 14400 error while inserting data
Hi all,
i am facing an ora 14400 error in the following scenario , please help.
i have created a table using the syntax:
CREATE TABLE temp_table
GRPKEY NUMBER(20, 0) NOT NULL,
UKEY NUMBER(10, 0),
ANUM VARCHAR2(250 BYTE),
APC VARCHAR2(2 BYTE),
SID VARCHAR2(65 BYTE),
RDATETIME VARCHAR2(19 BYTE),
CKEY NUMBER(20, 0),
AVER VARCHAR2(25 BYTE),
CVER VARCHAR2(250 BYTE),
TNAME VARCHAR2(50 BYTE),
SCODE VARCHAR2(30 BYTE),
PTYPE VARCHAR2(50 BYTE),
FILENUMB NUMBER(10, 0),
LINENUMB NUMBER(10, 0),
ENTRY_CREATEDDATE DATE
, CONSTRAINT temp_table_PK PRIMARY KEY (GRPKEY))
PARTITION BY RANGE(ENTRY_CREATEDDATE)
(PARTITION P0 VALUES LESS THAN(TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
when i try to insert data using :
insert into temp_table values
(1,null,null,null,null,null,null,null,null,null,null,null,null,null,'01-NOV-2010');
i get the following error output:
Error report:
SQL Error: ORA-14400: inserted partition key does not map to any partition
14400. 00000 - "inserted partition key does not map to any partition"
*Cause: An attempt was made to insert a record into, a Range or Composite
Range object, with a concatenated partition key that is beyond
the concatenated partition bound list of the last partition -OR-
An attempt was made to insert a record into a List object with
a partition key that did not match the literal values specified
for any of the partitions.
*Action: Do not insert the key. Or, add a partition capable of accepting
the key, Or add values matching the key to a partition specificationHi Chaitanya,
Change your table script to
CREATE TABLE temp_table
GRPKEY NUMBER(20, 0) NOT NULL,
UKEY NUMBER(10, 0),
ANUM VARCHAR2(250 BYTE),
APC VARCHAR2(2 BYTE),
SID VARCHAR2(65 BYTE),
RDATETIME VARCHAR2(19 BYTE),
CKEY NUMBER(20, 0),
AVER VARCHAR2(25 BYTE),
CVER VARCHAR2(250 BYTE),
TNAME VARCHAR2(50 BYTE),
SCODE VARCHAR2(30 BYTE),
PTYPE VARCHAR2(50 BYTE),
FILENUMB NUMBER(10, 0),
LINENUMB NUMBER(10, 0),
ENTRY_CREATEDDATE DATE
, CONSTRAINT temp_table_PK PRIMARY KEY (GRPKEY))
PARTITION BY RANGE(ENTRY_CREATEDDATE)
(PARTITION P0 VALUES LESS THAN(TO_DATE(' 2009-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')),
PARTITION P1 VALUES LESS THAN(MAXVALUE)
insert into temp_table values
(1,null,null,null,null,null,null,null,null,null,null,null,null,null,'01-NOV-2010');
1 row insertedor refer question regarding "Date Partitioning a table"
*009*
Edited by: 009 on Nov 3, 2010 11:29 PM -
RFC scenario for inserting data in SAP, help me experts
hi...
i have to insert data in SAP database using BAPI_PR_CREATE.
which adapter i hv to use for RFC(sender/receiver)(syn/Asyn).
this sceanrio is File1-RFC-File2.
file1 sends the data to RFC to insert data and file2 should hv to send the autogeneration keyID for PR
Its very urgent...
please help me..
thx in advance
johnhi ...
i did that..
but..iam gting only 1 msg in monitering...
evrythn is fine,,,,my scenario shows in MONI black flag...but gting only one msg and the data which i sent to SAP is not storing in SAP..and when i search in SM58 in XI server...i cnt see any messages...
can u explain me Y..?
thx for response..
john -
Help please !! Need to insert date automatically in form
I have been trying unsuccessfully for a week to automatically
capture today's date on a form. I can display a date on screen but
it will not insert date into mySQL db. All other information is
inserted as expected.
Am I just whistling in dark? Is there no way to eliminate
user input for the order date field?
I have looked throughout the forums and no luck.
Anyone have any ideas about how to do?
Thanks,
Dale :-)You can use a timestamp function within your MySQL table, but
remember you can only use the timestamp function ONCE in a table.
Using the timestamp Function:
Set the field type to TIMESTAMP. You can also set the default
to CURRENT_TIMESTAMP and the attributes to ON UPDATE
CURRENT_TIMESTAMP if you want the timestamp to change when the
record is updated.
If you want to record times more than the one time you are
using the timestamp and you are using PHP/MySQL or PHP/MySQL ADODB
(InterAKT's PhAKT Extension), then try this:
http://chuckomalley.net/help/insert_date_help.php
That gets the time into the MySQL Database. Next thing you'll
want to do is to have it display the time the way you want it. The
default will display it as yyyy-mm-dd hh:mm:ss and you may not want
it that way. To display it the way you want it try this:
http://chuckomalley.net/help/display_formatted_date.php
For the specific syntax on using this, refer to the online
MySQL Manual and search for DATE_FORMAT() at
http://dev.mysql.com/doc/mysql/en/index.html
Cheers
Chuck -
Help: Problem Inserting CLOB-data with ODBC
Hello,
I have searched this forum for my problem and found only one similar message, unfortunately without reply. I hope there are some wizards present here today who can help me.
I use Perl and the ODBC driver for 8i (v8.1.5., WinNT) to insert and query data from a tabel with a CLOB. Queries go fine (although you have to increase the buffer size within Perl, but I have a problem to insert values into CLOBS.
I get the message ORA-1704 shown below. Oracle/ODBC seems to think that i want to insert into a VARCHAR2(4000) instead of
a CLOB.
I have included my Perl test-script as well.
Any suggestions are very welcome,
Bart
Error-message:
ORA-01704 string literal too long
Cause: The string literal is longer than 4000 characters.
Action: Use a string literal of at most 4000 characters. Longer values
may only be entered using bind variables.
PERL test-script:
#!perl
# USAGE
# perl clobtest size [bufsize]
# Creates a string of approximately size*1000 bytes, consisting of a line with 'A',
# followed by lines of at most 100 'o's, followed by a line with 'Z'.
# bufsize is optional, if given, specifies the size of the ODBC buffer.
# Default value is 10240
# The string is loaded into a table field, then read from that field, and saved in
# a file. The entire table is deleted on beforehand! so that there is only one
# record in that table. If there are errors, error number and text are displayed on
# the console.
# See the globals below for username, password, host, table end column.
use strict;
use FileHandle;
use Win32::ODBC;
# GLOBALS
# DATABASE
my $ADMIN ='xpa';
my $PWD ='manager';
my $DBMC ='PO8i';
my $table = 'TEST';
my $column = 'OMSCHRIJVING';
my $amount = $ARGV[0];
my $newbufsize = $ARGV[1];
my $bulk;
sub connect_db {
if (!$newbufsize) {
$newbufsize = 10240;
print "Connecting as... $ADMIN to $DBMC\n";
my $dbh = new Win32::ODBC("dsn=$DBMC;UID=$ADMIN;PWD=$PWD");
if (!$dbh) {
print "Hm\n";
die qq(Cannot open ODBC\n);
$dbh->SetMaxBufSize($newbufsize);
my $bufsize = $dbh->GetMaxBufSize();
print "Bufsize = $bufsize\n";
return $dbh;
sub createbulk {
$bulk = "A";
my $bytes = 1000 * $amount;
my $i;
for ($i=0; $i<$bytes-4; $i++) {
if ($i % 100 == 0) {
$bulk .= "\n";
else {
$bulk .= "o";
$bulk .= "\nZ\n";
my $dbh = connect_db();
createbulk();
print "Deleting $table\n";
$dbh->Sql("delete from $table");
print "Inserting into $table -> $column\n";
my $fail = $dbh->Sql("insert into $table ($column) VALUES (\'$bulk\')");
if ($fail) {
print "$dbh->{ErrNum}: $dbh->{ErrText}\n";
exit;
print "Querying from $table -> $column\n";
$fail = $dbh->Sql("select OMSCHRIJVING from TEST");
if ($fail) {
print "$dbh->{ErrNum}: $dbh->{ErrText}\n";
exit;
my @result = ();
while (defined $dbh->FetchRow()) {
my $result = $dbh->Data();
push @result, $result;
print "Writing query result to file \"cltst$amount\"\n";
open TST, ">cltst$amount";
for my $line (@result) {
print TST $line;
close TST;Hi,
We can't directly insert into a column
which is a clob datatype.To insert data into
the CLOB datatype column we have to write
some PL/SQL progam using the package DBMS_LOB
in oracle.
Read Oracle documentation for more information on DBMS_LOB package.
Hope this will help u.
NEDU.
null -
Hi i am student doing a project for my school and i trying to insert data
i am inserting triples with jena adapter into my Oracle Database from a .nt file. 4 tables are being created FAMILY_NS, FAMILY_TPL, RDFB_FAMILY and RDFC_FAMILY. my data are in N-Triple format.i want to know why i can't view my data through sql-developer in my database.do i store those data or not?
here is the code i use to insert data into my database
import java.io.*;
import com.hp.hpl.jena.query.*;
import com.hp.hpl.jena.graph.*;
import com.hp.hpl.jena.rdf.model.*;
import com.hp.hpl.jena.util.*;
import oracle.spatial.rdf.client.jena.*;
public class Bulk {
public static void main(String[] args) throws Exception
String szJdbcURL = "jdbc:oracle:thin:@192.168.2.3:1521:orcl";
String szUser = "kostas";
String szPasswd = "welcome";
String szModelName = "Family";
Oracle oracle = new Oracle(szJdbcURL, szUser, szPasswd);
GraphOracleSem graph = new GraphOracleSem(oracle, szModelName);
PrintStream psOut = System.out;
String dirname = "C:\\users\\CoCo\\Desktop\\file";
File fileDir = new File(dirname);
String[] szAllFiles = fileDir.list();
// loop through all the files in a directory
for (int idx = 0; idx < szAllFiles.length; idx++) {
String szIndFileName = dirname + File.separator + szAllFiles[idx];
psOut.println("process to [ID = " + idx + " ] file " + szIndFileName);
psOut.flush();
try {
// Model model = FileManager.get().loadModel("C:\\users\\CoCo\\Desktop\\file\\example.nt");
InputStream is = new FileInputStream(szIndFileName);
graph.getBulkUpdateHandler().prepareBulk(
is, // input stream
"http://www.recshop.fake/cd", // base URI
"N-TRIPLE", // data file type: can be RDF/XML, N-TRIPLE, etc.
null, // tablespace
null, // flags
null, // listener
null // staging table name.
is.close();
catch (Throwable t) {
psOut.println("Hit exception " + t.getMessage());
Edited by: CoCo on Oct 18, 2011 6:14 AM
Edited by: CoCo on Oct 18, 2011 6:15 AMYou haven't run completeBulk yet.
Please search for completeBulk in the following document.
http://download.oracle.com/docs/cd/E16338_01/appdev.112/e11828/sem_jena.htm
Thanks,
Zhe Wu -
Query for inserting data into table and incrementing the PK.. pls help
I have one table dd_prohibited_country. prohibit_country_key is the primary key column.
I have to insert data into dd_prohibited_country based on records already present.
The scenario I should follow is:
For Level_id 'EA' and prohibited_level_id 'EA' I should retreive the
max(prohibit_country_key) and starting from the maximum number again I have to insert them
into dd_prohibited_country. While inserting I have to increment the prohibit_country_key and
shall replace the values of level_id and prohibited_level_id.
(If 'EA' occurs, I have to replace with 'EUR')
For Instance,
If there are 15 records in dd_prohibited_country with Level_id 'EA' and prohibited_level_id 'EA', then
I have to insert these 15 records starting with prohibit_country_key 16 (Afetr 15 I should start inserting with number 16)
I have written the following query for this:
insert into dd_prohibited_country
select
a.pkey,
b.levelid,
b.ieflag,
b.plevelid
from
(select
max(prohibit_country_key) pkey
from
dd_prohibited_country) a,
(select
prohibit_country_key pkey,
replace(level_id,'EA','EUR') levelid,
level_id_flg as ieflag,
replace(prohibited_level_id,'EA','EUR') plevelid
from
dd_prohibited_country
where
level_id = 'EA' or prohibited_level_id = 'EA') b
My problem here is, I am always getting a.pkey as 15, because I am not incrementing it.
I tried incrementing it also, but I am unable to acheive it.
Can anyone please hepl me in writing this query.
Thanks in advance
Regards
RaghuBecause you are not incrementing your pkey. Try like this.
insert
into dd_prohibited_country
select a.pkey+b.pkey,
b.levelid,
b.ieflag,
b.plevelid
from (select max(prohibit_country_key) pkey
from dd_prohibited_country) a,
(select row_number() over (order by prohibit_country_key) pkey,
replace(level_id,'EA','EUR') levelid,
level_id_flg as ieflag,
replace(prohibited_level_id,'EA','EUR') plevelid
from dd_prohibited_country
where level_id = 'EA' or prohibited_level_id = 'EA') bNote: If you are in multiple user environment you can get into trouble for incrementing your PKey like this.
Maybe you are looking for
-
How to use one query results in another query
hi, in help.sap I have founded that using variable type replacement path I can use one query results in another query. It is wrote there that I have to choose query name results I want to get in variable definition but I do not know where. How I can
-
How can I edit an outlook email prior to the form being distributed?
I have recently upgraded from Acrobat X Pro 9 to version 10.1.3 and am now unable to use the below feature. Before, when distributing a pdf form, I would use the 'desktop email application' option, and when I clicked 'submit' on the form, it would go
-
Set Not to Sleep, But it Does Anyway
Although I have my system set to " Never" sleep it still does and I don't want it to. When I go to bed at night I leave my system running, when I wake up it's sleeping and my AirPort is off. Any clues why? BTW, display is set to sleep after 20 min. T
-
I have a ipod classic and after having it in my pocket there's a tih black line in the middle of the screen.It looks like a etch a sketch
-
Effect of Planning Plant in Tasklist
Dear All, I having one query related to Tasklist in PM There are two Plants X and Y Earlier tasklist created for Planning plant as X at header level. Now Planning plant X has been closed , Instead of that need to use Planning plant Y. There is no iss