Skip to Content
0
Former Member
Apr 19, 2010 at 03:56 AM

Issue while using user-exit: USEREXIT_MOVE_FIELD_TO_VBAP

1717 Views

Hi,

Scenario:

I am using the above mentioned user exit to to modify the values for few fields associated with the line item, like product hierarchy, profit center, material group 1 and material group 2. This has to be performed whenever the user changes the 'item category' associated with the line item. For this, I call a FM inside this exit and modify the values of the line item.

I am checking the value of 'svbap-tabix' and if the value is '0', I use the VBAP fields and if its > '0', I loop on the XVBAP table and modify the values.

Issue:

Say I created a line item. The exit is called and the values are modified and reflected on the screen. Now when the user tries to change the item category, again this exit is called and this time I check the value of 'svbap-tabix' which is greater than '0' so I loop on XVBAP table and modify the values but this is not being reflected back on the screen. i.e. say after calling the FM the product hierarchy associated with the material is changed, which I am able to see in the XVBAP table, but its not reflected on the screen.

But when I call the exit USEREXIT_SAVE_DOCUMENT_PREPARE, the values are changed and are reflected on the screen.

Kindly suggest what am I missing and also let me know if I am using the correct exit.

Regards

s@k