Leading zeros for FM F4_GET_RESULT - wildcard problem

Hi,
I have the following problem:
FM F4_GET_RESULT supports the search help in a BSP application.
It works fine when there is no wildcards used. However when there is a wildcard it doesn't work.
For example in case of cost centers, we use search help M_KOSTN, which based on table CSKS. There is one cost center 0002160221, which is found if I use form '000216*', however not found if I use without leading zeros.
Actually it's the same if I use SE16 on table CSKS.
I cannot really use ALPHA conversion here as I don't know how many leading zeros I have to add.
Any idea how to solve this issue?
Thanks in advance,
Peter

Hi peter,
To remove leading zeros and leading blanks
Please use FM
CONVERSION_EXIT_ALPHA_INPUT Conversion exit ALPHA, external->internal
CONVERSION_EXIT_ALPHA_OUTPUT Conversion exit ALPHA, internal->external
These function modules convert the value of an external represntation of a field into an internal format or vice versa.(Meaning for some fields like MATNR, then value which you see is not the way it is stored in the database. The value that you see is the external format, and the value which is stored inside the database id the internal format. These function modules convert the values of such fields from internal to external and vice versa.
CONVERSION_EXIT_ALPHA_INPUT This function module is used to append leading zeroes...
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
            EXPORTING
              input  = wf_version
            IMPORTING
              output = wf_version.
Example:
input = 123
output = 0000000000000...000000000000123
Hope this resolves your query.
Reward all the helpful answers.
Regards

Similar Messages

  • Remove Leading zeros for Material in Transformation

    Hi Experts,
    I'm using DTP first time. I don't have much exp on DTP & Transformations.
    I'm creating infocube with some objects. I want to remove leading zeros for zmaterial.
    In 3.x writen update routines as fallows:
    data: zmat(18) type c.
    zmat = COMM_STRUCTURE-/BIC/ZMAT.
    shift zmat left deleting leading '0'.
    result value of the routine
      RESULT = zmat.
    I'm confusing in Transfermation where to write this routines.
    I'm writing in Transformation as fallows:
    data: zmat(18) type c.
    zmat = SOURCE_FIELDS-/BIC/ZMAT.
    shift zmat left deleting leading '0'.
    RESULT = zmat.
    But it's getting remove zero's.
    Anybody suggest on this.
    Siri

    Dear Sir,
    No confusion at all.
    Just double click on the Target Infoobjct i,e Material object in Transformation, you will see a wizard popping up.
    There you will see a option called "RULE TYPE" and the default value will be "Direct Assignment". In the same check box click on the drop down icon and select "Routine".
    The moment you select the routine option, it will open up ABAP workspace where in you can write your routine and get the desired result.
    Hope it helps.

  • How can i avoid leading zeros for a field in smartform?

    how can i avoid leading zeros for a field in smartform?

    Hi,
    Using the Symbols.
    &symbol(Z)&  Omit Leading Zeros  &symbol(S)&  Omit Leading Sign 
    &symbol(<)&  Display Leading Sign to the Left 
    &symbol(>)&  Display Leading Sign to the Right 
    &symbol(C)&  Compress Spaces 
    &symbol(.N)&  Display upto N decimal places 
    &symbol(T)&  Omit thousands separator 
    &symbol(R)&  Right justified 
    &symbol(I)&  Suppress output of the initial value 
    Regards,
    Shiva Kumar

  • Leading Zeros for Decimal values

    Hi,
    In my requirement i need to add leading zeros for Decimal values.
    For Example.
    If the value is = 0.00 then my Target value should be = 000000000000.00
    Regards,
    Anil.

    Hi Anil,
    You have to use conversion exit ,
    Kindly go through this link below:
    Re: Conversion exit: numbers in database, two decimals on screen
    Hope it helps
    Regards
    Mansi

  • Leading Zeros for variable vlaues(Date)

    Hi,
    How to remove leading zeros for variable values.
    For example;
    Comapny Code by Auth: 007.2004(July 2004)
    How to take out the first two zeros or first zero.
    Any suggestions would be of great help.
    Regards,
    Suresh

    How is that related to sql develper?
    Did you read the forum title? - SQL Developer (Not for general SQLl/PLSQL questions)

  • How to remove leading zeros for an item number within quickviewer

    how to remove leading zeros for an item number within quickviewer. Pls help

    ask your abap guy to do  it. not portal guys business.

  • Removal of leading zeros for material no. in report

    hi
    my issue is that i have to remove leading zeros for material number when displaying in alv grid.iam getting output.but leading have to truncated automatically.
    eg: 000000000000000102
    the ouput should be 102.
    please do provide solution for this or any function module.thanks in advance.

    Hi Sanjana,
    while populating the internal table use the conversion exit available for MATNR. this will remove the leading zeros.
    oter possible way, declare the internaltable by referring the data element MATNR, i hope if you do this, it will delete the leading zeros automaticallt.
    or if you declare the internal table field as charecter type, use the ALPLA_CONVERSION_EXIT_INPUT ot OUTPUT function module to remove the leading zeros.
    Reward the points if it is helpful..

  • Suppress leading zeros for ALV column

    Hello,
    I have an ALV with a column mapped to a context attribute of type NUMC and would like to suppress the leading zeros being displayed.  My initial solution was to change the attribute to a char/string type and remove the zeros in my code, but then, the sort functionality no longer works correctly.  Any ideas if the ALV can use a 'hidden' field to do the sorting for a certain column... that way, I can display the number as a char/string without the zeros and when the user sorts the column, the ALV will use the hidden NUMC type field.
    Thanx for any directions...

    Hi,
    You can follow the following way which i implemnted for one of my application. Here i am setting this property for the context attrubute. May be this will work. But in ALV there is no separate method for this type of setting.
    **This method is used to display the Leading zeros for the Lot Number in Step-1
      DATA:
        node_do_not_change                  TYPE REF TO if_wd_context_node,
        node_d0130_sapmf05a                 TYPE REF TO if_wd_context_node,
        node_pstap                          TYPE REF TO if_wd_context_node,
        node_info                           TYPE REF TO if_wd_context_node_info,
        ls_fprops                           TYPE wdy_attribute_format_prop.
      node_do_not_change = wd_context->get_child_node( name = wd_this->wdctx_do_not_change ).
      node_d0130_sapmf05a = node_do_not_change->get_child_node( name = wd_this->wdctx_d0130_sapmf05a ).
      node_pstap = node_d0130_sapmf05a->get_child_node( name = wd_this->wdctx_pstap ).
      node_info = node_pstap->get_node_info( ).
      ls_fprops = node_info->get_attribute_format_props( 'VALUE' ).
      ls_fprops-null_as_blank = if_wd_context_node_info=>c_format_null_as_BLANK.
      node_info->set_attribute_format_props(
        name              = 'VALUE'
        format_properties = ls_fprops ).
    Warm Regards,
    Vijay

  • Delete leading zeros for material in mapping.

    Hi,
    How to delete leading zeros for material like 0000000128736 if so I am expecting 128736 only.
    We need to consider if I get  material number is like RPG2389 .
    Thanks,
    Vinay.

    Hi,
    If you will be getting alphanumeric codes, it would be best to use a UDF with a regex-expression.
    UDF Type:
    ContextType
    imports:
    java.util.regex; (if you are using PI 7.1 you must remove the semicolon)
    arguments:
    input1
    Here's the code (courtesy of Sun Developer Network):
            Pattern p = Pattern.compile("[^a-zA-Z]");
            Matcher m = p.matcher(input1[0]);
            StringBuffer sb = new StringBuffer();
            boolean output = m.find();
            while(output) {
                m.appendReplacement(sb, "");
                output = m.find();
            m.appendTail(sb);
    result.addValue(input1[1]);
    Now to solve the leading zeroes, just add formatNumber: 0 after the UDF and it will work.
    Hope this helps,

  • Leading zero for the instance

    hi,
    my numbers looks like 0 or -0,23 or ,45...
    but i want to have a leading zero, e.g. 0,0 or 0,45
    i know that i can use to_char(xxx,'format') in queries,
    but i want to have the leading zero for the whole instance.
    is that possible?
    thx.

    In cas you use SQL*Plus for your queries modify your login file
    SET NUMFORMAT ...http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch3.htm#1005686

  • How to get the leading zeros for decimal values?

    Hi,
      How i wil get the leading zeros for decimal values.For CONVERSION_EXIT_ALPHA_INPUT it is not working.Now iam using overlay condition for getting leading zeros.But iam getting the value like 00013.500.But as per my requirement i want to display this value 0000013.5.
    my code is
                    overlay w_MetLife_detail-rdempsalary with '000000000'
                    data :rdempsalary     type char9
    Please help me on this.
    Regards,
    Sujan

    Hi
    For more info,
    The function of the statement UNPACK is based on the fact, that the BCD display of a decimal place corresponds to the second half-byte of code of a digit in the most character representations. This conversion is commonly called "unpacking".
    The statement PACK to pack is obsolete and can be replaced by MOVE.
    If destination is specified as untyped field symbol or as untyped formal parameter and is not flat and not character-type during execution of the statement, then an untreatable exception occurs in Unicode programs. In non-Unicode programs, an exception occurs only with deep types, whereas flat types are treated as character-type types.
    Example
    After the assignments,char1 and char2 contain the values "123.456" and "0000123456".
    DATA: pack  TYPE p LENGTH 8 DECIMALS 3 VALUE '123.456',
          char1 TYPE c LENGTH 10,
          char2 TYPE c LENGTH 10.
    MOVE   pack TO char1.
    UNPACK pack TO char2.
    Regards

  • Leading zeros for 9AMATNR creating problem

    Hi Experts,
    In the DP Planning book, we are using product (9AMATNR) as one of the characteristics. If I open the shuffler and enter a product number (numeric), the system attaches the leading zeros to make it 40 characters. If I put a product number as alpha numeric, system does not attach the leading zeros.
    After loading the data into the planning book, if I click on 'Details all' in the filter for product, I see the products as 'product number/description' e.g. 00000000000000000000000000000000000012345/ABCDEFGH.
    The issue is, while accomodating the leading zeros here, the description is truncated and we dont see the complete product description.
    Is there a way to over come this? The intent is that the product description should not get truncated.
    Any pointer would be of great help.
    Regards
    Manotosh

    In the IMG
    Goto SAPSCM - Implementation Guide
    -> Advanced Planning and Optimisation
    --> Master Data
    ---> Product
    > Specify Output Format of Product Number
    Ensure that the checkbox "Leading Zeroes" is not ticked

  • Leading zeros for Month and Day in filename.

    Hello,
    I am in Jdev 10.1.3.3.0
    One of my requirement is to have a file name concatenated with current month and day (example: <filename><02><23>).
    Used the xpath as following and returns an output as *'filename223'*:
    concat('filename',xp20:month-from-dateTime(ora:getCurrentDate()),xp20:day-from-dateTime(ora:getCurrentDate()),'.txt')
    what changes I need to make in my Xpath to get the file name as *'filename0223'*
    Thanks in advance!
    Regards,
    Rakesh

    I was googling on the date format used in BPEL to achieve various format types. Specially I was searching for my requirement : <filename><current month with leading zeros if month is single digit><current day with leading zeros if day is single digit>(ie. if the month is february and day is 23rd, then my filename should be *<filename><02><23>*).
    I found a link which helped solving my problem :
    http://plane.javaeye.com/blog/161316
    I changed my Xpath to :
    concat('filename',xp20:format-dateTime(ora:getCurrentDate(),'[M01][D01]'),'.txt')
    And I got my expected result : *'filename0223.txt'*
    Regards,
    Rakesh

  • Leading zero for Product ID deleted when posting confirmation

    Dear All,
    I'm facing a problem when posting confirmation document from SRM to backend for PO item WITHOUT account assignment. When I want to post confirmation document, there is an error message 'Material document data and PO data do not match (Material )'. When I check the Idoc for confirmation, the leading zero in product ID was deleted in Idoc. For Example:
    The product ID is 000000001600000000 (18 character, as defined in Tcode COMCPRFORMAT) when confirmation document created, but the document can't be posted, I can only save the document. And when I check the Idoc, the product ID became 1600000000.
    I've already create a PO and confirmation for the same product using account assignment (Cost Center). And confirmation posted succesfully in backend. FYI, I've already implement note 1568941 in my SRM system.
    Does anyone here ever have the same problem?
    Rgds,
    Aleluya.

    problem solved after implement note 1592750
    Rgds,
    Aleluya sap.

  • How can we put the leading zeros for the extract file.

    hello experts..
           Iam extracting values from one ztable in this for one filed length will be 2, for this field i need leading zero s at the time of extract... please help me....

    Hi,
    Declare the field as NUMC data type, automatically you will get the leading zeroes.
    Regards,
    Subramanian

Maybe you are looking for

  • Adding Spool List recipient

    Hi Team, When setting up a user to receive emailed reports the "Spool List Recipent" is not retaining the email addres It is saved as part of the SM36 set up. But when going back to check in SM37 the error is No Spool List recipient. Could you please

  • How to schedule a Process Chain using ABAP Program?

    Hi All, I want to schedule the activity of extracting data from the query to a flatfile. Currently we are schedulling it using the transaction rscrm_bapi. I need to know , how we can achieve the same using an abap program and not ( rscrm_bapi) in a p

  • Logout button and Page submission problem

    {color:#000080}Hi All, We have logout buttons on every page of our application. The problem is that if the user clicks on any part of the page, even on the group-panel, the logout button gets the focus and a hit on the enter key causes the user to lo

  • Start New clip a scene break

    I am importing HD footage into IMovie HD I have selected start new clip at scene break but all it does is import as one huge file and does not start a new clip at each scene break. I know the importing has to be done at 1/4 speed because of my older

  • Page won't open that's linked but not in the navigation menu

    On my photos page I have set links from each of the photos to another page. As long as I keep the page in my navigation menu it opens. But when I uncheck that option, clicking on the photo opens up a pop up with an original size version of the same p