Conversion Exits

Hi all
In my report program, i am calling a conversion exit dynamically(i.e) the name of the conversion exit for a particular data type is generated accordingly.
The data is converted by the conversion exit to the specified format( i used MATNR)
for a value 3 it converted to 000000000000000003 (which is the proper format for MATNR).
but still i am not able to fetch values on the basis of this.
But if in my select option i pass the value of MATNR as 000000000000000003 directly, the correct data is fetched.
Note: For all other fields (such as ebeln, correct data is fetched, so it rules out any problems with the select query)
Plz help.
Thanks & Regards
Ravish Garg

<b>* select statement to get the conversion exit name for the field *</b>
  select convexit
    into varconv_exit
    from  dd01l
    where domname = vardomname.
  endselect.
<b>
if conversion exit found for a field *</b>
    concatenate 'CONVERSION_EXIT_'
                varconv_exit
                '_INPUT'
                into
                varconv_exit.
    perform f_conversion_exit
                          using p_table
                                p_field
                                varconv_exit:
                         changing s_range-low,
                                  s_range-high.
<b>&----
*&      Form  f_conversion_exit
      text
     <--P_S_RANGE_LOW  text
     <--P_S_RANGE_HIGH  text
----</b>
form f_conversion_exit  using p_tabname
                              p_fname
                              p_convexit
                        changing p_value1.
  call function p_convexit
  exporting
      input        = p_value1
      importing
      output       = p_value1
    exceptions
      length_error = 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.
endform.                    " f_conversion_exit
<b>&----
*&      Form  get_data
      text
-->  p1        text
<--  p2        text
form get_data .</b>
select * into corresponding fields of table <dyn_table>
             from (p_table) where (it_where) .
  if sy-dbcnt = 0.
    write :/  'No Data matching Your Criteria!'.
    leave program.
  endif.
endform.                    " get_data
When i put matnr in the filed name and a value for it,
it gets the right conversion exit name : "CONVERSION_EXIT_MATN1_INPUT" for matnr.

