How to upload 15 lakhs of record onto ztable with performance
I have 15 to 20 lakhs of records in my internal table. I'm uploading it onto ztable in se11.
While doing so, it's taking lot of time.
I'm writing the following query:
MODIFY ZTABLE FROM TABLE ITAB(INTERNAL TABLE NAME).
Please let me know if there is any other alternative which gives better performance.
Moderator message - Moved to the correct forum
Edited by: Rob Burbank on Feb 2, 2010 11:59 AM
Hi Rob,
just trace a
MODIFY ZTABLE FROM TABLE ITAB
with ST05 and you will see what the DBI / DB does with this statement.
If i remember right you are on DB6. Given current releases it migth be possible
that a MERGE (which can handle arrays) will be used instead of UPDATE / INSERT on
a row by row basis.
On most platforms the modify from table is done row by row like this:
UPDATE dbtab_row.
IF sy-subrc NE 0.
INSERT dbtab_row.
IF sy-subrc NE 0.
UPDATE dbtab_row.
ENDIF.
ENDIF.
if the rows exist you will only see updates.
if the rows don't exist you will see updates (no record) followed by an insert (1 record).
In rare cases you might see update (no record), insert (no record, somebody else inserted this record after the first update), update (1 record).
Kind regards,
Hermann
Similar Messages
-
How to upload data from flat to ztables with in the same client by idocs
Hi Experts,
I have a requirement in IDOCS, I need to create a custom IDOC .I am working on IDES 4.6c. The reqirement is , there are ztables with header and item data. say for example Authors and Books. I need to upload data from flat file which is available in presentation server of the same client, which will updated in ztables by using idocs. For this i need to do ale settings also. The client is 800. There is no other client available. With in the same client i need to do the above stuff.
For this requirement how to approach (step by step) to accomplish.
Thanks in Advance.
Regards
J.S.VarmaHi,
This is the procedure.
create segments using we31. <b>don't forget to relaese it</b>
create idoc using above segments using we30 <b>don't forget to relaese it</b>
create message type using we81
create function module to upload data using se37
maintain process code using we42
create partner profiles we20.
In the fm module itself write the code for downloading the data from presentation server by GUI_DOWNLOAD.
Then update the database tables directly by insrt through other internal table in the same client itself.
Thanks
Manju -
How to upload normal excell file to ztable
Hi All there,
Can anybody tell me how to upload normal excell file to ztable directly.
pl provide detail coding
Regards
SagarHi Sagar,
first upload the excel data into your internal table using a FM than upload the data to your ZTABLE using BDC.
parameters:
p_file type rlgrap-filename " File name
data:
lw_file type string. " File Path
data:
t_bdcdata type
standard table
of bdcdata,
fs_bdcdata type bdcdata. " Work area for bdcdata
* Messages of call transaction
data:
t_messtab type
standard table
of bdcmsgcoll,
fs_messtab type bdcmsgcoll. " Work area for messtab
at selection-screen on value-request for p_file.
call function 'F4_FILENAME'
exporting
program_name = syst-cprog
dynpro_number = syst-dynnr
field_name = ' '
importing
file_name = p_file.
lw_file = p_file.
call function 'GUI_UPLOAD'
exporting
filename = lw_file
filetype = 'ASC'
has_field_separator = 'X'
dat_mode = 'X'
tables
data_tab = t_final_data
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
others = 17.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif. " IF SY-SUBRC <> 0
if t_final_data is initial.
message 'File not found'(003) type 'E'.
endif. " IF T_FINAL_DATA IS INITIAL
end-of-selection.
perform upload_0585_data_using_bdc. " populate the bdcdata table using tcode SHDB
call transaction 'PA30' using t_bdcdata
mode 'A'
messages into t_messtab.
form upload_0585_data_using_bdc.
loop at t_final_data into fs_final_data.
perform bdc_field using 'Q0585-ACNTR(07)'
w_curr.
perform bdc_field using 'Q0585-ACOPC'
lw_flag.
perform bdc_field using 'BDC_OKCODE'
'=UPD'.
perform bdc_dynpro using 'MP058500' '2000'.
perform bdc_field using 'BDC_OKCODE'
'/EBCK'.
perform bdc_dynpro using 'SAPMP50A' '1000'.
endloop.
* Start new screen *
form bdc_dynpro using program dynpro.
clear fs_bdcdata.
fs_bdcdata-program = program.
fs_bdcdata-dynpro = dynpro.
fs_bdcdata-dynbegin = 'X'.
append fs_bdcdata to t_bdcdata.
endform. " Form bdc_dynpro using program...
* Insert field *
form bdc_field using fnam fval.
clear fs_bdcdata.
fs_bdcdata-fnam = fnam.
fs_bdcdata-fval = fval.
append fs_bdcdata to t_bdcdata.
endform. " Form bdc_field using fnam fval
With luck,
Pritam. -
How to delete the all records in Ztable from report program
Hi Guys,
Good Day!
How to delete all records in Ztable from report program(Means I want to clean Ztable records from report program) . Please send me the code.
Thanks & Regards,
ReddyUse this.
DELETE { {FROM target [WHERE sql_cond]}
| {target FROM source} }.
*But before deleting the rows please check if this Ztable is being used in any other programs or used by others.
Check "where-used-list"
in se11 give the table name
utilities- where-used list.
I hope this helps.
thanks. -
How to fetch all the records from ztable
Hi
My program is outbound program.
According to the requirement i have to fetch all the records from ztable which are not tranmitted before to the third party and once the records are extracted and written to output file they will be marked as 'X' in the "status" field of that ztable for the next days run.
How to fetch the records.Please suggest me.
Thanks,
NeelimaHI,
Fetch all the records whose status is equal to 'X' as whatever data is sent to third party system is marked as 'X' in status field of table after sending.
You need to first fetch the data into internal table using the select statement where status EQ space. You get the data which is not yet transmitted to third part. And later in the program after trasmitting the data to third party modify the Records in the DB table which are transmitted with Staus eq 'X'. -
How to upload a photo editor onto a website?
I am building a website freepicedit.com on godaddy website builder and I want to upload a photo editor onto the site in JavaScript or PHP? Do you have any products that I can do that with ? Photoshop ?
This is a user to user forum. Adobe hardly ever visits the forum, but is known to from time to time. Photoshop can not be upload to a website server, not does it produce any code needed to edit an image.
Verify with GoDaddy, that you can upload php, not all services provide that permission.
Its best to use php for server side scripts and javascript for browser side scripts.
That said, there are site that provide free apps in both langauges. Be wary of using them, some create free apps just to gain access to your account. So make sure that programmer has a good reputation.
I recommend that you use a browser side script, just so the user does not have to wait for a response. Granted communication has improved greatly, server side code still provides a lag, that may be noticeable with mouse painting, etc.
What you can do though, is provide server side code that will do simple conversions, like formats, scaling, bit depth, etc. Do a search for imagemagick. -
How to lock the perticular record in table with some of fields
Hi,
I have one Doubt please clarify me.
How to lock the record in table with perticular fields combination please give me example of code.
Thanks,
Hari.Hi,
IT LIKE this....
This is the function mode that you have to create for locking the contents of you internal table.
CALL FUNCTION 'ENQUEUE_EZHFINDID'
EXPORTING
mode_zhfindid = 'E'
mandt = sy-mandt
ownid = w_display-ownid
X_OWNID = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
CASE sy-subrc.
WHEN 1.
w_flag_lock = c_x.
CLEAR w_okflag.
MESSAGE e265 WITH w_display-ownnum.
ENDCASE.
Jayant Sahu. -
HR_BLP_SAVE_TIMEDATA and how to load high volume records onto Infotype 2001
Because of high data volume (estimated 1 million records each run) and short SLA time requirement (runs every 2 hours), we chose to use functions that are called by CAT6 (Skipping the CATS to HR info types loading process) to load the time records directly into Infotype 2001 and Infotype 2002.
Now we discover that some records (sporadically and randomly) don't get loaded onto the infotype and they don't return from the error message table either. We are wondering whether anyone has used these functions before, and how they resolve the issues of missing records / error handling.
We are also wondering if there is any other feasible solution to meet our customer's need.
The two functions we use are: HR_BLP_MAINTAIN_TIMEDATA and HR_BLP_SAVE_TIMEDATAHi Curt,
No, they are 32 bit RGB. I have just made an 8 bit RGB and it gives me the option. Thank you for your help -
How to upload a new photo onto dreamweaver to upload to existing site
how do I upload a new photo in dreamweaver and insert it into an existibg website with pre existing file name/directories for photos that have been deleted because stock has been sold
Hello ms butterfly,
would you please specify your request. What means, sorry for misunderstanding - "that have been deleted because stock has been sold".
On the first glance, these prerequisites are needed for the success:
Do you have access to the website in question and/or the files?
Can you load them down to your computer?
If yes it's no problem to insert them into the DW files and load them up again.
Hans-Günter -
Upload data from excel to Ztable with statistics
Hi,
I have a requirement to upload data from excel sheet to ztable .
Here i need tp provide the user with the execution statistics like
1.Number of records read from the Excel spread-sheet
2. Number records processed successfully
3. Number records with Error
4. Name and location of Error Log-file (text-file format)
5. Name and location of the file containing error records (Excel spread-sheet format)
I would appreciate if any of you have code written for the sameSee the below example code to upload from xl file to sap
REPORT ZLWMI151_UPLOAD no standard page heading
line-size 100 line-count 60.
*tables : zbatch_cross_ref.
data : begin of t_text occurs 0,
werks(4) type c,
cmatnr(15) type c,
srlno(12) type n,
matnr(7) type n,
charg(10) type n,
end of t_text.
data: begin of t_zbatch occurs 0,
werks like zbatch_cross_ref-werks,
cmatnr like zbatch_cross_ref-cmatnr,
srlno like zbatch_cross_ref-srlno,
matnr like zbatch_cross_ref-matnr,
charg like zbatch_cross_ref-charg,
end of t_zbatch.
data : g_repid like sy-repid,
g_line like sy-index,
g_line1 like sy-index,
$v_start_col type i value '1',
$v_start_row type i value '2',
$v_end_col type i value '256',
$v_end_row type i value '65536',
gd_currentrow type i.
data: itab like alsmex_tabline occurs 0 with header line.
data : t_final like zbatch_cross_ref occurs 0 with header line.
selection-screen : begin of block blk with frame title text.
parameters : p_file like rlgrap-filename obligatory.
selection-screen : end of block blk.
initialization.
g_repid = sy-repid.
at selection-screen on value-request for p_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = g_repid
IMPORTING
FILE_NAME = p_file.
start-of-selection.
Uploading the data into Internal Table
perform upload_data.
perform modify_table.
top-of-page.
CALL FUNCTION 'Z_HEADER'
EXPORTING
FLEX_TEXT1 =
FLEX_TEXT2 =
FLEX_TEXT3 =
*& Form upload_data
text
FORM upload_data.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = p_file
I_BEGIN_COL = $v_start_col
I_BEGIN_ROW = $v_start_row
I_END_COL = $v_end_col
I_END_ROW = $v_end_row
TABLES
INTERN = itab
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
write:/10 'File '.
ENDIF.
if sy-subrc eq 0.
read table itab index 1.
gd_currentrow = itab-row.
loop at itab.
if itab-row ne gd_currentrow.
append t_text.
clear t_text.
gd_currentrow = itab-row.
endif.
case itab-col.
when '0001'.
t_text-werks = itab-value.
when '0002'.
t_text-cmatnr = itab-value.
when '0003'.
t_text-srlno = itab-value.
when '0004'.
t_text-matnr = itab-value.
when '0005'.
t_text-charg = itab-value.
endcase.
endloop.
endif.
append t_text.
ENDFORM. " upload_data
*& Form modify_table
Modify the table ZBATCH_CROSS_REF
FORM modify_table.
loop at t_text.
t_final-werks = t_text-werks.
t_final-cmatnr = t_text-cmatnr.
t_final-srlno = t_text-srlno.
t_final-matnr = t_text-matnr.
t_final-charg = t_text-charg.
t_final-erdat = sy-datum.
t_final-erzet = sy-uzeit.
t_final-ernam = sy-uname.
t_final-rstat = 'U'.
append t_final.
clear t_final.
endloop.
delete t_final where werks = ''.
describe table t_final lines g_line.
sort t_final by werks cmatnr srlno.
Deleting the Duplicate Records
perform select_data.
describe table t_final lines g_line1.
modify zbatch_cross_ref from table t_final.
if sy-subrc ne 0.
write:/ 'Updation failed'.
else.
Skip 1.
Write:/12 'Updation has been Completed Sucessfully'.
skip 1.
Write:/12 'Records in file ',42 g_line .
write:/12 'Updated records in Table',42 g_line1.
endif.
delete from zbatch_cross_ref where werks = ''.
ENDFORM. " modify_table
*& Form select_data
Deleting the duplicate records
FORM select_data.
select werks
cmatnr
srlno from zbatch_cross_ref
into table t_zbatch for all entries in t_final
where werks = t_final-werks
and cmatnr = t_final-cmatnr
and srlno = t_final-srlno.
sort t_zbatch by werks cmatnr srlno.
loop at t_zbatch.
read table t_final with key werks = t_zbatch-werks
cmatnr = t_zbatch-cmatnr
srlno = t_zbatch-srlno.
if sy-subrc eq 0.
delete table t_final .
endif.
clear: t_zbatch,
t_final.
endloop.
ENDFORM. " select_data
Reward Points if it is helpful
Thanks
Seshu -
How do I select one record when working with image data sets?
David Powers had an example with creating spry data sets and using the filename in the database linked to images in the local files as data sources. The pages shows the images with the specified information requested, however all of the images display with their content. I want to pull an individual record with the image and content. HELP!
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$maxRows_rs_getPhoto = 10;
$pageNum_rs_getPhoto = 0;
if (isset($_GET['pageNum_rs_getPhoto'])) {
$pageNum_rs_getPhoto = $_GET['pageNum_rs_getPhoto'];
$startRow_rs_getPhoto = $pageNum_rs_getPhoto * $maxRows_rs_getPhoto;
mysql_select_db($database_gepps1_db, $gepps1_db);
$query_rs_getPhoto = "SELECT last_name, first_name, personal_bio, file_name, width, height FROM mem_profile";
$query_limit_rs_getPhoto = sprintf("%s LIMIT %d, %d", $query_rs_getPhoto, $startRow_rs_getPhoto, $maxRows_rs_getPhoto);
$rs_getPhoto = mysql_query($query_limit_rs_getPhoto, $gepps1_db) or die(mysql_error());
$row_rs_getPhoto = mysql_fetch_assoc($rs_getPhoto);
if (isset($_GET['totalRows_rs_getPhoto'])) {
$totalRows_rs_getPhoto = $_GET['totalRows_rs_getPhoto'];
} else {
$all_rs_getPhoto = mysql_query($query_rs_getPhoto);
$totalRows_rs_getPhoto = mysql_num_rows($all_rs_getPhoto);
$totalPages_rs_getPhoto = ceil($totalRows_rs_getPhoto/$maxRows_rs_getPhoto)-1;
?>
<table width="800" border=" ">
<tr>
<td>Image</td>
<td>thumbnail</td>
<td>firstname</td>
<td>lastname</td>
<td>personal bio</td>
</tr>
<?php do { ?>
<tr>
<td><img src="<?php echo $row_rs_getPhoto['file_name']; ?>" alt="" width="<?php echo $row_rs_getPhoto['width']; ?>" height="<?php echo $row_rs_getPhoto['height']; ?>"></td>
<td><img src="<?php echo $row_rs_getPhoto['file_name']; ?>" alt="" width="50" height="35"></td>
<td><?php echo $row_rs_getPhoto['first_name']; ?></td>
<td><?php echo $row_rs_getPhoto['last_name']; ?></td>
<td><?php echo $row_rs_getPhoto['personal_bio']; ?></td>
</tr>
<?php } while ($row_rs_getPhoto = mysql_fetch_assoc($rs_getPhoto)); ?>
</table>
<?php
mysql_free_result($rs_getPhoto);
?>I tried pulling the record by using entered value, but then I would need to create several recordsets.
It's actually no problem doing that. Can you explain more what you want the final result of this page to display? You are pulling a recordset of the entire group of photos. Do you still want that comprehensive recordset on this page? How many other images do you want? Are you trying to make a master/detail pair where this page displays only the details for a single image? See what I mean? -
How do you Delete a Record using Form with submit button?
Hi,
The table REGISTRATION has two feilds, FULL_NAME and USER_GROUP. I created a form that has a drop down
of all the FULL_NAME values that allows the user to select the record that they want to delete. I got the drop down to work and
created the Delete Record behavior, I just can't get the submit button to send the form data and cause the delete to happen.
I have created other pages that update records in this way, but for some reason, I can't get delete to work.
Any Ideas?
Thank You in Advance,
Eric
Ps Anyone know why this site locks up in I.E. on some PC's? My Company PC is locked down and they won't investigate. My laptop works but says error on page. I have the latest updates and JAVA ...
Here is the code:
<cfif IsDefined("FORM.Full_Name") AND #FORM.Full_Name# NEQ "">
<cfquery datasource="ilmf_parts">
DELETE FROM REGISTRATION
WHERE Full_Name=<cfqueryparam value="#FORM.Full_Name#" cfsqltype="cf_sql_clob" maxlength="50">
</cfquery>
<cflocation url="index.cfm">
</cfif>
<cfquery name="REGISTRATION" datasource="ilmf_parts">
SELECT Full_Name, User_Group
FROM REGISTRATION
ORDER BY Full_Name ASC
</cfquery>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>User Delete Test Page</title>
</head>
<body>
<p align="center">USER DELETE TEST PAGE </p>
<p> </p>
<form action="index.cfm" method="post" enctype="multipart/form-data" name="Delete_Form" id="Delete_Form">
<table width="500" border="1" cellspacing="1" cellpadding="3">
<tr>
<th scope="col">NT Name </th>
<th scope="col"><select name="select">
<cfoutput query="REGISTRATION">
<option value="#REGISTRATION.Full_Name#">#REGISTRATION.Full_Name#</option>
</cfoutput>
</select>
</th>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="DELETE" /></td>
</tr>
</table>
<p> </p>
<p> </p>
</form>
<p> </p>
</body>
</html>The name of your form control is "select".
<select name="select">
The name of your form field in your SQL is full_name
<cfqueryparam value="#FORM.Full_Name#" cfsqltype="cf_sql_clob" maxlength="50">
You probably really want these names to match!
P.S.
Is your name field really a "clob" data type? Just how long are these names anyway.
P.P.S.
Why are you relocating from the page index.cfm to index.cfm?
<form action="index.cfm" method="post" enctype="multipart/form-data" name="Delete_Form" id="Delete_Form">
<cflocation url="index.cfm"> -
How to upload to Youtube a slideshow made with Keynote: it has separate video
I made my 1st slideshow with Keynote tonight, but when I exported it, or converted to a video, it was in 2 pieces! A video and a audio file. I wanted to upload it to Youtube, and I don't know how to do it. Youtube has a "Video Editor" but I couldn't get it to work. I wish Keynote would export like iPhoto and produce a video that has the sound included (but iPhoto isn't so good for including text). Do I have to put Keynote slideshows into iMovie to add sound?
Hey blckhed,
Welcome to the Apple Support Communities. You can easily get your slideshow to YouTube. The following article will assist you in the process.
Keynote '09: Publishing to YouTube
http://support.apple.com/kb/HT3368
The area you are looking for is: Choose Share > Send To > YouTube
Regards,
-Norm G. -
How to upload a image for the login with my user?
When I open system preferences and I go to users and groups; I can't upload a new image for the login.. how I can upload a new one? Sorry for my english, I'm Italian
Please help me!! Thanks
-LorenaYour English is a lot better than many who post here.
Click on your picture, select 'Recents', and you should be able to copy and paste a new picture in an open box. Sometimes it may take a couple of attempts. -
How to Upload a RTF Template from desktop with out using XML Publisher resp
Dear All,
While uploading an RTF template for an XML report through XML Admin responsiblity, i am getting some weird error. So, i am looking for other options of uploading the Template. Can any one let me know if any other options are available. Can i use FNDLOAD? But i think it is to move the files between instances. My requirement is to upload the template only from my desktop.
Please suggest
Thanks
RajHi,
Thanks for the reply.
When i am trying to upload from XML Publisher Admin responsibility, i am getting the following error:
oracle.apps.fnd.framework.OAException: java.sql.SQLException: No corresponding row found in XDO_LOBS
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:865)
at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:988)
My Template size is 1.7 MB.
Application Release is : 11.5.10.2
DB Version: 10g
OS: Unix
Thanks
Raj
Maybe you are looking for
-
More than one class in single java source file?
Is there a way to define more than one class in single java source file? I get a duplicate class definition error for each extra class, but I am sure there is a way to handle this in JDeveloper. Anyone knows how ?
-
Hi, PLEASE HELP!! Last night my boyfriend asked me to sync his phone as he had purchased a new app and it was required to connect to iTunes to finish installing, so we did this, it took forever!! It also prompted us to upgrade to iOS5, which we did
-
Hide adobe Non interactive form in Initial Display
Hi, I have a adobe form under the input field & button in WD application. Form should be shown only when users hits the Button. Right now both are shown in intial view.How do we hide adobe form ? rgds Vara Edited by: Vara K on Jan 27, 2009 7:49 PM
-
Hi, I have created sales order successfully using the id proc_sales. while creating PO using proc_agent user, I need to assign the supplier to the sales order qty which is required to be procuired. Now when I am going to select suplier, It is not sh
-
Why can I not see other libraries in Home Sharing?
I have tried EVERYTHING! I cannot figure out why my mac and PC will not communicate. I have authorized both computers with the same Apple ID and Home Sharing log in is all the same for both computers. I have turned off firewalls on both computers. Th