cancel
Showing results for 
Search instead for 
Did you mean: 

After saving customer user exit samf02d is not returning the kunnr

former_member188831
Contributor
0 Kudos

I am using user exit SAPMF02D to trigger the event and perform some action after saving the customer master from xd01. It gives all the data from tables like kna1 etc but not giving the customer number in kna1-kunnr field if we have internal customer number generation. How to get it ?

Thanks,

Mahesh

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member513101
Active Contributor
0 Kudos

Hi Mahesh,

Since you are using internal number, you have to use FM - NUMBER_GET_NEXT - to get the next number where

object = DEBITOR

number range = get from T077D

Thanks

former_member188831
Contributor
0 Kudos

Thanks but how i can make sure that is the right number it uses while it commit.

If multiple users creating the customer master will it work fine ? or any jumbling will happen.?

former_member188831
Contributor
0 Kudos

However I tried using NUMBER_GET_NEXT but it is not matching the same number. If customer created with# 0001 it is giving me #0002 ( next number).

I need the same customer# when it got created.

Lakshmipathi
Active Contributor
0 Kudos

When you post a query and give further updates, please add the content under "Comments" and not under "Answer" as you were not answering to a query but only providing additional informations as asked by the members. Also, when you add the text under Comments, it will be intimated to the person to whom you are responding whereas, if you add the text under Answer, the member will not be intimated. By the way, your above answer has been converted as comment by me.

former_member513101
Active Contributor
0 Kudos

Hi Mahesh,

If multiple users is creating customer and you want to get the exact customer number, you need to set no buffer with T-code SNUM

debitor-buffer.png

debitor-no-buffer.png

Thanks

former_member513101
Active Contributor
0 Kudos

Mahesh,

You need to set to no buffer then test with your abaper with the user exit. If this is not working then you may need to ask your abaper to find the enhancement spot to insert the to get the "next number" just after commit.

Thanks