Skip to Content

Custom Table in creating WBS element (CJ20)

Hello guys,

I'm trying to enhance the wbs element branch data with a custom table displayed as ALV Grid. Now I know that enhancement CNEX0007 is made for CI_PRPS enhancement fields. But in my case I do not have single fields but a Z-Table which I want to fill.

To have some checks before the update of the z-Table I wanted to use BADI WORKBREAKDOWN_UPDATE with method AT_SAVE. Unfortunately the BADI does not get triggered because standard WBS program does not set the value changed flag. So what can I do now to get that BADI triggered for my ALV Z-table changes? I found an enhancement spot directly after setting the value change flag but I would prefer to avoid enhancement spots. Any ideas?

Regards

Michael

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Mar 06 at 07:11 AM

    You can use the SMOD enhancement CNEX0007 to display update the customer z-table, but in your CMOD project you must handle the update task yourself.

    You could use some PERFORM ON COMMIT/ROLLBACK of a form in the Exit function group for this purpose, in the FORM call some z-update FM in update task. You should also consider maintaining a field in CI_PRPS to trigger update when your data was changed in subscreen (e.g. last change timestamp of the z-table).

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 06 at 07:58 AM

    Hello Raymond,

    Yes, I use the CNEX0007 enhancement to display the alv grid. This works fine, but I do not want to save the data in this enhancement, because I think it is to early and canot fetch some errors on standard fields that happen when clicking on save.

    What do you mean with PERFORM ON COMMIT? I never heard of that. I thought in the same way with some z-field in CI_PRPS. I therefor used a flag which I set and unset when changes happen in z-table (I compare db values with values when clicking on save). This works fine, but does not sound like the best workaround for me. But you're right last change timestamp sounds more sinful ;-)

    Regards

    Michael

    Add comment
    10|10000 characters needed characters exceeded

    • The form registered with PERFORM ON COMMIT will only be executed ON COMMIT, so when main program of transaction execute the COMMIT-WORK and you can add your own CALL IN UPDATE TASK in this form. As the form should be defined in the exit function group, you can access to function group global data so internal table of your ALV.

  • Mar 12 at 12:58 PM

    I now found another problem of using the grid in my custom function group.

    When I transfer data from CNEX0007 to my custom function group its always for one wbs element with prps structure only. But when user changes wbs elements in transaction CJ20N, he is able to change several wbs elements by clicking them on the hierarchy at the left without saving after finishing one wbs element. So it can happen that I have to update several wbs elements when clicking on save. Any idea how to handle this?

    Add comment
    10|10000 characters needed characters exceeded