WHO Columns updation

Hi
I have a shell script that I am using for SQL loader through which I want to update the who columns in custom table at the time of load. How can I achieve this?
below is the SQL loader part of the script.
cat > $ctl_file <<!
OPTIONS (errors=5000,SKIP=1)
LOAD DATA
CHARACTERSET ZHS16GBK
INFILE '$v_data_file'
REPLACE INTO TABLE XXHYBRID_FORECAST_NAV
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
plant "LTRIM(RTRIM(:plant))",
build_date "LTRIM(RTRIM(:build_date))",
reg "LTRIM(RTRIM(:reg))",
job "LTRIM(RTRIM(:job))",
order_num "LTRIM(RTRIM(:order_num))",
qty "LTRIM(RTRIM(:qty))",
step "LTRIM(RTRIM(:step))",
customer "LTRIM(RTRIM(:customer))",
sfx "LTRIM(RTRIM(:sfx))",
mdl "LTRIM(RTRIM(:mdl))",
feature "LTRIM(RTRIM(:feature))",
cust_req "LTRIM(RTRIM(:cust_req))",
Orddte "LTRIM(RTRIM(:Orddte))",
acct "LTRIM(RTRIM(:acct))",
loading_date ,
created_by ,
creation_date ,
last_update_date ,
last_updated_by ,
last_update_login "USERENV('SESSIONID')"
I am only able to load the value of last_update_login with "USERENV('SESSIONID')".
fnd_profile.VALUE('USER_ID') is not working for created_by and last_updated_by.
Any ideas are welcome.
Thanks
Vishalaksha

Hi Vishalakha,
SQL* Loader is basically a Database technology, and it does not allow any access to Oracle Apps User Id for Created_by and last_updated_by, but you can consider using an Oracle PL/SQL trigger, or consider submitting loader concurrent program from PL/SQL Concurrent program.
Thanks,
Kiran

