Insert multiple line with one call to a SQL procedure
Hello,
I'm working with BC4J and UIX/XML.
Our purpose is to insert in a table more then one row at one time and put them (all the rows) in an array.
Then, we have to save them at one time by calling one time the function doDML().
Thanks.
Hello,
I'm working with BC4J and UIX/XML.
Our purpose is to insert in a table more then one row at one time and put them (all the rows) in an array.
Then, we have to save them at one time by calling one time the function doDML().You may use BatchUpdating feature in Bc4J to achieve this.
The semantics for using this for an Entity is same as the normal - non-batch mode. However by adding a batch-threshold on the Entity defnition (Entity Object Editor/Tuning panel), you can control if that entity type has a given number of affected rows, then framework should use batchmode post operations).
When this is turned on, one roundtrip from entity DML will contain all entities of that type for that operation,for example if you have inserts/deletes/updates for Dept, then in one roundtrip, all deletes will go followed by another roundtrip for inserts and another one for updates.
Similar Messages
-
Insert multiple rows with one sql statement in access
Hi,
I'm trying to copy a table into another. What I want to do is to use "Insert into table1 select * from table2 where field > val". Something like that. I know a lot of databases support it. I was wondering if ms access ODBC driver also supports it. I searched quite a bit and haven't found a definitive answer on this.
Thank youYes, M$ Access 2000 supports it. This is from their help:
INSERT INTO Statement
Adds a record or multiple records to a table. This is referred to as an append query.
Syntax
Multiple-record append query:
INSERT INTO target [(field1[, field2[, ...]])] [IN externaldatabase]
SELECT [source.]field1[, field2[, ...]
FROM tableexpression
Single-record append query:
INSERT INTO target [(field1[, field2[, ...]])]
VALUES (value1[, value2[, ...])
The way you've written the INSERT, table1 and table2 have to have the same # of columns and the same types, of course. -
How to insert multiple line items in fv60 using bdc.
Hi all,
How to insert multiple line items in fv60 using bdcshi
chk this
DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
DATA : IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
DATA : V_EBELP(30) , V_MENGE(30) , V_WERKS(30), V_EMATN(30) ,
V_PEINH(30).
DATA : FILE TYPE STRING, V_MSG(100) , V_IND(2) TYPE N , FLAG VALUE 'X'.
PARAMETERS: P_FILE(50) TYPE C DEFAULT 'C:\ME21_TEST'.
DATA : BEGIN OF ITAB OCCURS 0,
IND(02),
LIFNR_001(010),
data element: BSART
BSART_002(004),
data element: BEDAT
data element: EKORG
EKORG_004(004),
EKGRP_006(003),
data element: LPEIN
LPEIN_005(001),
data element: EMATNR
EMATN_01_007(018),
data element: EWERK
WERKS_01_008(004),
data element: EPEIN
PEINH_01_009(006),
data element: EWERK
MENGE_01_013(017),
data element: AUFEP
EBELP_014(005),
data element: AUFEP
END OF ITAB.
START-OF-SELECTION.
FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = ITAB
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.
SORT ITAB BY IND.
START-OF-SELECTION.
LOOP AT ITAB.
REFRESH IT_MESSAGES.
<b>V_IND = V_IND + 1.</b>
<b>AT NEW IND.</b>
<b>READ TABLE ITAB INDEX SY-TABIX.</b>
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0100'.
PERFORM BDC_FIELD USING 'EKKO-LIFNR'
ITAB-LIFNR_001.
PERFORM BDC_FIELD USING 'RM06E-BSART'
ITAB-BSART_002.
*perform bdc_field using 'RM06E-BEDAT'
ITAB-BEDAT_003.
PERFORM BDC_FIELD USING 'EKKO-EKORG'
ITAB-EKORG_004.
PERFORM BDC_FIELD USING 'RM06E-LPEIN'
ITAB-LPEIN_005.
PERFORM BDC_FIELD USING 'EKKO-EKGRP'
ITAB-EKGRP_006.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
ENDAT.
<b>PERFORM BDC_DYNPRO USING 'SAPMM06E' '0120'.
CONCATENATE 'EKPO-EMATN(' V_IND ')' INTO V_EMATN.
PERFORM BDC_FIELD USING V_EMATN
ITAB-EMATN_01_007.
CONCATENATE 'EKPO-WERKS(' V_IND ')' INTO V_WERKS.
PERFORM BDC_FIELD USING V_WERKS
ITAB-WERKS_01_008.
CONCATENATE 'EKPO-PEINH(' V_IND ')' INTO V_PEINH.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0120'.
PERFORM BDC_FIELD USING V_PEINH
ITAB-PEINH_01_009.
*CONCATENATE 'EKPO-MENGE(' V_IND ')' INTO V_MENGE.
*perform bdc_dynpro using 'SAPMM06E' '0120'.
*perform bdc_field using V_MENGE
ITAB-MENGE_01_013.
*CONCATENATE 'EKPO-EBELP(' V_IND ')' INTO V_EBELP.
PERFORM BDC_DYNPRO USING 'SAPMM06E' '0120'.
PERFORM BDC_FIELD USING 'RM06E-EBELP'
ITAB-EBELP_014.</b>PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
AT END OF IND.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=BU'.
ENDAT.
CALL TRANSACTION 'ME21' USING IT_BDCDATA MODE 'A'
UPDATE 'S'
MESSAGES INTO IT_MESSAGES.
LOOP AT IT_MESSAGES WHERE MSGTYP = 'E' OR MSGTYP = 'A'.
IF FLAG = 'X'.
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING
CLIENT = SY-MANDT
DEST = FILLER8
GROUP = 'GAMY_FAILURE'
HOLDDATE = FILLER8
KEEP = 'X'
USER = SY-UNAME
RECORD = FILLER1
PROG = SY-CPROG
IMPORTING
QID =
EXCEPTIONS
CLIENT_INVALID = 1
DESTINATION_INVALID = 2
GROUP_INVALID = 3
GROUP_IS_LOCKED = 4
HOLDDATE_INVALID = 5
INTERNAL_ERROR = 6
QUEUE_ERROR = 7
RUNNING = 8
SYSTEM_LOCK_ERROR = 9
USER_INVALID = 10
OTHERS = 11
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR FLAG.
ENDIF.
CALL FUNCTION 'BDC_INSERT'
EXPORTING
TCODE = 'ME21'
POST_LOCAL = NOVBLOCAL
PRINTING = NOPRINT
SIMUBATCH = ' '
CTUPARAMS = ' '
TABLES
DYNPROTAB = IT_BDCDATA
EXCEPTIONS
INTERNAL_ERROR = 1
NOT_OPEN = 2
QUEUE_ERROR = 3
TCODE_INVALID = 4
PRINTING_INVALID = 5
POSTING_INVALID = 6
OTHERS = 7
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
ID = IT_MESSAGES-MSGID
LANG = 'EN'
NO = IT_MESSAGES-MSGNR
V1 = IT_MESSAGES-MSGV1
V2 = IT_MESSAGES-MSGV2
V3 = IT_MESSAGES-MSGV3
V4 = IT_MESSAGES-MSGV4
IMPORTING
MSG = V_MSG
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
WRITE : / V_MSG.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
ENDLOOP.
IF FLAG NE 'X'.
CALL FUNCTION 'BDC_CLOSE_GROUP'
EXCEPTIONS
NOT_OPEN = 1
QUEUE_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
Start new screen *
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR IT_BDCDATA.
IT_BDCDATA-PROGRAM = PROGRAM.
IT_BDCDATA-DYNPRO = DYNPRO.
IT_BDCDATA-DYNBEGIN = 'X'.
APPEND IT_BDCDATA.
ENDFORM.
Insert field *
FORM BDC_FIELD USING FNAM FVAL.
CLEAR IT_BDCDATA.
IT_BDCDATA-FNAM = FNAM.
IT_BDCDATA-FVAL = FVAL.
APPEND IT_BDCDATA. -
Inserting Multiple Line Items To Stored Procedure
Hi
I need to insert line item values to one of the argument in stored procedure.what data type do i need to pass for type attribute.I tried with different datatypes from sap help but no luck.Please guide me how should i proceed.
Interface is : Idoc to JDBC (stored procedure)
Target structure:
DT_Orderstatus_Trgt
--> StatementName
-->SP Name
action--->Attribute
table--->Attribute
--->Argument (to insert multiple line items)
isInput
isOutput
type
Just i am showing only one argumnet which needs to be inserted multiple line items.
ThanksHi,
Stored procedure can support the below data types
INTEGER, BIT, TINYINT, SMALLINT, BIGINT, FLOAT, REAL, DOUBLE, NUMERIC, DECIMAL, CHAR, VARCHAR, STRING, LONGVARCHAR, DATE, TIME, TIMESTAMP, BINARY, VARBINARY, LONGVARBINARY, BLOB (input and output),CLOB (input and output), CURSOR (output; only in conjunction with the Oracle JDBC driver).
But
Instead of passing multiple line items / array of input value in stored procedure, You can go for the below option as having 2 statements in your mapping with below structures and those 2 statements should be linked with the primary key say col1.
<root>
<StatementName1>
<dbTableName action=u201DINSERTu201D>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2</col2>
</access>
<access>
<col1>val11</col1>
</access>
</dbTableName>
</StatementName1>
<StatementName2>
<dbTableName action=u201DINSERTu201D>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2</col2>
</access>
<access>
<col1>val11</col1>
</access>
</dbTableName>
</StatementName2>
</root> -
Select or deselect multiple rows with one single selection event
Does anyone know how to create a JTable which can select or deselect multiple rows with one single selection event in JTable. Fore example, if the table has
row1
row2
row3
row4
row5
row6
What I need is when user select row1 or row2, both row1 and row2 should be set to be selected. Then if user press CTRL and click one of row3 or row4, both of them should be selected including the previouse selected row1 and row2.
For deselection, if row1 and row2 are selected, when users deselect one of row1 or row2, both of them should be deselected.
Hopefully someone can give me a hint.Here is a partial solution using a JList. Only one line gets highlighted when the user makes a selection in the list. But, two lines are returned. There is a blank line between every two lines.
private void addLineToList() {
String a = f_one.getText();
String b = f_two.getText();
if (a.length() == 0) {
Utils.showInformationMessage("Item field is empty.");
f_one.requestFocusInWindow();
return;
if (b.length() == 0) {
Utils.showInformationMessage("Match field is empty.");
f_two.requestFocusInWindow();
return;
model.addElement("item: " + a);
model.addElement("match: " + b);
model.addElement(" ");
int size = model.getSize();
pairList.setSelectedIndex(size - 3);
f_one.setText("");
f_two.setText("");
f_one.requestFocusInWindow();
private void editList() {
if (pairList.getSelectedValue().toString().equalsIgnoreCase(" ")) {
Toolkit.getDefaultToolkit().beep();
f_one.requestFocusInWindow();
return;
if (!f_one.getText().equals("")) {
int result = JOptionPane.showConfirmDialog(this,
"The Item field contains text. Replace the text?",
"Flash Card Activity", JOptionPane.YES_NO_OPTION,
OptionPane.INFORMATION_MESSAGE);
if (result == JOptionPane.NO_OPTION) return;
if (!f_two.getText().equals("")) {
int result = JOptionPane.showConfirmDialog(this,
"The Match field contains text. Replace the text?",
"Flash Card Activity", JOptionPane.YES_NO_OPTION,
JOptionPane.INFORMATION_MESSAGE);
if (result == JOptionPane.NO_OPTION) return;
String item = "";
String match = "";
int index = pairList.getSelectedIndex();
String choice = model.getElementAt(index).toString();
if (choice.startsWith("item")) {
item = choice;
match = model.getElementAt(index + 1).toString();
model.remove(index);
model.remove(index);
model.remove(index);
else {
item = model.getElementAt(index - 1).toString();
match = choice;
model.remove(index + 1);
model.remove(index);
model.remove(index - 1);
int size = model.getSize();
if (size > 2) {
pairList.setSelectedIndex(size - 2);
f_one.setText(item.substring(6));
f_two.setText(match.substring(7));
f_one.requestFocusInWindow();
} -
Insert multiple records with php
please help me
I have a problem in a multiple input records
please help ...............
example script:
<?php require_once('Connections/koneksi.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
$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;
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO mhs (NIM, NAMAMHS, ALAMAT) VALUES (%s, %s, %s)",
GetSQLValueString($_POST['NIM'], "text"),
GetSQLValueString($_POST['NAMAMHS'], "text"),
GetSQLValueString($_POST['ALAMAT'], "text"));
mysql_select_db($database_koneksi, $koneksi);
$Result1 = mysql_query($insertSQL, $koneksi) or die(mysql_error());
$insertGoTo = "baru.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $insertGoTo));
$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_koneksi, $koneksi);
$query_Recordset1 = "SELECT * FROM mhs";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $koneksi) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?><!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=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<p> </p>
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
<table border="1">
<tr>
<td>NIM</td>
<td>NAMAMHS</td>
<td>ALAMAT</td>
<td> </td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_Recordset1['NIM']; ?></td>
<td><?php echo $row_Recordset1['NAMAMHS']; ?></td>
<td><?php echo $row_Recordset1['ALAMAT']; ?></td>
<td><table align="center">
<tr valign="baseline">
<td nowrap="nowrap" align="right">NIM:</td>
<td><input type="text" name="NIM" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">NAMAMHS:</td>
<td><input type="text" name="NAMAMHS" value="<?php echo $row_Recordset1['NAMAMHS']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right">ALAMAT:</td>
<td><input type="text" name="ALAMAT" value="<?php echo $row_Recordset1['ALAMAT']; ?>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td> </td>
</tr>
</table></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
<input type="hidden" name="MM_insert" value="form1" />
<input type="submit" value="Insert record" />
</form>
<p> </p>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>PowerMilk wrote:
I want to update multiple rows with one click on the submit button.Unfortunately, it doesn't work. What is wrong in the code?
It would be more helpful if you were to say what happens. "It doesn't work" isn't very helpful.
However, a quick look at your code reveals that your hidden field that contains the ID is outside the loop (repeat region) in your form. Move it inside the loop like this:
<?php do { ?>
<tr>
<td><input name="dag[]" type="text" value="<?php
echo $row_rsWijzigOpeningsuren['dag']; ?>" size="15" maxlength="15"
/></td>
<td><input name="voormiddag[]" type="text" value="<?php echo
$row_rsWijzigOpeningsuren['voormiddag']; ?>" size="15" maxlength="15"
/></td>
<td><input name="namiddag[]" type="text" value="<?php echo
$row_rsWijzigOpeningsuren['namiddag']; ?>" size="15" maxlength="15"
/></td>
</tr>
<input name="id[]" type="hidden" value="<?php echo $row_rsWijzigOpeningsuren['id']; ?>" />
<?php } while ($row_rsWijzigOpeningsuren = mysql_fetch_assoc($rsWijzigOpeningsuren)); ?> -
Create multiple folders with one click on documents tab in BP in SAP CRM
Hi Experts,
I have a requirement to create multiple folders by clicking on a button in Documents tab in BP transaction in CRM. In standard process by clicking on create folder button we create folders. we want to create multiple folders with one single click ( i guess we can develop another button for that) folder name will be hard coded. Kindly let me know , how this can be achieved.Hi Experts,
I have a requirement to create multiple folders by clicking on a button in Documents tab in BP transaction in CRM. In standard process by clicking on create folder button we create folders. we want to create multiple folders with one single click ( i guess we can develop another button for that) folder name will be hard coded. Kindly let me know , how this can be achieved. -
Multiple iPhones with one one computer
I was using multiple iPhones with one one computer, each iPhone device has it's Owen Apple ID. When I connected my device. I got my mothers photos, contacts & applications. All my applications are deleted, is there a way to retrieve my iPhones photos and applications ?
Sign out of your mom's account in itunes, then sign in with your account, then restore your phone from your itunes backup.
-
Multiple selections to multiple layers or multiple files with one go ?
Hi,
how to convert multiple selections to multiple layers or multiple files with one go ?
Thanks!You may want to ask over at
http://forums.adobe.com/community/photoshop/photoshop_scripting?view=discussions
or
http://ps-scripts.com/bb/
I think there are Scripts about for the task or at least ones that could be adapted without too much problems.
The usual approach is, I think, creating a Work Path from a Selection and then using (expanded) Selections based on the individual subPathItems to intersect with the original selection.
Of course there are possibilities for bad results … -
Photoshop crashes while using multiple windows with one image
Has anyone else encountered the following problem:
Photoshop CS4 crashes sooner or later when working with multiple windows with one image (window->arrange->new window for...).
I remember having same problem since CS2. Is this a bug in Photoshop or am I having a bad luck?
Technical specifics:
Ps CS4, iMac, 21.5, 10.6Don't know. I haven't heard of other people having that problem.
Do you have a crash report I could look at?
Or have you attached your email to crash reports sent to Adobe and can you tell me the date on one of them? -
Create multiple delivery with one invoice
Hi all,
can you tell me how to do multiple delivery with one invoice,
i tried in vf01 by giving their my 3 delivery nos but it is generating three invoices
pls explain this in details
points will be rewarded
regards,
smmmmmmDear Sameer
As per your requirement run the Tcode VF04 (Billing Due list) and select the Delivery Documents for which you want to to have single Billing Document by clicking on Collective Billing document/Online Push Button in that screen.
To Have Single Billing Document for Multiple Delivery you need to have Payer,Terms of Payment,Incoterms(part 1 and part2) same for all materials orelse the billing document will split and this split analysis is visible during creating of Billing document.
Hope this will help you in solving your problem.
Regards
PSH -
Insert multiple images in one slide and setting dsiplay time for each
Hi,
I am using Adobe Captivate4.
I could not able to insert multiple images in one slide and set display time for each image.
Need help in this regard.This is not about background image.
I have 3 images and want to insert in one slide only. I could able to insert image1 for first time, but could not able to insert image2 and image3.
I have followed the same steps: Insert Menu>Image. -
Inserting multiples rows into a table using function or procedure..
How do i insert multiples rows into a table using function or procedure?
Please provide me query..Use FORALL bulk insert statement...
eg:
procedure generate_test_data as
type cl_itab is table of integer index by pls_integer;
v_cl_itab cl_itab;
type cl_vtab is table of varchar2(25) index by pls_integer;
v_cl_vtab cl_vtab;
type cl_dtab is table of date index by pls_integer;
v_cl_dtab cl_dtab;
begin
for i in 1.. 100 loop
v_cl_itab(i):= dbms_random.value(1,1000);
v_cl_vtab (i):=dbms_random.string('a',20);
v_cl_dtab (i):=to_date(trunc(dbms_random.value(2453737, 2454101)),'j');
end loop;
forall i in v_cl_itab.first .. v_cl_itab.last
execute immediate 'insert into test_order values( :n, :str , :dt ) ' using v_cl_itab(i), v_cl_vtab (i), v_cl_dtab (i);
commit;
end; -
Error when try to call a pl/sql procedure from the .xsql file
I tried to call a pl/sql procedure like this:
<?xml version="1.0"?>
<page connection="omtest5" xmlns:xsql="urn:oracle-xsql">
<xsql:include-owa>
sampleowaxml.testone
</xsql:include-owa>
</page>
but I got the following error message:
<?xml version="1.0" ?>
- <page>
- <xsql-error action="xsql:include-owa">
<statement>declare buf htp.htbuf_arr; param_names owa.vc_arr; param_values owa.vc_arr; rows integer := 32767; outclob CLOB;begin param_names(1) := 'HTTP_COOKIE'; param_values(1) := ''; param_names(2) := 'SERVER_NAME'; param_values(2) := 'mxfang-nt.us.oracle.com'; param_names(3) := 'SERVER_PORT'; param_values(3) := '80'; param_names(4) := 'SCRIPT_NAME'; param_values(4) := '/servlets/oracle.xml.xsql.XSQLServlet'; param_names(5) := 'PATH_INFO'; param_values(5) := '/xsql/test/myproject.xsql'; param_names(6) := 'HTTP_USER_AGENT'; param_values(6) := 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)'; owa.init_cgi_env(6,param_names,param_values); sampleowaxml.testone owa.get_page(buf,rows); dbms_lob.createtemporary(outclob,true,dbms_lob.session); for i in 1..rows loop dbms_lob.writeappend(outclob,length(buf(i)),buf(i)); end loop; ? := outclob; ? := DBMS_LOB.INSTR(outclob,CHR(10)| |CHR(10));end;</statement>
<message>ORA-06550: line 3, column 3: PLS-00103: Encountered the symbol "OWA" when expecting one of the following: := . ( @ % ; The symbol ":=" was substituted for "OWA" to continue.</message>
</xsql-error>
- <xsql-error action="xsql:include-owa">
<message />
</xsql-error>
</page>
This error message is very similiar to the message that Shanthir posted on Jan, 21. I did run the dbmslob.sql, but it doesn't help. Anybody has ideas how to solve it?
I used the PL/SQL web toolkit provided by OAS4.0.8.1. I believe oracle web agent is replaced by this toolkit.
Thanks,
Min
nullHi,
Glad that somebody else too got this problem. Well, as I had mentioned in my previous posting too, I think there are some procedures in the package, dbms_lob, like the writeappend, createtemporary etc.. which is not found in my dbms_lob.sql file, I am using 8.0.5, but I found these procedures in the 8i, I think it is becos of that.
By the way if anybody got this solution and got any workaround, please help me too.
I am still waiting for the solution to that.
Shanthi -
How to call a PL/SQL procedure from a Java class?
Hi,
I am new to the E-BusinessSuite and I want to develop a Portal with Java Portlets which display and write data from some E-Business databases (e.g. Customer Relationship Management or Human Resource). These data have been defined in the TCA (Trading Community Architecture) data model. I can access this data with PL/SQL API's. The next problem is how to get the data in the Java class. So, how do you call a PL/SQL procedure from a Java program?
Can anyone let me know how to solve that problem?
Thanks in advance,
Chang Si ChouHave a look at this example:
final ApplicationModule am = panelBinding.getApplicationModule();
try
final CallableStatement stmt = ((DBTransaction)am.getTransaction()).
createCallableStatement("{? = call some_pck.some_function(?, ?)}", 10);
stmt.registerOutParameter(1, OracleTypes.VARCHAR);
stmt.setInt(2, ((oracle.jbo.domain.Number)key.getAttribute(0)).intValue());
stmt.setString(3, "Test");
stmt.execute();
stmt.close();
return stmt.getString(1);
catch (Exception ex)
panelBinding.reportException(ex);
return null;
}Hope This Helps
Maybe you are looking for
-
Hi, I need help desperately. The following is an example of the data that I have. I have two tables one name Customers and the other named Orders. The tables have the following attributes CUSTOMER CustomerNum, CustomerName, OrderNum ORDER OrderNum, O
-
mavericks has broken most stock apps, app store ,preview, messages, facetime ect the list goes on they bounce in the menu then nothing its been like that since installing mavericks fixed briefly by reinstalling but then stopped again very quickly any
-
Z_PROGRAM does not run with SAP_ALL
Hi All, System: ECC 6.0 I have a test ID with SAP_ALL and SAP_NEW authorizations, but I am not not able to execute a Z Program with this Test ID, but other users can. Compared other users UMR with this Test ID and they match up 100%. All the related
-
Apple Remote Desktop 3.0 and OS 10.6.8
I purchased Apple Remote Desktop 3 several year ago when I was running 10.4. Last year we got new computers and we are running 10.6.8 now. I tried to load Apple Remote onto my new computer, but it did not work. It appeared to load, though very quic
-
Why am I getting error code 62 when I try to download the Creative Cloud Set up?
Error Code 62