Skip to Content
author's profile photo Former Member
Former Member

Vendor Code Datatype

Hi

I have done a module mool where we have to key in a vendor and do some operation.

My requirement is, if i give the vendor code, its name should be printed in the name field.

For ex: vendor code : '0000000025' name should be dispalyed as 'Metropol'.

But when i select the vendor code '0000000025', system is accepting that as '25' only. so iam unable to retrive the record..

Can anyone help me out in this..

Cheers

Christina.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2008 at 04:54 AM

    Hi,

    Please use CONVERSION_EXIT_ALPHA_INPUT function module before getting the data from the data base. it will convert vendor no i.e., 25 to 000000025.

    then you wont get any issues.

    Regards,

    Naveen Veshala

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 04, 2008 at 04:29 AM

    u can check the type declaration of the input field...through which you are inputting the vendor code value...It must be of the same type as the field of the table from which you are picking the value..may be because of datatype mismatch its happening...

    Or declare that input field as a character variable...that may help u out...

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      I did the same thing,. I have declared that a sthe same type of that table.

      Also I tried by declaring as Char datatype also..

      But it is working out fine..

      Is there any other method that you can suggest..

      Cheers

      Christina

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2008 at 05:03 AM

    Hi,

    User vendor code input data declaraction type shound be use 'LIFNR'.

    OR

    Use CONVERSION_EXIT_ALPHA_INPUT function module.

    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

    EXPORTING

    input = input " 00025

    IMPORTING

    output = lv_lifnr. "25

    Reward if useful...

    Thanks,

    Durai.V

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2008 at 05:17 AM

    hi lavanya,

    i think ur trying display name of the vendor based on vendor (vbeln)

    in ur case though it displaying '0000025' , extenal representation is simply 25.

    sometimes it takes care of automatic conversion .( external to internal ie apppends requiered zero to length of field).

    in ur case its not taking automatic conversion

    so u have to convesion exit

    go to se 11 -> vbak -> doulble clck on deta element of vbeln ->domain-> definition tabe

    u find Convers. Routine

    use that.

    Reward if useful.

    Raju Mummidi.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.