How to find length of integer elements using message mapping

Hi all,
         How can I find the number of digits in an element using message mapping
XIer

Satish,
           Cause I have to write the code for 100 elements, I have decided to have a AUDF with two inputs;
1) for the element
2) for the length of the data type (I am passing length using Constant message mapping func).
Now when I change my UDF and try running it I get the following error:
<b><i>Start of test
Source code has syntax error:  /usr/sap/B06/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map0999e66045cf11dcc83b4ebcfc11da82/source/com/sap/xi/tf/_MM_Recordcount1_.java:160: operator >= cannot be applied to int,java.lang.String if(Element_Name.length()>=Element_Length) ^ /usr/sap/B06/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map0999e66045cf11dcc83b4ebcfc11da82/source/com/sap/xi/tf/_MM_Recordcount1_.java:166: operator <= cannot be applied to int,java.lang.String for(int i=Element_Name.length();i<=Element_Length;i++) ^ 2 errors</i></b>
The code I have used is:
public String Include_Space(String Element_Name,String Element_Length,Container container)
{StringBuffer sb= new StringBuffer();
if(Element_Name.length()>=Element_Length)
return""Element_Name"";
else
for(int i=Element_Name.length();i<=Element_Length;i++)
if(i==Element_Name.length())
sb.append(Element_Name);
else
sb.append(" ");
return ""sb.toString()"";
Pls advice, where I am going wrong...
XIer
Message was edited by:
        XIer

Similar Messages

  • How to find Length of String

    Hi
    how to find length of a string.. i have a requirement that user cannot add more than 9 digits in a string.. i am new to WD Abap..
    Regards,
    Puneet

    Hi,
    You can use STRLEN command for your requirement.
    First read your input field using code wizard.
    Then using STRLEN command you can find the length of the Input field.
    For Example :
    Here input is your input field.
    data :    length type i.
    length = strlen(input).
    If length < 9.
    raise error msg.
    endif.
    Edited by: Viji on Mar 26, 2008 11:30 AM

  • How to find out which keywords were used to create a smart album?

    Hi,
    I actually have 2 questions;
    a) Short of scrolling down my very long list of password on the HUD - is there an elegant way to do it - How to find out which passwords were used to create an existing smart album? It's a recurring challenge for me.\ 'cause I like using smart albums, but once in a while need to check or chane the passwords.
    b) With annoying regularity when I try to get to this forum and choose Aperture, I get the following message - in pink, no less: It appears you're not allowed to view what you requested. You might contact your administrator if you think this is a mistake.
    Any clues?
    Thanks guys,
    Raphael
    <Edited by Host>

    b) With annoying regularity when I try to get to this forum and choose Aperture, I get the following message - in pink, no less: It appears you're not allowed to view what you requested. You might contact your administrator if you think this is a mistake.
    Any clues?
    Raphael,
    that message may occur for four reasons at least:
    Most frequently, when you are using an outdated link to a post that no longer exists, for example from an email notofication. Sometimes our community host will remove posts, that are in violation of the terms of use: see:
    Apple Support Communities Terms of Use
    Or you are using the edit button or a bookmark to an "Edit" window, after the fifteen minutes allowed for editing are up.
    Or you want to view a page in a restricted section of the ASC - soem perta are only open for members of level 6 or higher.
    Or it is one  of the unexplained problems with the forum software right now.
    a) Short of scrolling down my very long list of password on the HUD - is there an elegant way to do it - How to find out which passwords were used to create an existing smart album? It's a recurring challenge for me.\ 'cause I like using smart albums, but once in a while need to check or chane the passwords.
    I really like Kirby's suggestion with the IPTC rule Keyword is. This is very useful for smart albums global to the library.
    Frequently a different approach helps for my smart albums. Many of my smart albums are local to projects or folders.  In this case the smart HUD will only show those keywords that have been used for the images in the selection. So if I only have tagged the images with the keywords "birds" and "slideshow", the smart settings HUD will only show these two keywords and the list is very short.
    My Keywords HUD, is organized hierarchically; this way I can collapse large sections at once, and it is easier to focus on the keywords needed for a specific task.
    I use the search field in HUD a lot, to filter the set of keywords shown.

  • How to find out names of reports using a particular view

    hi guys,
    i am newbie here, i jsut want to know how to find out which reports are using a particular view
    many thanks in advance for your help

    If you go to the Properties for the Folder in Discoverer Administrator, there is a Dependents tab that should list any workbooks using the folder. This only works for workbooks saved to the database, so won't help with any created using Discoverer Desktop. If you are gathering statistics and have the The Discoverer V5 EUL business area and its workbooks installed, it can tell you about Folders Used as well. It contains information about queries run whether the workbook is saved to the database or to the file system, but wouldn't contain inforamation about workbooks that had been created but not run.

  • How to find out if I am using a 32 bits or 64 bits version of JRE?

    How to find out if I am using a 32 bits or 64 bits version of JRE?
    If I have 2 instances of Java installed in 2 seperate directories, one 32 bits and other 64 bits on Linux. How do I identify which directory holds which version?
    Is there any command that can output this info?
    Regards,
    Billamama

    With a Sun JDK or JRE, you can use java -version:
    $ java -version
    java version "1.6.0"
    Java(TM) SE Runtime Environment (build 1.6.0-b105)
    Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)
    ... switch to the 64-bit JDK ...
    $ java -version
    java version "1.6.0"
    Java(TM) SE Runtime Environment (build 1.6.0-b105)
    Java HotSpot(TM) 64-Bit Server VM (build 1.6.0-b105, mixed mode)
    The last line says "64-Bit."

  • In DBI , how to find out the Source Query used for the Report

    Hi All,
    How to find out the Source Query used to display the data in the DBI Reports or Dashboards. We can get it in Apps Front end by Going to Help and Record Histroty. But DBI Runs in Internet Explorer so i dont know how to get the source query ( SELECT Query ) Used.
    In IE we have View --> Source . But that does not help since it gives the HTML Coding and not the SELECT Query used.
    If anyone has ever worked on it...Please help me in finding it.
    Thanks,
    Neeraj Shrivastava

    Hi neeraj,
    You can see the query used to display reports.Follow these steps to get the query.
    1)Login to oracle apps
    2)Select "Daily Business Intelligence Administrator" responsiblity.
    3)Now click on "Enable/Disable Debugging" (Now u enabled debugging)
    4)now open the report which you want to see the query of
    5)In view source it displays query along with the bind varilables.
    Feel free to ping me if you have any doubts
    thanks
    kittu

  • HT1338 Can anyone tell me how to find what OS I'm using on the Mac? Tiger or Leopard? Also, how do I update from 10.6.8 to the latest version?

    Can anyone tell me how to find what OS I'm using on the Mac?
    Tiger or Leopard?
    Also, how do I update from 10.6.8 to the latest version?

    Go to the Apple menu and select "About This Mac". You will get a window similar to this one -
    You current OS X version number will be shown as I've marked.
    OS X 10.4.x is Tiger, 10.5.x is Leopard, 10.6.x is Snow Leopard, 10.7.x is Lion, and 10.8.x is Mountain Lion.
    Whether or not you can go to the latest OS X version depends upon your hardware -
    You will need to purchase the retail set for the OS X version you want; there is no pint in getting and installing any intermediate versions. Once the retail version has been installed, you can update it to the latest release for that version via download updater.

  • How to find the columns and tables used in a stored procedure?

    Hi,
    Can someone suggest how to find the columns and tables used within a stored procedure?
    Thanks
    VBK

    For example:
    SQL> create or replace
      2    procedure p1
      3      is
      4          cnt number;
      5      begin
      6          select count(*) into cnt from emp;
      7  end;
      8  /
    Procedure created.
    SQL> select  referenced_owner,
      2          referenced_name
      3    from  dba_dependencies
      4    where owner = 'SCOTT'
      5      and name = 'P1'
      6      and referenced_type = 'TABLE'
      7  /
    REFERENCED_OWNER               REFERENCED_NAME
    SCOTT                          EMP
    SQL> SY.

  • How to find out which users are using SharePoint Designer to make changes in SharePoint 2010 site?

    Hi there,
    How to find out which users are using SharePoint Designer to make changes in SharePoint 2010 site?
    Thanks.

    You need to enable auditing on SharePoint server and it will let you know, if someone makes any critical changes for the same.
    Please walk through this informative KB to enable auditing on SharePoint :https://support.office.com/en-za/article/Configure-audit-settings-for-a-site-collection-f5a346d0-ee0f-4412-a5e6-d9b5abaa1012
    Here is one more resource :
    https://support.office.com/en-in/article/View-audit-log-reports-4293e8d5-4e7d-4201-b8ac-c8e63a100131
    Moreover, if you wish to audit such critical changes automatically, you may consider on this comprehensive application (http://www.sharepointauditing.com/) that helps to track every changes on SharePoint into
    real time and provides the captured data at granular level.

  • How to find a perticular t.codse used in last 6 months

    Hi All,
    can anyone let us know how to find a perticular t.codse used in last 6 months.
    Regards!!

    Hi,
    Its all depends on the settings has done for transaction ST03N.
    If it has explicitly set to last 6 months then you can find in the left hand side transaction profile coloumn of ST03N.
    If not you can set it  by the following way:
    ST03N>goto collector and perfomrance DB>monitoring database-->Reorganisation
    Thank you,
    Tilak

  • How to find out internet explorer version ,using a java program?

    How to find out internet explorer version ,using a java program?

    Browser version from java?....you must be referring it from some web application....rite?
    You can read the User-Agent header using request.getUserAgent() or request.getHeader("User-Agent") in your jsp or servlet.
    for more details pls refer:
    http://www.jguru.com/jguru/faq/view.jsp?EID=12253

  • How to find 2 different projects are using which gl accounts and co pa char

    Hi ,
              There are 2 different project id s , now how to find differences between them regarding using of G/L accounts and required characteristics for the COPA module ?
    Thanks & regds
    Ramachandra

    hope you are talking about the value field for COPA.
    Please go to the project profile and find out the settlement profile, and from settlement profile find out the PA transfer structure, and check the PA transfer structure for COPA value filed details.

  • How to find deptno wise sum(sal) using subquery

    hi all,
    how to find deptno wise sum(sal) using subquery.
    can u tell me any one please.
    thanks,
    regards.

    If we are talking standard emp and dept tables ala scott schema then (say); -
    select ename, sal, total_dept_salary
    from emp,
    (select sum(sal) as Total_Dept_Salary,
    deptno
    from empt
    group by
    deptno) saldept
    where emp.deptno = saldept.deptno
    Is that what you were after?? (I would advise against correlated sub-queries on all but the most modest of tables)
    There are nicer ways of doing the subquery depending on which version of the db you are on...

  • How to find a memory and CPU used by a specific concurrent program ?

    Dear All ,
    How to find a memory and CPU used by a specific concurrent program ?
    Thanks.

    Hi,
    How to find a memory and CPU used by a specific concurrent program ?
    Could you please let us can we get the
    memory used for a specific concurrent request .
    Please refer scripts available at:
    Concurrent Manager and program related scripts
    Queries : Concurrent Managers/Processes
    Thanks &
    Best Regards,

  • How to find max(time) from table using group by

    how to find max(time) from table using group by
    select var max(time)
              from table
              into (var1, time1)
               where .....
                 group by var.
    it is fetching record which is top in table.
    if u can help?
    regards.

    No this will fetch the maximum time from teh table.
    select var max(time)
    from table xxxx
    into (var1, time1)
    where .....
    group by var.
    Refer this code
    TABLES SBOOK.
    DATA:  COUNT TYPE I, SUM TYPE P DECIMALS 2, AVG TYPE F.
    DATA:  CONNID LIKE SBOOK-CONNID.
    SELECT CONNID COUNT( * ) SUM( LUGGWEIGHT ) AVG( LUGGWEIGHT )
           INTO (CONNID, COUNT, SUM, AVG)
           FROM SBOOK
           WHERE
             CARRID   = 'LH '      AND
             FLDATE   = '19950228'
           GROUP BY CONNID.
      WRITE: / CONNID, COUNT, SUM, AVG.
    ENDSELECT.

Maybe you are looking for

  • Cisco ASA 5505 VPN connection issue ("Unable to add route")

    I'm trying to get IPSec VPN working onto a new Cisco ASA5505. Pretty standard configuration. Setup: * Cisco VPN client on Windows 7 (v5.0.07.0290 x64 on Laptop1 and v5.0.07.0440 x64 on Laptop2) * PPPoE/NAT and internal DHCP on the ASA were configured

  • Major Problem: Safari won't open

    Hi, Safari keeps quitting as soon as I try to open it and I don't know how to fix it. I have repaired permissions and opened in Safe Mode and reset Safari but it still won't open, so it won't send this to Apple either. Below is the report. Please can

  • Trying to use Crystal Reports XI Release 2  to display a report

    I am creating an application in Visual Basic using Microsoft Visual Studio 2005.  I have downloaded the trial version of Crystal Reports XI and I have built my report and have attached to the Crystal Viewer that is on my form in my application.  I us

  • How to upload photos of the user that logs in EBP by providing

    there is an option for displaying the photo of the  the user in the iniial page that logs in . this is done by specifying the url that contais the user photo.

  • Exchange Server 2013 help chm file

    Hi, does anyone know where offline help file in chm format for Exchange Server 2013 can be found? Link http://www.microsoft.com/en-us/download/details.aspx?id=35395 does not work - you can click to download and choose file but then nothing happens.