Translate to Upper Case in Transformation

Hello BI experts,
Extractor has more than 100 fields in combination of Char, Num, Date etc...
Some Char fields are bringing data in lower case letters. 
Here I am looking for ABAP code in Start routine, where I can translate all Char fields lower case letter to Upper case.
I know how to translate for each individual field level (infoobject routine level).  But I need in Start routine for all Char fields at once.  In other words,  I think, we have to filter out Char fields from <Source-Fields> and translate them to Upper case.
Any help would be greatly appreciated.
Thanks much,
Anil

Hi,
try the following logic in start routine& let me know if you find any difficulty..
data : r_itab type table of rstrucinfo,
          v_sytabix like sy-tabix,
          wa type rstrucinfo.
    FIELD-SYMBOLS : <fs1> type any,
                 <fs2> type any.
    CALL FUNCTION 'GET_COMPONENT_LIST'
      EXPORTING
        program    = sy-repid
        fieldname  = 'SOURCE_PACKAGE'
      TABLES
        components = r_itab[].
    loop at SOURCE_PACKAGE assigning <fs2>.
      v_sytabix = sy-tabix.
      loop at r_itab into wa where TYPE = 'C'.
        assign component wa-COMPNAME of structure <fs2> to <fs1>.
        translate <fs1> to upper case.
      endloop.
      modify SOURCE_PACKAGE from <fs2> index v_sytabix.
    endloop.
regards,
raju

