Skip to Content

Badies/Exits for updating CDHDR in QM

Hello,

I am trying to find the badies/exits that are called, for updating the table CDHDR in QM module, for change document object QPRUEFLOS (TR: QA11, QA12; QA01, QA03) .

I am trying to create a local table that will hold the changes (the ones that will be updated in CDHDR) made for this object, so I will be able to analyse them afterwards without accessing CDHDR (for performance reasons).

Did anyone do this before, or handled it in another way ?

Any suggestion will be helpful!

Thank you,

Adelina

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Mar 23 at 12:51 PM

    You could create an event from change document (Tr. SWEC) as in a Workflow trigger definition, then handle the event in a custom receiver function module to fill your own database table (Tr. SWETYPV)

    You could also look for ALE change pointers as in an IDOC distribution.

    Etc.

    Add comment
    10|10000 characters needed characters exceeded

    • Thank you Raymond for the hint. I will need a little help in defining the event and handling the event.

      In SWEC, the Change Document Object will be 'QPRUEFLOS', but for which Business Obj. Type ?

      And in SWETYPV where should I specify the custom FM, and where can I see where exactly this FM will be called ?

  • Mar 29 at 01:45 PM

    Thank you Raymond!

    I populated my custom table with the following steps:

    1. I copied the Business Object for Inspection Lot in SWO1.

    2. I defined the Change Document QPRUEFLOS in SWEC for the previous defined Business Object and for the corresponding event (QM12 event changed).

    3. I defined the FMs to handle the event in SWETYPV. The FM where I've put the code is the one for Check Function Module. This FM is called after the tables CDHDR and CDPOS are populated, so the last entry from CDHDR should be the one previously created/modified.

    My custom table gets populated correctly for QM12.

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 23 at 03:46 PM

    Hello everyone,

    Did anyone create a custom implementation for INSPECTIONLOT_UPDATE ? Is it called for all qm transactions ?

    Will I be able to access the changes on QM objects with this Badi ?

    Thank you in advance,

    Adelina

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 26 at 06:43 AM

    I strongly advise to not mess around with CDHDR. This is the central place of Change Management in SAP, and it has references to places that you might not know. You will for sure get lots of issues, at the latest when implementing SAP updates/support packages. Deactivating/relocating the recording of changes to a "local" table (and therefore changing the built in recording/traceability of changes) might in addition cause you losing a certification of your system (if you have one, e.g. by KPMG). This might be relevant if you are dealing with sensitive products/data.

    If I understand you correct, you want to do this due to performance reasons during analysis. In this case my recommendation is to take a look at a data warehouse system, which copies your change data and provides it in a way that is best for data analysis.

    Regards
    MH

    Add comment
    10|10000 characters needed characters exceeded

    • Weel, if I would be your IT department, I would rather work with you on optimizing the performance of your database accesses (how did you try it so far?) than allowing you to create shadow tables that replicate existing data...