Please help me on to write UDF

Hi,
The condition is,
Source Fields (Time)
PICKUP_TIME
DELKEY_TEXT_WE
Target Field(Date/Time)
EarliestTime
                        IF PICKUP_TIME is not equal to 00:00:00 then Read value from: PICKUP_TIME and reduce this by 30 min. and place the result into: EarliestTime. Else
if map value from DELKEY_TEXT_WE position 6 until 13
into: EarliestTime.
Please help me on this...like how to implement UDF
Thanks & Regards,
Y.Raj.

u can try:
// UDF <input parameters: String picktime, String DELKEYTEXT
String EarliestTime="";
          if(!picktime.equals("00:00:00")){
               SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
               try{
                    Date newDt = sdf.parse(picktime);               
                    newDt.setMinutes(newDt.getMinutes()-30);
                    EarliestTime = sdf.format(newDt);               
               }catch(Exception e){
               return EarliestTime;
          }else{               
                  return DELKEYTEXT.substring(6,13);               
Regards
Ritu...
Edited by: Ritu Sinha on Sep 19, 2008 12:06 PM

Similar Messages

  • Please Help! Unable to write error whilst trying to synch my ipod to Ext HD

    Hi there,
    I hope someone out there can help me as I have searched high and low for the answer to my problem without success.
    I recently copied my music library to an external hard drive (seagate) connected to my pc via usb. I am able to play music fine from the external library. However when I plug in my ipod to copy the music over, Itunes crashes with an unable to write/network connection error.
    As I have >60GB of music and a 20GB ipod, I have selected the option to auto update from playlists which is < 15GB of music. This doesn't seem to be the issue though because attempting to manually update the ipod by drag and drop gives me the same error.
    Generally, one song will copy over before the error is displayed or itunes crashes. If I unplug the ipod then itunes recovers ok.
    I have upgraded my ipod and itunes to the latest software versions - a number of times:( I am getting the same problem on my HP Compaq desktop as I do on my Dell Inspiron laptop at home.
    There seems to be a conflict somewhere but I really need help to resolve it.
    Hope someone can help!
    Thx,
    Nikki.

    Could be your security software preventing the devices from being recognized in iTunes. Try disabling a/v software and turn off the Firewall.
    Disable antivirus software
    Turn Windows Firewall on or off

  • PLEASE HELP: SOURCE CODE TO WRITE AN AUDIO RENDERER PLUG-IN !!!

    Hi,
    In my project, I need to render a sound stream to the right ear of a stereo headphone. To do that I need to write up an Audio Renderer plugin that is using the JavaSound API I guess.
    Thank you so much if anyone has an idea to do that? Source code example?
    Cheers,
    Mous.

    maybe
    http://w1.862.tela.com/~u86203407/java/dsp/pan.html
    will help

  • Please  Help me How write the BDC program for the MIGO inbound Delivery

    Please help me how to write bdc program for the MIGO Inbound Delivery in 4.7EE Version. Please help me.
    Not in LSMW.  Required call transaction or Session Method. Please help me.
    Mohan

    Run transaction BAPI . Select Logistics Execution/Shipping/InboundDelivery/SaveReplica.. You can use function module BAPI_INB_DELIVERY_SAVEREPLICA in your ABAP program.

  • Please help me ( advanced graphical user interface)

    I have to finish this problem until 5 pm.
    Java How to program (Deitel & Deitel) - Third edition
    page 696
    please help me
    13-7 : write a program that displays a circle of random size and calculates and displays the area, radius, diameter and circumference. Use the following equations : diameter=2 * radius, area = 3.14(pie) * radius * radius, circumference = 2 * pie * radius. Use the constant Math.PI for pi. All drawing should be done on a subclass of JPanel and the result of the calculations should be displayed in a read-only JTextArea.
    13-10 : Write a program that uses the paint method to draw the current value of a JSlider on a subclass of JPanel. In addition, provide a JTextField where a specific value can be entered. The JTextField should display the current value of the JSlider at all times. A JLabel should be used to identify the JTextField. The JSlider methods setValue and getValue should be used.(Note : The setValue method is a public method that does not return a value and takes one integer arguement - the JSlider value, which determines the position of the thumb.)

    ... until 5 pm.What time zone? I can only see that your message was posted yesterday 7:30 PM, in some unknown time zone.
    And, you are more likely to get help if you show that you have tried to find a solution on your own. No sane person will do your work for you!

  • Please help me to write a function for this requirement!

    Hi,
        I have created a stored procedure which accepts 2 input parameters (param1 & param2 ) and its output is 'Score'
    Eg:
    Exec uspScorecalculation StudentID,DeptID 
    output: 85
    Now, My requirement is , I want to populate this value as one of the columns in a 'Select' statement.
    Can you please give me some input like how can i write a funtion to retrieve this score from the procedure and use it in the select statement?
    I assume,  the funciton should pass the two parameters into the stored procedure 'uspScorecalculation'  and retreives the Score.
    Can you please help me on this?
    thanks!

    >> I have created a stored procedure which accepts 2 input parameters (param1 & param2 ) and its output is 'Score' <<
    We have no idea from this posting what this procedure does. No code. No spec. Only a vague, useless narrative. 
    We do not put that silly “usp_” prefix on a proc name; this is one version of tibbling. When we wrote in FORTRAN I and II, we had to put “fn_” on user functions name. A procedure uses a “<verb>_<object>” format. Have you read ISO-11179 Standards
    or any book on data modeling?  
    EXEC Calculate_Something_Score student_id, dept_id; 
    >> Now, My requirement is, I want to populate this value as one of the columns in a 'SELECT' statement. <<
    Populate a column? We do not do that in a declarative language like SQL. The row with that column comes into existence all at once, and all the rows in the table come into existence all at once. This is a set-oriented language. 
    >> Can you please give me some input like how can I write a function to retrieve this score from the procedure and use it in the SELECT statement? <<
    NO! An SQL programmer will take the body of the procedure and replace the parameters with column names. It will be part of a SELECT statement and not a function call. We hate UDFs and other procedural constructs. 
    Please post the code and DDL, if you want help. Your failure and rudeness in not following Netiquette only hurt yourself. Your mindset is still locking into 1960's FORTRAN, not SQL. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • My iTunes won't open! It keeps saying 'The iTunes Library.itl is locked on a locked disk or you not have write permission for this file.' Please Help!

    My iTunes won't open! It keeps saying 'The iTunes Library.itl is locked on a locked disk or you not have write permission for this file.' Please Help!

    this may happen on external drives if:
    The external drive was hotpluged (removed) without going the correct "eject" way
    The iTunes library (database) got corrupted
    First Aid for external drive
    Close iTunes
    Unmount (eject) external drive the right way.
    Mount drive again
    Go to Workplace -> right click external drive -> choose "clean up" This will force the filesystem to rescan the file structure of the drive and rebuilding the file system table and journaling file.
    After the tool shows "done" (could last some time depending on size of drive) restart iTunes
    If your iTunes library is on your internal drive, this may happen
    The system was not shoot down correct, e.g. "pulled the plug"
    The iTunes library (database) got corrupted
    First Aid for internal hard drive
    Close iTunes
    Reboot system
    Go to Workplace -> right click external drive -> choose "clean up"
    After the tool shows "done" (could last some time depending on size of drive)
    Reboot system, restart iTunes
    If none of the above fixes your problem, post here.
    Lupunus

  • How to use the LAN NetStream for peer transmission, please help, write a sample code

    How to use the LAN NetStream for peer transmission, please help, write a sample code

    No reply, I reply, Oh

  • Hi there, can anyone please help? Download itunes and it says The Itunes library .itl file is locked, or on a locked disk or you do not have write permission for this file.

    Hi there, can anyone please help? Download itunes and it says The Itunes library .itl file is locked, or on a locked disk or you do not have write permission for this file.

    Holding down the shift key while iTunes is opening. That will bring up the 'choose iTunes library' dialog. Select 'Choose LIbrary' from the choices and navigate to your music folder and iTunes music folder.
    Or refer to this article:
    iTunes for Windows XP: "Disk is locked" or "iTunes folder cannot be found" when installing or opening iTunes
    http://support.apple.com/kb/HT1866

  • In a document with several sections, in section VIII and IX one cannot select the text of the page foot nor set the pointer in it; so, one cannot write nor change the page foot text. Please help!

    in a document with several sections, in section VIII and IX one cannot select the text of the page foot nor set the pointer in it; so, one cannot write nor change the page foot text. Please help!

    Question already asked and answered several times.
    It's a bug striking in long documents.
    Select a word somewhere higher in the page then use the arrows to reach the wanted insertion point.
    Yvan KOENIG (VALLAURIS, France) mardi 23 août 2011 15:44:24
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please :
    Search for questions similar to your own
    before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Please help me to write the reports

    Hi everyone, This is rohith here, Please can anyone help me out to write the reports
    1. Developed material master details report. Input of material and plant as select-options and material type as parameter. Output list will have quantity by material group and plant.
    2. Created an Interactive report for displaying vendor information. Based on the selection made the corresponding Vendor Bank Details are listed such that the line selected in the basic list was visible along the secondary list.
    3. Developed an ALV report lists all deliveries that have been shipped but not yet billed
    4. Generated a report  which displays vendor invoice details.

    hi Rohit,
    <b>Welcome to SDN.</b>
    Design the Selection screen first with MATNR & WERKS as Select-options.
    and Material type as Parameteres.
    declare the req internal tables to fetch the data from DB tables .
    Validate the selection screen fields with their check tables according to req..
    write the logic of fetching the data in START-OF- SELECTION.
    and display the output internal table in the output list.
    <b>
    Reward points if useful</b>
    Cheers,
    Chandra

  • Please help to re-write this query using exists or with

    Hi please help to re-write this query using exists or with, i need to write same code for 45 day , 90 days and so on but sub query condition is same for all
    SELECT SUM (DECODE (t_one_mon_c_paid_us, 0, 0, 1)) t_two_y_m_mul_ca_
    FROM (SELECT SUM (one_mon_c_paid_us) t_one_mon_c_paid_us
    FROM (
    SELECT a.individual_id individual_id,
    CASE
    WHEN NVL
    (b.ship_dt,
    TO_DATE ('05-MAY-1955')
    ) >= SYSDATE - 45
    AND a.country_cd = 'US'
    AND b.individual_id in (
    SELECT UNIQUE c.individual_id
    FROM order c
    WHERE c.prod_cd = 'A'
    AND NVL (c.last_payment_dt,
    TO_DATE ('05-MAY-1955')
    ) >= SYSDATE - 745)
    THEN 1
    ELSE 0
    END AS one_mon_c_paid_us
    FROM items b, addr a, product d
    WHERE b.prod_id = d.prod_id
    AND d.affinity_1_cd = 'ADH'
    AND b.individual_id = a.individual_id)
    GROUP BY individual_id)
    Edited by: user4522368 on Aug 23, 2010 9:11 AM

    Please try and place \ before and after you code \Could you not remove the inline column select with the following?
    SELECT a.individual_id individual_id
         ,CASE
            when b.Ship_dt is null then
              3
            WHEN b.ship_dt >= SYSDATE - 90
              3
            WHEN b.ship_dt >= SYSDATE - 45
              2
            WHEN b.ship_dt >= SYSDATE - 30
              1
          END AS one_mon_c_paid_us
    FROM  items           b
         ,addr            a
         ,product         d
         ,order           o
    WHERE b.prod_id       = d.prod_id
    AND   d.affinity_1_cd = 'ADH'
    AND   b.individual_id = a.individual_id
    AND   b.Individual_ID = o.Individual_ID
    and   o.Prod_CD       = 'A'             
    and   NVL (o.last_payment_dt,TO_DATE ('05-MAY-1955') ) >= SYSDATE - 745
    and   a.Country_CD    = 'US'

  • Please help URGENT : Chinese handwriting doesn't seem to work on Lion OSX. the handwriting trackpad appears but anything i write in Chinese doesn't appear in word, chrome,..... HELP PLEASE

    please help URGENT : Chinese handwriting doesn't seem to work on Lion OSX. the handwriting trackpad appears but anything i write in Chinese doesn't appear in word, chrome,..... HELP PLEASE
    And in system prefs/language and text/input languages, simplified chinese and traditional chinese are ticked as usual with handwriting options on !!!!

    Please search the forum for "chinese" to find the many other earlier posts about your issue, like
    https://discussions.apple.com/message/15746805#15746805

  • Report Writer. Urgent Please help.

    Hi Everyone,
    I am new to SAP report writer. I have a question. Prompt response will be greatly appreciated.
    I am trying to display the total franchise sales/Contract Sales/Total units in my Profit and loss report. The stat key figure linked to these fields does not show up any values when the report is executed. Can someone please help me with that?
    Message was edited by:
            Adam King

    Wow Sridhar, that was quick
    Vj

  • Delayed write failure with iPad - please help

    Hi,  I have an iPad (original) that I picked up used recently.  After a week or so of use, I'm now getting a "Delayed Write Failure" whenever I connect it to my PC.  Here are the details:
    1) I am not synching music, only email, apps and photos. 
    2)  when I connect my iPad, I get a delayed write failure on F:\$Mft.  (F is one of two external USB drives I use).  Once this error happens my "F:" drive is no longer usable.  The drive itself still shows up in Windows Explorer but it will not show the folder structure,
    3)  I need to shut down my computer, unplug my "F" drive, let it sit for a few minutes, then Re-boot my PC and re-attach my F: drive to get it operational again.
    4)  After this happened the first time, and I was able to figure out how to get my F drive back to normal, I ran it for two days connected to a different USB port using a different USB cable and it worked fine.  Then I used the old USB cable but the different USB port for another 2 days and no problem.  I then went back to the original USB cable and original USB port for 2 days and still no problem.  If I run iTunes with out the iPad connected there is not problem.  Only when I connect the iPad does this problem occur, even before I ask iTunes to do anything like synch.
    Please help
    Thanks -- Dan

    Try this  - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.) No data/files will be erased. http://support.apple.com/kb/ht1430
    Frozen or unresponsive iPad
    Resolve these most common issues:
        •    Display remains black or blank
        •    Touch screen not responding
        •    Application unexpectedly closes or freezes
    http://www.apple.com/support/ipad/assistant/ipad/
    iPad Frozen, not responding, how to fix
    http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    Black or Blank Screen on iPad or iPhone
    http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iOS: Device unexpectedly restarts, displays Apple logo, or powers off
    http://support.apple.com/kb/TS5356
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
    You iPad is still under warranty. Take it to an Apple Store for evaluation.
    Make a Genius Bar Reservation
    http://www.apple.com/retail/geniusbar/
     Cheers, Tom