Similar Messages

  • Translate to upper case a structure in ecc 6.0

    Hi,
    How to translate to upper case a structure in sys:ecc 6.0 (unicode) like it was possible in sys:4.7
    TRANSLATE s_tab TO UPPER CASE.
    now I have an error message: "s_tab shall be a character-type".
    thanks

    Hi,
    The usage of the method to convert codepages of structures is described including this code sample:
    DATA:BEGIN OF struc,
    text(5) TYPE c,
    int TYPE i,
    END OF struc.
    DATA:buffer TYPE xstring,
    conv TYPE REF TO cl_abap_conv_out_ce,
    view TYPE REF TO cl_abap_view_offlen.
    view = cl_abap_view_offlen=>create_legacy_view( struc ).
    conv = cl_abap_conv_out_ce=>create(
    encoding = '0120'
    endian = 'B' ).
    struc-text = 'Abc12'.
    struc-int = 65538.
    conv->convert_struc( EXPORTING data = struc
    view = view
    IMPORTING buffer = buffer ).
    Regards,
    Satish

  • Calling Function Module for upper case to lower case in Transformation

    Hi all,
    We have the data load happening everyday for the Account Receivables data. The DSO activation is failing because of the invalid characters. It gives the messages as below
    "Value 'bdmg0808dm' (hex. '620064006D006700300038003000380064006D00') of characteristic ZINVNUM contains invalid characters"
    We understood that the character ZINVNUM is maintained only for uppercase letter wherein the lower case check box is not ticked. We have a function module which is build within BI which can be used to permit non permitted characters including space. Just want to know how can I call this function module in a transformation and which is the best option to call the function module(start routine/end routine).
    Regards
    Vijay

    You can use statement in end routine to convert text to upper case. No need of calling any function module. Just loop through records of RESULT_PACKAGE and for that particular field convert text using below statement.
    LOOP AT RESULT_PACKAGE.
    TRANSLATE RESULT_PACAKGE-/BIC/ZNAME TO UPPER CASE.
    ENDLOOP.
    Edited by: ABHIJIT TEMBHEKAR on Nov 14, 2008 2:22 PM

  • FM to translate first letter of every word to upper case.

    Hi all,
    I have a requirement to change the first letter of every word in sentence to Upper case.For example if the sentence is 'fifty eight thousand' it has to be changed to 'Fifty Eight Thousand'.Is there any FM to acheive this? Any help would be highly appreciated.
    Thanks and Regards
    Kiran.

    it is useful for u :
    FM:ISP_CONVERT_FIRSTCHARS_TOUPPER
    OR u can user below code:
    translate output_string to lower case.                 
      pos_max = strlen( output_string ) - 1.
      pos = 0.
      assign output_string+pos(1) to <poi>.
      assign input_string+pos(1)  to <hpoi>.
      <poi> = <hpoi>.
      assign input_string+pos(*) to <rest>.
      while <rest> ca separators.
        pos = pos + sy-fdpos + 1.
        if pos > pos_max. exit. endif.
        assign output_string+pos(1) to <poi>.
        assign input_string+pos(1)  to <hpoi>.
        <poi> = <hpoi>.
        assign input_string+pos(*) to <rest>.
      endwhile.

  • How to translate the key words in ABAp program from lower case to upper cas

    How to translate the key words in ABAp program from lower case to upper case?

    Hi Kittu,
    You need to set the Pretty Printer settings to achieve key words in ABAP program from lower case to upper case.
    Utilities -> Settings -> Pretty Printer (tab) -> Select third radio button.
    Thats all.
    <b>Reward points if this helps.
    Manish</b>

  • Translate search parameters to lower and upper case

    Hi All,
    I need to create a search function. Is it possible to translate the search paramaters to  both upper and lower case because inside the data there are data with upper case or lower case or both.
    Thanks in advance.

    Hi ,
      As per your requirement you have to write logic for three conditions :
    1. Translate whole word into upper case .
        TRANSLATE  your field name  TO UPPERCASE.
    2. Translate whole word into lower case .
        TRANSLATE  your field name  TO LOWERCASE.
    3. First character of your field should be in uppercase rest in lower case .
    so write your logic now considering third point also .
    Regards ,
    Nilesh Jain .

  • To translate the text to upper case

    Hi,
          I have an requirement to translate the text to upper case.  please suggest.
    Thanks.
    Tony

    Hi,
        you try this FM  2054_TRANSLATE_2_UPPERCASE
    Example,
    CALL FUNCTION '2054_TRANSLATE_2_UPPERCASE'
           EXPORTING
                I_STRING            = P_V_TEXT
           IMPORTING
                E_STRING            = P_V_TEXT
    Regards,
    Joan

  • Function Module for Translation of text from Lower to Upper Case

    Hi All,
    Can any one give me function module for translation of text from lower to upper case.
    If we use Translate statement for the program in the Extended Syntax check it is giving error.
    Thanks in advance.
    Regards,
    srinivas

    Hi Srinivas,
    You can use any of the Function Modules below.
    AIPC_CONVERT_TO_UPPERCASE
    2054_TRANSLATE_2_UPPERCASE
    HR_99S_CONV_UPPER_CASE
    Please reward if useful.
    regards,
    Raj

  • How to cast a fieldinput value to upper case.

    Im not a java programer I guess that this must be a silly thing.
    Im searching data in R/3 from 2 fields 1 numeric and the other alphanumeric. This alphanumeric fields if I put it in upper case works, if I wirte it in lower case doesnt works.
    In R/3 when I test the FM doesnt matter if I put it lower or upper case, it works fine.
    so I wanna know how can I in WD cast the value that I put in that fieldinput be converted to upper case when I hit the search button.
    Thx

    > Im not a java programer I guess that this must be a
    > silly thing.
    >
    > Im searching data in R/3 from 2 fields 1 numeric and
    > the other alphanumeric. This alphanumeric fields if I
    > put it in upper case works, if I wirte it in lower
    > case doesnt works.
    >
    > In R/3 when I test the FM doesnt matter if I put it
    > lower or upper case, it works fine.
    >
    > so I wanna know how can I in WD cast the value that I
    > put in that fieldinput be converted to upper case
    > when I hit the search button.
    >
    > Thx
    Hi,
    When you test the FM in SE37 in R3 there is an option at the top of the screen Called Uppercase/Lowercase - this controls whether the input is automatically converted to upper case for alphanumeric fields.
    The other option you have, if it is a custom FM, is to translate the input of the alphanumeric fields in the ABAP - it is quite common to have to translate or convert input data to make sure it is in the same format as the backend system.
    I prefer to do this sort of conversion on the backend system as usually you have a better guarentee that it will be in the correct format, than if you do it in the Java element.
    Just my opinion,
    Gareth.

  • How to CHECK WHETHER LOWER CASE OR UPPER CASE  IN CUSTOM TABLE

    Dear Friends,
                     I have a requirement where from  the flat file  i have collected into the internal table is as below :
      IDNo.     Name     Date      Location   Designation  Dept
      101       raja      4/12/2007  Delhi      manager      HR
      102       james    4/12/2007  Delhi      clerk          HR
    now iam checking against my custom table where iam   if the designation for the employee name already exists then i shouldnt modify/update the custom table that record
      now iam facing a problem where is the flat file is always having the Lower Case only ,
    as per the scenario  if my custom table already have the employee name i shouldnt modify/update i.e i shouldnt overwrite,
    this scenario is working but it is failing in the case
    by chance in the Custom table the employee name or designation is in Upper Case  the condition where iam checking in the code  is failing as the flat file data coming into the internal table is having always lower Case.
    So could any one please let me know how i should check in my custom table whether iam having upper case or lower case and how can i make it lower case ?
    because iam able to manage in the case where if the flat file data coming in Upper case i can check before only by
    using Translate to lower case . how i unalbe to  check for the data coming from the Custom table if  in Uppercase , so i want to change that to lower case then checking my condition whether that data already exists in my custom table before modifying the data coming from the flat .
    because the condition is failing when the data in the custom table is in upper case and the Flat file data is in lower case.
    please help how i can check for the data in the Custom table is in upper case and then change it to lower case.
    Regards
    Madhuri.

    Hi Madhuri,
    Translate both data in your flat file & custom table to lowercase before comparing them. With that, you're able to identify if there's a differences in for both data.
    If you're putting data that is pulled from custom table, what you can do is after selecting/reading the data, translate to lowercase or uppercase (whichever you prefer) but make sure if you translate to lowercase, your data in the flat file must be lowercase to and vice versa.
    Happy doing !!..
    Regards,
    Loo

  • XSLT upper-case function()

    Does anybody know how to use a upper-case() function in XSLT? I have it in a XSL mapping of a routing service. I want it as below:
    <xsl:when test='(upper-case(/imp1:GENERIC4) = "YES") or (/imp1:AWARDTYPE = "227")'>
    <top:ccFlag>
    <xsl:text disable-output-escaping="no">Y</xsl:text>
    </top:ccFlag>
    I want it to be true no matter what case of YES is. It can be yes/Yes/YES/or anything.
    I also tried the following,
    <xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable>
    <xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
    <xsl:choose>
    <xsl:when test='(translate(/imp1:GENERIC4,$lower,$upper) = "YES") or (/imp1:AWARDTYPE = "227")'>
    <top:ccFlag>
    <xsl:text disable-output-escaping="no">Y</xsl:text>
    </top:ccFlag>
    </xsl:when>
    <xsl:otherwise>
    <top:ccFlag>
    <xsl:text disable-output-escaping="no">N</xsl:text>
    </top:ccFlag>
    </xsl:otherwise>
    </xsl:choose>
    But doesnt work.
    Thanks for helping.

    this code works for me
        <ns1:testBPELProcessRequest>
          <ns1:input>
            <xsl:value-of select="xp20:upper-case(/ns1:testBPELProcessRequest/ns1:input)"/>
          </ns1:input>
        </ns1:testBPELProcessRequest>
      </xsl:template>maybe you need to use the namespace in front of the upper-case

  • File name gets converted to upper case

    I am facing an unusual problem with Solaris 10. When I insert an USB thumb drive formatted with FAT to copy some file from the stick, some of the files whatever gets copied to hard disk get their file names changed to upper case. This is quite random, at least, I am not being able to figure out what pattern of file names are causing this problem. Any suggestions?
    Edited by: Holmes.Sherlock on Dec 4, 2012 1:13 PM

    Hi...
    you can translate the password in upper case before call bapi....
    translate psw to upper case.
    regards
    Marco

  • Converting lower case to upper case data of flat file

    Hi All,
    I have a requirement purche order creation by using bapi function module.My requirement is  when I am uploading the flat file and if flat file  contains the data in lower case then before passing it to the function module i want to convert it in to Upper case. please tell me how can I do this.
    its very urgent.
    Regards,
    Amit.

    hi,
    Use translate statement ..
    DATA letters(3) TYPE C.
    MOVE 'abc' TO letters.
    TRANSLATE letters TO UPPER CASE.
    write : letters.
    Also refer
    /people/alvaro.tejadagalindo/blog/2006/12/21/does-abap-lacks-of-string-processing
    Regards,
    Santosh

  • To print the address in UPPER CASE

    Hi ABAP Gurus
    Please help me out.
    I am in a situation where i need to print whole ship-to-party address in Upper Case. no mater how it is stored in tables. Currently i am getting mixed letters. however i need to print only in upper letters.
    Please help me out.
    Thanks in advance.
    will reward points for the usefull answers.

    Hi
    Use FM
    AIPC_CONVERT_TO_UPPERCASE
    SPP01_CONVERT_TO_UPPERCASE
    pass the string and it will convert
    or use translate to upper
    Regards
    Shiva

  • How to convert a string from lower case to upper case withour using transla

    Hi all,
    how to convert a string from lower case to upper case withour using translate,
    Thanks in Advance,
    Reddy

    Refer to this related thread
    Re: hi guys this very urgent please help

Maybe you are looking for