on 03-13-2013 10:05 AM
Hello,
I have a little Problem. I hope my Description is not sooo worse.
In my Table ZPROFESSOR i have a Field called PROFID.
My goal is to create a Primary Key-Number for that field.
So i created a Numberrange (SNRO) and whit Numberintervalls.
And then i combinate them with my Table.
SE11-> TTabellenpflegegenerator->
Umfeld->Modifikation->Zeitpunkte
i used the Event 05 (New Entrys)
And there i embeddet the coding to create a Atonumber for my PROFID Field.
I Used the Funktions:
CALL FUNCTION 'NUMBER_RANGE_ENQUEUE'
CALL FUNCTION 'NUMBER_GET_NEXT'
CALL FUNCTION 'NUMBER_RANGE_DEQUEUE'
If i make a new entry in my Table ZPROFESSOR over SE16 the Number was created.
So until this Step everything was exactly as it used to be.
But now i wanted to create new Data in ZPROFESSOR over my WebDynpro coding.
I wrote soming like:
INSERT ZPROFESSOR from LS_ZPROFESSOR.
A new entry in my Table ZPROFESSOR was created, but without my Key-Field PROFID, the Key-Field is emty!!!
i asume that the Event 05 (defined in my Table ZPROFESSOR) has not been triggert by an WebDynpro coding.
I hope understand my Problem.
Please Help me.
Kind Regards
Tobias K.
ps: plz look at the attachments
Hi Tobias,
Since you are using webdynpro , your coding in the table maintaenece generator wont work. so, while inserting the data throguh webdynpro , use the function module
CALL FUNCTION 'NUMBER_GET_NEXT'
to get the next avilable number from SNRO and then insert it into your custom table..
Regards
Aravindan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Tobias,
Table maintainence events will work when you want to do some action on table so if you want to maintain table entries programatically then you need to call FM 'NUMBER_GET_NEXT' to generate a new number and then update/modify tables entries with this.
Hope this helps.
Regards,
Deepti
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Did you check the below statement in the runtime. Are you sure LS_ZPROFESSOR-PROFID is containing value generated from the function module get_number_next.
INSERT ZPROFESSOR from LS_ZPROFESSOR.
Please post your code.
Best regards,
Arun Krishnamoorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Aravindan was right.
the howl thing with the tabelgenerator was not needet....lol
this code worked fine...
*Daten Speichern
DATA: I_INTNR type ZPROFESSOR-PROFID.
CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
NR_RANGE_NR = '01'
OBJECT = 'ZWD_BBVPRO'
IMPORTING
NUMBER = I_INTNR " Number generated by Range Generator Object
EXCEPTIONS
INTERVAL_NOT_FOUND = 1
NUMBER_RANGE_NOT_INTERN = 2
OBJECT_NOT_FOUND = 3
QUANTITY_IS_0 = 4
QUANTITY_IS_NOT_1 = 5
INTERVAL_OVERFLOW = 6
BUFFER_OVERFLOW = 7
OTHERS = 8.
LS_ZPROFESSOR-PROFID = I_INTNR.
INSERT ZPROFESSOR from LS_ZPROFESSOR.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.