Application Development 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: 

Problems of Modifying XVBAP

Former Member
0 Kudos

Hi all,

To move data from xkomv to vbap table i  have coded as below.

FORM USEREXIT_MOVE_FIELD_TO_VBAK.

loop at xvbap.

read table xkomv with key kschl = 'MWST'

                          kposn = xvbap-posnr.

  xvbap-zz_mwsk1 = xkomv-mwsk1.

modify xvbap.

endloop.

ENDFORM.

Its working fine but my question is, Is there any problems if i modify Xvbap? Or is there any alternaate solution to moce data from xkomv to vbap ?

Thanks in advance,

Thanks & regards,

NarsiReddy.

7 REPLIES 7

Former Member
0 Kudos

Hi,

I don't think, it will be created any problem becasue all SAP SD user exit  value modify only existing internal table which is used internally in the sales order or delivery.

Regards,

Prasenjit

Former Member
0 Kudos

Hello NarsiReddy,

This modify will work without issue, since you are modifying item level, why cant you use USEREXIT_SAVE_DOCUMENT_PREPARE or userexit_move_field_to_vbap.

I am not asking you to change still my suggestion.

Regards,

Vadamalai A

0 Kudos

Hi Vadamalai,

Because those exits are called before data comes to xkomv field and there wont be any data in xkomv and vbap fields.

Will there be any performance issues if i modify XVBAP?

Thanks & regards,

NarsiReddy

0 Kudos

Hello NarsiReddy,

I am sure there wont be performance issue.

Regards,

Vadamalai A

0 Kudos

Hi,

If you need to check performance issue, please put break point and check how many times trigger this user exit in your case  and when value will be updated in the internal table.

put some condition if user exit repeated more time like sy-ucomm  or something.

Regards,

Prasenjit

Former Member
0 Kudos

Narsi Reddy,

USEREXIT_MOVE_FIELD_TO_VBAK is trigger for every screen navigation in sales order create or change.  I think it is right place to code, especially if you have custom screen fields like 'ZZ-' and want to see the changes immediately on the screen,  If you do not care you can as well code that in USEREXIT_SAVE_DOCUMENT_PREPARE which is triggered right before save.

Hope this helps,

Thanks,

-VM.

Former Member
0 Kudos

Hi,

if you are concerned with performance issue. You may better add this.

modify xvbap transporting zz_mwsk1.


Thanks!


Anil Sahni