What is use of  Conversion Routine in  Abap dictionary

Hi,
Can any body please tell me the proper use of <b>Conversion Routine in  Abap dictionary.</b>
Please give me a practical example where it has been used.
Thanks
prabhudutta

hi,
here is help for conversion routine
Conversion takes place when converting the contents of a screen field from display format to SAP-internal format and vice versa and when outputting with the ABAP statement WRITE, depending on the data type of the field.
If standard conversion is not suitable, it can be overridden by specifying a conversion routine in the underlying domain.
A conversion routine is identified by its five-place name and is stored as a group of two function modules. The function modules have a fixed naming convention. The following function modules are assigned to conversion routine xxxxx:
CONVERSION_EXIT_xxxxx_INPUT
CONVERSION_EXIT_xxxxx_OUTPUT
The INPUT module performs the conversion from display format to internal format. The OUTPUT module performs the conversion from internal format to display format.
If a screen field refers to a domain with a conversion routine, this conversion routine is executed automatically each time an entry is made in this screen field or when values are displayed with this screen field.
regards,
Raghavendra

Similar Messages

  • USE OF CONVERSION ROUTINES WHILE CREATING DOMAIN

    Hi,
    Could anyone tell me the use of conversion routines under output characteristics tab while creating a domain ??
    Thanks & Regards,
    Mounica J

    Coversion Routines are used to convert field values into internal or external format.
    Once you specify the Conversion routines at domain level,it ensures that data conversion into external and internal format is handled automatically .
    Please close the post if the question is answered.
    Thanks,
    Faiz

  • What is conversion routine which is found in data element

    Hi all,
    I was just trying to creating a data element assigned to a particular domain in se11. While i am creating i can see a conversion routine
    Can anyone tell me what is the use of that conversion routine with an example.
    thanxs in advance
    hari

    Hi,
    Depending on the data type of the field, there is a conversion when the contents of a screen field are converted from display format to SAP-internal format and vice versa. If this standard conversion is not suitable, it can be overridden by defining a conversion routine in the underlying domain.
    Conversion routines are identified by a five-place name and are stored as a group of two function modules. The function modules have a fixed naming convention. The following function modules are assigned to conversion routine xxxxx:
    CONVERSION_EXIT_xxxxx_INPUT
    CONVERSION_EXIT_xxxxx_OUTPUT
    The INPUT module converts from display format to internal format, and the OUTPUT module converts from internal format to display format.
    When is a Conversion Routine Executed?
    If a screen field refers to a domain with a conversion routine, this conversion routine is executed automatically when entries are saved in this screen field or when values are displayed in this screen field. The conversion routine of the domain is also triggered when the field contents are output with the WRITE statement.
    Table SPFLI in the  flight model contains information about the flights offered by the carriers. The time for each flight is recorded in field FLTIME. Enter and display the time of the flight in input templates in the form HHH:MM (hours:minutes). Store the flight time entered in the database as an integer number (number of minutes of the flight). An entry 3:27 is therefore stored in the database as 207 (3 hours, 27 minutes = 207 minutes).
    Field FLTIME refers to domain S_DURA, to which conversion routine SDURA is assigned. The value is thus converted by the two function modules <b>CONVERSION_EXIT_SDURA_INPUT</b> and <b>CONVERSION_EXIT_SDURA_OUTPUT</b>.
    A conversion routine can also be triggered by specifying its five-place name in the attributes of a field in the Screen Painter or with the addition <b>USING EDIT MASK <Name of conversion routine></b> in the WRITE command in the program. With the USING NO EDIT MASK addition in the WRITE statement, you can skip a conversion routine defined for a domain when outputting.
    Parameters
    The two function modules of a conversion routine must have precisely two parameters with the names INPUT and OUTPUT for the value to be converted and the converted value.
    The INPUT parameter in the INPUT conversion and the OUTPUT parameter in the OUTPUT conversion should not have any reference fields because the value passed in the call could have a different length than that expected.
    Programming Conversion Routines
    ABAP statements that result in an interruption of processing (such as CALL SCREEN, CALL DIALOG, CALL TRANSACTION, SUBMIT, COMMIT WORK, ROLLBACK WORK, MESSAGE I, MESSAGE W) are not allowed in conversion routines.
    Only A messages are meaningful in output conversion, but A, E and S messages can be triggered in input conversion (although S messages are not very meaningful here). E messages result in an error dialog. Exceptions are not intercepted in the call.
    The output conversion is also triggered with WRITE and WRITE TO. The conversion routine may therefore occur very frequently with lists. The output conversion should therefore be programmed as efficiently as possible.
    No external performs should be used in conversion routines. Programs that are called externally use the table work areas of the first calling main program. In conversion routines this can result in errors that cannot be easily analyzed since they are sometimes called at unpredictable times in the program flow.
    <b>Pls refer link which contains code as an example to conversion routine used in abap</b>.
    <a href="http://www.bwexpertonline.com/downloads/source_code.doc">http://www.bwexpertonline.com/downloads/source_code.doc</a>
    Pls reward points.
    Regards,
    Ameet

  • What does CUNIT, ABPSP & ABPSN conversion routines do?

    What does CUNIT, ABPSP & ABPSN conversion routines do?
    There is no help on SAP documentation on how these  conversion routines work?Can someone  tell me in simple english on how to they the padding logic.
    Something like if <b>all numeric</b> then <b>pad  spaces on the left side</b> etc
    thanks
    Rao

    Hi Rao,
    I can help you with CUNIT. SAP manages units of measure in an internal and external format. That its, when it is saved in database, it uses a code (for example for units it uses ST), and when it shows you the value, it uses another one (in this case UN). So, what basically does CUNIT conversion routines (A.H.P mentioned the function modules) is to switch between those formats.
    Hope to help!
    Regards,
    Diego

  • How to use conversion routine?

    hi,
    in my z-table i have a field called matnr for the material number say.
    its domain defines it as 18 char.
    say i have created an entry say 200.
    so it will be saved may be as 000000000000000200.
    i want it should be displayed with as 200.
    and if i search for say 200.
    so it should not look for the proceeding zero's.
    it should not give me an error that record doesn't exists.
    please tell me how to use exaclty conversion routine.
    thanks
    ekta

    hi all,
    the problem has been solved.
    CONVERSION_EXIT_MATN1_OUTPUT   this FM module can only be used where the z-table has matnr of the type MATNR the standard matnr of the table mara.
    so in my program it was not working.
    my data element was not matnr.
    i had used a popup for position finder.
    so it could not read the material number which had zeros as prefixes.
    thanks for all the help
    thanks
    ekta
    below the code is mentioned...................
    *******************************C O D E*******************************************
        WHEN '&POS'.
          popup_title       = 'Choose The Material Number'.
          CLEAR it_fields.
          it_fields-tabname    = 'Z10ET_TAB_MAT01'.
          it_fields-fieldname  = 'MATNR'.
          it_fields-field_attr = ' '.
          it_fields-field_obl  = 'X'.
          APPEND it_fields.
          CALL FUNCTION 'POPUP_GET_VALUES'
            EXPORTING
              no_value_check  = 'X'
              popup_title     = popup_title
              start_column    = '5'
              start_row       = '5'
            IMPORTING
              returncode      = returncode
            TABLES
              fields          = it_fields
            EXCEPTIONS
              error_in_fields = 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.
          IF returncode = ' '.
            MESSAGE i036 WITH it_fields-value.
            SORT it_material_data BY matnr.
            READ TABLE it_material_data INTO wa_material_data
                            WITH KEY matnr = it_fields-value.
            IF sy-subrc = 0.
              tab_ctrl1-top_line = sy-tabix.
              REFRESH it_fields.
              CLEAR returncode.
              CLEAR ok_code_0101.
            ELSE.
              CONCATENATE concat it_fields-value INTO v_matnr.
              READ TABLE it_material_data INTO wa_material_data
                              WITH KEY matnr = v_matnr.
              IF sy-subrc = 0.
                tab_ctrl1-top_line = sy-tabix.
                REFRESH it_fields.
                CLEAR returncode.
                CLEAR ok_code_0101.
              ELSE.
                MESSAGE i037 WITH it_fields-value.
                REFRESH it_fields.
                CLEAR returncode.
                CLEAR ok_code_0101.
              ENDIF.
            ENDIF.
          ENDIF.

  • Conversion Routine - DATES

    Hello Gurus,
    I am fetching dates from tables in source system, which is of type Decimal 15.
    Now this in a very strange format, as you see in the source system tables.
    Hence I want to use an conversion routine in BI, at the infoobject level.
    I have created ZABCDATE, with a datatype DATS.
    My 1st question is, is there a way to write your own conversion routine.
    My 2nd question is, how can I define conversion routines at the datasource level.
    Thanks in advance
    Full points to correct answers
    Edited by: bw on Jan 21, 2009 12:59 AM

    Hi.......
    1) is there a way to write your own conversion routine.
    Yes..........u can write ur own ABAP code in the End routine of the Transformation..........
    2) is, how can I define conversion routines at the datasource level.
    If u write ur own ABAP code for conversion in the Transformation...........then that will be at datasource level........ie datasource specific.......
    Regards,
    Debjani.....

  • Error in CHECK_REQUIREMENTS phase (Open ABAP Dictionary Conversions)

    Hi Gurus,
    When were are trying to update SPAM/SAINT  to version 7.00/0033 from 7.00/0029
    we're encountering  'Open Conversions in the ABAP Dictionary' in CHECK_REQUIREMENTS phase, refraining to proceed further.
    It was due to 2 indexes in a table.
    When i checked(using SE14), those two indexes were not appearing in dictionary, hence we've removed them at the ORACLE level, reset the queue and tried to update again, and got the same error .
    Table PAT03 - has the following
    Patch               - 'SAPKD70033'
    Status              - '?'
    and the table PAT02 has 2 enties of those two indexes.
    with Patch - 'OPEN_TBATG'
    How to proceed further,pls provide us a solution.
    Regards
    Prabumanoharan

    Hai,
    Goto SE14 - select "Indexes" and "Activate". But you should have tried this before deleting the Indexes from the Oracle level.
    or try restarting the update.
    Regards,
    Yoganand.V

  • Abap-dictionary

    hi experts,
    what is value table&check table in abap dictionary.
    where we use it. and what is the purpose.
    thank u,
      cnu

    Hi,
    Check this link
    http://help.sap.com/saphelp_nw04s/helpdata/en/e2/667092730811d2959500a0c929b3c3/content.htm
    Value Table
    This is maintained at Domain Level.
    When ever you create a domain , you can entered allowed values.   For example  you go to Domain   SHKZG - Debit/credit indicator.  Here only allowed values is H or S.
    When ever you use this Domain, the system will forces you to enter only these values.
    This is a sort of master check . To be maintained as a customization object. This mean that if you want to enter values to this table you have to create a development request & transport the same.
    Check table
    For example you have Employee master table & Employee Transaction table.
    When ever an employee Transacts we need to check whether that employee exists , so we can refer to the employee master table.
    This is nothing but a Parent & Child relationship .  Here data can be maintained at client level , no development involved.
    As per DBMS what we call foregin key table, is called as check table in SAP.
    There is 1 more important Difference in Value Table and Check Table is that:
    1. The contents of the check will be used as an input help(F4 Help) for a particular field on which a check table is assigned.
        But the contents of Value Table are never used in Input Help.
    The Heirarchy which decides from where to used the Input Help is:
    1. Input help defined explicitly in ABAP Program or Dialog Module.
    2. Input Help Attached to the referenced Database Table field.
    3. Using the contents of Check Table as an input help if neither (1) or (2) help are there.
    4. Input help from Fixed value or Value range given in Domain.
    http://www.sap-img.com/abap/difference-between-a-check-table-and-a-value-table.htm
    Hope thsi helps.

  • ABAP Dictionary type FLTP is not allowed for screen element

    Hi Experts
    I tried to open VBFA in se16 and i got the message in the status bar like this , what does it mean. please explain.
    "ABAP Dictionary type FLTP is not allowed for screen element"

    Hi,
        This is from help
    ABAP Dictionary type FLTP is not allowed for screen element
    Message no. 37048
    <b>Diagnosis</b>
    The format of the ABAP Dictionary field is only for use within the ABAP
    program and cannot be used in the Screen Painter.
    <b>Procedure</b>
    The field cannot be used in screens. If you want to output the
    information in the field or assign a value to the field from the screen,
    you must use an intermediate field with an appropriate format.
    <b>Reward points</b>
    Regards

  • How to delimit leading zero in vendor number in OO ABAP ALV without using conversion routine

    Hi,
    How to delimit leading zero in OO ABAP ALV without using conversion routine, because I have many fields like vendor, customer, material number etc..
    How to address this leading zero.
    I appreciate your quick response.
    Regards,
    Nalini S.

    Hi Nalini,
    Delimiting leading zeros in fields has to be done via conversion routines, as suggested by Vadamalai you need to pass on the conversion routine name in you field catalog variable.
    Now as to which object oriented approach are you using to have your table contents display in ALV as it matters  -
    Using FACTORY method of CL_SALV_TABLE class, or
    Using SET_TABLE_FOR_FIRST_DISPLAY method of CL_GUI_ALV_GRID class.
    Using FACTORY method of CL_SALV_TABLE will do your own work, no need to apply any conversion routines or set long/medium/short text for columns as we do in field catalogs!
    Cheers,
    Varun

  • What are the commonly used conversion routines apart from alpha conversion?

    hi all,
    Can any one let me know the commonly used conversion routines apart from alpha conversion routines ?
    thanxs ina dvance
    hari

    Hari
    There are lot of conversion routines, like
    BUCAT Conversion Routine. eg. The BUCAT conversion routine converts the internal presentation of the budget type
    (0BUD_CAT) into the external presentation (0BUD_CAT_EX), using the active entries in the
    master data table for the budget type InfoObject (0BUD_CAT).
    see the link below for all the routines.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b9119290-0201-0010-69af-96fe3bf00243
    assign points if helpful
    Kalyan

  • Use Conversion Routine in Infopackage

    Hello friends,
    I would like to know whats the purpose and function of 'Use Conversion Routine' in the Infopackage  under 'Data Selection' tab. I wasnt able to get any data as long as that box was checked.As soon as I unchecked the box, i was able to get data.Please explain in detail.
    Points will be assigned.
    Thanks.

    Hi,
    The function of "Use Conversion Routine" is to convert the data that user enter in the field (is called external format) into internal format (database format).
    example Alpha Conversion (general used): in the field ABC (assume this char is 8 characters long) you enter value '1234' and you check that box, this will look up into your data source with value ABC = '00001234' and match then data will be extracted, but if <u>in your data source</u> the value of field ABC is '1234'  the data won't be extracted.
    in your case, please check in your data source at field you selected whether the data format match or not with value that you have entered(with condition checked or unchecked).
    I hope it helps
    Cheers
    IR

  • What is the use of end routine in bi 7.0

    hi friends,
    what is the use of end routine in bi 7.0. what scenerio we use end routine.
    Thanking u
    suneel.

    hi Suneel,
    check
    http://help.sap.com/saphelp_nw70/helpdata/en/e3/732c42be6fde2ce10000000a1550b0/frameset.htm
    End Routine
    An end routine is a routine with a table in the target structure format as input and output parameters. You can use an end routine to postprocess data after transformation on a package-by-package basis. For example, you can delete records that are not to be updated, or perform data checks.
    If the target of the transformation is a DataStore object, key figures are updated by default with the aggregation behavior Overwrite (MOVE). You have to use a dummy rule to override this.
    hope this helps.

  • Why class builder allows to develop abstract final class ? What is the use of such class in ABAP?

    I am new to ABAP. I tried creating abstract class and found that class builder allows development of abstract final class. What is the use of such class in ABAP?

    Hi,
    Does not compile:
    This one do:
    Inheritance:
    Regards.

  • PRODU Conversion Routines in APO ABAP

    Hi Folks,
      I am new to APO..
    I wanted to change PRODU conversion routines for Product , Could you please let me know is there any user-exits or Badis avaialble..
    I wanted to change both Input, output routines..
    my req is :
    Material number is .1234
    when ever we create any material starting with (.) it should change to(0) 01234..
    and internal format also should be only 01234 not all  other leading zeros( as 40 is length).. and display format is as 01234
    Thanks,
    Smriti..

    Hi Smriti,
    Can you use the Replace command for the above issue.
    Command
    REPLACE ALL OCCURRENCES OF '.' IN matnr WITH `0`.
    Regards
    Rajkumar Narasimman

Maybe you are looking for

  • In Credit Memo Net Value is coming 0.

    Dear SD Expert, I have created Credit Memo with Reference Credit memo request. While creating Credit memo (VF01) the Net Value is 0. But the Billed quantity is coming correct in the system. In Credit Memo request(VA01) every thing is ok, Quantity and

  • IPhone Unlocking ( No Service )

    Hello, I Bought an Iphone from about one year .. and it was factory unlocked i kuwait after upgrading to 5.1.1 and baseband upgaraded to 4.12.01 now it's locked and giving me an error message ( No Service ) please help i can't use my phone anymore

  • Sync confusion and non-functional find my phone

    got an iphone last January. Set it up to sync with my iMac and MBA and all has been working fine. Had used Mobile Me before to sync iMac and MBA. Now getting the messages to be ready for end of MM so went to icloud. Calendar is empty. Address book ha

  • Export Versions not in viewer

    When I export and save a new version of a vile how come I can't see it in the viewer? Do i have to reimport it or am I missing a setting?

  • MSS: Eventing with Employee Profile/Search

    Hi All, I've followed this blog to event with employee profile iview. In the end, the application does pick the employee selected from Employee Search table, but the issue is, on selecting another employee, the application doesnt pickup the right per