Material Number Leading Zeros

Scheinoha John Scheinoha.John at basco.com
Tue Apr 6 11:22:16 EDT 2004


Casey,
 
   Another option is to use the write statement using the no-zero
format option.
 
   Example:
 
   Data:  W_NUMBER(10) TYPE N.
 
   MOVE 23 TO W_NUMBER.
  WRITE W_NUMBER NO-ZERO.
 
  I found this in "Introduction to ABAP/4 Programming for SAP page 46.
 
 
 
 
John Scheinoha
Briggs & Stratton Corporation
(414) 256 - 5136
scheinoha.john at basco.com
 
>>> Darrell.Heath at Lyondell.com 04/02/04 07:26AM >>>
Good point Kjetil, much better suggestion.  Shows the mind is going...
 
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of
Kjetil Kilhavn
Sent: Friday, April 02, 2004 7:10 AM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Material Number Leading Zeros
 
To use this you should normally not call the function. Instead, use
write object-key-material_number
      using edit mask '==MATN1'.
 
It is the same with all CONVERSION_EXIT_*_OUTPUT functions. The * is
replaced by the conversion exit name and there should be a similar
*_INPUT
function.
You can also use these as edit mask specifications for fields if you
e.g.
use ALV Grid. Very handy, and it is not difficult to set up your own.
The
only disadvantage is that you have to define functions in SAP's
namespace.
I've created one to get time output/input without seconds. It is of
course
also possible to hard-code edit mask '__:__' everywhere where you only
need
it for output, but when you also need it for input there is no other
solution than a conversion exit as far as I know. Then you can also
have
non-display of non-zero values. In ALV Grid it is for some reason not
possible to have non-display of non-zero time values if you specify an
edit
mask which is not a conversion exit.
--
Kjetil Kilhavn
 
 
 
 
 
                    "Heath, Darrell L."
                    <Darrell.Heath at Lyond        To:
SAP-WUG at MITVMA.MIT.EDU
                    ell.com>                    cc:     (bcc: Kjetil
Kilhavn)
                    Sent by: SAP                Subject:     Re:
Material Number Leading Zeros
                    Workflow
                    <Owner-SAP-WUG at MITVM
                    A.MIT.EDU>
 
 
                    01.04.2004 22:03
                    Please respond to
                    "SAP Workflow Users'
                    Group"
 
 
 
 
 
 
Try function module CONVERSION_EXIT_MATN1_OUTPUT.  It will take into
account any Alpha material numbers as well.  To
CONVERSION_EXIT_MATN1_INPUT can be used to go the other way.
 
Darrell
 
-----Original Message-----
From: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU] On Behalf Of
Sergey Breslavets
Sent: Thursday, April 01, 2004 1:37 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: Material Number Leading Zeros
 
Casey, there are no formatting characters.
syntax is: SHIFT <string> LEFT DELETING LEADING <symbol>.   <string>
is
your material number string, <symbol> is the symbol that you want to
shift out - '0' in your case.
You might want to check SAP Help on SHIFT also..
 
Sergey
 
 
        -----Original Message-----
        From: Smith, Cassaundra
[mailto:Cassaundra.Smith at anheuser-busch.com]
        Sent: Thu 4/1/2004 1:15 PM
        To: SAP-WUG at MITVMA.MIT.EDU
        Cc:
        Subject: Re: Material Number Leading Zeros
 
 
 
        Thanks,
 
        But where can I find a listing of these different formatting
characters/symbols
        that can be used here.
 
        Casey
 
        -----Original Message-----
        From: Sergey Breslavets
[mailto:sergey.breslavets at epstechnology.com]
        Sent: Thursday, April 01, 2004 12:52 PM
        To: SAP-WUG at MITVMA.MIT.EDU
        Subject: Re: Material Number Leading Zeros
 
 
        SHIFT <..> LEFT DELETING LEADING '0'.
 
        take care...
 
                -----Original Message-----
                From: Smith, Cassaundra
[mailto:Cassaundra.Smith at anheuser-busch.com]
                Sent: Thu 4/1/2004 12:43 PM
                To: SAP-WUG at MITVMA.MIT.EDU
                Cc:
                Subject: Material Number Leading Zeros
 
 
 
                Hi
 
                Does anyone know how I can strip the leading zeros off
the material
        number I am
                using in my business object.  I am sending out an
email
within the
        workflow that
                displays the material number and my user doe not wish
to
see the leading
        zeros.
 
                We are on SAP 4.6C.
 
                Casey
 
 
 
 
 
 
 
-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination
of
the
information or copying of this message is prohibited. If you are not
the
addressee, please notify the sender immediately by return e-mail and
delete
this message.
Thank you
 


More information about the SAP-WUG mailing list