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

Regarding Tax Code display.

Former Member
0 Likes
1,573

Hi all,

my requirement is to display the tax code from xkomv on VA01, va02 and Va03 transactions.

So i added a zfield in VBAP and VBAK table. then i added it to screen painter.

i coded in USEREXIT_MOVE_FIELD_TP_VBAP AS

FORM USEREXIT_MOVE_FIELD_TO_VBAP.

vbap-zz_mwsk1 = xkomv-mwsk1.

ENDFORM.

and in USEREXIT_MOVE_FIELD_TP_VBAK as


FORM USEREXIT_MOVE_FIELD_TO_VBAk.

vbak-zz_mwsk1 = xkomv-mwsk1.

ENDFORM.

Now when i enter the materials for the first material it is not showing tax code of VBAP(VBAP-zz_mwsk1), but for 2nd material it is showing tax code?

Can anybody please explain why?

Message was edited by: Matthew Billingham

8 REPLIES 8
Read only

Lakshmipathi
SAP Champion
SAP Champion
0 Likes
1,512

Please dont expect technical assistance from a functional forum by posting in sales forum.  Try to post in right forum to get right direction.  Moved from SAP ERP SD Sales to ABAP Development

G. Lakshmipathi

Read only

0 Likes
1,512

sorry, i though i was in ABAP development.

Read only

0 Likes
1,512


Dear Lakshmipathi,

Can you please alert moderator to delete this post.

I need to delete this post or atleast the screen shots.

Thanks & Regards,

NarsiReddy.

Read only

matt
Active Contributor
0 Likes
1,512

I've done better than that. I've edited your pictures and removed the confidential information.

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,512

I'm confused - is this field item-level or header-level? Also have you tried just debugging it to understand why it might not be working? Please clarify what analysis have been done before posting on SCN.

Read only

0 Likes
1,512

hi jelena perfiljeva,

I have debugged, it is showing value in XKOMV-mwsk1 but is not assigning to VBAP-zz_mwsk1. The problem is Userexit_MOve_field_to_vbap is not working(not executing) for the first item.

My requirement is i need to add field mwsk1 for item level. But i just also tried adding it in header level.

Thanks & regards,

Narsireddy.

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
1,512

It's just a guess but I seriously doubt that user exit USEREXIT_MOVE_FIELD_TO_VBAP is not executed at all for the first material. The problem most likely is that pricing is triggered after that user exit, therefore XKOMV is blank in the first pass. In the second pass it probably has data in it that actually belongs to the first item.

Read only

0 Likes
1,512

hi jelena perfiljeva,

So, do you have any idea to overcome this?

I even tried using

USEREXIT_SAVE_DOCUMENT.

USEREXIT_SAVE_DOCUMENT_PREPARE

But it is not working.

Thanks & regards,

NarsiReddy.