SQLJ with EJB. Do not insert data in the database
Hi All!
I4m developing an application using SQLJ and EJB (session beans,
container managed transactions), and when I try to insert data
in the database it doesn't work. All goes well (apparently), but
the changes do not have effect in the DB.
I've tried to use bean managed transactions, but when I try to
insert data, I get the error: NOT IN A TRANSACTION. The code of
the client in the bean managed is the following:
public class MiEJBCLiente {
public static void main(String[] args) {
String namespaceURL
= "jdbc:oracle:thin:@rabinf56:1521:prinpal";
String ejbUrl
= "sess_iiop://rabinf56:2481:prinpal/test/Bean";
String username = "xxx";
String password = "xxx";
// Setup the environment
Hashtable environment = new Hashtable();
// Tell JNDI to speak sess_iiop
environment.put
(javax.naming.Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
// Tell sess_iiop who the user is
environment.put(Context.SECURITY_PRINCIPAL, username);
// Tell sess_iiop what the password is
environment.put(Context.SECURITY_CREDENTIALS, password);
// Tell sess_iiop to use credential authentication
environment.put(Context.SECURITY_AUTHENTICATION,
ServiceCtx.NON_SSL_LOGIN);
environment.put
(jdbc_accessURLContextFactory.CONNECTION_URL_PROP, namespaceURL);
UserTransaction ut = null;
// Lookup the URL
hello.MiBeanHome homeInterface = null;
try {
Context ic = new InitialContext(environment);
DriverManager.registerDriver (new
oracle.jdbc.driver.OracleDriver());
ut = (UserTransaction)ic.lookup
("jdbc_access://test/BeanTrans");
homeInterface = (hello.MiBeanHome) ic.lookup(ejbUrl);
catch (SQLException e) {
// That's it!
try {
System.out.println("Creating a new EJB instance");
hello.MiBean remoteInterface = homeInterface.create();
ut.begin ();
remoteInterface.inserta();
ut.commit();
catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
I4m waiting for suggests.
Thanks in advance...
Hi,
Are you sure it's a front-end bug? Try to double check your back-end code.
If you still believe the bug is in the front-end, try to debug the insertHandler function to see if you are attaching the UserVO properly into the UserEvent.
Best regards,
Pablo Souza
Similar Messages
-
Sync z30 with PC does not transfer data to the PC
i've installed BBlink in a PC with windows 7 and the contacts/calendar sync with outlook does not go well. It apears a message that sync is complete but no dta as been trasfered to the PC
Try syncing only Calendar, then try Contacts.
Or: http://helpblog.blackberry.com/2013/02/how-to-setup-outlook-to-wirelessly-synchronize-your-contacts-... -
Inserting date in the database
Hello!
I am getting one error ie SQLException which says"Optional feature not implimented ",while inserting date in a table in a database using PreparedStatement.setDate() method.please help me because of this one error my entire project is not moving forwardhello prathu4,
cud be more specific about which database ur trying to save the records ... check whether the date ur trying to save is in the right format as reqd by the database. -
I can not stop or start the Database logged with sidadm
Hello !!
I migrated ECC6 SAP / MaxDB 7.6.00.35 Windows 2003 Server to Windows 2008 Server. But now when I perform a login with sidadm, can not stop or start the database in dbmcli.
Just with Administrator can stop or start the database.
Error After db_offline :
Err -24994, ERR_RTE: Runtime enviroment error 1, could not create comm. Shared memory [5]
sdbverify ok :
SAP Utilities 7.6.00.35 64 bit in d:/sapdb/
check files... ok
check dependencies... ok
package data is consistent
DB Analyzer 7.6.00.35 64 bit in d:/sapdb/pr
check files... ok
check dependencies... ok
package data is consistent
db_enum
OK
P01 D:\sapdb\P01\db 7.6.00.35 fast running
P01 D:\sapdb\P01\db 7.6.00.35 quick offline
P01 D:\sapdb\P01\db 7.6.00.35 slow offline
P01 D:\sapdb\P01\db 7.6.00.35 test offline
Anyone have any ideas or know of any problem with windows 2008?
tksHello,
-> Please check, if the solution of SAP Note No. 688028 will help you with reported issue
-> I also recommend to update the MAXDB, the version is quite old and there many fixes done in the new release patches of 7.6.
Regards, Natalia Khlopina -
Could not insert Data in to the table
hello friends
I have some pbm in inserting values in to sqlserver database table.I could not insert values to the
table having varchar datatype fields.partyType is a field name of varchar type.when i try to insert
"LCL" for that field it throws following exception.
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]The name 'LCL'
is not permitted in this context. Only constants, expressions, or variables allowed here. Column
names are not permitted.
sometime it throws
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Optional feature not
implemented
If i give only numeric values to those fields it accepts.ie table accepts only integer values for all the fields.I use prepared statement for inserting data.I am inserting data to 4 tables at a time.I use ODBC driver.can u tell me where would be the problem??</p>
with regards
deviHmmmm...
ssniazi does nothing but ask for contact information or recommend Oracle products.
Based on this I consider it likely that this person is some sort of sales representative either directly or indirectly associated with Oracle.
I personally wouldn't provide any contact information to this person. Nor would I accept any advice until this person starts to actually provide some solutions or at least correctly reveals any financial interests that they might have.
In addition I believe ssniazi is in violation of the conduct code of this website because ssniazi is requesting information which will be used by a business entity without telling the users that it will be used in that way. And I expect that Oracle itself would frown on such activities.
2.3 You agree that You will not use the Website to:...(g) collect or store personal data about other users unless specifically authorized by such users. -
BDC not inserting data in mandatory fields of MM01
Suddenly My BDC for sales maintenance View is not working as it is not inserting data in Mandatory fields.?can any one tell me the reason
Hi Satyanarayan,
1. Check ur code in debug to see if your internal table contains value in mandatory fields
2. Try executing BDC program online to figure out the problem....
3. Check ur code to see whether u r assigning values to this fields...
Let me know if these things are ok in ur code...
Enjoy SAP. -
Problem with ALV Grid Not Displaying Data
Hi Gurus,
I have a report program, when i run it I display an output summary on ALV Grid, and when i click on each of the row in the output summary, I'm suppose to see the item detail of each record.
This item detail is showing for some record and is not showing for some other records (when i use different selections). I debugged it and observed that the table populating the ALV grid actually has records in it. The ALV grid is not just displaying the records.
I debugged the 2 examples (one showing record and the other not showing), I found out that nothing is different in the way they run till they populate the final internal record to passed to the ALV Grid.
Please any suggestions on this:
This is the function code for the ALV grid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_program_id
i_callback_pf_status_set = c_detail_status
i_callback_user_command = c_detail_user_comm
i_grid_title = lv_grid_title
is_layout = w_detail_layout
it_fieldcat = i_detail_fieldcat
it_sort = i_detail_sort
TABLES
t_outtab = i_faglflexa[] "NEM - detail
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e064
WITH sy-subrc.
Function REUSE_ALV_GRID_DISPLAY failed on detail view SY-SUBRC = &
ENDIF.This is the full code:
***INCLUDE ZFIGL_HYPERION_F01.
*& Form open_files
Open files used by the program.
FORM open_files.
OPEN DATASET p_fileot FOR OUTPUT IN TEXT MODE ENCODING DEFAULT
MESSAGE g_message.
IF sy-subrc <> 0.
MESSAGE e056
WITH g_message.
Unable to open output file &
ENDIF.
ENDFORM. " open_files
*& Form close_files
Close files used by the program.
FORM close_files.
CLOSE DATASET p_fileot.
ENDFORM. " close_files
*& Form extract_data
Extract data from database needed to generate output file and report.
FORM extract_data.
Get the required general ledger totals records.
PERFORM get_faglflext_data.
Derive any other necessary fields for I_FAGLFLEXT.
PERFORM derive_add_fields_faglflext.
Split records by fiscal period.
PERFORM split_records_by_period.
Summarize the detail records to allow for creation of the file and
reporting.
PERFORM summarize_records_by_period.
Get the required general ledger actual line items records.
PERFORM get_faglflexa_data.
Derive any other necessary fields for I_FAGLFLEXA.
PERFORM derive_add_fields_faglflexa.
Sort the detail and summary output tables into key sequence.
PERFORM sort_output_tables.
ENDFORM. " extract_data
*& Form process_data
Create the requested file and report.
FORM process_data.
Create the local file if requested by the user or the month-end file
at month-end.
IF cb_test = c_not_selected.
PERFORM create_pc_file.
ELSEIF sy-uname = c_user_batch_admin.
PERFORM create_output_file.
ENDIF.
Create the necessary tables for summary ALV report.
PERFORM build_summary_layout.
PERFORM build_summary_field_catalog.
PERFORM build_summary_sort_table.
Check to see that there is data in the summary output table. If yes,
generate report, if not, then give a message to the user.
READ TABLE i_output_summary INDEX 1 TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
MESSAGE s062.
STOP.
No data extracted for selection criteria entered
ENDIF.
Generate the summary ALV report view.
PERFORM generate_summary_alv_report.
ENDFORM. " process_data
*& Form verify_user_selections
Verify data input by the user.
FORM verify_user_selections.
IF NOT p_ryear IS INITIAL.
IF p_ryear < 2006 OR
p_ryear > 2100.
MESSAGE e057.
Fiscal year is invalid
ENDIF.
ENDIF.
If program is being run in a non-test mode and the user has left the
fiscal year selection blank, display a error message.
IF cb_test IS INITIAL AND
p_ryear IS INITIAL.
MESSAGE e058.
A fiscal year must be entered when generating the file
ENDIF.
If program is being run in a non-test mode and the user has left the
period selection blank, display a error message.
IF cb_test IS INITIAL AND
s_rpmax IS INITIAL.
MESSAGE e132.
A period must be entered when generating the file
ENDIF.
IF cb_test IS INITIAL AND
p_lfile IS INITIAL.
MESSAGE e071.
Local filename is required when generating the file
ENDIF.
****Basil Balogun's addition to include the hyperion acct in selection. (10/03/2007)***
IF s_rhype IS NOT INITIAL.
LOOP AT s_rhype.
CLEAR r_hyper.
r_hyper-sign = 'I'.
r_hyper-option = 'CP'.
CONCATENATE '' s_rhype-low '' INTO r_hyper-low.
APPEND r_hyper.
ENDLOOP.
SELECT bukrs saknr hyper
FROM zall_gl_hype INTO TABLE i_zall_gl
WHERE hyper IN r_hyper.
LOOP AT i_zall_gl INTO w_zall_gl.
w_zall_gl1-saknr = w_zall_gl-saknr.
w_zall_gl2-bukrs = w_zall_gl-bukrs.
APPEND w_zall_gl1-saknr TO i_zall_gl1.
APPEND w_zall_gl2-bukrs TO i_zall_gl2.
CLEAR: w_zall_gl, w_zall_gl1, w_zall_gl2.
ENDLOOP.
SORT i_zall_gl1 BY saknr.
SORT i_zall_gl2 BY bukrs.
DELETE ADJACENT DUPLICATES FROM i_zall_gl1 COMPARING saknr.
DELETE ADJACENT DUPLICATES FROM i_zall_gl2 COMPARING bukrs.
IF s_racct IS INITIAL.
LOOP AT i_zall_gl1 INTO w_zall_gl1.
r_saknr-sign = 'I'.
r_saknr-option = 'EQ'.
r_saknr-low = w_zall_gl1.
APPEND r_saknr.
CLEAR r_saknr.
CLEAR w_zall_gl1.
ENDLOOP.
ELSE.
r_saknr[] = s_racct[].
ENDIF.
IF s_rbukrs IS INITIAL.
LOOP AT i_zall_gl2 INTO w_zall_gl2.
r_bukrs-sign = 'I'.
r_bukrs-option = 'EQ'.
r_bukrs-low = w_zall_gl2-bukrs.
APPEND r_bukrs.
CLEAR r_bukrs.
CLEAR w_zall_gl2.
ENDLOOP.
ELSE.
r_bukrs[] = s_rbukrs[].
ENDIF.
ELSE.
r_saknr[] = s_racct[].
r_bukrs[] = s_rbukrs[].
SELECT bukrs saknr hyper
FROM zall_gl_hype INTO TABLE i_zall_gl.
ENDIF.
****Basil Balogun's addition to include the hyperion acct in selection. (10/03/2007)***
ENDFORM. " verify_user_selections
*& Form get_faglflext_data
Get FAGLFLEXT (General Ledger: Totals) data from the database.
FORM get_faglflext_data .
Use the fiscal year for the selection, if it was populated by the
user.
IF NOT p_ryear IS INITIAL.
SELECT ryear rldnr rvers racct rbukrs prctr rfarea kokrs segment
zzsarea zzsareaim rassc hsl01 hsl02 hsl03 hsl04 hsl05 hsl06
hsl07 hsl08 hsl09 hsl10 hsl11 hsl12 hsl13 hsl14 hsl15 hsl16
hslvt
INTO TABLE i_faglflext
FROM faglflext
WHERE rldnr = c_run_ledger AND
rbukrs IN r_bukrs AND
racct IN r_saknr AND
rfarea IN s_rfarea AND
prctr IN s_prctr AND
ryear = p_ryear AND
rvers = c_run_version.
ELSE.
SELECT ryear rldnr rvers racct rbukrs prctr rfarea kokrs segment
zzsarea zzsareaim rassc hsl01 hsl02 hsl03 hsl04 hsl05 hsl06
hsl07 hsl08 hsl09 hsl10 hsl11 hsl12 hsl13 hsl14 hsl15 hsl16
hslvt
INTO TABLE i_faglflext
FROM faglflext
WHERE rldnr = c_run_ledger AND
rbukrs IN r_bukrs AND
racct IN r_saknr AND
rfarea IN s_rfarea AND
prctr IN s_prctr AND
rvers = c_run_version.
ENDIF.
ENDFORM. " get_faglflext_data
*& Form derive_add_fields_faglflext
Derive additional fields needed for the I_FAGLFLEXT.
FORM derive_add_fields_faglflext.
Get needed company code and profit center data from the database.
PERFORM get_t001_data.
PERFORM get_t880_data.
READ TABLE i_faglflext INDEX 1 TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
PERFORM get_cepc_data.
ENDIF.
SORT i_zall_gl BY bukrs saknr.
LOOP AT i_faglflext INTO w_faglflext.
Get necessary company code data.
READ TABLE i_t001 INTO w_t001
WITH KEY bukrs = w_faglflext-rbukrs
BINARY SEARCH.
IF sy-subrc <> 0.
MESSAGE e059
WITH w_faglflext-rbukrs.
Company code & not found on table T001
ENDIF.
Determine the entity.
PERFORM derive_entity USING w_t001-rcomp
CHANGING w_faglflext-entity.
Determine the strategic segment.
PERFORM derive_strategic_segment USING w_faglflext-rassc
w_faglflext-prctr
CHANGING w_faglflext-strat_seg
w_faglflext-zzsareaim
w_faglflext-zzsarea.
Determine the strategic segment channel.
PERFORM derive_strat_seg_chnl USING w_faglflext-rassc
w_faglflext-prctr
CHANGING w_faglflext-strat_seg_chnl.
Determine the all item ID and all products.
PERFORM derive_all_item_id USING w_t001-waers
CHANGING w_faglflext-all_item_id
w_faglflext-all_products.
Determine the all customers and all customers channel.
PERFORM derive_all_customers_fields USING w_faglflext-strat_seg
*w_faglflext-strat_seg_chnl
CHANGING w_faglflext-all_cust
*w_faglflext-all_cust_chnl.
Determine the sub account using the company ID of the trading partner.
PERFORM derive_sub_account USING w_faglflext-rassc
CHANGING w_faglflext-sub_acct.
PERFORM derive_sub_account USING w_t001-rcomp
w_faglflext-rassc
CHANGING w_faglflext-sub_acct.
****Begin Basil changes to include hyperion acct in selection (10/03/2007).
READ TABLE i_zall_gl INTO w_zall_gl
WITH KEY bukrs = w_faglflext-rbukrs
saknr = w_faglflext-racct
BINARY SEARCH.
IF sy-subrc = 0.
****End Basil changes to include hyperion acct in selection (10/03/2007).
Determine the Hyperion account number from G/L account long text.
PERFORM derive_hyperion_account USING w_faglflext-racct
w_faglflext-rfarea
"KMK5/22/06 ITR: 20592
w_faglflext-sub_acct
w_faglflext-rassc
w_faglflext-prctr
CHANGING w_faglflext-hyperion_acct
w_faglflext-reverse_sign "NEM8/21/06 ITR: 24286
w_faglflext-balance_sheet "NEM8/21/06 ITR: 24286
w_faglflext-zzsarea
w_faglflext-zzsareaim
w_faglflext-strat_seg.
ENDIF.
Determine the all customers and all customers channel.
PERFORM derive_all_customers_fields USING w_faglflext-strat_seg
w_faglflext-strat_seg_chnl
CHANGING w_faglflext-all_cust
w_faglflext-all_cust_chnl.
Update i_FAGLFLEXT with the newly derive fields.
MODIFY i_faglflext FROM w_faglflext
TRANSPORTING entity
strat_seg
strat_seg_chnl
all_item_id
all_products
all_cust
all_cust_chnl
hyperion_acct
sub_acct
fiscal_period
zzsarea
zzsareaim
reverse_sign "NEM8/21/06 ITR: 24286
balance_sheet. "NEM8/21/06 ITR: 24286
ENDLOOP.
CHECK s_rhype IS NOT INITIAL.
SORT s_rhype BY low.
LOOP AT i_faglflext INTO w_faglflext.
READ TABLE s_rhype WITH KEY low = w_faglflext-hyperion_acct.
IF sy-subrc NE 0.
CLEAR w_faglflext-hyperion_acct.
MODIFY i_faglflext FROM w_faglflext.
ENDIF.
ENDLOOP.
DELETE i_faglflext WHERE hyperion_acct IS INITIAL.
ENDFORM. " derive_add_fields_faglflext
*& Form derive_entity
Derive the entity using the company code.
-->RCOMP - Company code.
<--ENTITY - Entity
FORM derive_entity USING rcomp TYPE t_t001-rcomp
CHANGING entity TYPE t_faglflext-entity.
CLEAR:
entity.
Get necessary global company code data.
READ TABLE i_t880 INTO w_t880
WITH KEY rcomp = rcomp
BINARY SEARCH.
IF sy-subrc = 0.
entity = w_t880-name2+0(3).
TRANSLATE entity TO UPPER CASE.
ELSE.
MESSAGE e060
WITH w_t001-rcomp.
Company code & not found on table T880
ENDIF.
ENDFORM. " derive_entity
*& Form get_t001_data
Get T001 (Company Codes) data from the database.
FORM get_t001_data.
SELECT bukrs waers rcomp
INTO TABLE i_t001
FROM t001
CLIENT SPECIFIED
WHERE mandt = sy-mandt.
SORT i_t001 BY bukrs.
ENDFORM. " get_t001_data
*& Form get_t880_data
Get T880 (Global Company Data (for KONS Ledger)) data from the
database.
FORM get_t880_data.
SELECT rcomp name2
INTO TABLE i_t880
FROM t880
CLIENT SPECIFIED
WHERE mandt = sy-mandt.
SORT i_t880 BY rcomp.
ENDFORM. " get_t880_data
*& Form derive_all_item_id
Derive the all item ID from the company code currency key.
-->WAERS - Currency key.
<--ALL_ITEM_ID - All item ID.
<--ALL_ITEM_ID - All item ID.
FORM derive_all_item_id USING waers TYPE t_t001-waers
CHANGING all_item_id TYPE t_faglflext-all_item_id
all_products TYPE t_faglflext-all_products
CLEAR:
all_item_id.
Populate all item ID.
all_item_id = c_all_item_id.
IF waers = c_us_dollars.
REPLACE '*' WITH c_united_states INTO all_item_id.
ELSE.
REPLACE '*' WITH c_local INTO all_item_id.
ENDIF.
Populate all products.
all_products = c_all_products.
TRANSLATE all_products TO UPPER CASE.
ENDFORM. " derive_all_item_id
*& Form derive_all_customers_fields
Derive the all customers and all customer channel fields from
the strategic segment and strategic segment channel respectively.
-->STRAT_SEG - Strategic segment.
-->STRAT_SEG_CHNL - Strategic segment channel.
<--ALL_CUST - All customers.
<--ALL_CUST_CHNL - All customers channel.
FORM derive_all_customers_fields USING strat_seg TYPE
t_faglflext-strat_seg
strat_seg_chnl TYPE
t_faglflext-strat_seg_chnl
CHANGING all_cust TYPE
t_faglflext-all_cust
all_cust_chnl TYPE
t_faglflext-all_cust_chnl.
CLEAR:
all_cust,
all_cust_chnl.
all_cust = strat_seg.
all_cust+2(1) = c_all_customers.
TRANSLATE all_cust TO UPPER CASE.
all_cust_chnl = strat_seg_chnl.
TRANSLATE all_cust_chnl TO UPPER CASE.
ENDFORM. " derive_all_customers_fields
*& Form derive_hyperion_account
Read G/L account long text to get the Hyperion account number.
-->RACCT - SAP G/L account number.
<--HYPERION_ACCT - Hyperion account number.
FORM derive_hyperion_account USING racct TYPE t_faglflext-racct
farea TYPE t_faglflext-rfarea
"KMK5/22/06 ITR 20592
sub_account TYPE
t_faglflext-sub_acct
rassc TYPE t_faglflext-rassc
prctr TYPE t_faglflext-prctr
CHANGING hyperion_acct TYPE t_faglflext-hyperion_acct
reverse_sign TYPE t_faglflext-reverse_sign "NEM8/21/06 ITR: 24286
balance_sheet TYPE t_faglflext-balance_sheet "NEM8/21/06 ITR: 24286
zzsarea TYPE t_faglflext-zzsarea
zzsareaim TYPE t_faglflext-zzsareaim
strat_seg TYPE t_faglflext-strat_seg.
DATA:
lv_text_name TYPE thead-tdname,
l_strl TYPE i VALUE 0,
l_hyperion_acct(10), "KMK5/20/06 ITR 20527
l_farea(10) VALUE '0000000000', "KMK5/22/06 ITR 20592
l_balance_sheet(1), "NEM8/17/06 ITR 25792
l_string TYPE tline-tdline. "NEM8/17/06 ITR 25792
DATA: l_hyp_account_1 TYPE tline-tdline,
l_hyp_account_2 TYPE tline-tdline,
l_hyp_account_3 TYPE tline-tdline.
reverse_sign = '1'.
SELECT SINGLE bilkt xbilk
FROM ska1
INTO (l_hyperion_acct,l_balance_sheet)
WHERE ktopl = c_global_tcoa
AND saknr = racct.
balance_sheet = l_balance_sheet.
l_string = w_zall_gl-hyper.
SEARCH l_string FOR '-'.
IF sy-subrc = '0'.
reverse_sign = -1.
ELSE.
reverse_sign = 1.
ENDIF.
CHECK w_zall_gl-hyper IS NOT INITIAL.
CLEAR: l_hyp_account_1, l_hyp_account_2, l_hyp_account_3.
SPLIT w_zall_gl-hyper
AT ';'
INTO l_hyp_account_1 l_hyp_account_2 l_hyp_account_3.
IF l_hyp_account_2 IS INITIAL. " Only one hyperion account
hyperion_acct = l_hyp_account_1+0(7).
l_strl = STRLEN( hyperion_acct ) - 1.
IF hyperion_acct+l_strl(1) EQ '1'.
CLEAR sub_account.
PERFORM repopulate_strategic_segment
USING rassc prctr
CHANGING strat_seg.
zzsareaim = g_hold_sales_type.
zzsarea = g_hold_sales_area.
ENDIF.
ELSE. " Two or more hyperion accounts
IF sub_account > ''.
hyperion_acct = l_hyp_account_2+0(7).
ELSE.
hyperion_acct = l_hyp_account_1+0(7).
ENDIF.
ENDIF.
CLEAR: w_hyperion.
w_hyperion-racct = racct.
w_hyperion-hyperion_acct = hyperion_acct.
w_hyperion-reverse_sign = reverse_sign.
ENDFORM. " derive_hyperion_account
*& Form derive_sub_account
Determine the sub account based on the company ID of the trading
partner.
-->RASSC - Company ID of trading partner.
<--SUB_ACCT - Sub account.
*FORM derive_sub_account USING rassc TYPE t_faglflext-rassc
CHANGING sub_acct TYPE t_faglflext-sub_acct.
IF rassc IS INITIAL.
CLEAR: sub_acct.
ELSE.
sub_acct = rassc.
TRANSLATE sub_acct TO UPPER CASE.
ENDIF.
*ENDFORM. " derive_sub_account
FORM derive_sub_account USING rcomp TYPE t_t001-rcomp
rassc TYPE t_faglflext-rassc
CHANGING sub_acct TYPE t_faglflext-sub_acct.
IF rassc IS INITIAL.
CLEAR: sub_acct.
ELSE.
READ TABLE i_t880 INTO w_t880
WITH KEY rcomp = rassc
BINARY SEARCH.
IF sy-subrc = 0.
sub_acct = w_t880-name2.
TRANSLATE sub_acct TO UPPER CASE.
ELSE.
MESSAGE e060
WITH w_t001-rcomp.
Company code & not found on table T880
ENDIF.
ENDIF.
ENDFORM. " derive_sub_account
*& Form repopulate_strategic_segment
Derive the strategic segment based on the company ID of the trading
partner or the profit center.
-->RASSC - Company ID of trading partner.
-->PRCTR - Profit center.
<--STRAT_SEG - Strategic segment.
FORM repopulate_strategic_segment USING rassc TYPE t_faglflext-rassc
prctr TYPE t_faglflext-prctr
CHANGING strat_seg TYPE t_faglflext-strat_seg
DATA:
lv_segment TYPE cepc-segment.
CLEAR:
strat_seg.
Find the valid profit center record.
LOOP AT i_cepc INTO w_cepc
WHERE prctr = prctr AND
datab <= sy-datum AND
datbi >= sy-datum.
Pad segment with leading zeros if necessary.
lv_segment = w_cepc-segment.
SHIFT lv_segment RIGHT DELETING TRAILING ' '.
TRANSLATE lv_segment USING ' 0'.
Get the segment name from FAGL_SEGMT (Master Data for Segments).
SELECT SINGLE *
FROM fagl_segmt
WHERE langu = sy-langu AND
segment = lv_segment.
IF sy-subrc = 0.
strat_seg = fagl_segmt-name+0(3).
TRANSLATE strat_seg TO UPPER CASE.
ENDIF.
ENDLOOP.
ENDFORM. "repopulate_strategic_segment
" repopulate_strategic_segment&----
*& Form derive_strategic_segment
Derive the strategic segment based on the company ID of the trading
partner or the profit center.
-->RASSC - Company ID of trading partner.
-->PRCTR - Profit center.
<--STRAT_SEG - Strategic segment.
FORM derive_strategic_segment USING rassc TYPE t_faglflext-rassc
prctr TYPE t_faglflext-prctr
CHANGING strat_seg TYPE t_faglflext-strat_seg
sales_type TYPE t_faglflext-zzsareaim
sales_area TYPE t_faglflext-zzsarea.
DATA:
lv_segment TYPE cepc-segment.
CLEAR:
strat_seg.
*Hold values in Sales Type and Sales area before setting to default
*values
In case need to use them later
g_hold_sales_type = sales_type.
g_hold_sales_area = sales_area.
If the company ID of the trading partner is populated, then set the
strategic segment to a default value.
And set Sales Type and Sales area to default values **NEM 07/13/06
IF NOT rassc IS INITIAL.
strat_seg = c_def_strat_seg.
sales_type = c_sales_type.
sales_area = c_sales_area.
TRANSLATE strat_seg TO UPPER CASE.
TRANSLATE sales_type TO UPPER CASE.
TRANSLATE sales_area TO UPPER CASE.
EXIT.
ENDIF.
Find the valid profit center record.
LOOP AT i_cepc INTO w_cepc
WHERE prctr = prctr AND
datab <= sy-datum AND
datbi >= sy-datum.
Pad segment with leading zeros if necessary.
lv_segment = w_cepc-segment.
SHIFT lv_segment RIGHT DELETING TRAILING ' '.
TRANSLATE lv_segment USING ' 0'.
Get the segment name from FAGL_SEGMT (Master Data for Segments).
SELECT SINGLE *
FROM fagl_segmt
WHERE langu = sy-langu AND
segment = lv_segment.
IF sy-subrc = 0.
strat_seg = fagl_segmt-name+0(3).
TRANSLATE strat_seg TO UPPER CASE.
ENDIF.
ENDLOOP.
ENDFORM. " derive_strategic_segment
*& Form get_cepc_data
Get CEPC (Profit Center Master Data Table) data from the database.
FORM get_cepc_data.
SELECT prctr datbi kokrs datab khinr segment
INTO TABLE i_cepc
FROM cepc
FOR ALL ENTRIES IN i_faglflext
WHERE prctr = i_faglflext-prctr.
SORT i_cepc BY prctr datab.
ENDFORM. " get_cepc_data
*& Form derive_strat_seg_chnl
Derive the strategic segment channel based on the company ID of the
trading partner or the profit center area.
-->RASSC - Company ID of trading partner.
-->PRCTR - Profit center.
<--STRAT_SEG_CHNL - Strategic segment channel.
FORM derive_strat_seg_chnl USING rassc TYPE t_faglflext-rassc
prctr TYPE t_faglflext-prctr
CHANGING strat_seg_chnl TYPE
t_faglflext-strat_seg_chnl.
CLEAR:
g_setclass,
g_subclass,
g_setname,
strat_seg_chnl.
If the company ID of the trading partner is populated, then set the
strategic segment to a default value.
IF NOT rassc IS INITIAL.
strat_seg_chnl = c_def_strat_seg_chnl.
TRANSLATE strat_seg_chnl TO UPPER CASE.
EXIT.
ENDIF.
Check for SETNAME = 2*** in setleaf table.
PERFORM get_setleaf_data USING c_prctr_group
prctr
CHANGING g_subrc.
IF g_subrc NE c_no_record.
PERFORM find_setleaf_record CHANGING g_subrc.
SELECT SINGLE *
FROM setheadert
WHERE setclass = g_setclass AND
subclass = g_subclass AND
setname = g_setname AND
langu = sy-langu.
IF sy-subrc = 0.
strat_seg_chnl = setheadert-descript+0(2).
TRANSLATE strat_seg_chnl TO UPPER CASE.
ENDIF.
ELSE.
Find the valid profit center record.
LOOP AT i_cepc INTO w_cepc
WHERE prctr = prctr AND
datab <= sy-datum AND
datbi >= sy-datum.
Get the correct SETNODE (Lower-level sets in sets) record.
PERFORM get_setnode_data USING c_prctr_group
w_cepc-khinr
CHANGING g_subrc.
PERFORM find_setnode_record CHANGING g_subrc.
IF g_subrc = c_no_record.
EXIT.
ENDIF.
If an appropriate SETNODE record still has not been found, then
keep looking.
IF g_subrc = c_wrong_record.
DO.
PERFORM get_setnode_data USING c_prctr_group
w_setnode-setname
CHANGING g_subrc.
PERFORM find_setnode_record CHANGING g_subrc.
IF g_subrc = c_no_record OR
g_subrc = c_correct_record.
EXIT.
ENDIF.
ENDDO.
ENDIF.
In the end, there was no SETNODE record to find.
IF g_subrc = c_no_record.
EXIT.
ENDIF.
SELECT SINGLE *
FROM setheadert
WHERE setclass = g_setclass AND
subclass = g_subclass AND
setname = g_setname AND
langu = sy-langu.
IF sy-subrc = 0.
strat_seg_chnl = setheadert-descript+0(2).
TRANSLATE strat_seg_chnl TO UPPER CASE.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. " derive_strat_seg_chnl
*& Form get_setnode_data
Get SETNODE (Lower-level sets in sets) data from the database.
-->SETCLASS - Set class.
-->SUBSETNAME - Subordinate set ID.
<--SUBRC - Return code.
FORM get_setnode_data USING setclass TYPE c
subsetname TYPE c
CHANGING subrc TYPE sy-subrc.
SELECT setclass subclass setname
INTO TABLE i_setnode
FROM setnode
WHERE setclass = c_prctr_group AND
subsetname = subsetname.
subrc = sy-subrc.
ENDFORM. " get_setnode_data
*& Form get_setleaf_data
Get SETLEAF (Values in Sets) data from the database.
-->SETCLASS - Set class.
-->VALFROM - Subordinate set ID.
<--SUBRC - Return code.
FORM get_setleaf_data USING setclass TYPE c
valfrom TYPE c
CHANGING subrc TYPE sy-subrc.
subrc = c_correct_record.
SELECT setclass setname valfrom subclass
INTO TABLE i_setleaf
FROM setleaf
WHERE setclass = c_prctr_group AND
valfrom = valfrom AND
setname GE '2000' AND
setname LE '2999'.
IF sy-subrc <> 0.
subrc = c_no_record.
EXIT.
ENDIF.
ENDFORM. " get_setleaf_data
*& Form find_setleaf_record
Find the appropriate SETLEAF record.
<--SUBRC - Return code.
FORM find_setleaf_record CHANGING subrc TYPE sy-subrc.
subrc = c_wrong_record.
If no records were found during selection, then exit the routine.
READ TABLE i_setleaf INDEX 1 TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
subrc = c_no_record.
EXIT.
ENDIF.
Check to see if one of the records has a setname in the 2000 series of
numbers.
LOOP AT i_setleaf INTO w_setleaf.
g_setclass = w_setleaf-setclass.
g_subclass = w_setleaf-subclass.
g_setname = w_setleaf-setname.
subrc = c_correct_record.
ENDLOOP.
ENDFORM. " find_setleaf_record
*& Form find_setnode_record
Find the appropriate SETNODE record.
<--SUBRC - Return code.
FORM find_setnode_record CHANGING subrc TYPE sy-subrc.
subrc = c_wrong_record.
If no records were found during selection, then exit the routine.
READ TABLE i_setnode INDEX 1 TRANSPORTING NO FIELDS.
IF sy-subrc <> 0.
subrc = c_no_record.
EXIT.
ENDIF.
Check to see if one of the records has a setname in the 2000 series of
numbers.
LOOP AT i_setnode INTO w_setnode.
IF w_setnode-setname+0(1) = c_valid_number.
g_setclass = w_setnode-setclass.
g_subclass = w_setnode-subclass.
g_setname = w_setnode-setname.
subrc = c_correct_record.
EXIT.
ENDIF.
ENDLOOP.
ENDFORM. " find_setnode_record
*& Form split_records_by_period
Split the i_FAGLFLEXT records by fiscal period. This is necessary
because all (16) fiscal periods are on one record.
FORM split_records_by_period .
REFRESH:
i_output_detail.
LOOP AT i_faglflext INTO w_faglflext.
START OF CHANGES BY BAYAPV on 07/07/2007**********************
*SELECT SINGLE BUKRS
SAKNR
XOPVW
into w_skb1
from skb1
FOR ALL ENTRIES IN I_FAGLFLEXT
where bukrs = w_faglflext-rbukrs
and SAKNR = w_faglflext-racct.
*IF w_skb1-XOPVW = 'X'.
*SELECT BUKRS
HKONT -
Attribute Change Run aborted with an error :Not all data indexed for index
Hi,
I have an issue where the master data Attribute Change Run aborted with an error pointing to the BWA:
Attribute Change Run aborted with an error :Not all data indexed for index
we tried to load only 0 data into it,the error still occured.Detail message is following:
not all data was indexed for index 'GBP_BIC:XYCH_098('0' for '114')
creation of The BIA INDEX for infocube 'YBC_SD015' terminated while filling -
Can i insert data in my database from a web intelligence report?
if that's not possible,can I do it from a stored procedure based Universe or with a derived table? Does BusinessObjects in general allow me to execute statements to insert data in my database?
Hi Erika,
afaik it is not possible write back to database from web intelligence .
from dashboards with web services you can achieve this. -
Refresh jTable after inserting new data into the Database
Hey all,
I'm using Netbeans 6.5 to create a Desktop Application which is connected to a Java DB (Derby).
The first simple steps were all very successfull:
Create the jTable and bind it to the Database => everything works fine. When the application starts it correctly shows all data from the database.
The problem starts when I try to insert new data to the database.
For that reason I've created textfields and a button "Save". When I press the button it successfully inserts the data to the database but they are not displayed in the jTable (when the application starts they are all there, they are not updated at runtime) . I've tried table.invalidate() and table.repaint() but they just don't work.
Any help will be GREATLY appreciated. But please have in mind that most of the code is Netbeans-generated and most of it not editable.
Many thanks in advance.
GeorgeOnce again you are right my friend. I jumped to conclusion way too fast, when I shouldn't. (Give me a break, I've been busting my head with this well over a week). The response I saw when I did that was that indeed a line is added to the jTable. Because I falsly set the index of the object to be added to be second to last the row appeared on the table, what I didn't see at the time was that the last one disappeared. Hmm...
A new adventure begins...
So after a few hours of messing around with it here are my observations:
1) It was not an observable list. When I add the new element with employeesList.add(newEmp); , the table gets notified but a get a bunch of exceptions:
xception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 84, Size: 84
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at org.jdesktop.swingbinding.impl.ListBindingManager$ColumnDescriptionManager.validateBinding(ListBindingManager.java:191)
at org.jdesktop.swingbinding.impl.ListBindingManager.valueAt(ListBindingManager.java:99)
at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.getValueAt(JTableBinding.java:713)
at javax.swing.JTable.getValueAt(JTable.java:1903)
at javax.swing.JTable.prepareRenderer(JTable.java:3911)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:154)
at javax.swing.JComponent.paintComponent(JComponent.java:743)
at javax.swing.JComponent.paint(JComponent.java:1006)
at javax.swing.JViewport.blitDoubleBuffered(JViewport.java:1602)
at javax.swing.JViewport.windowBlitPaint(JViewport.java:1568)
at javax.swing.JViewport.setViewPosition(JViewport.java:1098)
at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.vsbStateChanged(BasicScrollPaneUI.java:818)
at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:807)
at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:348)
at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:285)
at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:151)
at javax.swing.JScrollBar.setValue(JScrollBar.java:441)
at javax.swing.plaf.basic.BasicScrollBarUI.scrollByUnits(BasicScrollBarUI.java:907)
at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.mouseWheelMoved(BasicScrollPaneUI.java:778)
at javax.swing.plaf.basic.BasicScrollPaneUI$MouseWheelHandler.mouseWheelMoved(BasicScrollPaneUI.java:449)
at apple.laf.CUIAquaScrollPane$XYMouseWheelHandler.mouseWheelMoved(CUIAquaScrollPane.java:38)
at java.awt.Component.processMouseWheelEvent(Component.java:5690)
at java.awt.Component.processEvent(Component.java:5374)
at java.awt.Container.processEvent(Container.java:2010)
at java.awt.Component.dispatchEventImpl(Component.java:4068)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchMouseWheelToAncestor(Component.java:4211)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2068)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
at java.awt.Container.dispatchEventImpl(Container.java:2054)
at java.awt.Window.dispatchEventImpl(Window.java:1801)
at java.awt.Component.dispatchEvent(Component.java:3903)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 84, Size: 84
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at org.jdesktop.swingbinding.impl.ListBindingManager$ColumnDescriptionManager.validateBinding(ListBindingManager.java:191)
at org.jdesktop.swingbinding.impl.ListBindingManager.valueAt(ListBindingManager.java:99)
at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.getValueAt(JTableBinding.java:713)
at javax.swing.JTable.getValueAt(JTable.java:1903)
at javax.swing.JTable.prepareRenderer(JTable.java:3911)
at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
... and a lot morewhich from my poor understanding means that the jTable succesfully notices the change but it is not able (??) to adjust to the new change. What is more interesting is that when I plainly add the element to the end of the list (without an idex that is), a blank row appears at the end of my Table. The weird thing is that I've bound the table to some text fields below it, and when I select that empty row all the data appear correctly to the text fields.
I tried going through:
org.jdesktop.observablecollections.ObservableCollections.observableList(employeesList).add(newEmp);as well as
help = org.jdesktop.observablecollections.ObservableCollections.observableListHelper(employeesList);
help.getObservableList().add(newEmp);
help.fireElementChanged(employeesList.lastIndexOf(newEmp));and
obsemployeesList = org.jdesktop.observablecollections.ObservableCollections.observableList(employeesList);
obsemployeesList.add(newEmp);and I still get the same results (both the exeptions and the mysterious empty row at the end of the table
So, I'm again in terrible need of your advice. I can't thank you enough for the effort you put into this.
Best regards,
George
Edited by: tougeo on May 30, 2009 11:06 AM
Edited by: tougeo on May 30, 2009 11:21 AM
Edited by: tougeo on May 30, 2009 11:30 AM -
Error while trying to insert data on a database through a mediator
I have build a simple project on 11g TP$, which consists of a mediator, a file adapter, that reads an xml file and a DB adapter that inserts data on a database.
The mediator connects the file adapter to the DB adapter and through a routing rule it inserts data on a table of the database.
When I try to run this project the input file is consumed by the file adapter, but after that I get the following error
SEVERE: Part {body} return null from the message :in
Dec 5, 2008 2:24:55 PM oracle.tip.mediator.service.transformation.XSLTransformer getPartDocument
SEVERE: payload map source message :{opaque=oracle.xml.parser.v2.XMLElement@19b0076}
Dec 5, 2008 2:24:55 PM oracle.tip.mediator.service.transformation.MediatorTransformationHandler transform
SEVERE: Transformation failed
oracle.tip.mediator.infra.exception.MediatorException: Error occured while transforming payload!
Please review the XSL or source payload.Contact Oracle Support if error not fixable
at oracle.tip.mediator.service.transformation.XSLTransformer.getPartDocument(XSLTransformer.java:191)
at oracle.tip.mediator.service.transformation.XSLTransformer.transform(XSLTransformer.java:102)
at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:103)
at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:196)
at oracle.tip.mediator.service.DataActionHandler.getNextPayload(DataActionHandler.java:145)
at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:74)
at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:53)
at oracle.tip.mediator.service.OneWayActionHandler.oneWayRequestProcess(OneWayActionHandler.java:67)
at oracle.tip.mediator.service.OneWayActionHandler.process(OneWayActionHandler.java:34)
at oracle.tip.mediator.service.ActionProcessor.onMessage(ActionProcessor.java:61)
at oracle.tip.mediator.dispatch.MessageDispatcher.executeCase(MessageDispatcher.java:103)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCase(InitialMessageDispatcher.java:465)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:361)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:254)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.dispatch(InitialMessageDispatcher.java:149)
at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.process(MediatorServiceEngine.java:533)
at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.post(MediatorServiceEngine.java:634)
at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:138)
at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:152)
at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy70.post(Unknown Source)
at oracle.integration.platform.blocks.adapter.fw.jca.mdb.AdapterServiceMDB.onMessage(AdapterServiceMDB.java:574)
at oracle.integration.platform.blocks.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:295)
at oracle.tip.adapter.file.inbound.ProcessWork.publishMessage(ProcessWork.java:2127)
at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork.java:1719)
at oracle.tip.adapter.file.inbound.ProcessWork.translateAndPublish(ProcessWork.java:677)
at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:320)
at oracle.integration.platform.blocks.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
at oracle.integration.platform.blocks.adapter.fw.common.ThreadPool.run(ThreadPool.java:283)
at java.lang.Thread.run(Thread.java:595)
Dec 5, 2008 2:24:55 PM oracle.tip.mediator.serviceEngine.MediatorServiceEngine process
SEVERE: Updating fault processing DMS metrics
Dec 5, 2008 2:24:55 PM oracle.tip.mediator.serviceEngine.MediatorServiceEngine process
SEVERE: Got an exception: Error occured while transforming payload!
Please review the XSL or source payload.Contact Oracle Support if error not fixable
oracle.tip.mediator.infra.exception.MediatorException: Error occured while transforming payload!
Please review the XSL or source payload.Contact Oracle Support if error not fixable
at oracle.tip.mediator.service.transformation.XSLTransformer.getPartDocument(XSLTransformer.java:191)
at oracle.tip.mediator.service.transformation.XSLTransformer.transform(XSLTransformer.java:102)
at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:103)
at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:196)
at oracle.tip.mediator.service.DataActionHandler.getNextPayload(DataActionHandler.java:145)
at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:74)
at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:53)
at oracle.tip.mediator.service.OneWayActionHandler.oneWayRequestProcess(OneWayActionHandler.java:67)
at oracle.tip.mediator.service.OneWayActionHandler.process(OneWayActionHandler.java:34)
at oracle.tip.mediator.service.ActionProcessor.onMessage(ActionProcessor.java:61)
at oracle.tip.mediator.dispatch.MessageDispatcher.executeCase(MessageDispatcher.java:103)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCase(InitialMessageDispatcher.java:465)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:361)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:254)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.dispatch(InitialMessageDispatcher.java:149)
at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.process(MediatorServiceEngine.java:533)
at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.post(MediatorServiceEngine.java:634)
at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:138)
at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:152)
at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy70.post(Unknown Source)
at oracle.integration.platform.blocks.adapter.fw.jca.mdb.AdapterServiceMDB.onMessage(AdapterServiceMDB.java:574)
at oracle.integration.platform.blocks.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:295)
at oracle.tip.adapter.file.inbound.ProcessWork.publishMessage(ProcessWork.java:2127)
at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork.java:1719)
at oracle.tip.adapter.file.inbound.ProcessWork.translateAndPublish(ProcessWork.java:677)
at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:320)
at oracle.integration.platform.blocks.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
at oracle.integration.platform.blocks.adapter.fw.common.ThreadPool.run(ThreadPool.java:283)
at java.lang.Thread.run(Thread.java:595)
Dec 5, 2008 2:24:55 PM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
SEVERE: JCABinding=> Read ReadAdapter Service Read was unable to perform delivery of inbound message to the composite due to: oracle.tip.mediator.infra.exception.MediatorException: Error occured while transforming payload!
Please review the XSL or source payload.Contact Oracle Support if error not fixable
Dec 5, 2008 2:24:55 PM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
SEVERE: JCABinding=> Read
oracle.fabric.common.FabricInvocationException: oracle.tip.mediator.infra.exception.MediatorException: Error occured while transforming payload!
Please review the XSL or source payload.Contact Oracle Support if error not fixable
at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.process(MediatorServiceEngine.java:599)
at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.post(MediatorServiceEngine.java:634)
at oracle.integration.platform.blocks.mesh.AsynchronousMessageHandler.doPost(AsynchronousMessageHandler.java:138)
at oracle.integration.platform.blocks.mesh.MessageRouter.post(MessageRouter.java:152)
at oracle.integration.platform.blocks.mesh.MeshImpl.post(MeshImpl.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:59)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy70.post(Unknown Source)
at oracle.integration.platform.blocks.adapter.fw.jca.mdb.AdapterServiceMDB.onMessage(AdapterServiceMDB.java:574)
at oracle.integration.platform.blocks.adapter.fw.jca.messageinflow.MessageEndpointImpl.onMessage(MessageEndpointImpl.java:295)
at oracle.tip.adapter.file.inbound.ProcessWork.publishMessage(ProcessWork.java:2127)
at oracle.tip.adapter.file.inbound.ProcessWork.doTranslation(ProcessWork.java:1719)
at oracle.tip.adapter.file.inbound.ProcessWork.translateAndPublish(ProcessWork.java:677)
at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:320)
at oracle.integration.platform.blocks.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)
at oracle.integration.platform.blocks.adapter.fw.common.ThreadPool.run(ThreadPool.java:283)
at java.lang.Thread.run(Thread.java:595)
Caused by: oracle.tip.mediator.infra.exception.MediatorException: Error occured while transforming payload!
Please review the XSL or source payload.Contact Oracle Support if error not fixable
at oracle.tip.mediator.service.transformation.XSLTransformer.getPartDocument(XSLTransformer.java:191)
at oracle.tip.mediator.service.transformation.XSLTransformer.transform(XSLTransformer.java:102)
at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:103)
at oracle.tip.mediator.service.transformation.MediatorTransformationHandler.transform(MediatorTransformationHandler.java:196)
at oracle.tip.mediator.service.DataActionHandler.getNextPayload(DataActionHandler.java:145)
at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:74)
at oracle.tip.mediator.service.BaseActionHandler.requestProcess(BaseActionHandler.java:53)
at oracle.tip.mediator.service.OneWayActionHandler.oneWayRequestProcess(OneWayActionHandler.java:67)
at oracle.tip.mediator.service.OneWayActionHandler.process(OneWayActionHandler.java:34)
at oracle.tip.mediator.service.ActionProcessor.onMessage(ActionProcessor.java:61)
at oracle.tip.mediator.dispatch.MessageDispatcher.executeCase(MessageDispatcher.java:103)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCase(InitialMessageDispatcher.java:465)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:361)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.processCases(InitialMessageDispatcher.java:254)
at oracle.tip.mediator.dispatch.InitialMessageDispatcher.dispatch(InitialMessageDispatcher.java:149)
at oracle.tip.mediator.serviceEngine.MediatorServiceEngine.process(MediatorServiceEngine.java:533)
... 24 more
Dec 5, 2008 2:24:55 PM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
WARNING: JCABinding=> Read ReadonReject: The resource adapter 'File Adapter' requested handling of a malformed inbound message. However, the following Service property has not been defined: 'rejectedMessageHandlers'. Please define it and redeploy the module. Will use the default Rejection Directory file://jca\Read\rejectedMessages for now.
Dec 5, 2008 2:24:55 PM oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl log
WARNING: JCABinding=> Read ReadonReject: Sending invalid inbound message to Exception Handler:
Dec 5, 2008 2:24:55 PM oracle.tip.mediator.common.error.ErrorMessageEnqueuer$EnqueuerThread run
SEVERE: Failed to enqueue error message
javax.jms.TransactionInProgressException: Cannot call commit on a XA capable JMS session.
at oracle.j2ee.ra.jms.generic.RAUtils.make(RAUtils.java:595)
at oracle.j2ee.ra.jms.generic.RAUtils.toTransactionInProgressException(RAUtils.java:846)
at oracle.j2ee.ra.jms.generic.RAUtils.toTransactionInProgressException(RAUtils.java:840)
at oracle.j2ee.ra.jms.generic.SessionWrapper.commit(SessionWrapper.java:197)
at oracle.tip.mediator.common.error.ErrorMessageEnqueuer$EnqueuerThread.run(ErrorMessageEnqueuer.java:187)
at java.lang.Thread.run(Thread.java:595)
I have checked the .xsd file and my xml several times and it seems that they are correct. Moreover, the .xsl file is also correct.
Does anyone have any idea of what may produce this problem?
ThanksI was finally able to get my project working. Heidi - You were right, there was a problem with the XSL generated by the XSL map editor.
I am trying to locate if this issue has already been reported, but I am highlighting it here, in case someone else faces the same.
The XSL generated was as follows:
<xsl:stylesheet version="1.0"
xmlns:dvm="[http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue]"
xmlns:bpws="[http://schemas.xmlsoap.org/ws/2003/03/business-process/]"
xmlns:ns1="[http://xmlns.oracle.com/pcbpel/adapter/db/ReadEmps/Read/DB/]"
xmlns:plt="[http://schemas.xmlsoap.org/ws/2003/05/partner-link/]"
xmlns:ns0="[http://www.w3.org/2001/XMLSchema]"
xmlns:hwf="[http://xmlns.oracle.com/bpel/workflow/xpath]"
xmlns:xp20="[http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20]"
xmlns:xref="[http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions]"
xmlns:tns="[http://xmlns.oracle.com/pcbpel/adapter/file/ReadEmps/Read/Read/]"
xmlns:xsl="[http://www.w3.org/1999/XSL/Transform]"
xmlns:ora="[http://schemas.oracle.com/xpath/extension]"
xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance]"
xmlns:imp1="[www.TargetNameSpace.com/EmpTrack|http://www.targetnamespace.com/EmpTrack]*"*
xmlns:top="[http://xmlns.oracle.com/pcbpel/adapter/db/top/DB]"
xmlns:ids="[http://xmlns.oracle.com/bpel/services/IdentityService/xpath]"
xmlns:orcl="[http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc]"
xmlns:mhdr="[http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.GetRequestHeaderExtnFunction]"
exclude-result-prefixes="xsl plt ns0 tns imp1 ns1 top dvm bpws hwf xp20 xref ora ids orcl mhdr">
<xsl:template match="/">
<top:EmployeeTrackingCollection>
<xsl:for-each select*="/imp1:ROWSET/imp1:ROW*">
<top:EmployeeTracking>
<top:locationId>
<xsl:value-of select="*imp1:LOCATION_ID*"/>
</top:locationId>
<top:employeeId>
<xsl:value-of select="*imp1:EMPLOYEE_ID*"/>
</top:employeeId>
<top:employeeX>
<xsl:value-of select="*imp1:EMPLOYEE_X*"/>
</top:employeeX>
<top:employeeY>
<xsl:value-of select="*imp1:EMPLOYEE_Y"*/>
</top:employeeY>
</top:EmployeeTracking>
</xsl:for-each>
</top:EmployeeTrackingCollection>
</xsl:template>
</xsl:stylesheet>
The Xpath included the "imp1:" tag to reference the namespace. I tested this XSL and it didn't work. However, on removing the namespace "imp1:" from the Xpath, the XSL works fine and I am able to insert into the database. "No suitable driver" still appears in the log, but all rows from the XML are inserted into the database.
Heidi - do you think this is a bug? -
Insert data into the xml schema-based xmltype table problem!
Hello, there,
I got problem in inserting data into the xmltype table after registered XML schema and created table. details see below:
1) xml schema:
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2007 sp2 (http://www.altova.com) by Constantin Ilea (EMERGIS INC) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1" targetNamespace="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1" elementFormDefault="qualified">
<!-- ************** PART I: BEGIN SIMPLE OBJECT TYPE DEFINITIONS ********************************** -->
<xs:simpleType name="RoutingType">
<xs:restriction base="xs:string">
<xs:enumeration value="Synch"/>
<xs:enumeration value="Asynch"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="StatusType">
<xs:restriction base="xs:string">
<xs:enumeration value="ACTIVE"/>
<xs:enumeration value="VOID"/>
<xs:enumeration value="PENDING"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="SenderApplicationType">
<xs:restriction base="xs:string">
<xs:enumeration value="PR"/>
<xs:enumeration value="CR"/>
<xs:enumeration value="POS"/>
<xs:enumeration value="CPP"/>
<xs:enumeration value="Other"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ServiceTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="IS"/>
<xs:enumeration value="WS"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="RouteDirect">
<xs:restriction base="xs:string">
<xs:enumeration value="Request"/>
<xs:enumeration value="Reply"/>
<xs:enumeration value="None"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Indicator">
<xs:annotation>
<xs:documentation>can we also change the value to "ON" and "OFF" instead? in this way this cn be shared by all type of switch indicator</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:enumeration value="YES"/>
<xs:enumeration value="NO"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="RuleType">
<xs:restriction base="xs:string">
<xs:enumeration value="ControlAct"/>
<xs:enumeration value="WSPolicy"/>
<xs:enumeration value="AccessControl"/>
<xs:enumeration value="Certification"/>
<xs:enumeration value="MessageConformance"/>
<xs:enumeration value="Variant"/>
<xs:enumeration value="Routing"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="HL7Result">
<xs:restriction base="xs:string">
<xs:enumeration value="ACCEPT"/>
<xs:enumeration value="REFUSE"/>
<xs:enumeration value="REJECT"/>
<xs:enumeration value="ACK"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="IIPType">
<xs:restriction base="xs:string">
<xs:enumeration value="PUT"/>
<xs:enumeration value="GET/LIST"/>
<xs:enumeration value="NOTIF"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ProfileTypeType">
<xs:restriction base="xs:string">
<xs:enumeration value="IIPProfile"/>
<xs:enumeration value="BizOperationProfile"/>
<xs:enumeration value="OrchestrationProfile"/>
<xs:enumeration value="DomainObjectProfile"/>
<xs:enumeration value="ServiceProfile"/>
<xs:enumeration value="ExceptionProfile"/>
<xs:enumeration value="CustomizedProfile"/>
<xs:enumeration value="SystemProfile"/>
<xs:enumeration value="HL7XMLSchemaProfile"/>
<xs:enumeration value="EnricherParametersProfile"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ParameterType">
<xs:restriction base="xs:string">
<xs:enumeration value="String"/>
<xs:enumeration value="Object"/>
<xs:enumeration value="Number"/>
<xs:enumeration value="Document"/>
</xs:restriction>
</xs:simpleType>
<!-- ************** PART I: END SIMPLE OBJECT TYPE DEFINITIONS ********************************** -->
<!-- ************** PART II: BEGIN COMPLEX OBJECT TYPE DEFINITIONS ********************************** -->
<!-- *********************** begin new added objects, by rshan *************************************** -->
<xs:complexType name="ProfileType">
<xs:annotation>
<xs:documentation>
1.Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS
2.ProfileID used to uniquely identify the current profile
3.ProfileData used to hold all the necessary profile related data
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ProfileID" type="ProfileIDType">
<xs:annotation>
<xs:documentation>this will hold all the common attributes, espically the global unique identifier to the profile, no matter what type of profile is</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ProfileData" type="ProfileDataType">
<xs:annotation>
<xs:documentation>all the non-common profile meta data that attached to each specific profile type such as IIPProfile, OrchestrationProfile, and BizOperationProfile will be placed here</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ProfileIDType">
<xs:annotation>
<xs:documentation>global unique identifier and all the common attributes across all different profiles, the @ID and @Type together will be used as the primary key to identify the profile data</xs:documentation>
</xs:annotation>
<xs:attribute name="ID" type="xs:ID" use="required">
<xs:annotation>
<xs:documentation>ID is the global unique identifier to the profile, no matter what type of profile it is</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Name"/>
<xs:attribute name="Description"/>
<xs:attribute name="Version">
<xs:annotation>
<xs:documentation>version of the profile data</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Type" type="ProfileTypeType" use="required">
<xs:annotation>
<xs:documentation>value to identify the ProfileType type within
IIPProfile,BizOperationProfile,OrchestrationProfile,DomainObjectProfile
ServiceProfile,ExceptionProfile,SystemProfile,HL7XMLSchemaProfile,
EnricherParametersProfile,CustomizedProfile
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Status" type="StatusType" default="ACTIVE">
<xs:annotation>
<xs:documentation>used to show the related profile data status like "ACTIVE","PENDING","VOID"...</xs:documentation>
</xs:annotation>
</xs:attribute>
<!--
<xs:sequence>
<xs:element name="ProfileReference" type="ProfileIDType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>this will be the place to hold the integrity relationship with other profiles like foreign key if existed and necessary to show up</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
-->
</xs:complexType>
<xs:complexType name="ProfileDataType">
<xs:annotation>
<xs:documentation>meta data associated tightly to each specific type of profile</xs:documentation>
</xs:annotation>
<xs:choice>
<xs:element name="EnricherParametersProfileData" type="EnricherParametersDataType">
<xs:annotation>
<xs:documentation>Enricher Parameters related profile data
1. one instance of this type may contains all the related System metadata.
2. idType part may use to identify different version/release/status
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ExtendProfileData" type="ExtendProfileDataType">
<xs:annotation>
<xs:documentation>If needed, any profile data not defined within the current release scope can be added here </xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:complexType name="ExtendProfileDataType">
<xs:sequence>
<xs:element name="ExtendProfile" type="xs:anyType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EnricherParametersDataType">
<xs:sequence>
<xs:element name="EnricherParameter" type="EnricherParameter" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EnricherParameter">
<xs:sequence>
<xs:element ref="Enricher"/>
</xs:sequence>
<xs:attribute name="serviceName" type="xs:string" use="required"/>
<xs:attribute name="interactionID" type="xs:string"/>
</xs:complexType>
<xs:element name="Enricher">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Parameters" type="Parameters"/>
<xs:element ref="Section" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="ValueType">
<xs:attribute name="field" use="required"/>
<xs:attribute name="value"/>
<xs:attribute name="action"/>
</xs:complexType>
<xs:element name="Section">
<xs:complexType>
<xs:sequence>
<xs:element name="Value" type="ValueType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="Section" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="path" use="required"/>
</xs:complexType>
</xs:element>
<xs:complexType name="Parameters">
<xs:sequence>
<xs:element name="Parameter" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="name" use="required"/>
<xs:attribute name="reference"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RuleList">
<xs:annotation>
<xs:documentation>an array of rules</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="Rule" type="RuleProfile" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RuleProfile">
<xs:attribute name="RName" use="required"/>
<xs:attribute name="RType" type="RuleType" use="required"/>
<xs:attribute name="Status" default="ON">
<xs:annotation>
<xs:documentation>By default is ON (or if is missing)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Order"/>
<xs:attribute name="Direction" type="RouteDirect">
<xs:annotation>
<xs:documentation>Request / Reply</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<!-- ************** PART II: END COMPLEX OBJECT TYPE DEFINITIONS *********************************** -->
<!-- ************** PART III: BEGIN ROOT ELEMENTS DEFINITIONS ********************************* -->
<!-- 0) Profile wrapper root element
Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS
-->
<xs:element name="Profile" type="ProfileType">
<xs:annotation>
<xs:documentation>Profile IS USED TO BE AN WRAPPER ELEMENT FOR ALL KIND OF PROFILES NO MATTER WHAT KIND OF PROFILE IT IS</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>
2)register xml schema:
SQL> begin
2 dbms_xmlschema.registerSchema
3 (
4 schemaurl=>'http://rac3-1-vip:8080/home/'||USER||'/xsd/EHIPProfile_v00.xsd',
5 schemadoc=>xdbURIType('/home/'||USER||'/xsd/EHIPProfile_v00.xsd').getClob(),
6 local=>True,
7 gentypes=>True,
8 genbean=>False,
9 gentables=>False
10 );
11 End;
12 /
PL/SQL procedure successfully completed.
SQL>
SQL>
3) xml data:
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
<Profile xmlns="http://www.emergis.com/eHealth/EHIP/data/meta/profile:v1">
<ProfileID Type="EnricherParametersProfile" Status="ACTIVE" ID="EnricherPP.ID.0001" Name="EnricherPP.ID.0001" Description="EnricherPP.ID.0001" Version="01"/>
<ProfileData>
<EnricherParametersProfileData>
<EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.ExceptionCreators:createExceptionV50CategoryCanonicalPart" interactionID="">
<Enricher>
<Parameters>
<Parameter name="MESSAGE_ID" reference="test"/>
</Parameters>
<Section path="HEADER">
<Section path="RESPONSE_TYPE">
<Value field="value" value="I"/>
</Section>
<Section path="HL7_STANDARD_VERSION">
<Value field="value" value="HL7V3"/>
</Section>
<Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
<Value field="value" value="NE"/>
</Section>
<Section path="SENDING_NETWORK_ADDRESS">
<Value field="value" value=""/>
</Section>
<Section path="SENDING_APPLICATION_IDENTIFIER">
<Value field="root" value="2.16.840.1.113883.3.133.1.3"/>
<Value field="extension" value=""/>
</Section>
<Section path="SENDING_APPLICATION_NAME">
<Value field="value" value="NL HIAL"/>
</Section>
</Section>
</Enricher>
</EnricherParameter>
<EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.DomainObjectCreators:createFindClientsAssociatedIdentifersRequestObject" interactionID="PRPA_IN101105CA">
<Enricher>
<Parameters>
<Parameter name="MESSAGE_ID" reference="test"/>
</Parameters>
<Section path="HEADER">
<Section path="RESPONSE_TYPE">
<Value field="value" value="I"/>
</Section>
<Section path="HL7_STANDARD_VERSION">
<Value field="value" value="HL7V3"/>
</Section>
<Section path="PROCESSING_CODE">
<Value field="value" value="T"/>
</Section>
<!--
<Section path="PROCESSING_MODE_CODE">
<Value field="value" value="T"/>
</Section>
-->
<Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
<Value field="value" value="NE"/>
</Section>
<Section path="RECEIVER_NETWORK_ADDRESS">
<Value field="value" value="prsunew.moh.hnet.bc.ca"/>
</Section>
<Section path="RECEIVER_APPLICATION_IDENTIFIER">
<Value field="root" value="2.16.840.1.113883.3.40.5.1"/>
<Value field="extension" value=""/>
</Section>
<Section path="SENDING_NETWORK_ADDRESS">
<Value field="value" value=""/>
</Section>
<Section path="SENDING_APPLICATION_IDENTIFIER">
<Value field="root" value="2.16.840.1.113883.3.133.1.3"/>
<Value field="extension" value=""/>
</Section>
<Section path="SENDING_APPLICATION_NAME">
<Value field="value" value="NL HIAL"/>
</Section>
</Section>
</Enricher>
</EnricherParameter>
<EnricherParameter serviceName="LRS_BusinessDomainObject.lrs.businessDomainObject.domainObjectBuilder.concrete.DomainObjectContentEnrichers:enrichPRRequest" interactionID="">
<!--Sample XML file generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
<Enricher>
<Parameters>
<Parameter name="MESSAGE_IDENTIFIER" reference="test"/>
</Parameters>
<Section path="HEADER">
<Section path="HL7_STANDARD_VERSION">
<Value field="value" value="V3PR2"/>
</Section>
<!--POS/CPP populated ?-->
<!--Not sure if this should be set as a variance within EHIP or if we expect the POS/CPP to provide this value-->
<Section path="PROCESSING_CODE">
<Value field="value" value="T"/>
</Section>
<!--POS/CPP populated ?-->
<Section path="PROCESSING_MODE_CODE">
<Value field="value" value="T"/>
</Section>
<!--POS/CPP populated ?-->
<Section path="DESIRED_ACKNOWLEDGMENT_TYPE">
<Value field="value" value="NE"/>
</Section>
<!-- note:We Expect PRS to give us a web service address -->
<!--<Section path="RECEIVER_NETWORK_ADDRESS">
<Value field="value" value="_http://PRSServer/svcName"/>
</Section>
-->
<Section path="RECEIVER_APPLICATION_IDENTIFIER[0]">
<Value field="root" value="2.16.840.1.113883.3.40.1.14"/>
<Value field="extension" value="SIT1"/>
</Section>
<!-- note: values of the fields to be provided by PRS -->
<Section path="RECEIVER_APPLICATION_NAME[0]">
<Value field="value" value="receiverAppName"/>
</Section>
<!-- note: RECEIVER_ORGANIZATION has an extra trailing space, as in the Excel mapping spreadsheet -->
<!-- note: values of the fields to be specified by PRS later -->
<Section path="RECEIVER_AGENT/RECEIVER_ORGANIZATION/RECEIVER_ORGANIZATION_IDENTIFIER[0]">
<Value field="root" value="2.16.840.1.113883.3.40.4.1"/>
<Value field="extension" value="receiverOrgId"/>
</Section>
<Section path="SENDING_APPLICATION_NAME[0]">
<Value field="value" value="NLPRSCLNT"/>
</Section>
<!-- note: SENDING_ORGANIZATION has an extra trailing space, as in the Excel mapping spreadsheet -->
<!-- note: values of the fields to be specified by PRS later -->
<Section path="SENDING_AGENT/SENDING_ORGANIZATION/SENDING_ORGANIZATION_IDENTIFIER[0]">
<Value field="root" value="2.16.840.1.113883.4.3.57"/>
<Value field="extension" value="3001"/>
</Section>
<Section path="PERFORMER/HEALTHCARE_WORKER_IDENTIFIER[0]">
<Value field="root" value="2.16.840.1.113883.4.3.57"/>
<Value field="extension" value="HIAL_USR"/>
</Section>
</Section>
<Section path="PAYLOAD">
<!--<Section path="QUERY_STATUS_CODE">
<Value field="value" value="New"/>
</Section>-->
<!-- note: AUDIT has an extra trailing space, as in the Excel mapping spreadsheet -->
<Section path="AUDIT[0]/AUDIT_INFORMATION">
<Value field="code" value="LATEST"/>
<Value field="codeSystem" value="PRSAuditParameters"/>
</Section>
<!-- note: CONFIDENCE has an extra trailing space, as in the Excel mapping spreadsheet -->
<Section path="CONFIDENCE/CONFIDENCE_VALUE">
<Value field="value" value="100"/>
</Section>
<!-- note: HISTORY has an extra trailing space, as in the Excel mapping spreadsheet -->
<Section path="HISTORY/INCLUDE_HISTORY_INDICATOR">
<Value field="value" value="false"/>
</Section>
<!-- note: JURISDICTION has an extra trailing space, as in the Excel mapping spreadsheet -->
<Section path="JURISDICTION/JURISDICTION_TYPE">
<Value field="value" value="NL"/>
</Section>
<!-- note: RESPONSE_OBJECT has an extra trailing space, as in the Excel mapping spreadsheet -->
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[0]">
<Value field="code" value="GRS_ADDRESS"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[1]">
<Value field="code" value="GRS_ELECTRONIC_ADDRESS"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[2]">
<Value field="code" value="GRS_IDENTIFIER"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[3]">
<Value field="code" value="GRS_ORGANIZATION_NAME"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[4]">
<Value field="code" value="GRS_PERSONAL_NAME"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[5]">
<Value field="code" value="GRS_REGISTRY_IDENTIFIER"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[6]">
<Value field="code" value="GRS_TELEPHONE"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[7]">
<Value field="code" value="PRS_CONDITION"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[8]">
<Value field="code" value="PRS_CONFIDENTIALITY_INDICATOR"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[9]">
<Value field="code" value="PRS_DEMOGRAPHIC_DETAIL"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[10]">
<Value field="code" value="PRS_DISCIPLINARY_ACTION"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[11]">
<Value field="code" value="PRS_INFORMATION_ROUTE"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[12]">
<Value field="code" value="PRS_NOTE"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[13]">
<Value field="code" value="PRS_PROVIDER_CREDENTIAL"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[14]">
<Value field="code" value="PRS_PROVIDER_EXPERTISE"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[15]">
<Value field="code" value="PRS_PROVIDER_RELATIONSHIP"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[16]">
<Value field="code" value="PRS_STATUS"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[17]">
<Value field="code" value="PRS_WORK_LOCATION"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[18]">
<Value field="code" value="PRS_WORK_LOCATION_ADDRESS"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[19]">
<Value field="code" value="PRS_WORK_LOCATION_DETAIL"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[20]">
<Value field="code" value="PRS_WORK_LOCATION_ELECTRONIC_ADDRESS"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[21]">
<Value field="code" value="PRS_WORK_LOCATION_INFORMATION_ROUTE"/>
</Section>
<Section path="RESPONSE_OBJECT[0]/PROVIDER_QUERY_RESPONSE_OBJECT[22]">
<Value field="code" value="PRS_WORK_LOCATION_TELEPHONE"/>
</Section>
<!-- note: ROLE_CLASS has an extra trailing space, as in the Excel mapping spreadsheet -->
<Section path="ROLE_CLASS /ROLE_CLASS_VALUE">
<Value field="value" value="LIC"/>
</Section>
<Section path="SORT_CONTROL[0]/SORT_CONTROL_ELEMENT_NAME">
<Value field="code" value="PrincipalPerson.name.value.family"/>
</Section>
<Section path="SORT_CONTROL[0]/SORT_CONTROL_DIRECTION_CODE">
<Value field="value" value="A"/>
</Section>
</Section>
</Enricher>
</EnricherParameter>
</EnricherParametersProfileData>
</ProfileData>
</Profile>
the data is valid against the schema through XML Spy tool... and loaded into the XDB repository...
4) create table and insert data:
SQL> CREATE TABLE EHIP_PROFILE OF SYS.XMLTYPE
2 XMLSCHEMA "http://rac3-1-vip:8080/home/EHIPSBUSER1/xsd/EHIPProfile_v00.xsd" ELEMENT "Profile"
3 ;
Table created.
SQL>
SQL> alter table EHIP_PROFILE
2 add CONSTRAINT EHIP_PROF_PK PRIMARY KEY(XMLDATA."ProfileID"."ID",XMLDATA."ProfileID"."Type");
Table altered.
SQL>
SQL>
SQL>
SQL>
SQL> select xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob() from dual;
XDBURITYPE('/HOME/'||USER||'/PROFILEDATA/ENRICHERPP.ID.0001.XML').GETCLOB()
<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy
SQL>
SQL>
SQL> insert into ehip_profile values(xmltype.createXML(xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob()));
insert into ehip_profile values(xmltype.createXML(xdbURIType('/home/'||USER||'/ProfileData/EnricherPP.ID.0001.xml').getClob()))
ERROR at line 1:
ORA-21700: object does not exist or is marked for delete
what's the problem caused the "ORA-21700: object does not exist or is marked for delete" error?
Thanks in advance for your help?Thanks Marco,
Here're my environment:
SQL> select INSTANCE_NUMBER, INSTANCE_NAME,HOST_NAME,VERSION from v$instance;
INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION
2 rac32 RAC3-2 10.2.0.3.0
I followed your suggested in the above, and always purge recyclebin, but still got the same problem. because in 10gr2, there's no dbms_xmlschema.purge_schema available,
and I did checked the recyclebin after force the delete of schema, nothing inside. any other recommendation? -
EJB-Archive for getting Data from the DB
Hello,
I want to get data from the Database. I created a EJB-Project with an Entity Bean and a Session Bean.
The jar-Archive that I generated is corrupt. Is that normal?
Can you provide me with information on database acces?
In ABAP it would be a piece of cake: Select * from table into ...;-)
Greetings, FrankHi Frank,
I see that you are interested in getting data from R/3, please correct me if I'm wrong.
If that's so, you cannot do it by purely using EJBs, as an entity bean maps to a Table row in the database, which is not quite straight forward in terms of R/3.
The only way to get data from R/3 is to use
1)Java + SAP JCO
2)or a Netweaver technology like Webdynpro + Adaptive RFC
3)Portal Component + SAP JCO.
Again, assuming you're dealing with a WebAS server, coming to EJBs, its no different to any other application server. So, you need an RDBMS to use Entity Beans.
Please let me know if you've got more doubts.
Regards,
Rajit -
Insert data into oracle database using a PHP form
I'm trying to enter data into my oracle database table using a php form. When I click submit no data is added. Could someone help me please. I'm new to php/oracle thing.
NOTE: I don't have any problem connecting to the database using php.
Here is the code I'm using:
<?php
// just print form asking for name if none was entered
if( !isset($query)) {
echo "<form action=\"$uri\" method=post>\n";
echo "<p>Enter Name: ";
echo "<input type=text size=100 maxlength=200 name=data value=\"$data\">\n";
echo "<br><input type=submit name=submit value=Submit>\n";
echo "</form>\n";
exit;
// insert client's name
$query = "INSERT INTO client (name) VALUES ($data)";
// connect to Oracle
$username = "xxxx";
$paswd = "yyyyyy";
$dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
"(HOST=patriot.gmu.edu)(PORT=1521))".
"(CONNECT_DATA=(SID=COSC)))";
$db_conn = ocilogon($username, $paswd, $dbstring);
$stmt = OCIParse($db_conn, $query);
OCIExecute($stmt, OCI_DEFAULT);
OCIFreeStatement($stmt);
OCILogoff($db_conn);
?>
Thanks for your help. I will also appreciate a better was to do it.
Tonyresumption and jer,
Sorry I cannot format the code for easy reading!
The page is submitting to itself. See action = \"$uri\". I used the same logic to enter SELECT querries into the database. It pulls and displays data back on the webpage. The code I used for this is below. Compare it with the one above for inserting data into the table.
<?php
// connect to oracle
$username = "xxxxx";
$paswd = "yyyyy";
$dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
"(HOST=patriot.gmu.edu)(PORT=1521))".
"(CONNECT_DATA=(SID=COSC)))";
$db_conn = ocilogon($username, $paswd, $dbstring);
// username and password will be unset if they weren't passed,
// or if they were wrong
if( !isset($query)) {
// just print form asking for account details
echo "<form action=\"$uri\" method=post>\n";
echo "<p>Enter Query: ";
echo "<input type=text size=100 maxlength=200 name=query value=\"$query\">\n";
echo "<br><input type=submit name=submit value=Submit>\n";
echo "</form>\n";
exit;
// remove unwanted slashes from the query
$query = stripslashes($query);
// run the query
$stmt = OCIParse($db_conn, $query);
OCIExecute($stmt, OCI_DEFAULT);
// Open the HTML table.
print '<table border="1" cellspacing="0" cellpadding="3">';
// Read fetched headers.
print '<tr>';
for ($i = 1;$i <= ocinumcols($stmt);$i++)
print '<td class="e">'.ocicolumnname($stmt,$i).'</td>';
print '</tr>';
// Read fetched data.
while (ocifetch($stmt))
// Print open and close HTML row tags and columns data.
print '<tr>';
for ($i = 1;$i <= ocinumcols($stmt);$i++)
print '<td class="v">'.ociresult($stmt,$i).'</td>';
print '</tr>';
// Close the HTML table.
print '</table>';
OCIFreeStatement($stmt);
OCILogoff($db_conn);
?> -
Native SQL: insert data into oracle database, no return message.
hi,
the statement : insert into <TableName> values (Source)
how can I know if the data have already insert to the database table?
now I have a program have this problem: the data has already exist, but there's no error message return when insert the same data again.
data: dbs like dbcon-con_name value 'HRGK',
dbtype type dbcon_dbms.
data: sqlerr_ref type ref to cx_sql_exception,
exc_ref type ref to cx_sy_native_sql_error,
error_text type string.
data: cnt type i,
i(2) type c.
set locale language 'E'.
EXEC SQL.
CONNECT TO :DBS
ENDEXEC.
EXEC SQL.
SET CONNECTION :DBS
ENDEXEC.
EXEC SQL.
SELECT COUNT(*) from org_unit into :cnt
ENDEXEC.
write: / cnt.
*do.
i = 'A'.
try.
EXEC SQL.
BEGIN
insert into ORG_UNIT ( ORGAN_ID, UNIT_NO, UNIT_NAME, PARENT_ID)
values ( 'A', '123412', 'SDFSG', 'DDS'); " ORGAN_ID is primary key
" If the data 'A' has already exist in database ORG_UNIT, it will show error message
" But if I use :I instead 'A', it will not show error message.
IF SQL%FOUND THEN
COMMIT;
END IF;
END;
endexec.
EXEC SQL.
SELECT COUNT(*) from ORG_UNIT into :cnt
ENDEXEC.
write: / cnt.
catch cx_sy_native_sql_error into exc_ref.
error_text = exc_ref->get_text( ).
write: / error_text.
catch cx_sql_exception into sqlerr_ref.
perform handle_sql_exception using sqlerr_ref.
endtry.
EXEC SQL.
disconnect :DBS
ENDEXEC.
*enddo.
*& Form handle_sql_exception
form handle_sql_exception
using p_sqlerr_ref type ref to cx_sql_exception.
format color col_negative.
if p_sqlerr_ref->db_error = 'X'.
write: / 'SQL error occured:', p_sqlerr_ref->sql_code,
/ p_sqlerr_ref->sql_message. "#EC NOTEXT
else.
write:
/ 'Error from DBI (details in dev-trace):',
p_sqlerr_ref->internal_error. "#EC NOTEXT
endif.
endform. "handle_sql_exception
please help to see the words:
*" If the data 'A' has already exist in database ORG_UNIT, it will show error message*
*" But if I use :I instead 'A', it will not show error message.*
in the program.
Thanks a lot!resumption and jer,
Sorry I cannot format the code for easy reading!
The page is submitting to itself. See action = \"$uri\". I used the same logic to enter SELECT querries into the database. It pulls and displays data back on the webpage. The code I used for this is below. Compare it with the one above for inserting data into the table.
<?php
// connect to oracle
$username = "xxxxx";
$paswd = "yyyyy";
$dbstring = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)".
"(HOST=patriot.gmu.edu)(PORT=1521))".
"(CONNECT_DATA=(SID=COSC)))";
$db_conn = ocilogon($username, $paswd, $dbstring);
// username and password will be unset if they weren't passed,
// or if they were wrong
if( !isset($query)) {
// just print form asking for account details
echo "<form action=\"$uri\" method=post>\n";
echo "<p>Enter Query: ";
echo "<input type=text size=100 maxlength=200 name=query value=\"$query\">\n";
echo "<br><input type=submit name=submit value=Submit>\n";
echo "</form>\n";
exit;
// remove unwanted slashes from the query
$query = stripslashes($query);
// run the query
$stmt = OCIParse($db_conn, $query);
OCIExecute($stmt, OCI_DEFAULT);
// Open the HTML table.
print '<table border="1" cellspacing="0" cellpadding="3">';
// Read fetched headers.
print '<tr>';
for ($i = 1;$i <= ocinumcols($stmt);$i++)
print '<td class="e">'.ocicolumnname($stmt,$i).'</td>';
print '</tr>';
// Read fetched data.
while (ocifetch($stmt))
// Print open and close HTML row tags and columns data.
print '<tr>';
for ($i = 1;$i <= ocinumcols($stmt);$i++)
print '<td class="v">'.ociresult($stmt,$i).'</td>';
print '</tr>';
// Close the HTML table.
print '</table>';
OCIFreeStatement($stmt);
OCILogoff($db_conn);
?>
Maybe you are looking for
-
Not able to assign vendor on SC
Hello Experts, (SRM 5.0; Extended Classic) I'm facing an issue with indicating vendor on shopping card. When I create a shopping card and open tab Sources of Supply / Service Agents, there is only "Preferred Vendor" field active. Above that there is
-
HCM Master Data Loan repayments date change after payroll run
I am facing a challenge in a case in which the car loan has been posted in the month of Dec'13 and payroll have been executed till Feb'14. Now, the employee has taken relevant approvals for getting the car loan moved from Dec'13 to Nov'13 loan payme
-
Why is loading some website so slow. before the newest Firfox, it was faster
porn sites are really slow downloading. they did not use to be. have you added additional blocks.?
-
MacBook Pro and Projector - Keep MacBook resolution unchanged
Hello, I am using a 13" MacBook Pro with a projector at work. When I plug in the projector, the screen resolution changes on my MacBook. I can change the resolution back to max using the pull-down, but is there a way to keep the MacBook at max resolu
-
Re-trigger failed proxy message after certain time automatically in CRM
Hi experts, Can anyone tell me if we can automate the process of re-triggering failed proxy messages in SAP CRM sxmb_moni, say after a certain period of time. Thanks Swapna .