OK – credit where credit is due.
If you’re at ECC 5 and need to put custom data in MSEG, SAP gives you a reasonably slick way to do it.
In the MIGO dialog task, IF_EX_MB_MIGO_BADI and the YMIGO_BADI function group give you a reasonable way to pop a custom tab and save data off to memory (make sure it’s cross-server memory, though !!!)
And in the MIGO update task, MB_DOCUMENT_BADI can be used to import the data you’ve exported and update MSEG in a custom background function more or less synched to SAP’s own writes to MSEG.
Only two improvements I can see a need for are:
1) for SAP to pass GOITEM as a parameter to IF_EX_MB_MIGO_BADI as well as to IF_EX_MB_MIGO_ITEM_BADI;
2) provide an initial “shut-off” switch in IF_EX_MB_MIGO_BADI so that each of its methods don’t have to be turned off individually when the turn-off is conditional on specific customer data configurations.
Oh yeah – and by the way – SAP provides an example implementation of IF_EX_MB_MIGO_BADI that can be directly cloned for your implementation – SAP will take care of all the screen-to-memory and memory-to-screen stuff for you if you just clone the example completely and correctly.
Hmm … you mean someone at SAP agrees with the claim I’ve always made here that an ounce of “active” experiential learning is worth a pound of “passive” tutorial learning ?