Updating a Primary Key for Header / Detail


I have written an application in JDE E1. Find/Browse for entry point with data selection from the grid. This then will FI to a Header / Detail with the F47011 / F47012 tables. User request is to update the MCU and thus change the EKCO (appropriately) which is part of the primary key for the header and detail records. I have done the SELECT / INSERT / DELETE to update the records but something gets lost in the translation and the forms / records are no longer "working"

What is the best way to do this in an application to keep all recs in sysnc and the forms working?

Thanks much for any help anyone can offer!!!
Hi Laura

Are you able to change the required fields by using the application P47010, using the row exit for either header or detail revisions?

Other than that I'm only guessing, but there may be a problem with your form interconnect, are all the primary key fields in the form's data structure?

Well, it is wild to do that in header / detail form, however how about this:

1) if the user changes the MCU, get the appropriate (E)KCO to a variable
2) in After Record to DB Update simply loop through the just updated records and re-update with the new EKCO (you need to do this for both header and details)

Another question is if you really need it as EKCO is not used apart from filtering the data during running of the batch processor. Actually change of KCOO should be sufficient.
Thanks David. They actually want the EKCO, KCOO and CO all updated on Header and Detail. I will try the after rec to DB update and see what happens.
Also David you say that doing the update in a header detail is "wild". Is there a better way to do it?
Well, considering your requirements, probably not. The whole point is that JDE is designed not to update primary key fields in the forms so if you need to do that, you need to do something a little wild from the JDE point of view :)