Maybe you are looking for

  • Getting a Square Root Result

    Does anyone have an clever ways to yield a square root result. I can use the ^ feature a business rule or calc script and it validates fine, but then I don't get a result ex: I can say 100^.5 and should get a value of 10, but no go.....anyone having

  • Server Cannot be reached error

    Hi All,    While executing test bsp application, i am getting the following error on browser. <b>Service cannot be reached What has happened? URL http://server.sairam.com:8000/sap/bc/bsp/sap/zjvs_bsp/page1.htm call was terminated because the correspo

  • How to insert a file in a table field

    hi there i want to insert file into table field i am using plain JSP and oracle 9i is my backend what i would required to do the file may be of any format most probably PDF,WORD, or an Image which datatype is preferable for field regards sweety

  • Do I Have to Have Duplicates?

    When I import a CD/Album that has some songs on it that are on a previously imported CD/Album, the system will ask me if I want to over-write the existing songs. I ususally respond "no" because I want to keep each album intact. Now I have quite a few

  • Problems with FileVault, wont turn off:/

    Some time ago I turnd FileVault on to see what it was. But as I now know I dont need it, its youst a pain. And also, its very hard to turn off. If I say "Turn of filevault", I get the message that it needs 4.8 tb to turn it off. And, suprise!! I dont