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

Similar Messages

  • PRODU Conversion Routine

    Hi Experts,
    We are loading data from APO to BW. However, the Material length in APO is 40 with PRODU conversion routine. In BW, the Material length is 18 with ALPHA conversion routine.
    During data loading, if the value is '000000000000000000000000000000000001' in APO, it will display as '0000000000000000' in BW. Please advise on how to correct this. Thank you.

    HI
    first check in SPRO.. settings configures. 4.3.Specify Output Format of Product Number
    IMG >  Advanced Planning & Optimization>Master Data>Product> Specify Output Format of Product Number.
    For example: 
    Product Number with Leading Zeros:  000000001234 (zeros up to defined length of product number)
    Product Number without Leading Zeros:  1234 (leading zeros removed from product number)
    Following the menu path or transaction code above:
    u2022     Uncheck the u201Cleading zerosu201D box and save the setting.
    thx
    vijju

  • 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 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

  • 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

  • ABAP Conversion Routine

    HI,
    I want to create Conversion Routine andI know Coversion Routine was linked with Domain,
    Domain that I want to create Coversion Routine was used in serveral tables.
    I want to run Coversion Routine at specific table and I doesn't want to change domain name.
    Any ideas.
    Regards, Arnold.

    Thanks for Comments but I have basic knowledge for Converion Routine.
    My question si that Can we run Conversion Routine at Specific Table ?
    For example, we created Conversion Routine "A111" for domain "D111".
    Domain "D111" was used at table ZT001, ZT002, ZT003.
    I want to run Conversion Routine "A111"  at only table ZT001 because table ZT002, ZT003 has
    differenent meaning for domain "D111".
    Any Ideas ?
    Regards, Arnold.

  • WBS element conversion routines

    Hey guys,
    I recently added PS_PSP_PNR to 2LIS_11_VAHDR in order to extract the WBS element from the sales document header. So far so good and everything works fine. In the extractor checker I get the data as expected e.g. 'S-00017.02.09'.
    The problem occurs as soon as the data is transferred to BW. In the transfer structure I see that PS_PSP_PNR har conversion routine ABPSP that converts the WBS from external format CHAR(24) to internal NUMC(8). And this is what is causing me the trouble! In the PSA the WBS from above is converted to '00029788'.
    I tried several different approaches. If the field is mapped directly to 0WBS_ELEMT the value '00029788' is obviously also written to the DSO and further up the data flow.
    I tried coding an ABAP routine in the transfer rules which does not seem to work:
    call function 'CONVERSION_EXIT_ABPSP_OUTPUT'
    exporting
    input = TRAN_STRUCTURE-ps_psp_pnr
    importing
    output = RESULT.
    RETURNCODE = 0.
    ABORT = 0.
    Since the routine above did not help me at all I tested the FM in SE37 and it does not return any values for '00029788'.
    Any clues on this? How to proceed?
    BR
    Stefan.

    Well... Didn't want to wait any further for an answer, so I appended PS_POSID to the extract structure and filled this field in ZXRSAU01. In the exit I used 'CONVERSION_EXIT_ABPSP_OUTPUT' to convert to the correct format.
    BR
    Stefan

  • Routines used in ABAP

    There are 3 routines that have been created using ABAP and they are as follows:
    ABPSP, ABPSN, CUNIT
    I want to know the definitions for the above mentioned routines or know how to go about looking out for the definitions for those routines.
    Please let me know this asap.

    These are conversion routines, you can find the corresponding function modules in SE37
    CONVERSION_EXIT_ABPSP_INPUT
    CONVERSION_EXIT_ABPSP_OUTPUT
    CONVERSION_EXIT_ABPSN_INPUT
    CONVERSION_EXIT_ABPSN_OUTPUT
    CONVERSION_EXIT_CUNIT_INPUT
    CONVERSION_EXIT_CUNIT_OUTPUT
    hope this helps,

  • Conversion Routine... plz help

    Dear Gurus,
    There is a text field in R3 called as SGTXT related to some finance table... some of the records in this field directly start with '#' character and then the details.. Well here is the problem.. I m loading to ODS 0FIAR_O04 and it ends up in error due to the above mentioned problem.. the infoobject which carry the data from SGTXT field is 0POSTXT...
    I decided to go for a conversion routive in transfer rule for this field.. but i dont know how to write routines.. can you plz help me with the steps as well as the code to remove '#' from SGTXT.... Thanks.
    For more help i m attaching the conversion routine with is automatically generated by system... only i hv to add code to remove '#' character... kindly go thru it and suggest me where to add and what to add...
    here it is
    PROGRAM CONVERSION_ROUTINE.
    Type pools used by conversion program
    TYPE-POOLS: RS, RSARC, RSARR, SBIWA, RSSM.
    Declaration of transfer structure (selected fields only)
    TYPES: BEGIN OF TRANSFER_STRUCTURE ,
    InfoObject 0POSTXT: CHAR - 000050
    SGTXT(000050) TYPE C,
    END OF TRANSFER_STRUCTURE .
    Global code used by conversion rules
    $$ begin of global - insert your declaration only below this line -
    TABLES: ...
    DATA: ...
    $$ end of global - insert your declaration only before this line -
    FORM COMPUTE_POSTXT
    Compute value of InfoObject 0POSTXT
    in communication structure /BIC/CS0FI_AR_4
    Technical properties:
    field name = POSTXT
    data element = /BI0/OIPOSTXT
    data type = CHAR
    length = 000060
    decimals = 000000
    ABAP type = C
    ABAP length = 000120
    reference field =
    Parameters:
    --> RECORD_NO Record number
    --> TRAN_STRUCTURE Transfer structure
    <-- RESULT Return value of InfoObject
    <-> G_T_ERRORLOG Error log
    <-- RETURNCODE Return code (to skip one record)
    <-- ABORT Abort code (to skip whole data package)
    FORM COMPUTE_POSTXT
    USING RECORD_NO LIKE SY-TABIX
    TRAN_STRUCTURE TYPE TRANSFER_STRUCTURE
    G_S_MINFO TYPE RSSM_S_MINFO
    CHANGING RESULT TYPE /BI0/OIPOSTXT
    G_T_ERRORLOG TYPE rssm_t_errorlog_int
    RETURNCODE LIKE SY-SUBRC
    ABORT LIKE SY-SUBRC. "set ABORT 0 to cancel datapackage
    $$ begin of routine - insert your code only below this line -
    DATA: l_s_errorlog TYPE rssm_s_errorlog_int.
    RESULT = .
    returncode 0 means skip this record
    RETURNCODE = 0.
    abort 0 means skip whole data package !!!
    ABORT = 0.
    $$ end of routine - insert your code only before this line -
    ENDFORM.
    FORM INVERT_POSTXT
    Inversion of selection criteria for InfoObject 0POSTXT
    This subroutine needs to be implemented only for SAP RemoteCubes
    (for better performance) and for the Report/Report Interface
    (drill through).
    --> I_RT_CHAVL_CS Ranges table for current InfoObject
    --> I_THX_SELECTION_CS Selection criteria for all other InfoObjects
    <-- C_T_SELECTION Selection criteria for fields of
    transfer structure
    <-- E_EXACT Flag: Inversion was exact
    FORM INVERT_POSTXT
    USING I_RT_CHAVL_CS TYPE RSARC_RT_CHAVL
    I_THX_SELECTION_CS TYPE RSARC_THX_SELCS
    CHANGING C_T_SELECTION TYPE SBIWA_T_SELECT
    E_EXACT TYPE RS_BOOL.
    $$ begin of inverse routine - insert your code only below this line-
    DATA:
    L_S_SELECTION LIKE LINE OF C_T_SELECTION.
    An empty selection means all values
    CLEAR C_T_SELECTION.
    L_S_SELECTION-FIELDNM = 'SGTXT'.
    Selection of all values may be not exact
    E_EXACT = RS_C_FALSE.
    $$ end of inverse routine - insert your code only before this line -
    ENDFORM.

    It has been solved.. thanks everyone for inputs.. points awarded to concerened.. thanks.

  • What is meant by matn1 conversion routine in info object

    hi,
    Can i know the exact meaning and usage of matn1 (type of conversion routine) in the infoobject level.
    thanks in advance

    Hi Sankar,
    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.
    Check the info here:
    http://help.sap.com/saphelp_nw04/helpdata/en/2b/e9a20d3347b340946c32331c96a64e/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/07/6de91f463a9b47b1fedb5be18699e7/content.htm
    Hope this helps...

  • Conversion routine to remove leading zeros from nonnumeric values.

    Hi,
    Can anybody tell me any conversion routine while can remove leading zeros from a character value.
    Eg : 
    input : asdfe
            output : 0000asdfe and vice versa
    I tried with Alpha conversion routine but that is useful only with numeric values.
    Please help.
    Regards,
    Deepti Jain.

    Hi,
    See the following program, and the same logic you can apply in Transfer Rules/Transformations. Take ABAPer help.
    REPORT  ZALPHA_INPUT.
    DATA: ZI(18) TYPE C,
          ZO(12) TYPE C.
    DATA: ZS(12) TYPE C,
          ZR(18) TYPE C.
          ZI = '000000099999889925'.
          ZS = '099999889925'.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT         = ZI
       IMPORTING
         OUTPUT        = ZO.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
        EXPORTING
          INPUT         = ZS
       IMPORTING
         OUTPUT        =  ZR  .
    Write:/   ZI.
    Write:/   ZO.
    Write:/   ZS.
    Write:/   ZR.
    Thanks
    Reddy

  • Regarding "TYPES & "CONVERSION ROUTINES"............

    Hi abapers,
    Can we have a code snippet as given below,
    TYPES : NUMB TYPE I VALUE 100.
    DATA : NUM1 TYPE NUMB.
    WRITE : / NUMB, NUM1.
    what will be the output?. Will the value 100 be copied to the field NUM1?
    Next question is regarding "conversion routines". I read that "conversion routines" can be assigned to fields(variables) in abap?. What are "conversion routines"? What are their purpose? Also explain me the purpose of "EDIT MASK"?
    Thanks in advance.
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Jun 27, 2008 1:29 PM

    Hi,
    Conversion Routine..
    I will just give you an example.....
    For us in user interface English language is EN... but for system it is Just 'E'...
    There conversion will happen from user to system and while retrieving from system to user..
    So there are two routines for that.
    CONVERSION_EXIT_ <conversion routine name> _OUTPUT
    CONVERSION_EXIT_ <conversion routine name> _INPUT.
    These coversion routines do the conversion job
    check this link..
    http://help.sap.com/saphelp_erp2004/helpdata/en/33/206bc8012e11d3b495006094192fe3/content.htm
    Hope this would help you..
    Regards
    Narin Nandivada.

  • What are the routines available in abap

    hi all,
    I have found 2 routines so far widely used in abap.
    They are conversion routines in data element and user defined routines in lswm.Can anyone let me know is there any other routines apart from the above 2 routines specified.
    thanxs
    hari

    Some of the conversion routines
    CHAR_HEX_CONVERSION
    CHAR_INT_CONVERSION
    CHAR_NUMC_CONVERSION
    CHAR_PACK_CONVERSION
    CONVERSION_EXIT_PARVW_INPUT
    to know about conversion routines, check this link
    http://help.sap.com/saphelp_47x200/helpdata/en/cf/21ee19446011d189700000e8322d00/content.htm
    Thanks
    Seshu

  • 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

  • Infoobject Conversion Routine Alpha

    Hi All,
    At the time of creating infoobjects under General Tab we have option Conversion Routine : Alpha (by default), can anybody put light on that what is that exactly.
    Thanks and Regards
    Asim.

    Hi,
    See the following program, and the same logic you can apply in Transfer Rules/Transformations. Take ABAPer help.
    REPORT  ZALPHA_INPUT.
    DATA: ZI(18) TYPE C,
          ZO(12) TYPE C.
    DATA: ZS(12) TYPE C,
          ZR(18) TYPE C.
          ZI = '000000099999889925'.
          ZS = '099999889925'.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT         = ZI
       IMPORTING
         OUTPUT        = ZO.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
        EXPORTING
          INPUT         = ZS
       IMPORTING
         OUTPUT        =  ZR  .
    Write:/   ZI.
    Write:/   ZO.
    Write:/   ZS.
    Write:/   ZR.
    Thanks
    Reddy

Maybe you are looking for