E9.0 If I change a PK of some Table and it is related 10 objects ...

Kevin Jung

Member
Hi i`m junior developer in JDE

please advise me ^^;;

I will modify a PGM and..
First I will change a PK of extension TABLE and..
This table is related 10 objects are Batch PGM like R59K..., R59....

I heard that If I change a PK, I must modify related object. is it right? from another JDE developer.
I don`t understand it.

I just change a PK like that
col1+col2 --> col1+col2+col3

If is it true.
Why? and How I modify related PGMs?

please advise me please.

thanks
 
Not sure I completely followed you, but if I understand correctly you are changing the PK definition in an existing custom table (if it is NOT a custom table you should stop) to add another column to the PK? What are PGMs? Was this a new column added to the table or was it a column that was already in the table and you just added it to the PK definition?

IF this was a column that was already in the table and you simply added it to the PK definition then:
1. Adding a column to a PK definition that was already in the table is not as potentially impactful as both adding a new column AND adding it to the PK.
2. Adding a column is not as impactful as deleting a column.
3. Adding a column to the end of the key definition is not as impactful as adding it in the middle some place. So that is good in your case.

However, yes you should review ALL code/objects that uses this table, and all objects that use any business views where this table is in the business view. You can use the Cross Reference (Xref) facility for this (be sure and rebuild the Xref) and you should also do a text search in any C BSFNs source, both .c and .h, to see if the table is used in C BSFNs since the Xref will not show you those objects. Also, I guess technically, you should also look at any BSSVs and Orchestrations - lots of things these days that wont show up in an Xref search but Xref and text search of C BSFNs is probably all you will need. Pay very specific attention to any code that adds/updates/deletes records. Pay special attention to any business views and any join clauses defined in those views. Just opening a business view may require you to add the column and save the view if the column was not already in the view before the change. Again, make sure and run an Xref for each view to see what objects use any views that use the table. Also look for any C BSFNs that may have used any business views that use the table. I am probably forgetting something, but that is the core of what you need to look for.

Text searching C BSFN source code tips (find a good text editor for this. notepad++ works pretty well as does UltraEdit)

Search all files in \source\*.c and \include\*.h for:
1. NID_Fxxxxxx
2. Fxxxxxx
3. KEY1_Fxxxxxx (usually the PK is defined as KEY1_Fxxxxxx, but not in every case)
3. For each business view that you find that uses the table AND if the business view has a bvxxxxx.h header file, search for (example view V0006D / bv0006d.h):
3a. "B" + [view object name] Ex: BV0006D
3b. "ID_B" + [view object name] Ex: ID_BV0006D
3d. _J("V0006D")
 
Thank you very much.
My curiosity has been resolved. And thanks for the tip.
Have a nice day!
 
Back
Top