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: 

TKOMK-KEY_UC - out of sync with TKOMK

Former Member
0 Kudos

Greetings,

We have expended KOMK through an append using SE11. We added code in the standard user exit and we can see that TKOMK gets our changes in its head line. However, once the user exit is done, the below code is executed in FV45PF0P_PREISFINDUNG_VORBEREI.

DATA: TKOMK LIKE STANDARD TABLE OF KOMK

WITH KEY KEY_UC

INITIAL SIZE 2

WITH HEADER LINE.

READ TABLE tkomk WITH KEY tkomk-key_uc.

IF sy-subrc NE 0.

APPEND tkomk.

tkomk-ix_komk = sy-tabix.

MODIFY tkomk INDEX sy-tabix.

ENDIF.

The issue is that since tkomk-key_uc is not a complete copy of tkomk, it does not see any of our changes (at the end of tkomk). Has anyone run into this? Is there a limit to the size of the key for an internal table? (This is all standard SAP code and I have checked OSS with no note referencing this at all). TKOMK-key_uc ends up as 3080 bytes, but that is about 50+ fields that are not accounted for between the key and TKOMK, so no changes in these 50+ fields will be saved. Thanks.

3 REPLIES 3

former_member156446
Active Contributor
0 Kudos

after appending the structure did u active and adjust the table using Se14. That should be the fix.

Former Member
0 Kudos

the key will only allow so many characters, we had to move our fields up higher in the structure so they would be seen in the key.

imakuzim
Explorer
0 Kudos

This is very old thread but the answer to this is for any custom enhancement to pricing header/item table, you should extend KOMKAZ or KOMPAZ structure and not KOMK, KOMP or KOMG.

For some requirement it might work directly extending KOMK, KOMP or KOMG but some problem could arise like what the thread starter originally had.

SAP standard program will refer to KOMKAZ,KOMPAZ if it wants to check customer enhanced field changes, not in KOMK/KOMP direct custom append structures.