Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member181923
Active Participant
0 Kudos

Transaction IW2n (i.e. IW21-23) can be configured with a custom extra tab and multiple subscreens can be placed on this custom tab. 

The exits to bring data to and from these subscreens are in the XQQM function group.

SAP drives the update of QMEL and related tables from various global structures that can be modified by the code in the XQQM subscreen exits. (not the subscreen PBO's and PAI's - the ZXQQMU07 and ZXQQMU08 includes.)

For example, the global structure to update the QMEL table is defined off the SAP-delivered view VIQMEL, and this view includes all of the columns in QMEL.

Since SAP drives its QMEL update off VIQMEL, and since VIQMEL will include any custom QMEL columns added in an append structure to the QMEL table, SAP will automatically update QMEL correctly with any custom data on the custom subscreens, so long as the custom data from the subscreens is moved into the global structure variables i_viqmel and e_viqmel.  (I don't think both are necessary - it's probably one or the other, but I haven't bothered to read the code to figure out which.)

So in effect, the exits in XQQM will allow you to do a custom update of an QMEL append structure directly in the IW2n transaction.

Call this Alternative I.

Alternative II is to implement the SAP-provided BAdI NOTIF_EVENT_SAVE, which is specifically provided to change notification data during any save.

Under this alternative, the custom data developed in the XQQM subscreens are exported to memory (shared buffer), and then imported by the BAdI, which then updates the custom append structure in QMEL.

So the following general and particular questions arise:

1) General: Which is "better" - Alternative I or Alternative II? (Please feel free to cite whatever reasons you like here, but to avoid repetition, please see the "particular" questions (2) and (3) below before answering this question.)

2) Particular: Since Alternative I is dependent on SAP keeping the IW2n mechanics what they are today, is it "safer" to use Alternative II (the BAdI approach) because SAP guarantees that it will keep this BAdI upward compatible with any changes it makes to transaction IW2n, whereas SAP doesn't guarantee that it will keep customer exit code compatible with changes it makes to IW2n.

3) Particular: Since Alternative II is object-oriented (relies on an ABAP Objects implementation of a standard SAP interface via a custom class), isn't it "better" to use Alternative II on general principles, e.g. the fact that SAP wants its customer base to move toward ABAP Objects wherever and whenever possible?

15 Comments