Skip to Content

Problems with UserExit_move_fields_to_vbap.

Hi all,

Requirement: Displaying tax code, vat registration number on Additional tab of VA01, VA02 and VA03.

step1: I have added zz_mwsk1 on VBAP and zz_stceg, zz_mwsk1 on VBAK.

Step2: I have coded as

FORM USEREXIT_MOVE_FIELD_TO_VBAK.

vbak-zz_stceg = tkomk-stceg.

vbak-zz_mwsk1 = xkomv-mwsk1.

ENDFORM.

FORM USEREXIT_MOVE_FIELD_TO_VBAP.

vbap-zz_mwsk1 = xkomv-mwsk1.

ENDFORM.

Now VBAK fields are working fine, MWSK1 of VBAP is not working for first item in va01 transaction(see in figure: Picture). But MWSK1 of VBAK is working.

When i tried debugging i found that XKMOV-MWSK1 is not assigning to VBAP-zz_MWSK1(Userexit_move_fields_to_vbap) is not called for first item. But it is working for second item.

Please suggest me what is the problem.

Thanks in advance,

Thanks & Regards,

NarsiReddy.

Message was edited by: Matthew Billingham

Message was edited by: Moshe Naveh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Jun 03, 2014 at 09:52 AM

    Hi,

    Why dont you use the PBO module to populate data to the fields?

    Regards

    Sachin

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 03, 2014 at 04:03 PM

    The problem that you face is because the XKOMV data is not available when you enter the first item.

    The system will do the following in sequence:

    - Call to USEREXIT_MOVE_FIELD_TO_VBAP

    - Call to function "PRICING" that fills the XKOMV data.

    As the call to function PRICING happens AFTER the call to the user exit, you do not have the required data available in XKOMV.

    You either have to use a different user exit (for example one of the save user exits) or maybe call function PRICING within the user exit and fill XKOMV yourself in there. This is an unreleased FM though so could cause issues.....

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 03, 2014 at 11:47 AM

    Hi NarsiReddy,

    vbap-zz_mwsk1 = xkomv-mwsk1.

    Write above line of code in userexit_move_field_to_vbkd.

    see if it works or not for all items?

    Regards,

    Siddhesh Satghare.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 04, 2014 at 06:23 AM

    Hi Narsi,

    Pls try using "USEREXIT_SAVE_DOCUMENT_PREPARE", it will certainly solve your problem.

    Hope you must be taking care of X and Y internal tables.

    Thanking You All.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 04, 2014 at 11:33 AM

    Narsi,

    Still if your problem is not solved write implicit enhancement in PBO module of the screen program for VBAP field.

    Dont spend your valuable time on solving Userexit problem when workaround is available.

    Regards,

    Siddhesh Satghare.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.