How to write user funtions in ODI

hi ODI gurus,
Please help me to write a user defined functions i ODI....
Iam writing a single query for current date : in user function
the query is
select to_char(sysdate,'Dy DD-Mon-YYYY HH24:MI:SS') as "DATE_TIME" from target1;
its asking me to enter the group
what is to be added in the group

You need to write the function like this
Implementation tab
to_char($(column_name),'Dy dd-mm-yyyy hh24:mi:ss') , with Oracle or what ever technology you are planning to use this function .
[ you dont need to provide the complete select query]
Click Appy
Definition tab
Syntax - conv_date($(column_name)) ( you can change the conv_date name to what ever meaningful name you wish to provide ]
Group - date ( or what ever group name you feel like providing ]
name - conv_date
Interface
Lets say your column_name is sys_date
then function will be called in interface this way - conv_date(sys_date) . ODI automatically will convert the syntax to
to_char(sys_date,'Dy dd-mm-yyyy hh24:mi:ss') during the execution of the Interface.
Hope this is clear .
Edited by: Dev on Sep 7, 2010 5:45 AM

Similar Messages

  • How to write USER EXIT  for ecc6.0 version

    Hi,
    Can u pls tell me how to write user exit program in  ecc6.0 and also can u send me the sample program
    thanks in advance.

    hi ,
    'EXIT_SAPLHRBEN00GENERAL_014'
    1)Goto CMOD  tcode.
    2)Click on Utilites on Menu bar.
    3)Press Shift+F9, below in component name enter
    EXIT_SAPLHRBEN00GENERAL_014,
    4)F8 , then you will get Exit name PBEN0014
    Double Click  again Double Click you will get function
    FUNCTION EXIT_SAPLHRBEN00GENERAL_014.
    within this onel include file is there.
    INCLUDE ZXPBEU14.
    here you will write your Enhanc Code.
    Reward if , you got soln,
    Thanks.

  • HOW TO WRITE USER EXIST IN B/W

    HI SAP GURUS,
    CAN U PLZ TEL ME THE STEP BY STEP " HOW CAN I WRITE USER EXIST"
    AND I WHICH SUATION I CAN USE THIS OPTION
    AND SAME WITH CUSTOMER EXIST ALSO
    WITH AN EXAMPLE OF ANY ENHANCEMENT
    PLZ KINDLY HELP ME

    Hi,
    here customer exit we can write in r/ and bw side
    in both places also tcode is CMOD
    first create the project
    assign the enhancement for that procjet and go the compnents
    it shows the screns as below.
    if it is r/3
    exit_saplrsap_001--for transaction data
    exit_saplrsap_002---for master data attribute
    exit_saplrsap_003---master text
    exit_saplrsap_004 -heiraraches
    situation in r/3
    if do u want to enhance(add the field) to already existed data source or appling some condition on that.
    if it is bw
    same as r/3 for creating the project and assign the enhancement then click on copmonets it shows the fm  as exit_saplrrso_001
    in bw for all the things it is the FM
    doble click on that it takes to the main code screen with zxrsuo1 structure and go for change mode and write the code.
    in bw situation
    when ever u want calculate something internaly in dyanaamically u can write the code
    for example if u r created varible on some date colum now u want dynamically current date
    then u can write code as below
    when 'ur varibale name'
    clear l_s_range.
    l_s_range-low = sy-datum(current date)
    l_s_range-option = 'eq'.
    l_s_range-sign = 'i'.
    append l_s_range to e_t_range.
    here we r getting the current date for that varible
    like that in different scenarios we can use this.
    Thanks & Regards,
    Sathish

  • How to write user exit for benefit..

    Hello All,
    I'm a HR consultant, with no technical background..
    At my client end, the configuration for ER contribution right now has x% of EE contribution and limit set to y% of base salary..
    They want to change their way of calculating this..There is some basic calculation as in first 1% - match will be 100% or dollar for dollar and 2%-6%-match will be 50% or .50 on the dollar..
    Got to know that we can use a user-exit in 'PBEN0014' SAP enhancement (SAP function 'EXIT_SAPLHRBEN00GENERAL_014').
    Plz advice how to proceed....

    hi ,
    'EXIT_SAPLHRBEN00GENERAL_014'
    1)Goto CMOD  tcode.
    2)Click on Utilites on Menu bar.
    3)Press Shift+F9, below in component name enter
    EXIT_SAPLHRBEN00GENERAL_014,
    4)F8 , then you will get Exit name PBEN0014
    Double Click  again Double Click you will get function
    FUNCTION EXIT_SAPLHRBEN00GENERAL_014.
    within this onel include file is there.
    INCLUDE ZXPBEU14.
    here you will write your Enhanc Code.
    Reward if , you got soln,
    Thanks.

  • HOW TO WRITE USER EXIT FOR EXTENDED IDOC

    Can somebody please help me as i need the user exit code for Shipment idoc.
    I append the structure of VTTP and add one field with the name of ZDELCST i.e Delivery cost so i want to update that table once the idoc will post.
    I have to write the user exit for this but i have no idea how to do this so kindly requesting someone to please write the code for me and i will be very grateful to him/her.
    The functional module is IDOC_INPUT_SHIPPL
    and there is a CALL CUSTOMER-FUNCTION '012'
    this will take us to function module EXIT_SAPLV56I_012
    This includes ZXV56U08
    Within this include in need to map the delivery cost from the idoc to the new append filed VTTP-ZDELCST

    hi ,
    'EXIT_SAPLHRBEN00GENERAL_014'
    1)Goto CMOD  tcode.
    2)Click on Utilites on Menu bar.
    3)Press Shift+F9, below in component name enter
    EXIT_SAPLHRBEN00GENERAL_014,
    4)F8 , then you will get Exit name PBEN0014
    Double Click  again Double Click you will get function
    FUNCTION EXIT_SAPLHRBEN00GENERAL_014.
    within this onel include file is there.
    INCLUDE ZXPBEU14.
    here you will write your Enhanc Code.
    Reward if , you got soln,
    Thanks.

  • How to write user exit for 0008

    Dear Freinds
               i have tried using the badi HRPAD00INFTY (before input)..however i am not able to get the values, so i have switched to user exit zxpadu02 ....
    but, iam still failed as the iam not getting the value for bet01 for the specific wage type since this is tabel contol,
    my requirement is as follows , when the user enters for the ansal then it should automatically filled in bet01 for the wagetype( i.e , Q0008-lgart = MFPY)
    and the amount field bet01 should be graded out so that it cannot be entered manually.
    please any body can you give me coding .
    regards
    shanti.

    Dear Pranesh, 
    thank you for answering my question,
    i have done the coding as follows now i.e field bet01 is not mandatory now.
    i hae done in ZXPADU02.  
    data : wa_p0008 like p0008,
           l_v_ANSAL type ANSAL_15,
           l_v_amount type PAD_AMT7S.
    CASE innnn-infty.
    when '0008'.
    CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
    EXPORTING
    prelp = innnn
    IMPORTING
    pnnnn = wa_p0008.
    if wa_p0008-lga01 = 'MFPY'.
    l_v_ansal =  wa_p0008-ansal.
    l_v_amount = l_v_ansal / 100.
    move l_v_amount to wa_p0008-bet01.
    CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
    EXPORTING
    pnnnn = wa_p0008
    IMPORTING
    prelp = innnn. -
    > iam getting the data for bet01 i can see in debugging
    endif.
    when others.
    endcase.
    as i mentioned above i can see the calculated data in bet01  in debuggin and
    it is there in INNNN ............but iam not able to see the data now in pa30
    i.e the amount field Q0008-bet01 is not being filled.
    please let me know what i have to do.......
    note i have done only in ZXPADU02( PAI) , i have not written any coidng in zxpadu01.
    regards
    shanti

  • How to find number of users logged into ODI

    Hi Experts,
    I am using ODI 11g in linux environment. I have created 15 users in system manager tab.
    My query is, how to find ODI11g logged in users list
    For Example, out of 15 users, 7 users are accessing ODI, how to fetch 7 users name list.
    Is there any query to find fetch the list
    Can any one please help me out
    Thanks in Advance
    Regards,
    PK
    Edited by: 917775 on Jun 21, 2012 11:52 PM

    Hi Rai,
    Thank you for the response
    I have verified already with v$session table, it seems how database user are login (lie it show the status as Active and InActive in status column) but I want to know the staus for how users are login into ODI.
    I have verified with SNP_USER table also, no uses of the.
    Any help on same
    Thanks in advance
    Regards,
    Phanikanth

  • How to write customer exit in my BI query to get (current fiscal quarter) and (current fiscal quarter - 1 ) without user input

    Hi all,
    I need your help how to write customer exit in my BI query to get (current fiscal quarter) and (current fiscal quarter - 1 ) without user input.
    in my query info object is 0CALQUARTER and variable is ZFIS_QTR.
    in 0CALQUARTER fiscal quarter stored in 201301,201302,201303,201304 and 201401 format, for current fiscal quarter 201401 and (current fiscal quarter - 1 ) would be 201304.
    please replay ASAP to deliver the report to client.
    thanks in advance.
    -- Rakesh Nagpure

    I am Getting the same error for both the codes that i have written...
    Do i Need to write sth else in the code...
    Code:
    WHEN 'ZVLIVELEASES'.
      IF I_STEP = 2.
            L_DATE = SY-DATUM.
            SELECT * FROM "DSO_ACTIVE_TABLE"
                INTO TABLE ITAB_LL where "EXPIRY_DATE" > L_DATE.
            LOOP AT ITAB_LL INTO WA_LL.
            CLEAR l_s_range.
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            l_s_range-low = WA_LL-"EXPIRY_DATE".
           APPEND L_S_RANGE TO E_T_RANGE.
            ENDLOOP.
       ENDIF.
    Error: Error for variable in customer enhancement ZLIVELEASES

  • Iphone 4 cdma ppp user hdr password how to write  cdma work shop

    iphone 4 cdma ppp user hdr password how to write im using  cdma work shop
    and how to enble dignostic port 

    My Yahoo email account worked just fine on my iPhone 4S  for the last 2 months. Then this morning I started receiving the apple.imap.mail,yahoo error.  I tried all of the steps above in solving the yahoo email issue including numerous hard re-sets and deletions of my yahoo account settings without any success. So I gave up trying to use the default Yahoo setup option.  I added my Yahoo account back as an "other" type email account and then had the option to choose to set it up as a "POP" account instead of an IMAP type. I then just used the server settings recommended from Yahoo Help for a Yahoo Plus Email POP (or just google yahoo plus email pop settings). This works and I am back in business.
    I'm not sure if this will work for yahoo mail classic accounts.
    Frustrating that this issue seems to have been going on for quite awhile and Apple still as not made any acknowledgement of this issue or proposed a fix for those of us that can not resolve the issue with a reset.

  • How a administrator user is different from read-write user in Aruba Central?

    Q: How a administrator user is different from read-write user in Aruba Central?
    A: Aruba Central allows administrator to create multiple user of different access levels to help manage the system.  This access levels include:
    read only
    read/write
    guest operator
    NOTE: These access levels can be imposed on a specific "ap group" or a set of "ap groups" or all of them.
    Therefore looking at the roles, many of the aruba central customers, had a question of how a administrator user is different from read-write user. 
    Administrator is the only user who can move access points between groups. Read/Write user Do Not Have Permission to execute this action.

    Hi,
    I've managed to get what I needed by using a shift register + event structure as suggested by Adnan. However, I face another problem after implementing SR+event. I've attached two files, first the original program and second the updated program using SR + event. (it's only the jpg file as I've forgotten to save the labview program, will upload the program by tomorrow.
    In the original program, I have an elapsed time that is able to run continuously when I run the program. In the updated program, my elapsed time don't seem to run continuously when I run the program (as shown by elapsed time indicator). I need the elapsed time to run continuously as a input to calculate my motor profile.
    I suppose this is caused by the introduction of the event structure, will adding a case structure to wrap the event structure solve the problem or is there another way to get pass this. Appreciate if someone could drop me a pointer or two.
    Thanks
    Attachments:
    Mar 16 - continuous elapsed time.png ‏12 KB
    Mar 16 - elapsed time not continuous after introducing shift register + event structure.png ‏17 KB

  • How to writea   report which can send a mail to the user who is running

    Hello,
    how to write the program to send a mail

    have to get all the data in an text internal table and use the following fm in your pgm
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = w_doc_data
          put_in_outbox              = c_true
          sender_address             = ld_sender_address
          sender_address_type        = ld_sender_address_type
          commit_work                = c_true
        IMPORTING
          sent_to_all                = w_sent_all
        TABLES
          packing_list               = gt_packing_list
          contents_bin               = gt_attachment
          contents_txt               = gt_message
          receivers                  = gt_receivers
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          document_type_not_exist    = 3
          operation_no_authorization = 4
          parameter_error            = 5
          x_error                    = 6
          enqueue_error              = 7
          OTHERS                     = 8.
    * Populate zerror return code
      ld_error = sy-subrc.
      MESSAGE i000(zp) WITH 'Message succesfully sent'.

  • How to write a pgm to change the existing encrypted password

    Hi all,
    can anybody tell me how to write a pgm to change the existing encrypted password.
    thanks in advance.

    Well, it's going to depend on how it's implemented in the current system.
    But basically it's going to look a lot like the current login actions. Presumably you have something that takes the user ID and password, encrypts the password, looks up the encrypted password in the database matching that user ID, and compares them. This functionality would also take a new password (preferably twice so they can be checked for consistency), and if the existing encrypted passwords match, it will encrypt the new password and put it in the database where the old one was.
    And if the application has a mechanism for new users to sign up, it'll look a lot like this as well.
    But I'm just guessing. This is all going to depend on how the existing functionality is written. Probably the best thing you can do is talk to a programmer at your organization who has worked on the application, and ask them for help.
    Hope this helps anyway.

  • How to write a SQL query in SAP B1 2007 B with input parameters?

    How to write a SQL query in SAP B1 2007 B with input parameters, on execution of which will ask for some input value from the user and the values will be selected from a list such as item list?

    The syntax like
    SELECT * FROM OITM T0 WHERE T0.ItemCode = '[%0\]'
    Thanks,
    Gordon

  • How to write error log while creating invoice and avoid implicite commit

    Hi,
    I've have written code in exit RV60AFZZ in which I check for some possible errors while invoicing via VF01/VF04. If conditions are met then we create error message and display it to the user. As result we had a lot of missing SD invoices in FI when we did batch/mass invoicing. I've opened OSS note and SAP support team wrote that using statement MESSAGE is forbidden in UE. It can lead to implicite commits.
    Do you have some example how to write error log for invoincing in VF01/VF04 transactions?
    Thanks

    @ sri nath. Please read post before answering. I wouldn't be posting trivial questions. As I wrote before it doesn't work.  Also SAP support would not answer to the question in my OSS.
    In VOFM, SAP is using routine  VBFS_HINZUFUEGEN_ALLG to write to error log.
    Mine is something like this in ue:
          PERFORM ZVBFS_HINZUFUEGEN_ALLG
                     USING VBAP-VBELN VBAP-POSNR  'ZSD' 'E '600'
                           SPACE SPACE SPACE SPACE.
    (we have custom message class)
    As result  XVBFS and VBSK are filled with error, but posting is also done.  Error log is filled but invoice is created and posted in FI.
    That is not OK.
    thanks

  • How to find user who loaded the procs in DB

    Hi guys how to find user who loaded procs in database ..and the date...
    is there anyway..
    i tried to look at all_objects..but it didnot workout..
    thanks

    That is correct. You will only have audit rows for item that you are auditing. I am suggesting you audit all DDL in a production database since production jobs should not perform DDL with the probable exception of truncate. This will provide this type of information going forward. It will not help you answer the question of who created the procedure last week?
    Auditing is explained in the Security manual and the full comand syntax is available in the SQL manual.
    You can easily write a purge the audit data to remove data once it is no longer of interest based on the date the audit row was created.
    HTH -- Mark D Powell --

Maybe you are looking for