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

Problem in ALV HEADER

Hi Experts,

I have a problem in Alv Header. In front of material No zeros (Material No :000000000000006151 ) have come. i don't need zeros. i want only single vale 6151.

i am using this logic in Alv Header

IF MATNR-HIGH EQ SPACE.

CONCATENATE 'Material No : ' MATNR-LOW INTO TEXT1.

ELSE.

CONCATENATE 'FROM MATERIAL : ' MATNR-LOW 'TO MATERIAL : ' MATNR-HIGH INTO TEXT1 SEPARATED BY SPACE.

ENDIF.

Plz send me ASAP.

Thanks & Regards.

Sreedhar.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 08:21 PM

    You can use the keyword "SHIFT". But you should probably use a holder variable so you don't mess up your select-option variables.

    For example:

    data: gv_matnr type matnr.

    move: matnr-low to gv_matnr.

    SHIFT gv_matnr LEFT DELETING LEADING '0'.

    You'll need a second variable for MATNR-HIGH, and repeat for that as well. Then go on with your header output using the shortened matnr's.

    Hope this helps,

    Mark Schwendinger

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 09:44 PM

    Best thing to do is use the FM

    CONVERSION_EXIT_ALPHA_OUTPUT

    give the the material number to Parameter INPUT, it'll give you 6151. Hope this helps!

    ~Priya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 20, 2007 at 10:29 PM

    If the problem is in ALV header area

    data: l_matnr(18) type c.

    call function 'CONVERSION_EXIT_ALPHA_INPUT'

    importing

    input = mara-matnr

    exporting

    output = l_matnr.

    condense l_matnr.

    and then use l_matnr variable in your ALV header

    If the problem is in ALV GRID data area itself, use following

    For the field MATNR while creating field catalogue set one variable....NO_ZERO = 'X'.

    e.g.

    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.