Check Value In UDF

Hi,
I am using a UDF to take substring of my value from source (source value is of format abcd/xyz). Now I want to check if there exists any value before "/" i.e. I want to check if there is any value before "/" . I tried using the .length function, but due to some reason I am not able to get it working. So please tell me how to get the below UDF working:
public String getUser1Id(String Id, Container container) throws StreamTransformationException{
String logName = Id;
int len = logName.indexOf("/");
logName = logName.substring(0,len);
return logName;
Id is the input from the source (abcd/xyz) into the UDF.
Thanks.

Hi,
your code is working if you have "/" in your ld parameter. Another point is your function returns left of '/' in your input. Is this your requirement or returning true or false depending on the existence of anything before '/'?
Kind Regards,

Similar Messages

  • Trigger is not working while updating the values of UDF

    Dear Freind,
    I have created one Trigger for ORDR for Sales order. It is working fine. For that i have created two UDF to Title level. When i fill all fields it shows the correct result in DocTotal. But problem is that, while updateing specific record it also update but only refresh the DocTotal.
    Means suppose i change the value of UDF fields that time it is not working it gives following error.
    "There is difference between the document total and component total"
    ALTER TRIGGER AmountForPC1
    ON dbo.ORDR
    AFTER INSERT,
    UPDATE
    AS
    SET NOCOUNT ON
    UPDATE x
    SET x.DocTotal = COALESCE(i.DocTotalSy, 0) + COALESCE(i.U_Ref, 0) + COALESCE(i.U_Sub, 0)
    FROM dbo.ORDR AS x
    INNER JOIN inserted AS i ON i.DocEntry = x.DocEntry
    Thanks
    Swapnil

    Hi Swapnil,
    Are you aware that you might run into trouble, at least when it comes to a support case, because you have created triggers?
    Accordingly to note [896891|https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMSZ3PTU4ODAwMDAr)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=896891] triggers are not supported.
    Regards
    Mario

  • What is KCV (Key Check Value) in 3DES used for?

    Hi Friends..
    I want to know what is KCV (Key Check Value) used for?..
    i found that 3DES operation (2Keys length or 3Keys length) sometimes needs KCV (Key Check Value)..
    As far as i know the KCV itself computed as Follows :
    3DES(Keys, IV(all zeroes), Data (8byte zeroes)
    Please correct me if i'm wrong..
    Thanks

    Leonardo Carreira wrote:
    sabre150 wrote:
    Leonardo Carreira wrote:
    Could you suggest me what is the good book for "learning the concept of cryptography"?..Errr ... I thought I had done that!Yes you're right, you had suggested the book for me..
    And i don't found the KCV (Key Check Value) usage in the book..
    So, i ask this question, sorry if my question is sounds boring to you, sorry for this inconvenience.. :(
    thanksKCV has at least two different meanings. I suspect you are interested in the one outlined in http://www.cryptographyworld.com/key.htm.

  • FI13 - 'Check' value in SU24 appearing in PG

    Hi Experts,
    FI13 tcode has been included in a role. We find that auth. object S_TABU_DIS has 'CHECK" value in check indicator(SU24). But in PG S_TABU_DIS value is appearing with values 02,03 for the activity field.
    My query is eventhough the value of auth. object S_TABU_DIS is maintained as check in SU24, how is it appearing in PG. Please provide me details of the logic behind it.
    Version: SAP ECC 5.0
    Thanks for your time in advance.
    Regards,
    Nagendran

    Hi,
    Transaction FI13 is a parameter transaction which calls transaction SM34, which is used to maintain tables. Object S_TABU_DIS is a checked (value yes) for SM34. Hence it is appearing in the role. Also that is the reason it is not showing any values in authorization group field. If you would like to use FI13, then you should have object S_TABU_DIS with below values
    Activities: 02,03
    Authorization group: VC
    Please goto transaction SE93 and click on display. You can see the details for FI13 which has been using transaction SM34.
    Regards,
    Gowrinadh

  • Bad check value found during dbv on Datafiles

    Hi,
    We just received new DB, that return a "Bad check value found during dbv" on DBVerify.
    So, we can Open & Use this DB... perhaps until crash if we use the "bad block", but we can't save it by Rman (ORA-19566: exceeded limit of 0 corrupt blocks for file xxx) !
    And best thing is... Previous DB owner don't have any save (Rman or other) of this DB !!!
    Are there solution(s) about this problem... or this DB is definitively dead ?
    Sorry for my english,
    Thank for your help,
    J Sourti.

    Hi;
    What is DB version?
    Please see below note(also referance part) and below link which at least show u some way
    Rman Reports An Ora-19566: Exceeded Limit Of 0 Corrupt Blocks From Backup [ID 457422.1]
    http://oraclespin.wordpress.com/2009/07/03/how-to-find-and-fix-block-corruption-using-rman/
    Regard
    Helios

  • How to Access Radiobutton Check Value

    Hi all,
    I'm using Oracle 10g Forms Developer and I want to know how to access radio button check value, that means how to know that the current radio button is checked or not. Thanks in advance

    you assign each button the representing value in the properties.
    So you can just check if the radiogroup-item has the value you assigned the button, something like:
    IF :BLOCK.RADIOBUTTONITEM='A' THEN
    ...

  • Check value from Backend and update SC

    Hi,
    I am using SRM 5.0 and I have an requirement where I need to check value of SC or PO with backend system and accordingly update one custom field in SC/PO .
    Can anybody let me know exact place to perform this coding ?.
    Thanks,
    Sachin

    To update SC/PO at transaction time, you should use BADI "BBP_DOC_CHANGE_BADI" (Vadim is right). Indeed this BADI is called very often. It is recommended to filter your code using table sy if you are executing complex coding or remote call. You can use sy-ucomm, sy-tcode...
    Try to identify the right moment to call your remote function and check sy table in debugging.
    Axel

  • Error loading Valid Values for UDF via DTW

    Hi,
    SB1 8.81 PL09
    I´m using DTW to load Valid Values in UDF.
    Template CUFD - UserFieldsMD
    TableName     FieldID     Name     Description     Type     Size     SubType     EditSize     DefaultValue
    TableID     FieldID     AliasID     Descr     TypeID     SizeID     EditType     EditSize     Dflt
    ACRD     21     Name     Description     A     25          25     Default Value
    Template UFD1 u2013 ValidValuesMD
    ParentKey     ParentKey2     LineNum     Value     Description
    TableName     FieldID     LineNum     FldValue     Descr
    ACRD     21     0     Default Value     Default Value
    ACRD     21     1     Value 01     Value 01
    ACRD     21     2     Value 02     Value 02
    ACRD     21     3     Value 03     Value 03
    ACRD     21     4     Value 04     Value 04
    ACRD     21     5     Value 05     Value 05
    ACRD     21     6     Value 06     Value 06
    I get the following error message:
    Key               - Reason
    ACRD,21       - CServiceData::VerifyPropertyWrite failed; Property u2018FielIDu2019 of u2018UserFieldMDu2019 is read only65171
    Is any solution to work around this error?
    Thanks

    Tank you Eddy, but it seems it does not work.
    The error message received from DTW is:
    - <BOM>
    - <BOM>
    - <BO>
    - <AdmInfo>
      <Object>66</Object>
      <Version>2</Version>
      </AdmInfo>
    - <ProductTrees>
    - <row>
      <TreeCode>A00001</TreeCode>
      <Quantity>1</Quantity>
      <TreeType>iProductionTree</TreeType>
      </row>
      </ProductTrees>
    - <ProductTrees_Lines>
    - <row>
      <Currency>USD</Currency>
      <IssueMethod>im_Backflush</IssueMethod>
      <ItemCode>A00006</ItemCode>
      <Price>160</Price>
      <PriceList>1</PriceList>
      <Quantity>3</Quantity>
      <Warehouse>01</Warehouse>
      </row>
    - <row>
      <Currency>USD</Currency>
      <IssueMethod>im_Backflush</IssueMethod>
      <ItemCode>S10002</ItemCode>
      <Price>160</Price>
      <PriceList>1</PriceList>
      <Quantity>3</Quantity>
      <Warehouse>01</Warehouse>
      </row>
      </ProductTrees_Lines>
      </BO>
      </BOM>
      <ErrorMessage>A00001 - Errore definito dall'applicazione o dall'oggetto</ErrorMessage>
      </BOM>

  • How check value befor commit my form

    hi master
    sir
    how check value befor commit my form if that value right than commit otherwise show message box and not save
    please give me idea
    thanking you
    aamir

    Have you not tried using When-Validate-Item Trigger.
    Like if i have an Item Which can only take dates between sysdate and sysdate-3 your code in when-validate of the item should be
    If :BlockName.ItemName NOT BETWEEN SYSDATE-3 AND SYSDATE THEN
    MESSAGE('Pleaes Enter valid date);
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    This will fire, and commit will fail.

  • How to check the default checked  value for radio button on jsp for struts

    Hello , I just want to check the default checked value in JSP for a radio button, how can i do that?
    <html:radio property="sale" value="permanent" style="vertical-align: middle;">Permanent</html:radio>
    <html:radio property="sale" value="temporary" style="vertical-align: middle;">Temporary</html:radio>

    you can set the default value for property ( which you want to default selected when the form is first loaded) in reset method of the form.
    <html:radio property="sale" value="permanent" style="vertical-align: middle;">Permanent</html:radio>
    <html:radio property="sale" value="temporary" style="vertical-align: middle;">Temporary</html:radio>
    In the above case you can write the code as follows in the perticular form of this jsp.
    public void reset(ActionMapping mapping, HttpServletRequest request) {
    super.reset(mapping, request);
         sale = "permanent";
    This will show the first check box default selected when the first time the page is loaded.

  • How to get check value in DB based on java

    hi,
    anybody know how to get check value in DB based on java?
    TQ

    This should be a custom java class containing that method.
    Try on java or jdbc forum - Java Database Connectivity (JDBC) , Java Programming

  • Generating check value for put key

    hi
    in globalPlatform doesn't exist anything about check value for put key command.
    how can i generate it and change initial key for my java card?

    s.fallahdoost wrote:hello
    in other topic, i saw that you used these commands
    for put-key:
    cm> set-key 2/1/DES-ECB/ffeeddccbbaa99887766554433221100 2/2/DES-ECB/ffeeddccbbaa99887766554433221100 2/3/DES-ECB/ffeeddccbbaa99887766554433221100
    cm> put-keyset 2
    *=> 84 D8 00 81 4B 02 80 10 AE 25 9D AE 8A 7F 23 37 ....K....%....#7*
    *7F CF AD 42 5C B8 C3 EC 03 F3 9C 09 80 10 AE 25 ...B\..........%*
    *9D AE 8A 7F 23 37 7F CF AD 42 5C B8 C3 EC 03 F3 ....#7...B\.....*
    *9C 09 80 10 AE 25 9D AE 8A 7F 23 37 7F CF AD 42 .....%....#7...B*
    *5C B8 C3 EC 03 F3 9C 09 69 54 47 5D 25 8A AA 36 \.......iTG]%..6*
    *00 .*
    *(259100 usec)*
    *<= 02 F3 9C 09 F3 9C 09 F3 9C 09 90 00 ............*
    Status: No Error
    i know that AE 25 9D AE 8A 7F 23 37 7F CF AD 42 5C B8 C3 EC
    is your new key and F3 9C 09 is the first 3 bytes of tripleDES with key
    ffeeddccbbaa99887766554433221100.
    i have a question:
    what is ffeeddccbbaa99887766554433221100?!!
    how can i calculate it?ffee..00 is the plain text key. Sensitive data encryption is required for the 3 CM keys in the PUT KEY command. I first set off-card the keys I want to be included in the PUT KEY command, and JCOP Tools encrypts it with the DEK key of the current secure channel session. On-card the first the C_MAC is validated, then the keys are decrypted and compared to the key check value.

  • Checking value and displaying blank instead of null

    Hi,
    I was wondering how do I check in the code if the value is null then display a blank as suppose to displaying the word null??
    what I have now is:
    column1 column2
    24 null
    want
    24
    I've tried:
    if ("".equals(string))
    out.println(" ");
    if (string.equals(""))
    if (string.equals(null))
    thanks,
    Will

    Use s == null to test if the String s is null, then if yes, replace it with the blank string "". See the code bellow:
    class MyString {
        String[][] sa={{"column1", "column2"},
                 {"24", null},
                 {"want", "24"},
        public String toString() {
         String result = "";
         for (int i=0; i < sa.length; i++) {
             for (int j=0; j < sa.length; j++) {
              if (sa[i][j] != null) {
              result += sa[i][j];
              else {
              result += "";
              result += "\t";
         result += "\n";
         return result;
    public static void main(String[] args) {
         MyString ms = new MyString();
         System.out.println(ms.toString());

  • How to get all checked values from a chaeck box

    Hello
    In my app i have a checkbox called P10_CID with static lov like
    STATIC2:one;1,two;2,three;3,four;4,six;6
    my question is when i check more than one option
    i can not get that value.
    How is it possible to see all the values of the check box that are checked ?
    Regards
    Aris

    Hi Aris,
    Do you have to have checkboxes? Can you use a multiselect list instead?
    If you can, then the following excerpt from the user guide may help you:
    Using HTMLDB_UTIL.STRING_TO_TABLE to Convert Selected Values
    Suppose you had a report on the EMP and DEPT tables that is limited by the
    departments selected from a Department multiple select list. First, you create the
    multiple select item, P1_DEPTNO, using the following query:
    SELECT dname, deptno
    FROM dept
    Second, you return only those employees within the selected departments as follows:
    SELECT ename, job, sal, comm, dname
    FROM emp e, dept d
    WHERE d.deptno = e.deptno
    AND instr(':'||:P1_DEPTNO||':',':'||e.deptno||':') > 0
    Regards
    Andy

  • How can save only the checked values in a record as a string?

    I have a question on form where the user can choose multiple checkboxes. Due to the type of form that it is there will only be one record written. I am using Access as a comprehensive form as opposed to a database in this instance.
    Once industry submits this application (form) to us I upload some data to Oracle database which works fine. Now, I need to upload some of the data to a workflow software. I figured out how to do everything except the following:
    In this record there are over 20 checkboxes. Each check box has a name/Record source such as SA (Surface Area), SC (Surface Contour), SS (Sleep Slope), ect. The user will select several of these checkboxes. I need to look at each chk box field. If the value
    = true, write the fullname of each field to a table as a string with each field seperated with a comma. For instance,
    If SA, SC and SS were checked on the form Surface Area,Surface Contour,Sleep Slope would be added to the Procedure_Value field in a table (see function ExportTable). Next I convert the table into a text file
    Function ExportTable
    dim rst As DAO.Recordset
    dim strSQL1 As String
    strSQL1 = "SELECT tblExport1.* FROM tblExport1;"
    Set db = CurrentDb()
    Set rst = db.OpenRecordset(strSQL1, dbOpenDynaset)
    With rst
    .AddNew
    rst!Procedure_Value = "Surface Area,Surface Contour,Sleep Slope"
    .Update
    End With
    rst.Close
    Set db = nothing
    Set rst = nothing
    End Function
    jim neal

    If I understand you correctly you have one table with a bunch of yes/no values (SA, SC, SS, etc.).  Then for each record in that table you want to output a string listing all the fields from the first table which = yes (i.e are checked).  Perhaps
    the following code would get you started:
    Sub JimNeal()
        Dim strProcedure_Value As String
        Dim rst As DAO.Recordset
        Dim rstOut As DAO.Recordset
        Set rst = DBEngine(0)(0).OpenRecordset("TableWithCheckboxes")
        Set rstOut = DBEngine(0)(0).OpenRecordset("OutputTable")
        Do Until rst.EOF
            strProcedure_Value = ""
            If rst!SA Then strProcedure_Value = strProcedure_Value & "Surface Area,"
            If rst!SC Then strProcedure_Value = strProcedure_Value & "Surface Contour,"
            '... etc
            If rst!SS Then strProcedure_Value = strProcedure_Value & "Steep Slope,"
            rst.MoveNext
            ' Strip off final comma
            If Len(strProcedure_Value) > 0 Then strProcedure_Value = Left(strProcedure_Value, Len(strProcedure_Value) - 1)
            ' Output the string to your output table
            rstOut.AddNew
            rstOut!Procedure_Value = strProcedure_Value
            rstOut.Update
        Loop
        rst.Close
        rstOut.Close
        Set rst = Nothing
        Set rstOut = Nothing
    End Sub
    -Bruce

Maybe you are looking for

  • Need help in creating a dropdown box inside a table control

    Hi, I need to display a calender upon click event of a dropdown box placed inside my table control. Can any body help me out. Regards, Srinivas

  • Troubles with ALV set_table_for_first_display

    Hello people, I am facing an interesting problem. I want do display data from an internal table on an ALV grid. So far, so good, When I am trying do do so again with different recordsets, the ALV displays the data from the first attemp again. e.g.: d

  • "Allow incoming network connections?" appears on every launch of iTunes

    Hello, Firewall is on, iTunes is listed with "allow all incoming connections". Nevertheless I have to allow it manually on every launch. What can i do? This problem occured after using the software iGenres (http://www.apple.com/downloads/macosx/ipod_

  • Frozen macbook pro13

    Bought macbook pro 13 with retina. already frozen had to do hard restart. pretty shame. how to prevent it freezing?

  • Unable to open ports using terminal

    I need to open port 16004 and have attempted to do so via Terminal by entering: sudo ipfw add allow tcp from 16004 to 1600. However when i run port scan from the Network Utility it does not show up as open. Is this the correct syntax? Am I missing so