Modifying data in AIF_OPEN_INTERFACE table
Hello All,
I have a requirement where depending on certain conditions, I need to modify the contents of a column in AIF_OPEN_INTERFACE table. For example: Account is in Column 1 and Expense Type is in Column 2, then when Account starts with a certain number and has expense type populated, then I need to copy over the Expense Type over to the Account column in the table. The import format does not let us choose any import scripts. So what would be the best way to handle this? Will BefImport script work in this case?
Thanks and Regards,
Sandeep.
What do you mean ' .. I need to copy over the Expense Type over to the Account column in the table'? It is not particularly clear, do you mean copy the contents of expense type and overwrite the account column or copy the expense type and append to contents of the account column, or something else entirely?
Depending on your requirements this could either be done in the mappings or when you are initially populating the AIF_OPEN_INTERFACE table.
Similar Messages
-
Modify data in the table control
hello:
i would like to ask a favor , i am working with a table control (it already has the information i need) all the fields all my table control are present in output form only, but i need when the user press a pushbutton to modify a specific data one of the cell of the table control permit to be change.
my output is:
field1 field2 field3 (only output )
if the user press the button 'CHANGE DATA' it will be present as
field1 field2 fiel3(ready to recibe new data ).
but i don´t know how to do it, if somebody knows how to do it
thanks a lot.this will be your's main program
*& Report ZEMP
REPORT ZEMP.
TABLES: ZEMP." Z TABLE
CONTROLS: TAB_CONTROL TYPE TABLEVIEW USING SCREEN 1000.
DATA: IT LIKE ZEMP OCCURS 0 WITH HEADER LINE.
SELECT * FROM ZEMP INTO CORRESPONDING FIELDS OF TABLE IT.
CALL SCREEN 1000.
*& Module STATUS_1000 OUTPUT
text
MODULE STATUS_1000 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_1000 OUTPUT
*& Module USER_COMMAND_1000 INPUT
text
MODULE USER_COMMAND_1000 INPUT.
IF SY-UCOMM = 'BACK'.
LEAVE PROGRAM.
endif.
ENDMODULE. " USER_COMMAND_1000 INPUT
*& Module MODIFY INPUT
text
MODULE MODIFY INPUT.
MODIFY IT INDEX TAB_CONTROL-CURRENT_LINE.
MODIFY ZEMP FROM IT.
ENDMODULE. " MODIFY INPUT
and this should be your flow logic
PROCESS BEFORE OUTPUT.
MODULE STATUS_1000.
LOOP AT IT WITH CONTROL TAB_CONTROL.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_1000.
LOOP AT IT.
MODULE MODIFY.
ENDLOOP.
Regards
Prakash Varun -
Posting modified data from adf table.
Hi,
I'm still novice in JDeveloper and ADF.
I need to exchange data between two records and store changes in the database.
If I'm using the code below
public void exchangeData(String iterator) {
BindingContainer bindings = getBindings();
DCIteratorBinding it = (DCIteratorBinding)bindings.get(iterator);
RowSetIterator rit = it.getRowSetIterator();
Row curRow = rit.getCurrentRow();
Row prevRow = null;
if (curRow != null && rit.hasPrevious()) {
prevRow = rit.previous();
String value = (String)prevRow.getAttribute("Comments");
prevRow.setAttribute("Comments", curRow.getAttribute("Comments"));
curRow.setAttribute("Comments", value);
} else { //TODO there is no current Record}
rit.setCurrentRow(prevRow);
the data is exchanged with previous record properly, but corresponding "Commit/Save" button is not going to be activated.
What should be done to post or submit data and then commit it?
Thanks in advance!alexander,
Generally when working with business logic, the work is done in the model layer. You can more easily manipulate the data in a View Ojbect java class than on the form.
1. Look up how to retrieve/iterate data in a View Object or application module class.
2 Expose thoese methods on the view object/application module so that they will be accessable from the data control.
3. Then create a button that will initiate that method from the JSF form.
Stuart -
Need a FM which returns the last modified date& time
Hi,
Kindly Suggest me if any Function Module is there which returns the last modified date& time for tables HRP1000 and HRP1001.
Rgds
Kishor.Cjust check the following tables..
CDHDR - Change document header
CDPOS - Change document items
you can use this function module..
BPCT_CHANGEDOCUMENT_DISPLAY
Edited by: Arunima Rudra on Apr 14, 2009 4:49 PM -
How can you find the Last Modified Date of a particular table
Hi,
I want to show to the LAST MODIFIED date of a particular table to the user before refreshing the table with new data. Experts please suggest me the way using JDBC-SQL connection.There is no generic SQL way for this. It depends completely on the features your DBMS offers. With Oracle you'd need to create column which gets updated in a trigger. I believe MS SQL Server offers a special data type for this, which is updated automatically. I don't know about others.
-
How can I modify data from a Transparent Table without ABAP code.
Hi,All
How can I modify data from a Transparent Table (like TCURR), and important thing is I want do all that with no ABAP code here. It is like that we always do that in a Oracle database use TOAD or PLSQL third party tools, with no script code here.
I had fond that there is a way can do that:
1, type 'se11',and Display Database table 'TCURR', click Contents, then click Execute to display all data
2, type '/h' and let debugging on
3, select one of this data then click 'Display',enter in debugging system.
4, then make a breakpoint in the code. But... display a dialog let I type a 'ABAP Cmnds', I want to know what can be type in for that?
and, My system is ECC6.
thank you all
Edited by: xuehui li on Aug 20, 2008 6:30 PMHello,
Your approach (with Vijay's suggestion) MAY work. However, depending on how tight security is at the company that you are working at you may or may not be able to acutaly change the value of the SHOW field to EDIT. This will be especially true if you are working in a Production environment. Vijay's other comment is true as well. This is not a recommended approach to change data (especially data with a financial impact like TCURR) in a production environment. The auditors will not be impressed.
Explore the option of a maintenace view or look at tcode TBDM to upload a file which includes daily rates from providers like Reuters or try tcode s_bce_68000174 which is a maintenance view on TCURR.
Regards
Greg Kern -
Modifying data in Table Control thr' BDC
Hi,
I have a following requirement.
I need to modify(update/delete) the data in the table control through BDC. The number of records of the table control, seen on the screen are only 4. If i need to modify 11th record, how do i go forward?
Your help is highly appreciated.
Regards
ShankarDue to rudeness, your thread is denied.
Note. If you want help from people it's best to a) follow the rules, and b) not antagonise those who could help you.
locked. -
I have a series of databases. They're mirrors of each other in structure, only the data inside them changes. There's a database for each customer. Each night I run a procedure that checks if anything has changed in the database since the previous run and
e-mails me if it has. The reason for this was that an employee in the past was changing (and breaking) things so I wanted to track what was going on. Now, one of these databases is idle at the moment, in abeyance if you like, yet 1 table's modified date changes
once a week! Table definition stays stable at the level I am recording it (code below) so why is the modified date changing? Could it be an index-defrag? But if so, why this table and none of the others or indeed its mirror databases? CHECKDB run every day
and that's OK. Full backup done weekly. But again, why this 1 table? Nothing is even using the table at the moment! Code to get object definitions below.
SET
@command =
INSERT INTO TblSETUP_DatabaseVersionControl
SELECT
+ @database
+
''' as DatabaseName
+
CAST(@datestamp
as
varchar(20))
+
''' as SnapshotTime
,so.object_id as ObjectId
,so.[name] as ObjectName
,so.[type_desc] as ObjectType
,so.create_date as CreateDate
,so.modify_date as ModifiedDate
,CASE
WHEN so.type = ''U''
THEN tbl.TableDefinition
WHEN so.type = ''SN''
THEN ''CREATE SYNONYM ['' + ss.name + ''] FOR '' + ss.base_object_name
ELSE sm.definition
END as ObjectDefinition
FROM '
+ @database
+
'.sys.objects so
LEFT OUTER JOIN '
+ @database
+
'.sys.sql_modules sm
ON so.object_id = sm.object_id
LEFT OUTER JOIN (SELECT
td.object_id
,SUBSTRING(td.TableDefintionRaw,1,LEN(td.TableDefintionRaw)-1) + '')'' as TableDefinition
FROM (
select
so1.object_id
,(select
CASE
WHEN sc.column_id = 1
THEN ''CREATE TABLE ['' + so.name + ''] ([''
+ sc.name + ''] [''
+ st.name + '']''
+ CASE WHEN st.name LIKE ''%char%'' THEN ''('' + CAST(sc.max_length as varchar(5)) + '')'' ELSE '''' END
+ CASE WHEN sc.is_nullable = 1 THEN '' NULL,'' ELSE '' NOT NULL,'' END
ELSE ''['' + sc.name + ''] [''
+ st.name + '']''
+ CASE WHEN st.name LIKE ''%char%'' THEN ''('' + CAST(sc.max_length as varchar(5)) + '')'' ELSE '''' END
+ CASE WHEN sc.is_nullable = 1 THEN '' NULL,'' ELSE '' NOT NULL,'' END
END
from '
+ @database
+
'.sys.objects so
inner join '
+ @database
+
'.sys.columns sc
on so.object_id = sc.object_id
inner join '
+ @database
+
'.sys.types st
on sc.user_type_id = st.user_type_id
where so.type = ''U''
AND so.object_id = so1.object_id
order by sc.column_id
FOR XML PATH('''')) AS TableDefintionRaw
from '
+ @database
+
'.sys.objects so1
WHERE so1.type = ''U''
group by so1.object_id) as td) as tbl
ON so.object_id = tbl.object_id
LEFT OUTER JOIN '
+ @database
+
'.sys.synonyms ss
ON so.object_id = ss.object_id
WHERE so.[type] IN(''P'' -- Stored procedures
,''V'' -- Views
,''U'' -- User table
,''SN'' -- Synonym
,''FN'' -- Function
ORDER BY so.[type],so.name
JCEHIncidentally, I remember the second reason I set all this up. I had a view that used to revert back to an old definition under SQL 2008. It was weird. More than 1 of us had gone in and "fixed it" and then it unfixed itself. It turned out the view had been
renamed in the past. Each night I have a procedure that checks all views in the instance running sp_refreshview. Any errors are caught and e-mailed to me. It seems that the old definition was still stored somehow under the old name but with the same object
id (there had been some corruption in the database when a drive in the RAID5 array became suspect - picked up with CHECKDB, Windows and indeed the HP software didn't pick anything up). Although the database had been "fixed" this view switched back to
the old definition each time sp_refreshview was run. Fix was to drop and re-create using new definition. Learnt the lesson though and now keep track of all main definitions in each instance.
J
JCEH -
Add Audit Columns to the Dimension and Fact tables (Created & modified date Time)
Hi All,
I am new to SSIS , I have to Add Audit Columns to the Dimension and Fact tables (Created & modified date Time) of the package.
Please let me know the best and easy way through which I can implement the same.
If possible suggest some real time example or link where I can find the same
Regards,
Vipin jha
Thankx & regards, Vipin jha MCPYou can simply use ALTER TABLE ADD.. syntax to add the columns if the tables already exist.
You can generate a single script for all tables using INFORMATION_SCHEMA.TABLES view
You can make then of NOT NULL type and set the default value to GETDATE()
In addition you can also have a Audit Trail trigger for UPDATE to make sure Modified date gets updated correctly on each update if not passed explicitly.
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
What HFM Table contains the Hyperion Financial Reporting Modify Date
Does anyone know the name of the HFM table that contains the Hyperion Financial Reporting Modify Date field of a Report?
Thanks!
Edited by: user2609991 on Sep 1, 2009 8:49 AM1. no "HFM Table" stores any information about Financial Reporting reports. Financial Reporting is part of the "BI+" / "Reporting and Analysis" product, so if there was any information to be found in a relational database, it would be in the BI+ schema not the HFM one.
2. Oracle / Hyperion do not support customers trying to build their own relational database integrations directly into product repositories. To interact with the BI+ product (e.g. to extract modified by dates of FR reports) you should read up on the API and write custom code using that API. More information can be found in the Developers Guide here http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/hs_developer.pdf and in the "javadoc" documentation that comes with the BI+ product. -
ALTER TYPE MODIFY ATTRIBUTE cascade including table data
Hi,
does anybody know, why I get "ORA-00932: inconsistent datatypes: expected REF TYPE1_T got REF TYPE1_T"
after ALTER TYPE MODIFY ATTRIBUTE cascade including table data when the altered type contains a nested table of type REFs.
according to the documentation this should work? This works when the type contains a nested table of types!
ORACLE Version: 9i EE 9.2.0.3.0 64 bit
OS: HP-UX 11
-- create type1
CREATE OR REPLACE
TYPE TYPE1_T AS OBJECT
T1COL1 NUMBER,
T1COL2 VARCHAR2(35),
TYPE2REF REF TYPE2_T
-- create coll of type1 refs
CREATE OR REPLACE
type TYPE1COLL_T IS TABLE OF REF TYPE1_T
-- create type2
CREATE OR REPLACE
TYPE TYPE2_T AS OBJECT
T2COL1 NUMBER,
TYPE1COLL TYPE1COLL_T
-- create table of type1_t
CREATE TABLE TYPE1_OTB OF TYPE1_T
-- create table of type2_t
CREATE TABLE TYPE2_OTB OF TYPE2_T
nested table type1coll store as type1coll_ntb
-- populate type1_otb
INSERT INTO type1_otb
VALUES(1, 'ABCDEF',NULL);
-- populate type2_otb
INSERT INTO type2_otb
VALUES(1,TYPE1COLL_T());
select * from type1_otb;
T1COL1 T1COL2
TYPE2REF
1 ABCDEF
select * from type2_otb;
T2COL1
TYPE1COLL
1
TYPE1COLL_T()
ALTER TYPE type1_t MODIFY ATTRIBUTE t1col2 varchar2(50) cascade including table data;
Type altered.
select * from type1_otb;
T1COL1 T1COL2
TYPE2REF
1 ABCDEF
select * from type2_otb;
select * from type2_otb
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected REF TYPE1_T got REF TYPE1_THi John,
I am also facing the same problem after executing the command
SQL> alter type product_object modify attribute (NAME VARCHAR2(80)) cascade;
with the following error
ORA-00932: inconsistent datatypes: expected REF WOLFOBJECTS.EMPLOYEE_OBJECT got
WOLFOBJECTS.EMPLOYEE_OBJECT
Could you please suggest any alternate or workaround for this issue?
Thanks
Sara -
How to modify and save the data in the table control
how to modify and save the data in the table control
hi priya,
kindly go thru the code below.
PROCESS BEFORE OUTPUT.
MODULE status_9010.
LOOP WITH CONTROL tab_control.
MODULE move_data_to_table.
ENDLOOP.
PROCESS AFTER INPUT.
MODULE user_cancel AT EXIT-COMMAND.
LOOP WITH CONTROL tab_control.
MODULE move_data_from_table.
ENDLOOP.
MODULE move_data_to_table OUTPUT.
This is to move the data from the internal table to *the table control
*zmpets_mode-modecode, zmpets_range-rangeid, *zmpets_servfacto-factor are field names of the table *control columns.
READ TABLE int_factor INDEX tab_control-current_line.
IF sy-subrc = 0.
zmpets_mode-modecode = int_factor-modecode.
zmpets_range-rangeid = int_factor-rangeid.
zmpets_servfacto-factor = int_factor-factor.
ENDIF.
ENDMODULE. " move_data_to_table OUTPUT
**********************************************8888
MODULE move_data_from_table INPUT.
*To move the data from the table control to internal *table 'INT_FACTOR'.
int_factor-chk = line.
int_factor-modecode = zmpets_mode-modecode.
int_factor-rangeid = zmpets_range-rangeid.
int_factor-factor = zmpets_servfacto-factor.
MODIFY int_factor INDEX tab_control-current_line.
IF sy-subrc NE 0.
APPEND int_factor.
CLEAR int_factor.
ENDIF.
ENDMODULE. " move_data_from_table INPUT
if this helps , kindly award points.
for any clarification just mail me.
regards,
Anversha.S
[email protected] -
Can i change or modify or insert the data in standard tables
hi gurus
can i change /modify/insert the data in standard tables
witout using module pools
plz send the progem lines also
it ll be very helpful to me
thank you
kals.Hi Kalyan,
It is not advisable to update standard tables directly or through your own module pool programs also. The reasons are,
1. It is difficult to find out how many tables are updated through the transaction. if we leave one table also as Mr.Andrew said data integrity will be lost.
2. Authorization objects and profiles will be totally bypassed if data is inserted through custom programs.
3. Complete data validation is not possible. There are certain validations that are executed through code and appropriate errors and warnings are shown in the transactions. If we insert data directly to the tables anything can be inserted into the table field violating all the validations unless we have field level check constraints on the tables at database level.
4. User Exits and BADIs that are implemented for specific business requirements and checks will not function on the data.
5. Update & Transaction locks will not work properly.
Due to above reasons, definitely you should avoid updating standard tables directly.
There are many tools such as LSMW Recordings, BDCs, BAPIs, IDOCs, Upload Interfaces available in SAP through which bulk data can be updated without using relevant transactions.
You can collect data from end users in text or excel sheets or through custom programs in required format and upload at once through above mentioned tools.
Regards,
Hema -
Newbie: GUI front end to update data in a table
Hi: I have some tables in a oracle database to which I want to provide a web based GUI that end users can update, delete and add new records. Is there an application (preferably freeware) that can do this? Basically the user interface should show the current list of records and allow user to delete existing records or add new records.
Thanks
RayThis is not a Web interface, but SQL Developer can be used without any Oracle client installation, just a runtime.
And you have iSQL*Plus which allow you to run any query, almost like the overknown SQL*Plus.
By the way, why did you want to allow all your users to modify data without any application ? You may have some problem of data inconsistency for the business logic, if the data are updated without any application code.
Nicolas. -
Inserting data from one table to another in different format
Hello,
I would like to know what I am doing wrong with the following code when I write a data from one another to another table in a different format. I am now learning PL/SQL and am using this as
a test problem.
I have a table called students which has the following columns:
SQL> desc student
Name Null? Type
----------- ----------------STUDENT_ID NUMBER(10)
COURSE VARCHAR2(10)
CREDITS NUMBER(10)
I have created another table called new_student which has the following structure:
SQL> desc new_student
Name Null? Type
----------------------------------------- -------- ------------- STUDENT_ID NUMBER(10)
COURSE VARCHAR2(30)
CREDITS VARCHAR2(10)
The data in the student table is:
SQL> select * from student;
STUDENT_ID COURSE CREDITS
1 Science 4
1 History 3
2 Science 4
2 History 3
2 Math 4
3 Sociology 3
3 Psycology 3
I want to store the STUDENT table data in NEW_STUDENT table as:
STUDENT ID COURSES CREDITS
1 Science/History 4/3
2 Science/History/Math 4/3/4
3 Sociology/Psycology 3/3
This is my code:
DECLARE
-- Get all the student IDs
CURSOR studentlist_cursor IS select distinct student_id from student ORDER BY student_id;
-- Get the information for each student ID
CURSOR courses_cursor(nstudentid number) is select course, credits from student where student_id=nstudentid;
nIndex INTEGER;
pltcourses DBMS_SQL.VARCHAR2_TABLE;
pltcredits DBMS_SQL.NUMBER_TABLE;
newcourses varchar2(50);
newcredits varchar2(10);
BEGIN
FOR student_rec IN studentlist_cursor
LOOP
nIndex:=0;
-- Loop through each student ID from student_rec to get the
--courses and creditsstudent ID
FOR courses_rec in courses_cursor(student_rec.student_id)
LOOP
nIndex:=nIndex+1;
pltcourses(nIndex):=courses_rec.course;
-- Store the course data for each student ID in newcourses
-- while doing so check if it is null or put a '/' between each course
loop
if newcourses is null then
newcourses:=pltcourses(nIndex);
else
newcourses:=newcourses||'/'||pltcourses(nIndex);
end if;
end loop;
pltcredits(nIndex):=courses_rec.credits;
--Store credits data in variable newcredits
--If the newcredits is not null then put a '/' between each credits
loop
if newcredits is null then
newcredits:=pltcredits(nIndex);
else
newcredits:=newcredits||'/'||pltcredits(nIndex);
end if;
end loop;
-- Insert student id, newcourses, newcredits into NEW_STUDENT
INSERT INTO NEW_STUDENT
(student_id ,
course,
credits
) VALUES
(student_rec.student_id,
newcourses,
newcredits
COMMIT;
-- come out of the student id record and go to the next student --id record
END LOOP;
-- come out of the loop
END LOOP;
END;
While doing so I get an error message:
declare
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 23.
The error is at the line:
newcourses:=newcourses||'/'||pltcourses(nIndex);
Can anyone help me by pointing out where the mistake is?
Thank you for reading this long mail.
Thank you.
Rama.Hi dude
there is lot of error in ur pl/sql.
and u have created table new_student with columns
student_id number(10),
courses varchar2(30),
credits number(10).
first u need to modify ur table.
student_id number(10),
courses varchar2(30),
credits varchar2(10).
Now i am writing whole pl/sql block for u. it will work fine.
DECLARE
CURSOR studentlist_cursor IS select distinct student_id from student ORDER BY student_id;
CURSOR courses_cursor(nstudentid number) is select course, credits from student
where student_id = nstudentid;
nIndex INTEGER;
pltcourses DBMS_SQL.VARCHAR2_TABLE;
pltcredits DBMS_SQL.NUMBER_TABLE;
newcourses varchar2(50);
newcredits varchar2(10);
BEGIN
FOR student_rec IN studentlist_cursor
LOOP
nIndex:=0;
newcourses := null;
newcredits := null;
FOR courses_rec in courses_cursor(student_rec.student_id)
LOOP
nIndex:=nIndex+1;
pltcourses(nIndex):=courses_rec.course;
if newcourses is null then
newcourses:=pltcourses(nIndex);
else
newcourses:=newcourses||'/'||pltcourses(nIndex);
end if;
pltcredits(nIndex):=courses_rec.credits;
if newcredits is null then
newcredits:=pltcredits(nIndex);
else
newcredits:=newcredits||'/'||pltcredits(nIndex);
end if;
end loop;
INSERT INTO NEW_STUDENT
(student_id,
course) VALUES
(student_rec.student_id,
newcourses);
END LOOP;
END;
and please revert back
Regards
Anil
Maybe you are looking for
-
STO process from Plant to depot
have created an STO in which my receiving plant is a depot. I have made an outbound delivery, billing and excise invoice from the supplying plant. Now when I am doing the GR through MIGO and entering the Excise Invoice no. it is showing the excise ba
-
How do I turn on bluetooth? - windows 8
Hey all, I've been googling for a while now, and still haven't found anything relevant to me. I have a mid-2012 macbook pro running windows 8 through bootcamp and I've been trying to pair a bluetooth mouse. Bluetooth drivers seem to be installed (App
-
I WANT TO IMPORT MAIL FROM OUTLOOK TO TALKTALK
i want to direct mail from outlook to talktalk.
-
Setting up a RAID of system drives
hello everyone, I am looking to add a second system drive for more hd space. I was planning on purchasing a second Raptor and setting up a RAID 0. will I need to format my existing drive, or can I just plug in the new drive and set up my RAID in DU?
-
Change the field object location in crystal report
hello, i want to change the contols location in crystal report and the controls alignment in run time to make mirror ,how can i access this controls and this properties. we use two language English and arabic that have different alignment. thanks and