Skip to Content
-3

Issue while inserting record in to z database table

Aug 16, 2017 at 02:26 PM

112

avatar image
Former Member

Hello Experts,

I have an issue while inserting data in to z database table. one z table using inside function module and that function module type is RFC fm and that table key field is sequence. So in source code logic is there like first we are checking highest entry of sequence field then in loop we are increasing that sequence field count and passing remaining field data to workarea along with count value and then inserting workarea data to z table. So in first loop suppose we increased count as 10 and inserted then second loop count will be 11 but before inserting fm is type RFC so entries will inserting from PI system 11 sequence number, so when here we are inserting again its giving dump.

Anyone can help me on this how to handle this issue.

Thanks,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Mike Pokraka Aug 16, 2017 at 02:32 PM
6

Use a number range object, it's the standard way to do numbered keys.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Mike,

Thanks for your comment.

Can you give one one example, really i am not getting.

Thanks,

0
0
Uwe Fetzer Aug 16, 2017 at 03:24 PM
2

Or use GUIDs if you don't need numeric keys.

Share
10 |10000 characters needed characters left characters exceeded
Jagannatha Pucha Aug 16, 2017 at 06:54 PM
-1

if my understanding is correct, sequence number is determined and sent from PI. if yes, then ignore that and always read the highest number in RFC FM and increment in each loop.

you cannot have the sequence determination at 2 different systems.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

So you have a system telling 124 and the backend ignoring it and putting 215.

Data consistency?

0
Former Member

Hi Jagannatha,

Your understand is correct, but already (sequence number is determined and sent from PI. if yes, then ignore that and always read the highest number in RFC FM and increment in each loop.) this logic is there inside this fm and that fm is a RFC fm. But if you read my post i have clearly mentioned there while second loop time what sequence i am incremented same sequence number already was there in table before inserting my logic and same way i tried in my quality system there i am getting sy-subrc = 4 not dump. Can you help me on this.

Thanks.

0
avatar image
Former Member Aug 16, 2017 at 07:29 PM
0

is the Z table available in target system?what message u are getting in dump..did u activate external debugging.

Share
10 |10000 characters needed characters left characters exceeded