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.
Showing results for 
Search instead for 
Did you mean: 

Update VBAP custom field

0 Kudos

Hello experts,i added a custom field to the VBAP,named VBAP-ZZCRD,and i put this field in the Tab additional B,the user requrement is as follow:

when i use VA02 to change a sales order ,if this sales order has a bom,header material A and BOM item A1\A2\A3,if i change the BOM header VBAP-ZZCRD,i also need to follow the header VBAP-ZZCRD to update the BOM item VBAP-ZZCRD with the same value automatically.I try to update the XVBAP interal table structure in the userexit_check_vbap\userexit_save_document_prepare\userexit_save_document,but all failed,so please give some help,thanks in advance.


0 Kudos

the SO item BOM header  can update succefully,but the BOM item updated failed

0 Kudos

Hi Damon,

please clearify a bit your requirement: why do you talk about BOM end VBAP?

As second step, what did you try? How your code look?

0 Kudos

Simone,sorry,i make an example,there is a sales order looks like following:

Item  Material

100   A

200  A1

300  A2

400  A3

Material A is a sales order BOM,A1\A2\A3 are BOM item,i add a field ZZCRD to VBAP,if i change Item 100 VBAP-ZZCRD value manually,how can i update item A1\A2\A3 VBAP-ZZCRD with the same Item 100 VBAP-ZZCRD value automatically?

0 Kudos

Ok, now i think i got it.

Your Item 100 is the father item while 200...400 are childs of it, right?

In this case you have the link in field UEPOS of VBAP: for 200...400 it's filled with 100.

You have to work in userexit (save_document_prepare) and apply a bit of logic looping XVBAP table.

0 Kudos

thanks Simone,i have try userexit_check_vbap\userexit_save_document_prepare\userexit_save_document,they all did not work,they only work if i input a value for every item

0 Kudos

What did you exactly try?

How your code looks?