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: 

Problem with custom field

Former Member
0 Kudos

I have added a custom field to VBAK table using Append Structure. Then I'm trying to update a value to that field using one of the user exit but it is not updating. If I try to update some other custom field of VBAK which is already there through the same function module, it is updating properly.

It looks like I have to do something else after adding a custom field in order to use it. Append Structure, data element and the VBAK table are all activated properly after adding the field. Please help.

Thanks,

Rakesh.

7 REPLIES 7

Former Member
0 Kudos

all you need is to use the correct user exit and pass the value to VBAK and / or XVBAK. which user exit are you using? and did you debug to see if your code is being called and updating the field correctly?

Former Member
0 Kudos

I'm using 'CALL CUSTOMER-FUNCTION 002'. There are many custom fields in VBAK, if I try to update any of those, they are updating properly. But if I try to upate the custom field which I added to VBAK, it is not updating. When I debug the code, it is assigning to xvbak properly, but is not appearing in the table. Is it because the field I added through apeend structure is locked or do I have to do something else.

0 Kudos

which program., customer function 002 in SAPMV45A doesnt have VBAK as exporting or importing parameter, so how are you changing it there?

use USEREXIT_MOVE_FIELDS_To_VBAK

Former Member
0 Kudos

Thanks for the quick reply. I'm using function exit_saplj4as_002. It is updating other custom fields of VBAK, but it is not updating the field which I added today. When I debug also it is showing that it is being added to xvbak, but not showing in table. The custom field is CHAR of length 10 and I'm adding character of length less than 10 only.

0 Kudos

seems you are using AFS. this exit is not available in standard SAP, so i cant comment on how it would behave.

if it doesnt work the way you want, use move_fields_to_VBAK or save_document_prepare user exits to populate your custom fields

Former Member
0 Kudos

Yes, I'm using AFS and the exit I mentioned is working properly for updating all the custom fields of VBAK. Only the new field is not being updated. Data element, Append structure and VBAK table are all activated. Any ideas are appreciated.

Thanks,

Rakesh.

0 Kudos

no further comments. find someone using AFS and the same exit, or easier might be to debug and see what values are being returned to standard SAPMV45A from AFS