UDF(user defined function) for standard date transformate function,

Hi All,
Hope you are doing good !!!
I have a requirement where i need to write an UDF(user defined function). Please help me in writing the code for below logic-
I am getting my Input as 111213 where 11 denotes HH 12 denotes mm 13 denotes ss. I need ti insert : between hh:mm:ss
Please help me achieving a code for below logic
I have used standard date transformate function, there i am getting spaces as separator in my input resulting an errors i am sending without spaces.
Regards,
Vijay Kumar.

Hello,
I am getting my Input as 111213 where 11 denotes HH 12 denotes mm 13 denotes ss. I need ti insert : between hh:mm:ss
Please help me achieving a code for below logic
I have used standard date transformate function, there i am getting spaces as separator in my input resulting an errors i am sending without spaces.
What do you mean by spaces? Can you try the mapping below?
inputDate -> replaceString -> dateTrans(inputDateFormat: HHmmss outputDateFormat: HH:mm:ss) -> target
Constant: -> /
Constant:-> /
Hope this helps,
Mark

Similar Messages

  • User defined step for polling data

    Hi,
    I'm creating a User Defined VI to be called from SignalExpress, that needs to poll a serial device for data.
    The serial device makes new data availiable in a register-array at a rate of 10Hz, and uses an additional register as a "message ID" to indicate when new data is availiable.
    This means that my VI needs to poll this MessageID, and when it increments, I can read the register array into a waveform and return it to SignalExpress.
    Now, what is the best/correct way of writing this VI in regard to the polling wait time?
    I see two options here for the case when my VI is called and it detects that no new message is availiable:
    It immediately returns to SignalExpress ("non blocking").
    In this case, should I return an empty waveform or the previous waveform?
    (I do not want duplicated data logged in SignalExpress)
    It blocks the SignalExpress loop where the user defined step is placed, by waiting in my VI until a new message arrives, and then returns this new data in a waveform.
    My user defined step is placed in a separate loop in signal express so the blocking in case 2 should not affect other DAQ loops in my SignalExpress project, right?
    /LeifS

    I don't think it is directly possible for changing this at the front end level.
    You might need to make changes in some SE24 Classes

  • User Defined Transaction in Logical Data Service

    Hi
    I have few physical data services created from database store procedures. I've corresponding logical services for each of the physical data services.
    Now I've created a logical data service that calls 2 store procedures & trying to update this 2 store procs in a single transaction.
    Also I dont have a read operation in my logical data services. In this case both store proc. should take part in a single transaction & should commit or rollback as per success/failure.
    I tried testing this scenario & it fails. ALDSP was able to update first store proc. but there was an error in second store proc. so it should have rollback the entire transaction.
    Is there any way that we can have user defined transaction in logical data service?
    My Scenario:
    InsertData(RequestA,RequestB) as response
    res1 := call First Store Proc (RequestA) ;
    res2 := call Second Store Proc (RequestB);
    response := res1 + res2
    So my question was is it possible to define user transaction before making calls & have commit/rollback define around it.
    Apprecaite for your help!
    Thanks
    Pash

    I have assumed that you realize you need XA drivers for this. What is the exception you see? Something about "mixed outcome"?
    But in the case of store procedure, we cant drag & drop physical ds into logical ds. Why?Since your stored procedure updates, it should be defined in the physical ds as a "procedure" not a "function" - it sounds like it is. (procedure means it will update, function means it will not - not that it is a "stored procedure"). Because it updates it cannot be called by an xquery function because xquery is by definition read-only. It can only be called directly from the client, or from another procedure (which is XQSE, not Xquery). If you created a logical ds with a "procedure" - you could drop your procedure into that.
    created a new library procedure in which i am calling 2 physical ds assuming it will be executed in a single transaction. But it does not. Please verify.
    But it does not. Please verify.I won't verify it because it is not correct. It should be treated as though it is one transaction. And barring the bugs with JNDI/data source names and multi-data sources, I do not know how how it would not be. So either there is a misunderstanding or a new bug.
    Either way you need to open a case with customer support to resolve this. When you open your case, the more information you provide them with (i.e the smallest possible dataspace that will reproduce the problem along with DML to create the stored procedures and the tables that they use, and also any/all exceptions/stack traces and server logs).
    - Mike
    ps. there are no means to explicitly create a transaction in ODSI.

  • User-defined fields for WBS

    Hi,
    Std SAP provides the following user-defined fields for WBS.
    4 numeric fields
    4 general fields
    2 date fields
    2 check boxes
    We would like to use as many as 20 numeric user-defined fields for wbs.
    Is there a way to do this?
    Thanks in advance.
    Manohar

    hi,
    It is not possible with user defined fields. You can achieve this using SPRO menu path Project System ->Structures->Work Breakdown Structure->Enhancement for Project Definition WBS lements -> Create customer specific fields in WBS.
    You have to use enhancement CNEX0007 to create the required fields.
    You will, ofcourse, need the help of an ABAPer to do this.
    Muraleedharan.R

  • Create User-defined field for Marketing Documents

    I need to create a User-Defined field for Marketing Documents under Title and Rows.
    I need to do it via .NET instead of manually go into SAP to create it.
    Does anyone can give me idea on how to do this?

    Hi David,
    There are examples of how to do this in the SDK samples (look for MetaDataOperations project in the DI samples).
    There are also examples in the SDK help. Here's one:
    Private Sub AddUserField()
    '// The UserFieldsMD represents a meta-data object that allows you
    '// to addremove fields from tables or change the fields' characteristics
        Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
    '// In any meta-data operation there should be no other object "alive"
    '// but the meta-data object, otherwise the operation will fail.
    '// This restriction is intended to prevent a collisions.
        '// The meta-data object needs to be initialized with a
        '// regular UserFields object
        Set oUserFieldsMD = oCompany.GetBusinessObject(oUserFields)
        '// When adding user tables or fields to the SAP Business One database
        '// use a prefix identifying your partner name space
        '// this will prevent collisions between the various partners add-ons
        '// SAP's name space prefix is "BE_"
        '// Set the Fields' mandatory properties
        oUserFieldsMD.TableName = "OCRD" '// BP table
        oUserFieldsMD.Name = "BE_UserField1"
        oUserFieldsMD.Description = "A user field"
        oUserFieldsMD.Type = db_Alpha '// am alphanumeric type
        oUserFieldsMD.EditSize = 20
        '// Add the field to the table
        oUserFieldsMD.Add
    End Sub
    Kind Regards,
    Owen

  • How i can make user defined button in standard menu.........

    hi all,
                     please tell me how i can make user defined button in standard menu.........
       regards
    vikas saini

    hi Vikas ,'
    u can do this by using PF status and setting titile .
    follow thw link for help.
    Re: To Change SAP Tiltle into some other title
    Regards,
    Amit

  • How to create user defined metrics for SQL Server target?

    The customer is not able to create a user defined metrics for SQL Server target.
    This is very important for him to use this product.
    He is asking how to create user defined metrics?
    I sent him Note 304952.1 How to Create a User-Defined SQL Metric in EM 10g Grid Control
    But it would work for an Oracle DB, but his target is SQL Server DB
    Not able to find the "User-Defined Metrics" link from Database home page.
    How to create user defined metrics for SQL Server target?

    http://download-uk.oracle.com/docs/cd/B14099_19/manage.1012/b16241/Monitoring.htm

  • Problem creating user-defined metric for Database

    I am logged in to EM/Grid Control as SYSMAN, any user with superadmin privileges or a 'normal' user with operator/full privileges for my database target. When I go to set up user-defined metrics for the target db I get the following warning "You will only be able to view User Defined metrics because you do not have Operator Privileges on host <db target name>". The Create button is disabled.
    Can anyone offer any advise on where to identify the privilege problem?
    Thanks

    Well I did it with a host UDM calling a local script (which will be installed on shared drives for the development/test and production systems).
    The local script cats the /var/opt/oracle/oratab file eliminating lines beginning with # or $ then takes the second argument of each line and loops through all entries using a checkit procedure. The checkit procedure determines if the appropriate log directores exist for the oracle home and does a find on the diretory looking for alert*.log and *.trc. If there are any then global variables get updated with the count and directory name.
    There is an if statement before exit that checks of the count of files is greater than zero and write an appropriate em_result and em_message depending on the results.
    I then created the UDM in EM to call this script and check for critical/warning thresholds.
    Regards
    Tim

  • User defined fields for the Trading partner agreements

    Hi,
    Do we have any provision to create custom/user defined fields for the Trading partner agreements ?

    Hello,
    It would be great if you can provide complete details of your use case. I can suggest the possible way of implementation only after understanding your requirement.
    Regards,
    Anuj

  • Cannot Apply User Define Serial for ITEMS

    hi ,
    we have to generate user define serial # for items . for that we need to upload the MAC addresses as serial number from a excel spread sheet can any one help regarding that please
    Thanks & regards
    Moni.

    Moni,
    You have to do some coding to achieve this:
    1. Create a table with three columns like serial_id, serial_number,taken_sts.
    2. Load your serial numbers from spreadsheet to this table using an insert or SQL Loader.
    3. Oracle gives you this package user_pkg_serial with nothing coded in package body. Add your logic to this body to return only one serial number at a time. That is the reason I asked you to create table with three columns. Maintain taken_sts column as N for only one serial number at a time and return that serial number (out parameter of the package body).
    4. It is extremely important to return the x_return_status as 'S' otherwise this will not work.
    5. Run the Generate Serial Numbers program and your serial numbers can be seen in the mtl_serial_numbers table.
    Please let me know if you need more info.
    Thanks
    Nagamohan

  • User defined rule for missing triples

    Hi,
    i would like to know if there is a way to define a user defined rule for triples that are not contained in a model. With curly brace syntax it could be something like this:
    INSERT INTO mdsys.semr_validation_rb VALUES(
    'test_rule',
    '{?s ?p ?o. OPTIONAL{?s rdf:type ?t}}',
    't is null',
    '(?s <hasType> "false")',
    null);
    Unfortunately this is not working. Has anybody a suggestion to solve this problem with user defined rules?

    Hi,
    This is related to the following post.
    built-in primitives(noValue,remove) for user defined rules
    Note that there is something you need to pay a bit attention to.
    Say your original graph contains
    :John :fatherOf :Mary
    but not any type classification for :John (i.e. no match for {:John rdf:type ?t})
    Assume you add the following triple according to the rule you described
    (:John <hasType> "false")
    Now, what happens if :John is classified as a :Person (or :Parent, :Father),
    do you want to withdraw* :John <hasType> "false"?
    Thanks,
    Zhe

  • User Defined Metric for default ALERT log directory

    On our system we have moved the alert log to a non-default location. If we use the wrong initialization file or something else goes haywire then trace files and alert logs get placed in the $ORACLE_HOME/rdbms/log directory.
    I want to create a user defined metric for each machine that will look in all the $ORACLE_HOME/rdbms/log directories for each ORACLE_HOME on the server checking for any alert*.log or *.trc files. Creating an alert if it encounters any of these files.
    I don't know if I should do it as a host UDM or an instance UDM. And more to the point how do I get it to see the multiple homes if the server has more than one.
    Any ideas would be appreciated.
    Thanks
    Tim

    Well I did it with a host UDM calling a local script (which will be installed on shared drives for the development/test and production systems).
    The local script cats the /var/opt/oracle/oratab file eliminating lines beginning with # or $ then takes the second argument of each line and loops through all entries using a checkit procedure. The checkit procedure determines if the appropriate log directores exist for the oracle home and does a find on the diretory looking for alert*.log and *.trc. If there are any then global variables get updated with the count and directory name.
    There is an if statement before exit that checks of the count of files is greater than zero and write an appropriate em_result and em_message depending on the results.
    I then created the UDM in EM to call this script and check for critical/warning thresholds.
    Regards
    Tim

  • Advance Queue - Define schema for Events Data

    Hi All,
    we want to implement oracle Advanced Queue within BPEL processes. and i want to create a Publish Event document.
    now I want to define schema for events data. can anybody point me to such schema ?
    Thanks,
    pp

    Hello,
    We are using Jdeveloper 10.1.3 / oracle 10g / Oracle Fusion Middleware (BPEL) 10g and want to create a sample POC using BPEL process, any kind of Publish Event sample schema, Publish Event sample XML, Advance Queue adapter in jdev and be able to publish (enqueue) messages on sample AQ and be able to consume those messages (dequeue) by subcriber.
    as you see, this is just a sample POC .... nothing concrete as yet.
    I searched "Oracle By Example" for such sample code or zip that i can download. but did not find one.
    Can you point me to such sample code, i can open in jdeveloper and test ?
    thanks
    pp

  • 'Save' function inactive in user defined PF for CL_SALV*

    Hello,
    I've implemented OOPS ALV using CL_SALV* classes and defined a PF Status with 'Save' functionality copied from the Standard PF Status SALV_TABLE_STANDARD of the function group SALV_METADATA_STATUS.
    However, the said SAVE function button is not active on execution of the report. I've checked the activation/visibility of the function using methods get_function(), is_active() and is_visible () but everything seems fine.
    Please help.
    Thanks,
    Shalabh Jain

    I don' think anything wrong with SALV Class.  I tried the same by copying standard GUI Status "SALV_TABLE_STANDARD" to a Z GUI Status and it worked perfectly.  I followed below steps
    - Copy standard GUI status "SALV_TABLE_STANDARD" to "ZSALV_TABLE_STANDARD"
    - Changed the Function code of SAVE button to "SAVE"
    - Activated GUI Status.
    - Attached the GUI status to the Z program
    - Call method SET_SCREEN_STATUS
    DATA : lv_sypfkey  TYPE sypfkey.
        lv_sypfkey = 'ZSALV_TABLE_STANDARD'.
        TRY.
            lr_table->set_screen_status(
              EXPORTING
                report        = sy-repid
                pfstatus      = lv_sypfkey
                set_functions = lr_table->c_functions_all ).
          ENDTRY.
    Regards, Vinod

  • UDT and UDF - User-defined Tables and Fields

    Dear All,
    I am writing a Query to permit the Cashier to check her Cash entries and balances on a Daily basis.
    Basically, it's a General Ledger, but I want the Query - Selection Criteria window to display only a few GL codes namely GL codes 1240601, 1240602, 1240603 etc.
    I don't know if I am doing it right. This is what I did (SAP B1 8.8):
    UDT
    I created a UDT called TEST2 using:
    Tools -> Customization Tools -> User-defined Tables - Setup
    UDF
    Then I created a field in the UDT called GlCod using User-Defined Fields - Management
    Title : GlCod
    Description : GL Code
    Type : Alphanumeric 30
    Field Data
    In the Field Data window, I ticked the Set Valid Values for Fields checkbox and filled in the blanks as follows:
    #                  Value                Description
    1                 1240601             Cash in Hand (Rs)
    2                 1240602             Cash in Hand (USD Notes)
    3                 1240603             Cash in Hand (Euro Notes)
    etc...
    Query
    Then I wrote my Query (see below).
    When I run it, I get the Selection Criteria screen as I wanted:
    Query - Selection Criteria
    GL Code                                   ...............   (arrow here)
    Posting Date                              ...............
    [OK]                [Cancel]
    When I click on the GL Code arrow, I get a window with the exact choices I need. It looks like this:
    1240601 -  Cash in Hand (Rs)
    1240602 -  Cash in Hand (USD Notes)
    1240603 -  Cash in Hand (Euro Notes)
    Executing the Query
    The Query seems to run normally, but nothing is generated on the screen, and there's no Error Message.
    What can be wrong about this query?
    I suspect that the GL codes in JDT1 and TEST2 are not of the same data type, so that INNER JOIN returns nothing.
    Thanks,
    Leon Lai
    Here's my SQL
    declare @TEST2 TABLE
    (GlCod varchar(30))
    declare @GlCod nvarchar (30)
    set @GlCod =/*SELECT T0.U_GlCod from [dbo].[@TEST2] T0 where T0.U_GlCod=*/  '[%0]'
    declare @refdt datetime
    set @ref=/*SELECT T1.RefDate from [dbo].[JDT1] T1 where T1.RefDate=*/ '[%1]'
    select
    t1.Account as 'GL Code',
    t1.RefDate as 'Posting Date',
    t0.U_GlCod as 'Restricted GL Codes'
    from JDT1 T1
    INNER JOIN @TEST2 T0 ON T0.[U_GlCod] = T1.[Account]
    WHERE
    t1.RefDate <= @refdt
    and
    t0.U_GLCod = @GlCod

    Try this:
    declare @GlCod nvarchar (30)
    set @GlCod =/*SELECT T0.U_GlCod from [dbo].[@TEST2] T0 where T0.U_GlCod=*/  '[%0]'
    declare @refdt datetime
    set @refdt=/*SELECT T1.RefDate from [dbo].[JDT1] T1 where T1.RefDate=*/ '[%1]'
    select
    t1.Account as 'GL Code',
    t1.RefDate as 'Posting Date'
    from JDT1 T1
    WHERE
    t1.RefDate <= @refdt
      and
    T1.[Account] = @GlCod
    (There is no need to declare the memoria table @test2 if you already created one table with this name.
    And there is no need to a join.)
    Edited by: István Korös on Aug 15, 2011 1:27 PM

Maybe you are looking for