17 Replies Latest reply: May 13, 2010 2:56 PM by Anmol Bhat RSS

Issue with the Text Field Conversion

Currently Being Moderated

Hello Experts,

    I have Been facing an issue with  conversion of the text value.

Ex: the Value is E-implementation while input iam Give it has the same but while Exceuting its getting Converted to E_IMPLEMENTATION and Not hitting the data base with the Correct value and Leading to Sy-subrc = 4.

can Anyone Help me if any Conversion Exit Exists for the Filed.

Iam Using the Text filed as PROJECT  type CPR_TEXT. CPR_TEXT is the Filed in CATWS table with Domain Char25.

 

Appricate your Early Response.

 

Regards

Prem

  • Re: Issue with the Text Field Conversion
    Suhas Saha
    Currently Being Moderated

    You should use the same data element as the table field.

  • Re: Issue with the Text Field Conversion
    Suhas Saha
    Currently Being Moderated

    >

    Premkumar Ramineni wrote:

     

    > Ex: the Value is E-implementation while input iam Give it has the same but while Exceuting its getting Converted to E_IMPLEMENTATION and Not hitting the data base with the Correct value and Leading to Sy-subrc = 4.

    > Iam Using the Text filed as PROJECT  type CPR_TEXT. CPR_TEXT is the Filed in CATWS table with Domain Char25.

     

    So basically you input "E-implementation" but during the processing the value is getting converted to "E_IMPLEMENTATION".

     

    If the domain is CHAR25 i would understand "E-implementation" become "E-IMPLEMENTATION" as the domain is not case sensitive. But why "-" is turning "_" is beyond comprehension w/o further inputs

     

    If this is a custom code check if there is any code which REPLACE'ing "-" with "_".

     

    BR,

    Suhas

    • Re: Issue with the Text Field Conversion
      Currently Being Moderated

      Hi Suhas,

        Iam sorry It is Not Converting to E_ its Just E-IMPLEMENTATION.

       

      As this is the Issue Only with Convertin g the Csae from its original case.

       

      Regards.

      • Re: Issue with the Text Field Conversion
        Suhas Saha
        Currently Being Moderated

        >

        Premkumar Ramineni wrote:

         

        >   I am sorry It is Not Converting to E_ its Just E-IMPLEMENTATION.

         

        That is what it will do for the domain CHAR25. This is not because of any conversion exit, the domain is not case-sensitive because of which it is getting converted to CAPS.

         

        Check in the table if the values for the particular field are stored in small letters? If it is so i think the domain might be different.

         

        Anyways which table & field are you discussing about

        • Re: Issue with the Text Field Conversion
          Currently Being Moderated

          Hi Suhas,

           

            Its CATSW-CPR_TEXT

          • Re: Issue with the Text Field Conversion
            Suhas Saha
            Currently Being Moderated

            >

            Premkumar Ramineni wrote:

             

            >   Its CATSW-CPR_TEXT

             

            I don't think its an R3 table I don't have the table in my system ? Anyways if you say the domain mentioned in the data element for CATSW-CPR_TEXT is CHAR25 i don't think the data will be stored in small in your DB.

             

            Can you post the select query you are using ?

            • Re: Issue with the Text Field Conversion
              Currently Being Moderated

              *"----


              ""Local Interface:

              *"  IMPORTING

              *"     VALUE(PROFILE) LIKE  TCATS-VARIANT DEFAULT 'USP-PS03'

              *"     VALUE(PERNR_IMP) LIKE  CATSFIELDS-PERNR OPTIONAL

              *"     VALUE(PROJECT) LIKE  CATSW-CPR_TEXT OPTIONAL

              *"  EXPORTING

              *"     VALUE(TASK) TYPE  CATS_CPR_OBJTEXT

              *"     VALUE(DATE_FROM) LIKE  BAPIHRITBASE-FROM_DATE

              *"     VALUE(DATE_TO) LIKE  BAPIHRITBASE-TO_DATE

              *"----


               

              data: ICATSW_EXP type STANDARD TABLE OF CATSW,

                    wa_ICATSW_EXP type CATSW.

               

               

              CALL FUNCTION 'CATS_EXTERNAL_WORKLIST'

                EXPORTING

                  PROFILE                 = PROFILE

                  PERNR_IMP               = PERNR_IMP

              •   INPUTDATE_IMP           =

              IMPORTING

                 DATE_FROM                = DATE_FROM

                 DATE_TO                  = DATE_TO

              •   MEINH                   =

                TABLES

                  ICATSW_EXP              = ICATSW_EXP

              •    MSG_RETURN              = MSG_RETURN

              EXCEPTIONS

                 PROFILE_NOT_FOUND       = 1

                 OTHERS                  = 2

                        .

              IF SY-SUBRC <> 0.

              MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

                       WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

              ENDIF.

              clear task.

               

              data: l_project type CATSW-CPR_TEXT.

               

              write project to l_project.

               

              loop at ICATSW_EXP into WA_ICATSW_EXP where CPR_TEXT = l_project.

                move  WA_ICATSW_EXP-CPR_OBJTEXT to TASK.

               

               

                ENDLOOP.

               

               

              This Is the Code Iam Using.

            • Re: Issue with the Text Field Conversion
              Currently Being Moderated

              Hi Suhas,

                 Thanks for Your help, i can able to resolve the Issue finally, its working now..

              regards.

  • Re: Issue with the Text Field Conversion
    Sandeep Kumar
    Currently Being Moderated

    The only reason can be a conversion routine assigned to it but as the domain char25 rules out this possibility.

    Are you translating the text to upper case within your program?

  • Re: Issue with the Text Field Conversion
    HariKrishna Sana
    Currently Being Moderated

    hi,

     

    First translate the text to uppercase then try fetch the record, if sy-subrc 4 then  translate the text to lowercase and try to fetch the entry. This may help you.

  • Re: Issue with the Text Field Conversion
    Anmol Bhat
    Currently Being Moderated

    Hi Premkumar,

                         I am not sure about your scene but are you inputting this value in parameter or in a screen field,

    If so check the conversion of screen field and write lower case with parameters. It will be case sensetive when u write lower case with paramenter diclearation. Try your luck.

     

     

    Thanks,

    Anmol.

Actions