Similar Messages

  • Automatic updation of WHO columns in Oracle forms 6i

    Hi,
    I am using Forms 6i Version. I have developed a simple form with one database block. The form should display the colums in the table and should allow insert/update/delete operations on the form.
    I am able to update and delete the data through the foem. However my form doesn't allow me to insert data. This is because the creation_date and created_by columns in the table cannot be null.(custom table).
    And I dont want to have these fields in the form.
    I want the who colums to be automatically updated in the custom table through form, which is not happening currently.
    Pls help.
    Thanks
    Deepti

    Deepti,
    I have called the FND_STANDARD.SET_WHO in pre-insert /pre-update triggers. Still I could not get the who columns updated in my custom table.
    Was this done at the block level? -- Custom Oracle Form Fails when User Looks at the 'About This Record' Information (Doc ID 236642.1)
    Thanks,
    Hussein

  • How to populate who column values, when commiting the transaction?

    Hi,
    In Oracle forms we can populate who columns thru FND_STANDARD.SET_WHO;
    How is it in OAF?. Standard setter methods are sufficient or do I need to code something to get the values.
    Thanks

    Yes, all Setter methods are in EOImpl object. After I commit the trasnaction, who columns are showing as null.
    CreationDate
    CreatedBy
    LastUpdatedBy
    LastUpdateDate
    LastUpdateLogin
    * Gets the attribute value for CreationDate, using the alias name CreationDate
    public Date getCreationDate()
    return (Date)getAttributeInternal(CREATIONDATE);
    * Sets <code>value</code> as the attribute value for CreationDate
    public void setCreationDate(Date value)
    setAttributeInternal(CREATIONDATE, value);
    * Gets the attribute value for CreatedBy, using the alias name CreatedBy
    public Number getCreatedBy()
    return (Number)getAttributeInternal(CREATEDBY);
    * Sets <code>value</code> as the attribute value for CreatedBy
    public void setCreatedBy(Number value)
    setAttributeInternal(CREATEDBY, value);
    * Gets the attribute value for LastUpdatedBy, using the alias name LastUpdatedBy
    public Number getLastUpdatedBy()
    return (Number)getAttributeInternal(LASTUPDATEDBY);
    * Sets <code>value</code> as the attribute value for LastUpdatedBy
    public void setLastUpdatedBy(Number value)
    setAttributeInternal(LASTUPDATEDBY, value);
    * Gets the attribute value for LastUpdateDate, using the alias name LastUpdateDate
    public Date getLastUpdateDate()
    return (Date)getAttributeInternal(LASTUPDATEDATE);
    * Sets <code>value</code> as the attribute value for LastUpdateDate
    public void setLastUpdateDate(Date value)
    setAttributeInternal(LASTUPDATEDATE, value);
    public Number getLastUpdateLogin()
    return (Number)getAttributeInternal(LASTUPDATELOGIN);
    * Sets <code>value</code> as the attribute value for LastUpdateLogin
    public void setLastUpdateLogin(Number value)
    setAttributeInternal(LASTUPDATELOGIN, value);
    protected void updateRowWho()
    OADBTransaction oadbtransaction = getOADBTransaction();
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "Entering updateRowWho", 2);
    oadbtransaction.writeDiagnostics(this, "Not updating WHO columns", 2);
    oadbtransaction.writeDiagnostics(this, "Leaving updateRowWho", 2);
    protected void createRowWho()
    OADBTransaction oadbtransaction = getOADBTransaction();
    if(oadbtransaction.isLoggingEnabled(2))
    oadbtransaction.writeDiagnostics(this, "Entering createRowWho", 2);
    oadbtransaction.writeDiagnostics(this, "Not updating WHO columns", 2);
    oadbtransaction.writeDiagnostics(this, "Leaving createRowWho", 2);
    Thanks

  • Who Column - What is best way to put value in who columns

    Hi,
    I have a custom concurrent program that is inserting values in a custom database table. Now I have to update that table to enter *'who columns'*. I have updated table but now get confused when I need to enter values in those 'who columns'.
    Now I have two option: 1) change package body used by concurrent program to insert values of who column. 2) put trigger on the table to put who columns values on insert/update
    Now my question is that which is better and standard option in EBS and why????
    Do we have already existing 'who trigger' in EBS that I can reuse???
    Please help me to find answer.
    Thanks,
    Faried

    Hi Faried,
    It is always suggested to avoid triggers wherever possible. Its easy to implement the logic of updating who columns in the concurrent program and you will have one less thing (trigger) to maintain.
    As far as a prebuilt who trigger is concerned, there isn't anything available for a pl/sql program. If you are coding a custom form through which you want to update a who column of a table, there is a standard api (FND_STANDARD.SET_WHO), that comes from template.fmb which takes care of updating the who columns. However, for a custom concurrent program, there isnt anything like that. You will just have to add these columns in your insert/update statements.
    Thanks
    Vijay

  • Primary key and WHO columns on EO

    We are trying to create a EO based on a database view. We do not have primary key and standard OA WHO columns but the OA framework is forcing us the have these columns. How do we go about this issue? Any suggestion will be appreciated.

    Oracle Apps mandates that you should have the Audit columns in the Applications tables.
    So you must have the 5 columns defined.
    I have created new tables for my application and need to populate them whenever user creates or modifies any row
    Jdeveloper/BC4J handles direct updates/inserts through default EO implementation, it would insert/update/delete from the base table via the EO, what is your qeustion then ? do you want to know how to perform DMLs in OA or something else ?
    Thanks
    Tapash

  • Need to set WHO columns

    I am trying to set WHO columns in an Oracle APPs custom form.
    I tried fnd_standard.set_who
    bit gives an error, cannot insert null into creation date;
    i tried just setting it to USER
    but gives pre insert error -ora06502
    is there any other way to set WHO columns??
    Please let me know asap.
    Need it urgently.

    If you are updating using an EO and the tables have columns such as created_by,creation_date, last_update_date etc, OAF will automatically populate these.
    If you don't have these columns in your table, and get an error saying something like ' class must be declared abstract, setlastupdatelogin not defined', then implement empty methods to override this behavior.
    Also, how are you trying to set the value to 'USER'? The error you see is because of a wrong datatype.

  • AP_INVOICES_ALL Standard WHO Columns - Urgent help

    I created some Invoices(Debit memos), later i approved them in the front end and expected the last_update_date to change, but it didnt.
    Is there anything else that could be controlling the update on the standard WHO columns. My program depends on the last_update_date as a driving criteria, i am stuck at this point, wondering if something is preventing the update on the WHO columns.
    Can someone help me in this regard.

    I see this statement at the end of approval. May you can use this:
    UPDATE ap_invoice_distributions D
    SET match_status_flag = 'T',
    last_update_date = SYSDATE,
    last_updated_by = p_user_id,
    program_application_id = decode(fnd_global.prog_appl_id,
    -1,null,
    fnd_global.prog_appl_id),
    request_id = decode(fnd_global.conc_request_id,
    -1,null, fnd_global.conc_request_id),
    program_id = decode(fnd_global.conc_program_id,
    -1,null, fnd_global.conc_program_id),
    program_update_date = decode(fnd_global.conc_program_id,
    -1,null, SYSDATE)
    WHERE match_status_flag = 'S'
    AND D.invoice_id = p_invoice_id;
    Thanks
    Nagamohan

  • How to find out the oracle level user(sid) who is updating the table?

    Hi everyone,
    I am creating a update trigger which is to look for the user (sid) who is updating the rows in this table. Is there any lower level dynamic view or table I can use to find out the user?
    Thanks for any help.
    Jun

    Hi, please repost this question in the Database section under the SQL & PL/SQL discussion forum
    PL/SQL
    thanks - OTN

  • Can we use WHO columns in Business Logic implementation

    Hi,
    Can we use WHO columns for business logic implementation..?
    From one table I need to pick up the latest record. I have a ActionDate column in the table which stores the date of the action.
    But on the same day there can be multiple action records. ie Multiple records have same ActionDate.
    Select * from action_table where action_date=(maximum action_date)
    The above query will return more than 1 record.
    Now can I use the Creation_Date which is a WHO column to identify the latest record..?
    Will it introduce any issues if I use creation_date WHO column?
    Usage of WHO column in application logic, Is it against the Standards ?
    Thanks a lot.

    I guess you are talking about populating the value using the history column creation_dt from EO.
    If so, you can use then. We are using them in all our applications to populate WHO columns of our table.
    Infact as far as I know, even Oracle application uses them.
    They generally populate the timestamp, so you may need to format them when doing date comparisons.
    Hope that helps.
    Amit

  • How can I find the user that created a user account and the user who last updated the account

    How can I find out who created a user account and who last updated the account. I think that this is the same information that is displayed in the description field on the General tab.
    I am using ADO commands and vbscript
    ug3j

    I should point out that there are two attributes of all AD objects that can help you track down the correct information in the system logs. These are the whenCreated and whenChanged attributes. This will tell when the object was created and when it was last
    modified, which should help when you search the logs. Also, while whenCreated is replicated to all DC's, so they will all have the exact same creation time, the whenChanged attribute is technically not replicated. The date/time on each DC reflects when
    the last modification was replicated to that DC. The values will differ slightly on each DC, reflecting how long it took for the change to replicate.
    Richard Mueller - MVP Directory Services

  • I have several users who have updated to the new iOS 5 and now are unable to get to the apple store

    I have several users with ipads who have updated to the new iOS5 and are now unable to access the itunes store.  It loads about half way and then nothing.  Any ideas on how to fix this?

    Photo stream only keeps your photos for 30 days.  After that, they are removed from your photo stream but not from any device that has already received them.  Chances are, the 44 photos are from the last 30 days; the others are not there because they are no longer in your photo stream.
    If the photos were in your camera roll when you last backed up, restoring to the backup should recover them.  However, you will have to restore to the entire backup to do so.  If they weren't backed up or imported to your computer, there is no way to recover them now.
    To be sure your photos are saved, regularly import them from the camera roll to your computer as outlined here: http://support.apple.com/kb/HT4083.

  • How to display WHO columns in oracle apps form

    Hi all,
    I have WHO columns in the Table and i need to add in the existing form and i have WNI trigger (execute_query) and i am trying to add columns in the Existing Database Block
    After opening the Form(oracle apps form) i am not getting/populate any records on the Block
    Please help and please give me the steps
    Thanks

    Hi ,
    This community is to discuss Oracle Application Server specific issues, you can post this query in for better response:
    Forms
    Oracle Forms - EBS (MOSC)
    Regards,
    Prakash.

  • In R 12.1.3 , how do I enable the who columns on OAF pages ...

    Hello:
    How do I enable the WHO columns in OAF pages in R 12.1.3 ?
    Thanks - Yesh

    Hi,
    Please post your question in "Technology - OA Framework" forum for a better/faster response.
    Technology - OA Framework
    OA Framework
    Thanks,
    Hussein

  • Who will update control file when renaming a redolog file

    Hi when we rename a redolog file in mount state of database using the following command
    ALTER DATABASE
    RENAME FILE '/diska/logs/log1a.rdo', '/diska/logs/log2a.rdo'
    TO '/diskc/logs/log1c.rdo', '/diskc/logs/log2c.rdo';
    how the new location and new name of redo log files will be updated to control file and who will update that inforamtion
    thanks in advance.

    Where did you get this?
    oracle    4774  4733  0 12:04 pts/0    00:00:00 sqlplus   as sysdba
    oracle    4797     1  0 12:04 ?        00:00:00 ora_pmon_DB1
    oracle    4799     1  0 12:04 ?        00:00:00 ora_vktm_DB1
    oracle    4803     1  0 12:04 ?        00:00:00 ora_diag_DB1
    oracle    4805     1  0 12:04 ?        00:00:00 ora_dbrm_DB1
    oracle    4807     1  0 12:04 ?        00:00:00 ora_psp0_DB1
    oracle    4811     1  0 12:04 ?        00:00:00 ora_dia0_DB1
    oracle    4813     1  0 12:04 ?        00:00:00 ora_mman_DB1
    oracle    4815     1  0 12:04 ?        00:00:00 ora_dbw0_DB1
    oracle    4817     1  0 12:04 ?        00:00:00 ora_lgwr_DB1
    oracle    4819     1  0 12:04 ?        00:00:00 ora_ckpt_DB1
    oracle    4821     1  0 12:05 ?        00:00:00 ora_smon_DB1
    oracle    4823     1  0 12:05 ?        00:00:00 ora_reco_DB1
    oracle    4825     1  0 12:05 ?        00:00:00 ora_mmon_DB1
    oracle    4827     1  0 12:05 ?        00:00:00 ora_mmnl_DB1
    oracle    4829     1  0 12:05 ?        00:00:00 ora_d000_DB1
    oracle    4831     1  0 12:05 ?        00:00:00 ora_s000_DB1
    oracle    4855  4774  0 12:05 ?        00:00:00 oracleDB1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
    oracle    4858  4729  0 12:05 pts/1    00:00:00 bash
    oracle    4875  4858  0 12:05 pts/1    00:00:00 ps -fu oracleA ps output. The db is in mounted state.
    Dim

  • Who columns for OAF pages

    IS there anything equivalent to Forms' "Help -> Record History" in OAF Pages for end users to find the current records' Who column values?

    Niranjan,
    Forms and OAF pages belong to different techstack and therefore there are many technical differences in the two. Here you can view the vo query using about this page or use diagnostics mode to see existing logs of OAF pages.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Acrobat Pro. 7.1.0 problem with Windows 7

    Hello, I recently upgraded my desktop to Windows 7 64 bit.  Prior to that, I had been running Vista Home Premium 64 bit. Acrobat runs, and I can read Acrobat documents, so that is working.  However, when I go to "Devices and Printers", I don't have t

  • I can't restore my iphone.  when i plug it in, the phone recognizes that it is plugged into itunes, but itunes doesn't recognize it

    My iphone charges when I plug it into my computer, but itunes doesn't recognize that any device is attached (I have the latest version; a pc, not a mac; it's a Verizon iphone).  Also, the phone's info button (which should tell me the serial number) s

  • Printing to Acrobat Pro 9

    I am having an issue where certain files will not print to Acrobat. It doesn't ask for a name, then appears to go through the process of creating a PDF but does not create one. I know you can export, which I am forced to do but it interferes with the

  • Exported versions include GPS data?

    i spent quite a bit of time troubleshooting an issue before i learned that aperture does not include gps data when exporting versions.  is that really true?  if so, i'm fairly flabbergasted.  how can a pro product like this not perform such a basic f

  • Error opening TestStand 4.1.1: ParameterName SplitterDistance

    Hi, my TestStand Sequence Editor cannot be opened any more. The error "Sequence Editor  Der Wert -2147483648 ist für die SplitterDistance ungültig. SplitterDistance muss größer als 0 sein. Parametername: SplitterDistance" occurs and everything in the