Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

To fill reason code VBAP-ABGRU field while creating return order

Former Member
0 Likes
2,059

Hi,

I have a requirement to fill VBAP-ABGRU while creating return order. I am trying to create return order using 'Create with reference'.

In program 'MV45AFZZ' form 'userexit_move_field_to_vbap' filled CVBAP-ABGRU but of no use. Also created a copy routine and filled VBAP-ABGRU.

Above 2 cases did not work.

Can any one help me on this.

Thanks in advance.

Seshagiri

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,302

Hello Seshagiri,

This is what I did, let me know if u r doing it differently.

I have put in code VBAP-ABGRU = '03' (03 - Too expensive as per my system), in the code FORM USEREXIT_MOVE_FIELD_TO_VBAP.

I created an order of type OR.

Using ref. I again did VA01 order type RE and press cretae with ref. I gave the order number previously created. I had set up breakpoint in the FORM routine. This was fired twice

1.FV45PFAP_VBAP_FUELLEN

2.FV45PFAP_VBAP_FUELLEN_TEIL_2

Then I checked the item details and sales data and reason code was changed to 03.

Let me know if u r doing it differnetly. also u can check if can check using debug and setting watch point where it gets cleared will give more inputs for resolving .

4 REPLIES 4
Read only

Former Member
0 Likes
1,302

Hello Seshagiri,

Does it enter the user exit? If yes why CVBAP and not VBAP-ABGRU.

Read only

0 Likes
1,302

Hi,

Yes it enter the user exit and replacing VBAP-ABGRU.

But, some how reason code is not entered in the transaction.

Seshagiri

Read only

vinod_gunaware2
Active Contributor
0 Likes
1,302

Hi

USe <b>RV60AFZA</b>

<b>FORM USEREXIT_XVBAPF_KEY </b> fill new fields in summary flow key VBAPF following workareas are available:

- XKOMFKGN

- VBAK

- VBKD

- VBAP

<b>

USEREXIT_XVBAPF_KEY_CANC.</b>

following workareas are available:

- *VBRK

- *VBRP

regards

vinod

Read only

Former Member
0 Likes
1,303

Hello Seshagiri,

This is what I did, let me know if u r doing it differently.

I have put in code VBAP-ABGRU = '03' (03 - Too expensive as per my system), in the code FORM USEREXIT_MOVE_FIELD_TO_VBAP.

I created an order of type OR.

Using ref. I again did VA01 order type RE and press cretae with ref. I gave the order number previously created. I had set up breakpoint in the FORM routine. This was fired twice

1.FV45PFAP_VBAP_FUELLEN

2.FV45PFAP_VBAP_FUELLEN_TEIL_2

Then I checked the item details and sales data and reason code was changed to 03.

Let me know if u r doing it differnetly. also u can check if can check using debug and setting watch point where it gets cleared will give more inputs for resolving .