8.2.11

Symptom:

When running the program for copying number range intervals into other company codes, you receive the message
"CoCode XXXX: Copying not possible since intervals already exists".
You can, however, create the number range for the target company code manually.

Cause and prerequisites

The program only copies a document number range if a number range does not exist yet in the target company code for the fiscal year. This is exactly what the documentation for program RFNRIV10 states.

Solution
The functionality of the program has been enhanced for Release 3.0A or 2.2F. As a result, the program copies all number ranges that you could also insert by means of manual maintenance.
Interim correction for 2.2* or 3.0FCS possible:
1) SE38
Program "RFNRIV10" - change text elements
Change numbered texts
Please create the following texts:
100 Interval was copied
110 Interval cannot be copied
200 Target company code
UE1 No Year Result Explanation
No. of blanks: 1 2 24

2) SE38
Program "RFNRIV10" - change source text
report rfnriv10 message-id fc
no standard page heading
line-size 85. <-- DELETE line-size 132. <-- INSERT ... ... tables: bhdgd, nriv, t001. <-- DELETE t001, <-- INSERT t100. <-- INSERT ... ... *------ Schleife über alle Zielbuchungskreise ------------------------- LOOP AT BUK_TAB. <-- Delete all lines SUBOBJECT = BUK_TAB-BUKRS. <-- all the way to the CLEAR NRIV_NACH. <-- end of the program! REFRESH NRIV_NACH. <-- (approx. 95 lines) ... loop at buk_tab. <-- Replace them by the <-- following lines *------ Zielbuchungskreis ausgeben ------------------------------------ at new bukrs. format color col_group intensified off. write: / sy-vline no-gap, (25) text-200 no-gap color col_group intensified, buk_tab-bukrs, 132 sy-vline. endat. *------ Nummernkreisintervalle für Zielbuchungskreis verändern -------- format color col_normal intensified off. loop at nriv_von where subobject = von_buk. clear nriv_nach. refresh nriv_nach. move-corresponding nriv_von to nriv_nach. nriv_nach-subobject = buk_tab-bukrs. clear nriv_nach-nrlevel. nriv_nach-procind = 'I'. append nriv_nach. *------ Nummernkreisintervall in Zielbuchungskreis einfügen ----------- call function 'NUMBER_RANGE_INTERVAL_UPDATE' exporting object = object importing error = error error_occured = xerror warning_occured = xwarning tables error_iv = error_tab interval = nriv_nach exceptions others = 1. if sy-subrc = 1. message id sy-msgid type 'A' number sy-msgno with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. endif. read table nriv_nach index 1. if sy-subrc <> 0.
message a080 with 'RFNRIV10' 'READ NRIV_NACH'.
endif.

*------ Meldung ausgeben, ob Einfügen des Intervalls erfolgreich war --
if xerror = 'X'.
format color col_negative intensified off.
write: / sy-vline no-gap,
2 nriv_nach-nrrangenr,
5 nriv_nach-toyear,
11(30) text-110.
select single * from t100 where sprsl = sy-langu
and arbgb = 'NR'
and msgnr = error-msgnr.
if sy-subrc = 0.
write 43(89) t100-text.
endif.
write: 132 sy-vline.
else.
format color col_normal intensified off.
write: / sy-vline no-gap,
2 nriv_nach-nrrangenr,
5 nriv_nach-toyear,
11(30) text-100,
132 sy-vline.
endif.
endloop.

*------ ULINE am Ende jedes Zielbuchungskreises ausgeben --------------
at end of bukrs.
write: sy-uline.
endat.
endloop.

*------ Nummernkreisänderungen auf der Datenbank sichern --------------
call function 'NUMBER_RANGE_UPDATE_CLOSE'
exporting object = object
exceptions no_changes_made = 1
others = 2.
case sy-subrc.
when 0.
when 1.
when others.
message id sy-msgid type 'A' number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endcase.

*------ Nummernkreisobjekt 'RF_BELEG' entsperren ----------------------
call function 'NUMBER_RANGE_DEQUEUE'
exporting object = object
exceptions others = 1.
if sy-subrc = 1.
message id sy-msgid type 'A' number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.


***********************************************************************
* TOP-OF-PAGE *
***********************************************************************
top-of-page.
format color col_background intensified off.
perform batch-heading(rsbtchh0).
format color col_heading intensified.
skip.
uline.
write: sy-vline no-gap,
(60) text-ue1,
132 sy-vline.
uline.

No comments:

Post a Comment