22.5.10

Note 10118 - Number ranges for non-existent controlling areas

Symptom
If you call up the "Overview" function in number range maintenance for CO documents, number range intervals are displayed for controlling areas that do not exist in the respective client.
As these intervals can no longer be deleted, they obstruct the number range maintenance for other controlling areas.

Cause and prerequisites
The reasons are superfluous table entries in the tables TKA04, NRIV or TNRGT caused by transports or deletion of controlling areas for which number ranges have already been maintained.

Solution
Install correction program and run it:
-------------------------------------------------------------------------------------------------------------------
Note: Report RKCORR01 is available in the standard system as of release 2.2A
------------------------------------------------------------------------------------------------------------------

REPORT RKCORR01 .

PARAMETERS: DELETE(1) TYPE C DEFAULT ' '.

TABLES: TKA01, NRIV, TNRGT, TKA04.

RANGES: KOKRS FOR TKA01-KOKRS.

KOKRS-SIGN = 'I'.
KOKRS-OPTION = 'EQ'.
SELECT * FROM TKA01.
KOKRS-LOW = TKA01-KOKRS.
APPEND KOKRS.
ENDSELECT.
CHECK SY-SUBRC = 0.

* Nummernkreisintervalle
WRITE: / TEXT-001.
SELECT * FROM NRIV WHERE OBJECT = 'RK_BELEG'
AND NOT ( SUBOBJECT IN KOKRS ).
WRITE: /10 NRIV-SUBOBJECT, NRIV-NRRANGENR,
NRIV-FROMNUMBER, NRIV-TONUMBER, NRIV-NRLEVEL.
CHECK DELETE = 'X'.
DELETE NRIV.
ENDSELECT.
ULINE.
* Nummernkreisgruppen
WRITE: / TEXT-002.
SELECT * FROM TNRGT WHERE LANGU <> '1'
AND OBJECT = 'RK_BELEG'
AND NOT ( SUBOBJECT IN KOKRS ).
WRITE: /10 TNRGT-LANGU, TNRGT-SUBOBJECT, TNRGT-TXT.
CHECK DELETE = 'X'.
DELETE TNRGT.
ENDSELECT.
ULINE.
* Nummernkreiselemente (Vorgänge)
WRITE: / TEXT-003.
SELECT * FROM TKA04 WHERE NOT ( KOKRS IN KOKRS ).
WRITE: /10 TKA04-KOKRS, TKA04-ACTIVITY.
CHECK DELETE = 'X'.
DELETE TKA04.
ENDSELECT.
------------------------------------------------------------------------ -------------------------
Report title: Correction Program: Debug CO Document Number Ranges
Selection text: Delete NumRnges with errors (X-JA)
Number texts:
001 Number ranges
002 Number range groups
003 Number range elements (Bus.transactions)
004 Number ranges containing errors are not deleted - test run!
------------------------------------------------------------------------------------------------
Technorati : ,
Del.icio.us : ,
Zooomr : ,
Flickr : ,
Technorati :
Del.icio.us :

No comments:

Post a Comment