How to handle journal table using JPA+TopLink
Hi,
I am using JDev10.1.3.3 with Swing and EJB + JPA + TopLink using Oracle database. Every business table has a journal table. Does TopLink have any journal features or do I have to write my own code to insert data into the journal table.
Thanks,
Jim
Depends what's in your journal table? TopLink does have support for historization (see HistoryPolicy or docs).
Otherwise you could use TopLink events to insert into the table, or use database triggers.
-- James : http://www.eclipselink.org
Similar Messages
-
How to handle the table control While working with LSMW?
How to handle the table control While working with LSMW?
its possible in lsmw,
Hi,
LSMW will have a Indicator for headr and itam, i do not remember the correct field, but it will have an indicator, check the fields, there will be a single charecter lenght field, that should be the indicator, and using that we can write the logic.
check that single charecter field, it that is X that means the header record is processed, and do the items.
and, this is another way, try this out also
YOu can do this in "Define Source Structures" step,
the HEADER is defined first,
then the DETAIL below the HEADER.
add the fields to the structures.
Both should have some common key field
Please take care that the name of the common field is the same.
Once you do this it is linked. The you have a header and item corresponding to that header. then run the LSMW as you would.
Thanks -
How to restore a table using RMAN with previous backup ?
Hi everyone,
we have to restore a table from 1 week previous backup using RMAN.
Could you show me how to restore a table using RMAN with previous full backup.
please Help me out.
Thanks
Info > oracle 10g, OS: AIX5LHi,
first of all you must have all the archivelogs since you want to recover your table from the previous backups.
anyways if you want to recover your table then you need to perform incomplete recovery to the point where you loss the table for that you need to restore and recover your database.you likely to loose all the transcation which occurs to the point where you you loose your table.
thanks.. -
How to handle multiple tables data in Entity Beans?
How to handle multiple tables data in Entity Beans?
i mean, my bean (non trivial) is responsible for frequent
insertion in one table and some deletion on another table.
Can anyone of you...please..?Is your data model right? If you are adding in one and deleting in another it sounds to me more like a process that an entity, in which case you may revisit your data model and simplify it, add in a session bean with the process method to co-ordinate between the two.
However, if you want to map multiple different tables within a single entity bean it is possible and just part of the mapping. How you actualyl specify it depends on which implementation you are working with.
Cheers,
Peter. -
How to handle the table control in bapi?
how to handle the table control in bapi? example va01.
i pass multiple line item what is the procedure?
header detail same .
eample ship to party
sale to party.
line item mulptiple
10 mat1
2o mat2
30 mat3.
in bapi we can pass sinle line item.
any way to handle multiple line item pass through the bapi.
Message was edited by:
Karthikeyan PanduranganBAPI is not going through the screen flow logic so you need not to worry about the table control. Just check in the BAPi there must be one table parameter for line items just pass one int table with your data to that table parameter it will automatically update the tables.
Regards
shiba dutta -
How to create a table using Text Layout Framework?
How to create a table using Text Layout Framework? I meen real tables - like in HTML.
Cell as indipendant TLF should work, I have created my table using same approach and works fine for me ... this is where it is
http://apps.live-documents.com/docs/openWebDoc.do?docId=1480607
Regards
Raf -
How to handle Multile Table Group in InDesign
my XML file having multiple table group tables content but InDesign not supporting while importing xml files?.. could please help and suggest any buddy how to handle multiple table group in InDesign.... because i received many jobs xml workflow with multiple table group.
its urgent
-
How to handle Asynchronous calls using OSB?
Hi There,
How to handle Asynchronous calls using OSB?
Please help me out??
-VenkatHello friend, here is what you need.
Oracle Service Bus, invoke asynchronous webservices | Oracle .. Java .. OpenSource .. SOA -
How to handle audit columns using EJB and JPA.
Hi,
I am using JDev10.1.3.3 with Swing and EJB + JPA + TopLink.
Every entity (POJO) has the same audit columns:
@Column(name="CREATE_DATE", nullable = false)
private Timestamp createDate;
@Column(name="CREATE_USER_ID", nullable = false, length = 30 )
private String createUserId;
@Column(name="MODIFY_DATE", nullable = false)
private Timestamp modifyDate;
@Column(name="MODIFY_USER_ID", nullable = false, length = 30 )
private String modifyUserId;
Does JPA has a default feature/component that will auto populate this fields. (Similar to Business Components)?
Thanks,
JimHi,
I am not aware of this being part of EJB/JPA. However, you may want to check here. Its the TopLink forum, but these guys are involved in the JPA standardization
TopLink/JPA
Frank -
How to handle error while using dbms_sql.execute
Hi,
I am inserting some records by using the following piece of code.
stmt := 'insert into SSI_KPI_GOAL_VALUE_H (KPI_VAL_KPI_ID, KPI_VAL_RM_CDE,'|| v_day_value ||',KPI_VAL_ACT_DLY,'||v_month_val||',KPI_VAL_BIZ_UNIT_CDE) values (:kpi_array,:rm_array,:day1_array,:day1_array,:day1_array,:busnunit_array)';
l := dbms_sql.open_cursor;
dbms_sql.parse(l, stmt, dbms_sql.native);
dbms_sql.bind_array(l, ':kpi_array', col1_ins,1,ins_cnt-1);
dbms_sql.bind_array(l, ':rm_array', col2_ins,1,ins_cnt-1);
dbms_sql.bind_array(l, ':day1_array', col3_ins,1,ins_cnt-1);
dbms_sql.bind_array(l, ':busnunit_array', col4_ins,1,ins_cnt-1);
dummy := dbms_sql.execute(l);
dbms_sql.close_cursor(l);
I am getting an error since any one of the row contains value larger than the column.
How to handle exception handling for those rows which is having errors. I would like insert the records which is having
no errors. Like SAVE EXCEPTIONS for 'forall' is there any option is available to handle exceptional records.
Please help.
Thanks & Regards,
Hari.Hari,
What's oracle version? Are you looking for something similar to this? see following example
DECLARE
TYPE array
IS
TABLE OF my_objects%ROWTYPE
INDEX BY BINARY_INTEGER;
data array;
errors NUMBER;
dml_errors exception;
error_count NUMBER := 0;
PRAGMA EXCEPTION_INIT (dml_errors, -24381);
CURSOR mycur
IS
SELECT *
FROM t;
BEGIN
OPEN mycur;
LOOP
FETCH mycur BULK COLLECT INTO data LIMIT 100;
BEGIN
FORALL i IN 1 .. data.COUNT
SAVE EXCEPTIONS
INSERT INTO my_new_objects
VALUES data (i);
EXCEPTION
WHEN dml_errors
THEN
errors := sql%BULK_EXCEPTIONS.COUNT;
error_count := error_count + errors;
FOR i IN 1 .. errors
LOOP
DBMS_OUTPUT.put_line( 'Error occurred during iteration '
|| sql%BULK_EXCEPTIONS(i).ERROR_INDEX
|| ' Oracle error is '
|| sql%BULK_EXCEPTIONS(i).ERROR_CODE);
END LOOP;
END;
EXIT WHEN c%NOTFOUND;
END LOOP;
CLOSE mycur;
DBMS_OUTPUT.put_line (error_count || ' total errors');
END;Regards
OrionNet -
How to create multiple tables SQL in toplink?
Table A {
field1,
field2,
field3
Table B {
field1,
field2,
field3
select a.field1,a.field2,b.field3
from a,b
where a.field1=b.field1
and a.field2=b.field2
How can I create dynamic sql in toplink as Hibernate HQL?
Is there any simple method?Use multipleTableJoinExpression is too difficult.
Thanks!Bump
-
How to handle lsmw table control
i have to update line items for tcode : v-45. through LSMW.
please let me know how to handle multiple line items.Hi Bala Krishna,
1. TCode : LSMW.
2. Enter Project name, sub project name and object name.
Execute.
3. Maintain object attributes.
Execute
select Batch Input recording
goto->Recording overview
create
recording name.
enter transaction code.
start recording
do recording as per ur choice.
save + back.
enter recording name in lsmw screen.
save + back
Now there will be 14 steps.
2. MAINTAIN SOURCE STRUCTURES.
Here you have to enter the name of internal table.
display change
create
save + back
3. MAINTAIN SOURCE FIELDS.
display change
select structure
source_fields->copy fields.
a dialogue window will come .
select -> from data file
apply source fields
enter No. of fields
length of fields
attach file
save + back
4. MAINTAIN STRUCTURE RELATIONS
display change
save + back
5. MAINTAN FIELD MAPPING & CONVERSION RULE
display change
click on source field, select exact field from structue and enter
repeat these steps for all fields.
save+back
6. MAINTAIN FIXED VALUES, TRANSACTION, USER DEFINED
execute
save + back
7. SPECIFY FILES.
display change
click on legacy data
attah flat file
give description
select tabulatore
enter
save + back
8. ASSIGN FILE
execute
display change
save + back
9. IMPORT DATA.
execute
display change
save + back
10. DISPLAY IMPORTED DATA
enter ok, it willl show records only.
back
11. CONVERT DATA
execute
display change
save + back
12. DISPLAY CONVERTED DATA
execute
display change
save + back
13. CREATE BATCH INPUT SESSION
tick keep batch input folder
F8
back
14. RUN BATCH INPUT SESSION.
sm35 will come
Object name will be shown here
select object & process
Reward if useful.
Thanks
Aneesh
~from forum. -
How to get fixed results using JPA
Hi
I have a table with lot of rows, when I querry, it is taking a lot of time and I am displaying that many rows in UI in single table. So it is not scaling well.
SO I am planing to show x number of row in on page. So for that to achieve, how do I querry the db (derby) using JPA to get first 25 rows, next 25 rows...
I appricate any help
thanksi think you can have a serial number column in your table and you keep track of that serial number. I mean pass it to your method along with the size of page. Lets say if the number starts from 0 then you can calculate the first page using starting number + page size, if your page size is 25 then you will get 0+25 =25 and you can use the result to query from database like;
select * from myTable where rowNo<=25
You can store this number (Now 25) in user's session and pass it to the method. -
How to know the tables used in an Extractor?
Hi Friends,
Is there any method to find out the underlying tables used in an extractor?
For example , 2LIS_11_VAITEM datasource uses tables VBAP and VBUP( item status). For LOs we can see it in Lo **** pit. So If any extractor uses more than one table ..then how do you see those?? . If it is generic ds which is based on Functional Module, then what is the procedure other going into table tab.
Actuall i would like to know for DS of FICA Open items 0FC_OP_01 .
Thank in advanace
MurthyHi If it is LO extractor:
Use transaction code LBWE in the R/3
Go to the extractor for which you want to see the data( Logistic app->Extractors)
Go to maintenance
You will get an option to update just click yes and then you will get option to create request.Just check the display, it will lead you top the window where you can see where all the fields are and from which table it is available.
check the Roberto's blog:
/people/sap.user72/blog/2005/09/05/sap-bw-and-business-content-datasources-in-pursuit-of-the-origins -
How to Update crmd_customer_h TABLE Using CRMV_EVENT Through Funtion Module
Hi
How we can update customer_h table using the CRMV_EVENT Where i implemented logic below in the Funtion Module.
data: lt_doc_flow TYPE crmt_doc_flow_wrkt,
lw_cust_h_com TYPE crmt_customer_h_com,
lw_input_field_names TYPE crmt_input_field_names,
lt_input_field_names TYPE crmt_input_field_names_tab,
lt_objects_to_save TYPE crmt_object_guid_tab,
lw_guid TYPE CRMT_OBJECT_GUID.
DATA : lv_process_type TYPE crmt_process_type.
data: wa_doc_flow type CRMT_DOC_FLOW_WRK.
data: wa_customer_h type crmd_customer_h.
* Function module for retriving the Process type.
CALL FUNCTION 'CRM_ORDERADM_H_READ_OW'
EXPORTING
iv_orderadm_h_guid = iv_header_guid
IMPORTING
ev_process_type = lv_process_type
EXCEPTIONS
admin_header_not_found = 1
OTHERS = 2.
if lv_process_type eq 'ZG01'.
CALL FUNCTION 'CRM_DOC_FLOW_READ_OB'
EXPORTING
IV_HEADER_GUID = iv_header_guid
IMPORTING
ET_DOC_FLOW_WRK = lt_doc_flow.
read table lt_doc_flow with key objtype_a = 'BUS2000116' INTO wa_doc_flow. "gc_object_type-service.
if sy-subrc eq 0. "set flag for service order
lw_cust_h_com-ref_guid = wa_doc_flow-objkey_a.
lw_cust_h_com-ZZTRAIL_FLAG = 'X'.
lw_cust_h_com-mode = 'A'.
lw_cust_h_com-ref_handle = '0000000001'.
lw_guid = wa_doc_flow-objkey_a.
INSERT lw_guid INTO TABLE lt_objects_to_save.
endif.
lw_input_field_names-fieldname = 'REF_GUID'.
lw_input_field_names-fieldname = 'ZZTRAIL_FLAG'.
lw_input_field_names-changeable = ' '.
INSERT lw_input_field_names INTO TABLE lt_input_field_names.
Maintain Customer H
CALL FUNCTION 'CRM_CUSTOMER_H_MAINTAIN_OW'
EXPORTING
is_customer_h_com = lw_cust_h_com
CHANGING
ct_input_field_names = lt_input_field_names
EXCEPTIONS
header_change_error = 1
header_create_error = 2
error_occurred = 3.
ENDIF.
*endif.
*Clearing local variables
clear: lv_process_type,
lw_cust_h_com,
lw_input_field_names.
*Free internal tables
free: lt_doc_flow,
lt_input_field_names.Hi Faisal
I think your not clear with what i am saying anyhow i will again explain you my requirement
As per my requirement
1)in the service order search report i need to add a field called "Has trail order with No Follow up" with values "Yes" & "Blank"
For above Field i added using the structure CRMST_QUERY_SRVO_BTIL and through configuration i am able to display the field in webui as per (Attachement Pic 1)
2)When i search with search criteria as "Has trail order with No Follow up" with "Yes"
Then in result list i need to show the service order those having follow up as trail orders(sales order) only.if for next document trail order having any follow up then those service orders dont want to show in result list.
For above requirement i implemented F.M using CRMV_EVENT & I configured for BUS2000115 And BEFORE_SAVE The Order
The FM Will get trigger when i save the service order and for that service order if create any follow up and try to save the trail order then This FM Will trigger and in this i am doing validations.
3)Add one AET Trail Flag field is added under CUSTOMER_H Table.
4)in the FM I am validating for if the trail order having the preceding document as service order then i need to make flag as "X" For that service order in customer_h
if suppose when i delete trail order from the service order then that flag must need to be "unset" from the CUSTOMER_H.
Why bcoz we are doing above process is do show records in result list based on Flag values
these flag checks are validating in the BADI Which we implemented for search logic.
Please refer below Login for my requirement:-
Proposal to have a custom “flag” field (background at table level,
crmd_customer_h) linked to service order which gets flagged whenever at
least one Trial order is created and saved from the Service Order.
The flag value should be cleared when all the trial orders created and
saved as follow up transactions are deleted from the system.
Similarly for Trial Orders will use the same custom “flag” field
which gets activated when at least one follow up is created and saved from Trial Order.
The flag value should be cleared when all the follow up transactions from
the Trial Order are deleted from the system.
When the above search criteria “Has Trial order with no follow up”
“is” “Yes” is applied then the logic derives all the service
orders which satisfy additional search criteria applied in the search and
for these Service orders checks if the custom flag field is checked to
derive all Service orders which have Trial order. The custom flag values
values are derived from crmd_customer_h table in CRM.
4 )Further for all the Trial Orders determined in Step 3
check if the Trial Order has a follow up by checking if the custom flag field
is checked. The custom flag values are derived from crmd_customer_h table in
CRM.
5) If step 4 is not met populate the preceding Service
Orders in the Result list
Maybe you are looking for
-
SQL Express 2008 R2 will not start on Windows 7 Home
Ok, This used to work, and then over night my system rebooted and now I cannot start SQL Express 2008 R2 after I have unistalled, and re-installed. Cleared out the folders and the certificates, changed the Named Pipes configuration and all to no av
-
GDM requires password for a user even if one isn't set
Okay, GDM (more likely Pam) is pissing me off. HOW oh how do I get it to allow users to login without a password? I can login to a console as "guest" without a password, so I know one's not set, but GDM prompts me for a password everytime. How do I g
-
JVM_CreateJavaVM Returns -3
Trying to create a JVM using JVM_CreateJavaVM. The function returns -3 (JNI version error ). Tried specifying versions 1.1, 1.2, 1.4 (JNI version). I have JDK/JRE v5, Windows XP. Same code works on Mac just fine. Pointers passed to the method are ini
-
This program is well compiled but does not work.
I would like to know why this program does not work properly: the idea is : 1. the user introduces a text as a string 2.the progam creates a file (with a FileOutputStream) 3. then this file is encripted according to DES (using JCE, cipheroutputStream
-
Hi, I have a problem with the Bex Analyzer. It is showing th details in German Language and i am not able to do anything on it. Can anyone help me in this issue.