Writing Update Rules - The simplest way

Lets discuss on how to write update rules. Writing and modifying the data records is very simple. All we need is simple tricks and tips.

Few basic things before knowing how to write start routines in Update rules.

1. Data_package is the sap table ( runtime ) which holds the source data records. Used in Start routine.
2. COMM_Structure is the sap work area ( runtime ) to hold the source data records each at a time. This is used in Field routines.

Now data_package will be in the form of source structure. If you have a target field which is not in the source structure and we want to update to it there are two options.

1. Do the required coding in field routines. But this may not be ideal. Most of the project coding standard requirement needs to avoid field routines codings as much as possible. There are chances the code review may not be approved.

2. Enhance the DSO ( incase source is dso ) or enhance the infosource with target field requirement. By this way we can handle the update of this field in start routine. This is much more flexible. But do remember incase you do infosource enhancement 8<dsoname> rem to check everything the target field and add you do the generate export datasource on source dso.

 

No comments:

Post a Comment