Similar Messages

  • No Conversion exit entered

    Hi,
    I am new to SAP BW ,while creating a Datasource i am experiencing this error as "No Conversion exit entered" .Please help me on this .
    Thanks & Regards
    Sameer Khan

    Hi Vibhuti,
    How you created customer name and address, I mean to say data element? You can not have data with space except for short, medium and long text.
    Check if you are excluding first row as header in info package, if you have header in Flat file. Check if Lower case is ticked in Customer name and customer address.
    Regards,
    Kams

  • Conversion exit error while activating the transfer rules

    Hello gurus,
    We are doing a function module extraction with 3.X data sources.
    On activating the transfer rules , i am getting a conversion exit error for "0fiscyear", but in the infoobject we don't have the conversion exit for it.
    Points will be awarded for any kind of response.
    Thanks and Regards,
    Anu.

    Hi,
    1. Please check in the transformation, its necessary to provide the fiscal variant mapping as well when ur mapping fiscal year object. as on the basis of that value fiscal period will be derived.
    2 I guess ur doing direct mapping (Time conversion) and there is no routine written for that.  if any u can check that as well for any error.
    Thanks
    dipika
    Edited by: Dipika Tyagi on Jun 25, 2008 7:39 AM

  • How to find out the conversion exit format for VBRP-VRKME

    Hi Gurus,
               I am writing a report to fetch delivery details based on storage location'123'. My requirement is tat i shud convert the Billed Quantity unit TO Base unit of measure. In my VBRP table the field value/contents of VBRP-VRKME have values PAK for PAC( packets) and KAR for CAR(carton). When i click on User-specific Settings - - Check the filed CHEECK CONVERSION EXITS , i am able to get see the PAC and CAR respectively.
          But unfortunately when i selecting te fields form vbrp in my internal table i am getting the values 'PAK' for PAC and 'KAR' for CAR'. AS i am writing a report can any one suggest me how to convert this , as i wud b making use of FM MD_CONVERT_MATERIAL_UNIT  to convert to base unit of measure, n this FM is not accepting the values like PAK and CAK.
          Your Sugesstions are of utmost importance for me.
    Thanking you,
    ZIa

    Hi,
    Conversion routines are maintained at Domain Level(Definition Tab), Meins is the domain for VRKME data element.
    You have to use the following routines,
    CONVERSION_EXIT_CUNIT_INPUT
    CONVERSION_EXIT_CUNIT_OUTPUT
    Regards
    Srini

  • Web Dynpro ABAP: Assigning of Conversion Exits in ALV

    Hi,
    We are currently developing a generic data display application using ALV technology in Web Dynpro ABAP. "Generic" means that the structure of the data is created dynamically during runtime (using RTTS) and that even the contained data elements are created dynamically without any relation to DDIC. The generation is based on metadata like field name, data type, length, decimals, conversion exit.
    Our problem is that we were not able to find a way to assign the conversion exit of a data element ("column") in Web Dynpro ALV. Without this feature, no output conversions will take place since the data elements have no relation to DDIC. In the "classical" ALV, this could be easily done using method SET_EDIT_MASK of class CL_SALV_COLUMN.
    Is there a similar method in WebDynpro ALV or at least an alternative approach to assign a conversion exit to a column or cell?
    Thanks for your help in advance.
    Best Regards,
    Sven

    Hello Sven Hader,
    As you said you are generatiing the metadata like field name, data type, length, decimals, conversion exit dynamically.
    Can you please let me know how you are diong this?
    Meanwhile, you can try this approach to assign a Conversion exit to ALV Table column attribute dynamically.
    DATA:     lv_data                         TYPE  dd04v,
                  lv_mode_ext2int          type   ESEBOOLE. "Conversion mode that you are in
      read the data from the database
        CALL FUNCTION 'DDIF_DTEL_GET'
          EXPORTING
            name                = lv_ddobjname
            state               =   iv_object_state
            langu               =   iv_langu
          IMPORTING
            dd04v_wa         =   lv_data
          EXCEPTIONS
            illegal_input       = 1
            OTHERS           = 2.
        CHECK NOT lv_data-convexit IS INITIAL.
        CONCATENATE 'CONVERSION_EXIT_' lv_data-convexit '_INPUT'
          INTO cl_im_imp_ehs_material_erp=>mv_conversion_exit_input.
        CONCATENATE 'CONVERSION_EXIT_' lv_data-convexit '_OUTPUT'
          INTO cl_im_imp_ehs_material_erp=>mv_conversion_exit_output.
      IF lv_mode_ext2int = 'X'.
        ASSIGN cl_im_imp_ehs_material_erp=>mv_conversion_exit_input
            TO <lv_funcname>.
      ELSE.
        ASSIGN cl_im_imp_ehs_material_erp=>mv_conversion_exit_output
            TO <lv_funcname>.
      ENDIF.
    (3) call the conversion exit
      CHECK <lv_funcname> IS ASSIGNED.
      TRY.
          CALL FUNCTION <lv_funcname>
            EXPORTING
              input  = iv_value
            IMPORTING
              output = ev_value.
          IF sy-subrc <> 0.
          ENDIF.
        CATCH cx_sy_dyn_call_illegal_func
              cx_sy_dyn_call_illegal_type
              cx_sy_dyn_call_param_missing
              cx_sy_dyn_call_param_not_found.               "#EC NO_HANDLER
      ENDTRY.
    Endif.
    I hope it should work.
    Thanks,
    Bharath.K
    Edited by: Bharath Komarapalem on Dec 16, 2008 2:47 PM

  • ECC6 - ALV Grid Output Conversion Exit

    Hi,
    I'm creating a program in ECC6 to display the report in ALV grid by called FM: REUSE_ALV_GRID_DISPLAY.
    EG: Select field (TPLNR) from table IFLOT. Value retrieved are: ?0100000000000000029. However, the output doesnt do the conversion exit to change the TPLNR value to format MY.FO.001.
    I did the same in 4.6C system, the ALV report able to display the correct value of TPLNR. Eg: MY.FO.001 instead of
    ?0100000000000000029.
    If anyone encountered the same issues in ECC6 system which In an ALV grid, it doesnt to display data that is based on a domain with a conversion exit?

    Hi Simone,
    Check this NO_CONVEXT in the Structure LVC_S_FCAT. Populate with SPACE in the FCAT Build.
    If you have conversion Exit to that field then use the CONVEXIT in the same structure while building Field Catalog. sometimes you have Z converions so you need to check this.
    If you a Table field in the FCAT then you dont need all these things. because conversion exits are automatically done. Also COL_OPT = 'X' this will align the ALV in the correct format for output. hope this helps.

  • Conversion exits before value mapping in AIF

    Hi All
    I'm trying to use conversion exits before mapping in define value mapping, where I want to truncate leading zeroes in the source field before the value mapping is executed.
    I'm using the conversion exit 'ALPHA' (internal->external) to achieve this, but the leading zeroes do not get truncated. Below is an example-
    Conversion Exit: ALPHA
    Data Element for conversion:
    Direction: Internal->External
    Source Value: 0000012345
    Expected Value after conversion: 12345
    Actual Value after conversion: 0000012345
    A similar issue Error in reading a value from database table is noted here, however note 1892571 that is suggested does not seem to resolve the issue I'm facing.
    Am I missing something here?
    Regards
    Chandra

    Hi Glenn Bumanlag,
            I think the values that you have given for source values (Agency and scheme)
    and Target values (Agency and scheme) may be mismatching so kindly chek that...even i got the same error in the past..........
    If you the this problem kindly change it accordingly and also refresh the cache once you that with this.........
    Kindly follow the below mentioned link and check if you have followed these steps.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00ee347e-aabb-2a10-b298-d15a1ebf43c5
    Thanks
    Sai     
    PS: kindly reward points if helpful

  • Flat file Error in conversion exit CONVERSION_EXIT_PERI6_INPUT

    Hello Experts!
    I´m trying to upload a flat file data to an infocube and appears an error which diagnosis is:an error ocurred in record 1 during execution of conversion exit CONVERSION_EXIT_PERI6_INPUT for field CALMONTH.
    Procedure: Check That the record where the error ocurred has the correct format , and correct it accordingly.
    The characteristics in this fields (CALMONTH) are:
    - Data Type: numc-character string with only digits.
    - Length: 6
    - Convers.rout. PERI6
    - Output Length 7
    I hope You can help me soon.
    Thank you!

    Hi Eduardo Vergara,
    You just have to make sure the 0CALMONTH format is exactly the same. We have to match the format in the both columns. So in DataSource/Trans.Structure File “CALMONTH” change the Type to “Numc” and length o “6” . This is our problem but the tip is to match the proprieties.
    Regards,
    Alberto.

  • Short Dump DYNPRO_MSG_IN_HELP in Conversion Exit

    Hi Gurus,
    I've written the following conversion exit:
    FUNCTION CONVERSION_EXIT_ZBZEI_INPUT.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(INPUT)
    *"  EXPORTING
    *"     VALUE(OUTPUT)
    *"  EXCEPTIONS
    *"      INPUT_NOT_VALID
      DATA : CPI_OUT(4) type n, CPI_IN(5), cpi_in2(5), cpi_in3(5).
      DATA : CPI_YEAR(4), CPI_PERIOD(3).
      DATA : CPI_NUM2(2) TYPE N.
      DATA : CPI_NUM3(2) TYPE N,
             index(2)    type n,
             index2(2)   type n,
             merker(1).
      DATA : CPI_C8, CPI_C7, CPI_C6, CPI_C5.
      DATA: SONDERZ.                    "nimmt das Trennungszeichen auf
    *-initializations-----------------------------------------------------*
      check not input is initial.
      CPI_IN2 = INPUT.
      CLEAR : cpi_in, cpi_in3, cpi_out, OUTPUT, index, index2, merker,
              cpi_num2, cpi_num3.
      do.
        if cpi_in2+index(1) co '0123456789' and merker ne 'X'.
          cpi_in+index2(1) = cpi_in2+index(1).
          add 1 to index2.
        endif.
        if cpi_in2+index(1) = ':'.
          merker = 'X'.
          clear index2.
        endif.
        if cpi_in2+index(1) co '0123456789' and merker = 'X'.
          cpi_in3+index2(1) = cpi_in2+index(1).
          add 1 to index2.
        endif.
        add 1 to index.
        if index = 5.
          exit.
        endif.
      enddo.
      if cpi_in3 is initial.
        cpi_out = cpi_in.
      else.
        cpi_num2     = cpi_in.
        cpi_num3     = cpi_in3.
        cpi_out(2)   = cpi_num2.
        cpi_out+2(2) = cpi_num3.
      endif.
      if cpi_out(2) > 23.
        message e000 raising input_not_valid.
      endif.
      if cpi_out+2(2) > 59.
        message e001 raising input_not_valid.
      endif.
      output   = cpi_out.
    *  output+2(2) = cpi_in+3(2).
    endfunction.
    The problem is when the user inputs an invalid value and presses directly after this F4 the conversion exit will call and I get the short dump DYNPRO_MSG_IN_HELP  when I trigger the error message.
    Is there any way to know that the program is in value-request? Maybe a system field? Can I catch this error?
    Thanks for help.
    Lars

    Hello Lars,
    refering to OSS 84510 SAP does not allow error messages in this environment. However, to find out if you are in a F4- context you can use the kernel function 'DY_GET_DYNPRO_EVENT'
      data: event(3).
      "check if we are in F4 environment
      call 'DY_GET_DYNPRO_EVENT' id 'EVENT' field event.
      if sy-subrc <> 0 or ( event <> 'PAI'
                        and event <> 'INP' )."PAI also POV
        " not F4 help
        message e000 raising input_not_valid.
      else.
        "F4 help -> only S message
        message s000 display like 'E' raising input_not_valid.
      endif.
    Kind regards, miro

  • Custom Conversion Exit for a Custom InfoObject

    Has anyone created a custom conversion exit for an InfoObject?
    I have a requirement to mask the first five digits of the Social Security Number on output only. I created a custom conversion exit ZCONV, for example and added code to the output function module CONVERSION_EXIT_ZCONV_OUTPUT to accomplish the masking. In the CONVERSION_EXIT_ZCONV_INPUT, I just passed INPUT to OUTPUT.
    It works OK for masking the output results but any input variables return an "Invalid Format" error. So I am not able to have a selection screen variable where you enter the SSN number and run the query for it. It tries to convert it to the masked form and then run the query.
    Any pointers. Helpful answers will be promptly rewarded.
    Thanks
    Vineet

    Since the ultimate goal was not to display Social Security Numbers, I changed the custom Conversion exit to display SID values. In case anyone needs to do the same, The output function module CONVERSION_EXIT_ZCONV_OUTPUT  is coded to read the SID value for the SSN number from the SID table of the InfoObject and the input function module CONVERSION_EXIT_ZCONV_INPUT does the reverse by reading the SSN number for the SID.
    Dropdowns on variable values work OK by displaying the SID value and the employee name. The only drawback is that you cannot input a SSN number on the selection variable. You have to do the dropdown and select.
    Thanks
    Vineet

  • Data collection: Conversion exit and Input Conversion of Local Currency

    Hi,
    I'm collecting transaction data from BI where the local currency for one company has no decimal places.
    Therefore if I collect the data with no conversion, the value is multiplied by 100 in BCS .
    has anyone used the Conversion Exit or Input Conversion options?
    - any feedback, tips or useful documentation/links you can point me to?
    All help much appreciated.
    TheScotsman

    Hi TheScotsman,
    I'm almost sure that the reason of this behaviour but the special treatment of some specific currencies (see the OSS note 153707). Just check if you have the currency in the TCURX table.
    If yes, then please go through the links:
    Re: Local Currency COP, KRW values wrong in report
    (I described symptoms)
    Re: Currency conversion cube to report
    (see the document in the link)
    Edited by: Eugene Khusainov on Sep 8, 2008 4:20 PM

  • Assigning Conversion Exit to a Select-Option on Selection Screen.

    Hi,
    Is it possible to assign Conversion Exit (Like ALPHA) to a Select-Option on a Selection Screen. If so can anyone please tell me how is this achieved.
    Thanks & Regards,
    Goutham.
    P.S.: Points will be definitely awarded.

    Hi Anjaneyulu,
    Thanks for the Reply.
    But the problem comes here, when he enters both the ranges as well as single values, using the extension button provided for the select-option.
    One option i found was in the layout of selection screen, to the select-option i assigned the ALPHA as conversion exit. But it says that this will be over-written once program/screen is generated.
    Kindly let me know if any one has a solution for this.
    Thanks & Regards,
    Goutham.

  • Conversion exit missing in BI - Best practice to install missing exits

    Hi,
      We are on BI 7.0 SP10.
      While doing mappings, I found two conversion Exits MATN2 & SCOPE missing from the BI box. Hence SAP was throwing error while trying to activate the 7.0 datasource.
    On more analysis, I found that the function groups are altogether missing.
    What is the best practice to install these missing objects (Func Groups, Func Mods) in the system.
    Our ABAP person suggested to create these objects as "Repair objects" in the system. Is that the right procedure?
    Please advise.
    Thanks
    Vishno

    I have been through the following steps:
    Entered this URL http://help.sap.com/bp/initial/index.htm
    Clicked on 'Cross-industry Packages'
    Clicked on 'CRM'
    Clicked on 'Englilsh'
    Then the following page is displayed:
    http://help.sap.com/bp_crm70/CRM_DE/HTML/index.htm displayed
    But now what?. How do I get the Best practice instructions for a CRM implemenation?.
    Jason

  • Error 'Unit ST is not created in language EN...' at conversion exit

    Hi
    When i try to load a flat file i have this error message :
    Error 'Unit ST is not created in language EN...' at conversion exit CONVERSION_EXIT_CUNIT_INPUT (field SALES_UNIT record 1, value ST)
    My source has unit field. in the field in have sometime PC or ST  --> ST is coming from BW
    But when i load the file it gives the error for ST value.
    In my datasource i have the correct CUNIT conversion routine apply on the unit field
    Thanks for your help
    Cyril

    Yes this value is not maintained in T006 table. that's why i have the problem.
    So how to solve it.
    I have an ETL tools which read my DSO tables and it extract ST so i need to convert it this value exist in BI (internal code of PC)
    Cyril

  • Error 'Unit 1 is not created in language EN...' at conversion exit CONVERSI

    Hi Experts,
    I'm loading Flat File data of 1.5 Lacks record in to Cube. I'm encountering this error in InfoPack monitor.
    Can anyone help to resolve this please.
    Error 'Unit 1 is not created in language EN...' at conversion exit CONVERSION_EXIT_CUNIT_INPUT (field UNIT record 6628, value 1)
    Thanks

    It got resolved by checking the internal in the field selection tab of Datasource.

  • How to make SELECT querry to work for CONVERSION EXIT

    Dear All,
    I want to select some data from from table J_1IEXCTAX , and to limit that retrieval I have WHERE clause for fields VALIDFROM and VALIDTO
    My select querry is like
    SELECT SINGLE RATE ECSRATE
                         FROM J_1IEXCTAX
                         INTO (J_1IEXCTAX-RATE,J_1IEXCTAX-ECSRATE)
                         WHERE J_1ICHID = J_1IMTCHID-J_1ICHID and
                              ( VALIDFROM LE     T_GRREC-BUDAT and                   
                                VALIDTO      GE     T_GRREC-BUDAT ).  
    But the field  VALIDFROM and VALIDTO have data (i.e. dates) in different format
    So my selection doesnt happen..
    these formats can be converted to desired format using  CONVERSION EXITs at their domain level...
    But that increases coding and worsens performance.....
    Could anybody give me some other solution?
    Thanks in advance................
    Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 10:58 AM

    Hi,
    write T_GRREC-BUDAT to gv_date as <specify the format>
    now use gv_date in ur seelct query.
    Regards,
    Nagaraj

Maybe you are looking for