08-16-2017 3:26 PM
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,
08-16-2017 3:32 PM
Use a number range object, it's the standard way to do numbered keys.
08-16-2017 3:32 PM
Use a number range object, it's the standard way to do numbered keys.
08-16-2017 3:55 PM
Hi Mike,
Thanks for your comment.
Can you give one one example, really i am not getting.
Thanks,
08-16-2017 5:13 PM
Here ya go, plenty of examples:
https://www.google.co.uk/search?q=sap%20number%20range%20object
08-16-2017 4:24 PM
08-16-2017 7:54 PM
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.
08-16-2017 9:51 PM
So you have a system telling 124 and the backend ignoring it and putting 215.
Data consistency?
08-17-2017 8:38 AM
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.
08-16-2017 8:29 PM
is the Z table available in target system?what message u are getting in dump..did u activate external debugging.