on 04-20-2012 3:50 PM
Hello Everyone,
I have quick question on SAP EM7.0 EhP 1 New Archiving Objects
SAPTRX_EH and SAPTRX_EVM:
As suggested by SAP, Business Function SCM_HIGHVOL was enabled.
All Config is completed including Customizing Sequence (Event Handler, Event Messages) and also Residence time.
For new archiving
SAPTRX_EH object, we have Preprocessing (/SAPTRX/ARCHIVE_EH_PREPROCESS) before Writing and deleting Event Handlers.
In Preprocess Program (/SAPTRX/ARCHIVE_EH_PREPROCESS), we have following code:
*--------------------------------------------------------------------
* -> check if Sets used
*--------------------------------------------------------------------
SELECT SINGLE eh_guid FROM /saptrx/eh_seteh INTO lv_eh_guid. "#EC WARNOK
*--------------------------------------------------------------------
* -> if sets used exclude EH which belong to sets with subquery
*--------------------------------------------------------------------
IF sy-dbcnt > 0.
SELECT eh_guid FROM /saptrx/eh_hdr INTO TABLE lt_eh_hdr_key
WHERE
ao_system IN so_ao_sy AND
ao_type IN so_ao_tp AND
ao_id IN so_ao_id AND
eh_active = abap_false AND
eh_archived = abap_false AND
active_date IN lt_act_tstmp_range AND
inactive_date IN lt_inact_tstmp_range AND
created_by IN p_crby AND
created_date IN lt_create_tstmp_range AND
updated_by IN p_upby AND
updated_date IN lt_update_tstmp_range AND
eh_guid <> ANY ( SELECT eh_guid FROM /saptrx/eh_seteh ). "#EC CI_NOWHERE
lv_total_of_objects = sy-dbcnt.
IF sy-subrc <> 0.
MESSAGE ID '/SAPTRX/ADM_MSG' TYPE 'I' NUMBER '000'.
EXIT.
ENDIF.
*--------------------------------------------------------------------
* -> if no sets used: select without subquery for better performance
*--------------------------------------------------------------------
ELSE.
SELECT eh_guid FROM /saptrx/eh_hdr INTO TABLE lt_eh_hdr_key
WHERE
ao_system IN so_ao_sy AND
ao_type IN so_ao_tp AND
ao_id IN so_ao_id AND
eh_active = abap_false AND
eh_archived = abap_false AND
active_date IN lt_act_tstmp_range AND
inactive_date IN lt_inact_tstmp_range AND
created_by IN p_crby AND
created_date IN lt_create_tstmp_range AND
updated_by IN p_upby AND
updated_date IN lt_update_tstmp_range.
lv_total_of_objects = sy-dbcnt.
IF sy-subrc <> 0.
MESSAGE ID '/SAPTRX/ADM_MSG' TYPE 'I' NUMBER '000'.
EXIT.
ENDIF.
ENDIF.
My Question:
*--------------------------------------------------------------------
* -> if sets used exclude EH which belong to sets with subquery
*--------------------------------------------------------------------
IF sy-dbcnt > 0.
SELECT eh_guid FROM /saptrx/eh_hdr INTO TABLE lt_eh_hdr_key
WHERE
ao_system IN so_ao_sy AND
ao_type IN so_ao_tp AND
ao_id IN so_ao_id AND
eh_active = abap_false AND
eh_archived = abap_false AND
active_date IN lt_act_tstmp_range AND
inactive_date IN lt_inact_tstmp_range AND
created_by IN p_crby AND
created_date IN lt_create_tstmp_range AND
updated_by IN p_upby AND
updated_date IN lt_update_tstmp_range AND
eh_guid <> ANY ( SELECT eh_guid FROM /saptrx/eh_seteh ). "#EC CI_NOWHERE
lv_total_of_objects = sy-dbcnt.
IF sy-subrc <> 0.
MESSAGE ID '/SAPTRX/ADM_MSG' TYPE 'I' NUMBER '000'.
EXIT.
ENDIF.
*--------------------------------------------------------------------
* -> if no sets used: select without subquery for better performance
*--------------------------------------------------------------------
ELSE.
Thank you
Susheel Mamidala
Hello Susheel,
in the standard sets are only archived together i.e. all EH included in the set. Therefore also the Set has an inactive flag. If you just use the new archiving objects without checking this you could run in the situation that one EH of a set is archived and another one not. Depends on your scenario if you can live with that or not. If you would check this it should work when you adapt the new archiving reports (don't forget the EH Sets tables).
Best regards,
Steffen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.