Ansicht
Dokumentation
MCP20011 - User Exit for Processing Data Records to be Updated
ROGBILLS - Synchronize billing plans ROGBILLS - Synchronize billing plansThis documentation is copyright by SAP AG.
Once data in the planning table has been changed and is to be saved, the user is given the option (once more just before the database update)to evaluate/enhance/change the data records that are to be saved.
Here you need to note that the coding of te user exit is executed in update-task (i.e. in the background).
Tip: If you would like to debug the programmed user exit, set a breakpoint before the call and switch on the update debugging.
This exit is very important when you are working with character-key figures in the info strcuture and these are also used to restrict the cope of the selection in the initial screen. If new data records are created, you need to employ the user exit to enhance the character-key figures.
Interface: (See SE37 for references) Meaning:
IMPORTING
I_RMCP2 - General fields (e.g. planning type...)
I_ACTION - Flag: U(pdate) / I(nsert) / D(elete)
I_PARAM_ID - Parameter - ID to get initial info
(see example)
TABLES
T_DETAILS_OF_ETAB - Contains entries of the E table
(planning hierarchy) belonging to the node
that is updated
(Assignment: SxyzE = T_DETAILS_OF_ETAB !)
T_DATA_RECORDS - Contains the data to be updatede
(Assignment: SxyzE = T_DETAILS_OF_ETAB !)
Example:
*----------------------------------------------------------------------*
* INCLUDE ZXSOPU11
*----------------------------------------------------------------------*
* local data:
DATA: int_s001 LIKE s001 OCCURS 0 WITH HEADER LINE,
int_s001e LIKE s001e OCCURS 0 WITH HEADER LINE.
* ranges of the selection (naming convention is very important!!)
RANGES: sl_0001 FOR s001-KUNAG,
sl_0002 FOR s001-VKORG,
sl_0003 FOR s001-VTWEG,
sl_0004 FOR s001-SPART,
sl_0005 FOR s001-MATNR.
* check the planning type or info structure
CHECK i_rmcp2-sctyp = 'Z_S001'.
* take over the interface - tables
int_s001[] = t_data_records[].
int_s001e[] = t_details_of_etab[].
* get the selection - criteria:
IMPORT sl_0001
sl_0002
sl_0003
sl_0004
sl_0005
FROM MEMORY ID i_param_id.
* do something depending on the action:
CASE i_action.
WHEN 'I'.
WHEN 'U'.
WHEN 'D'.
ENDCASE.
PERFORM Short Reference Fill RESBD Structure from EBP Component Structure
This documentation is copyright by SAP AG.
Length: 3100 Date: 20240427 Time: 030441 sap01-206 ( 37 ms )