‎2006 Oct 26 11:18 AM
Hi all,
How can we create a unique key of 8 characters long using BUKRS(4), BELNR(10) and GJAHR(4)?
Thanks in advance.
Poorna
‎2006 Oct 26 11:20 AM
you can.. but your requirement is vague..explain clearly.
regards,
Sandeep Josyula
‎2006 Oct 26 11:20 AM
create a table with the 3 fields in key and add a number range.
BUKRS (X)
BELNR (X)
GJAHR (X)
Value
to add the value of Value go to transaction SNRO.
Fred
‎2006 Oct 26 11:32 AM
Hi Fred,
Thanks for replying.
Firstly let me explain my questions properly for all.
I want to create a unique key of 8 charecters long using BUKRS, BELNR and GJAHR in BKPF table.
I'll be using this unique while downloading BKPF data to two different files. I'll be using this 8 characters long unique key as reference in these two files which is sent to legacy system for further processing.
Hope i'm clear with my question.
Fred can you please explain more about SNRO transaction and how i can create number range using these three fields.
Thanks in advance
Poorna
‎2006 Oct 26 11:37 AM
The SNRO transaction will generate a unique value.
You will need to make a link between this value and the 3 fields. To create this link I propose to create a table.
You will need a user-exit / Badi to set the value into the tabel BKPF. In this user-exit, add the code to ask a new value of the range number using function : NUMBER_GET_NEXT.
Create the entry in the Zxxxx table. And replace the value into the BKPF table.
SNRO:
set an object name ZKEY_BKPF for ex.
Press create button (blank page)
Add description
set the data element of the field of BKPF
set the size
After this with function NUMBER_GET_NEXT, SAP will propose you the next free number.
Fred
‎2006 Oct 26 11:26 AM
Can you please brief as why do you need the unique key and how long would you keep the data for because the solution would more or less depend on that.