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.

Similar Messages

  • 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

  • How to write conversion routine for key figure?

    Our customer has this requirment:
    we need to know the last time of some TV program in BEx report, If a TV program last 500 seconds, we need show the key figure like this:  00:08:20, If a TV program last 100000 seconds, we need show the key figure like 27:46:40 (27 hours and 46 minitues and 27 seconds), If we define a key figure as time,  BW system will report a error that say it is not acceptable time.  If we want to define a integer, but we need display it like hhmmss format.  We know we can write conversion routine for char.  but I don't how to write conversion routine for key figure.   Please give me any hint if any other solutions?
    Edited by: SY DONG on Dec 2, 2010 3:36 AM

    If you want to do in Transformation Layer :
    You can use routine ...break up the seconds into minute hour and seconds
    you will have to handle few cases in this:
    let say your variable lv_seconds holds the number of seconds you want to convert to hour min and seconds
    DATA: lv_seconds type i,
               lv_hrs  type  i,
              lv_sec type i,
              lv_min type i.
    lv_hrs = lv_seconds / 3600
    if lv_hrs >= 1.
    lv_min = (lv_hrs - trunc(lv_hrs))*60
    here again handle seconds if min >60.
    else.
    lv_hrs = '00'.
    lv_min = lv_hrs*60
    It is just hint ..how you can manipulate the seconds to get it...you will have to think about the complete algorithm
    Regards,
    RK

  • 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

  • Use Conversion Routine

    Hi,
    I use SAP netweaver2004s, when I create an infopackage the Use conversion routines is in grey and I can select it.
    Do you have any idea why?
    Thanks,
    Eric

    Hi,
    My problem is that I don't have the choice to check it or not, this option is in grey.
    Thanks,
    Eric

  • 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

  • How to remove conversion routine "ABPSN"

    Dear gurus,
      In my transfer rules, under the tab "DataSource/Trans. Structure", I have a field PSPID whose "Conversion Routine" has the value "ABPSN". This conversion routine converts the external format to the SAP format which, however, is not what I want. I want to remain the original format so I need to remove this "ABPSN" conversion routine. When I double clicked it, it linked to the InfoObject 0PROJECT maintanace screen. On that screen, I removed the conversion routine "PROJ" for 0PROJECT, but still ABPSN remains and the data loaded into the InfoCube have been converted.
       So how can I remove this ABPSN convertion routine?
      Thanks in advance.
      Jin Ming

    Hi Jin Ming,
    Conversion Exit ABSPN is related to WBS element and not project at R/3 side.
    But at BW side this routine internally calls Project routine .
    The Process is,
    1. Delete all transactional data , from related ODS & Cube wherever 0PRoject is used .
    2. Delete master data from 0Project.
    3. Change object 0Project remove the conversion using Tcode RSD1.
    4. Load master data for 0Project.
    5. Load transaction data.
    Hope that helps.
    Regards
    Mr Kapadia

  • How to "Custom conversion routine" in BW

    Hi team,
    The R3 table level field has converion routine which stores the value as "A" .
    When you display this in application (or) using ALV, it shows as "AB". There are custom function modules behind this conversion routine.
    In BW, when we extract until PSA, we are getting "A".
    I see the option at Info object level to write" conversion routine" but how and where to start this conversion routine in BW.
    In BW, we want to show "AB"
    Thanks
    Angelo

    Hi,
    this problem is solved in transformation PSA to InfoObject using formula or routine.
    Regards,
    Conrado
    www.forosap.com
    Spanish SAP Forum Administrator
    Edited by: Conrado Linquet on Mar 29, 2010 5:54 PM

  • How to reset Conversion Routine NUMCV in InfoObject

    Dear all,
    In order to test, I deleted the Conversion Routine NUMCV in tab General of an InfoObject. And now I'd like to reset it as NUMCV. A message says: Conversion Routine NUMCV was deleted.
    How can I resolve it?
    Thanks a lot in advance

    Thanks for your answer.
    I've tried to create a new InfoObject, but everytime when I choose "Data type" as NUMC and then choose "Convers. Rout" as "NUMCV", it's said : Conversion Routine NUMCV was deleted.
    Do you have any idea?

  • How to use processing routine 2 for another smartform in nace

    Hi Techies,
    I have configured custom smartform ZS1 for standard program RLE_DELNOTE for delivery in nace.
    Now I need to configure another smartforms ZS2 for same program.
    How to proceed with this?
    Due to client constrain, I cannot make changes in ZS1.
    If it would be custom program, I can create new Form Routine, and proceed.
    But for same form routine, can you suggest differentiation methodology to proceed with processing routine 2:
    Program                   RLE_DELNOTE
    Form Routine              ENTRY
    Smartform Form        ZS2
    Kindle guide.
    Thanks in advance ,
    Tanaya

    Hi Tanaya,
    You can create a new output type in NACE and get this done. get a copy of existing output and attach your new smart form there. maintain appropriate condition records so that your document will trigger 2 outputs.
    Thanks,
    tansap.

  • How to use Start Routine for this requirement

    Hello,
    I am having data in 2 ods and should load that data into cube, but there isn't any common object in both the ods's. I need to analyze based on these ods objects. so I thought of pulling some objects into 1ods which are used for analysis and added some objects to ods and cube. Now I have to write a start routine in update rules to fetch the data from the info objects which are present in another ods. Can any one help me in this?
    Rajesh.

    Hi Surya,
    Extract all info from table BKPF
    select * into it_bkpf
    from bkpf
    where gjahr = p_fisyr.
    Select record based on internal table it_BKPF
    The reason why FOR ALL ENTRIES syntax is used because of its cluster table.
    select * into it_bseg
    from bseg
    for all entries in it_bkpf
    where bukrs = it_bkpf-bukrs
    and belnr = it_bkpf-belnr.
    Delete duplicate record based on Company Code and GL No.
    delete adjacent duplicates from it_bseg
         comparing bukrs belnr.

  • Conversion Routines

    How to use Conversion Routines in Production Support?What is Conversion Routine?How it is Working in real time?

    hi..
    i'm not too sure abt it.. check out if the below helps ya.
    you can create customer routines. According to OSS Note 41474 it is safe to create a function module that has the conversion exit naming standard (Begins with CONVERSION_EXIT*). You will get a warning that you can ignore. The important part is to have the first letter of your rountine name begin with Z or Y. That way you won't have a conflict with SAP. An example would be:
    CONVERSION_EXIT_Z0001_INPUT .
    i browsed n found these details as none had answered ur question.

  • Infopackage Conversion Routine option is checked

    Hi everyone,
    I'm trying to understand the dynamic of the Dataload process in my new client and there is a infopachage where in "Data Selection" tab i have a "Use Conversion Routine" option checked and i don't know where this exact routine is actually is, i mean i want to see the code and what this routine does??
    Any ideas?

    Hi,
    In the infopackage selection screen you can enter your selections either directly or through the use of routines.
    "Use conversion routine " is selected to enable these routines.
    To write the routines click on the "Type(Variable change...)" column,and in its selection screen u hav two options
    ABAP Routine
    OLAP Variables
    Selcet ABAP Routine.
    Give a description and click on editor,
    it will take u to the routine scree.
    Now u can do the required cahnges.
    Once it is saved the routine is available in the TYPE column in the selection screen

  • Why do u need conversion routine at object level?

    hi friends,
    what scenerio we use conversion routine at object level, while creating my character , there is option conversion routine, when we use, please give me 1 scenerio with sample code?
    regards
    ss

    Suneel,
    You can make transformation to the data for specific InfoObjects in the Transfer Rules and / or Update Rules.
    Now, when you do that, it will only affect that InfoObject in that particular set of rules.
    If you want to process o transform the data for this InfoObject ANYWHERE it is used, without the need of repeating it over and over in the Transfer or Update Rules where it is present, you just do it once, at the Object level.
    That's the main purpose.
    Sorry, I don't have a sample code.
    Regards,
    Luis

  • How to transport InfoObject Conversion Routine

    Hi,
    I am using an existing coversion routine to my InfoObjects, this conversion routine is a custom object which already existed in Dev created by someone and i have just used it for my InfoObjects, now how can i transport this conversion routine to CONS, is it enough if i just transport the INPUT and OUTPUT function module.
    Thanks
    Akila. R

    hi Just go to the transport Connection, select the infoobjet automatically the conversion routines will be associated with it no need of collecting it seperately .
    for example
    ALPHA conversion is used in the BW system for each presetting for character characteristics. The ALPHA conversion routine is registered automatically when a characteristic is created. If you do not want to use this routine, you have to remove it manually.
    The ALPHA conversion routine is used, for example, with account numbers or document numbers.
    For conversions from an internal to an external format (function module CONVERSION_EXIT_ALPHA_OUTPUT) the process is reversed. Blank characters on the left-hand side are omitted from the output.
    CONVERSION_EXIT_ALPHA_OUTPUT ths functional module will be transorted automatically with out your notice
    hope this helps
    santosh
    Edited by: Santhosh Nagaraj on Sep 16, 2009 2:59 PM
    Edited by: Santhosh Nagaraj on Sep 16, 2009 3:00 PM

Maybe you are looking for