13.12.10

SAP Note 12869 - Format of main asset number/subnumber in lists

Symptom:

The wish has been expressed that
1. the asset number be displayed not left-justified - with loss
of the number of digits - but right-justified.
2. the asset number should always have a constant length not
equal to 12.
3. the subnumber be right-justified - therefore with leading zeros

Solution
This is not provided in the stansard system because of the general
conversion routine, and because of many other customers who do
not want this functionality.
You can, however, use a standard customer interface in asset
reporting. As of Release 1.1 up to and including 2.1, this is in
the program module DBADACUS; as of Release 2.2 in the enhancement
project BADA0002.
There, the FIRST request can, for example, be implemented as
follows:
Please note that the code is only valid up to and including 2.1.
As of 2.2, you have to replace the field names
o ANLAV-ANLN1 by I_ANLAV-ANLN1 and
o ANLAV-ANLN0 by E_CUSANLN1.
CHECK ANLAV-ANLN1 CO '0123456789'.
IF ANLAV-ANLN1 LT 000000000010.
WRITE ANLAV-ANLN1+11(01) TO ANLAV-ANLN0+11(01).
ELSEIF ANLAV-ANLN1 LT 000000000100.
WRITE ANLAV-ANLN1+10(02) TO ANLAV-ANLN0+10(02).
ELSEIF ANLAV-ANLN1 LT 000000001000.
WRITE ANLAV-ANLN1+09(03) TO ANLAV-ANLN0+09(03).
ELSEIF ANLAV-ANLN1 LT 000000010000.
WRITE ANLAV-ANLN1+08(04) TO ANLAV-ANLN0+08(04).
ELSEIF ANLAV-ANLN1 LT 000000100000.
WRITE ANLAV-ANLN1+07(05) TO ANLAV-ANLN0+07(05).
ELSEIF ANLAV-ANLN1 LT 000001000000.
WRITE ANLAV-ANLN1+06(06) TO ANLAV-ANLN0+06(06).
ELSEIF ANLAV-ANLN1 LT 000010000000.
WRITE ANLAV-ANLN1+05(07) TO ANLAV-ANLN0+05(07).
ELSEIF ANLAV-ANLN1 LT 000010000000.
WRITE ANLAV-ANLN1+04(08) TO ANLAV-ANLN0+04(08).
ELSEIF ANLAV-ANLN1 LT 000100000000.
WRITE ANLAV-ANLN1+03(09) TO ANLAV-ANLN0+03(09).
ELSEIF ANLAV-ANLN1 LT 001000000000.
WRITE ANLAV-ANLN1+02(10) TO ANLAV-ANLN0+02(10).
ELSEIF ANLAV-ANLN1 LT 010000000000.
WRITE ANLAV-ANLN1+01(11) TO ANLAV-ANLN0+01(11).
ELSEIF ANLAV-ANLN1 LT 100000000000.
WRITE ANLAV-ANLN1+00(12) TO ANLAV-ANLN0+00(12).
ENDIF.
The SECOND request can be implemented using the following example
- assuming that the main asset number is always given with x
digits ( y = 12 - x ).
WRITE ANLAV-ANLN1+y(x) TO ANLAV-ANLN0(x).
Example : x = 5
--> WRITE ANLAV-ANLN1+7(5) TO ANLAV-ANLN0(5).
The THIRD request can only be set up using a modification. To do
this, you should extend the output of ANLAV-ANLN2 by the addition
USING NO EDIT MASK for every report.
We are presently checking whether such a development can be
covered by Release 3.0.
Please remember that this note has an exclusively advisory
character and you should contact your SAP support representative,
not our hotline, if you have further questions or problems here.

Key word: Asset number

No comments:

Post a Comment