Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FI Document leading zero issuse

Former Member
0 Likes
2,050


Hi,

We have modified the ranges for a company code Directly in a the table NRIV, but while doing so we have mistaken ly missed the leading zeros for FROM and TO numbers as a result When we post a Document Using FB01 it saved in the table as without out leading Zeros (eg - BKPF-BELNR), so when we tried to display the document using FB03 it says Document does not exists. Please suggest a solution to revert the document or update the values in all Database tables. I have given a Example below.

In NRIV table we have updated the range as 12345678 instead of 0012345678.

So when posting in FB01 the document numbers are stored as 87654321 instead of 0087654321.

This is causing issues in all standard T-code where we give Doc No as not created.

Please help me ASAP.

Thanks,

Arun


Hi,

We have modified the ranges for a company code Directly in a the table NRIV, but while doing so we have mistaken ly missed the leading zeros for FROM and TO numbers as a result When we post a Document Using FB01 it saved in the table as without out leading Zeros (eg - BKPF-BELNR), so when we tried to display the document using FB03 it says Document does not exists. Please suggest a solution to revert the document or update the values in all Database tables. I have given a Example below.

In NRIV table we have updated the range as 12345678 instead of 0012345678.

So when posting in FB01 the document numbers are stored as 87654321 instead of 0087654321.

This is causing issues in all standard T-code where we give Doc No as not created.

Please help me ASAP.

Thanks,

Arun

7 REPLIES 7
Read only

Former Member
0 Likes
1,771

Try changing the conversion routine attached to belnr, with a condition for the transaction code

Read only

0 Likes
1,771

Hi

We have corrected the changes in number range now the problem is how to reverse or correct the values of the Document posted.

Thanks,

Arun

Read only

Former Member
0 Likes
1,771

Hi

You need to change the range in NRIV table in order to place the leading zero, and then you should correct all posted documents.

To correct the document is not easy because it means:

- Find out all wrong posted documents (i.e all tables with data about those documents, like BKPF, BSEG,.........)

- Delete the wrong record and insert it again but with right number

Max

Read only

0 Likes
1,771


Hi,

We have corrected the NRIV for ranges but for documents there will be lots of tables which will contain the document number and its not advisable to update standard tables right?

Thanks

Read only

0 Likes
1,771

Not advisable at all, instead if possible cancel all the postings.and post the documents again.

Read only

0 Likes
1,771

Yes

of course

but if it need you can do it or you can try

The document number is a key, so you can only to delete the wrong record and insert it again

Some account documents like CO, profit center.... can be regenerated by standard report

Another solution (suggested by kartik sharma) can be to delete and post them again: the archiving is only standard way I know to delete a documen, and I don't know if it's possibile to archive single documents.

Sincerly I don't know which is the easier solution

but if the documents are posted by FB01 probably the table are not so much you believe

Max

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,771

It's not an ABAP question. As correctly pointed out, document number is a key field and there are many ties to that, so the only option would be to reverse the documents via SAP transactions (this depends on the type of the document).

Also since this looks like a major screw-up, you might want to seek help from SAP, maybe they have some magical solution or at least a word of wisdom.

I wouldn't advise trying to fix this by making direct updates in the database, as one might be tempted. You'll break more than you'll fix.