cancel
Showing results for 
Search instead for 
Did you mean: 

User-Exit for Sales Order Number

Former Member
0 Kudos

Hello All,

I have defined the Number Range and set it as externally assigned for my customized Sales Order type. We would like to copy the number from the reference document (Quotation). For example, if the Quotation number is 100007 we would like to make the Sales Order Number T100007. I have tested in the copy control in transaction code VTAA but it doesn't seem to work. May I ask is there any other place that I can make this enhancement?

Thanks.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

you have to create two number range for Sales documents: VN01

Q1 for Quotation set up as internal interval

S1...for Sales order set up as external interval

Assign your Quotation type <order type> to number range Q1.

In user exit program MV45AFZZ user exit USEREXIT_NUMBER_RANGE:

*Find what is quotation type, if number range switch has to be trigger(in case you specific order type for this sales order it is not *necessary)

data:lv_auart type auart.

select single auart from vbak into lv_auart where vbeln = vbak-vgbel.

case lv_auart.

when 'XXXX'. "Our quotation type

concatenate 'T' vbak-vgbel into vbak-vbeln.

US_RANGE_INTERN = 'S1'.

when others.

endcase.

Thank you

Jan

Former Member
0 Kudos

Hi,

As far as my understanding it is not possible,

Take help of abaper,

Kapil

Former Member
0 Kudos

Hi

Please find the below program and code with the help of ABAPER

MV45AFZZ

USEREXIT_NUMBER_RANGE

Regards

Damu