cancel
Showing results for 
Search instead for 
Did you mean: 

Form and End form in transfomation

srikanthbwbw
Active Participant
0 Kudos

Hi,

Can anyone let me know when sub routines are used in BW transformations. Example would be really useful.

thanks

annie

Accepted Solutions (0)

Answers (3)

Answers (3)

shanthi_bhaskar
Active Contributor
0 Kudos

Hello Srikanth,

Please do search before posting as a New thread.

Thanks,

SB.

Former Member
0 Kudos

Hi Annie.

You have 4 levels of Routine which can be used in BW transformations, and they are Start Routine, End Routine, Expert Routine, and Filed Level Routine.

beofre i explain in detial, the flow goeslike this.

Source------> Start Routine ------> Transformation( Direct, or formula or Field level Routine) --------> End Routine-Target

if you are using Exper Routine, nothing comes into picture the flow wil lbe like..

Source Data --------> Expert Routine ---------> Target.

Start Routine: while u execute DTP or IP, the data will be coming in Packets, say for each set of packket( 50,000 records) u need to modify any incoming recprds data or wtiht the incoming records if u need to make look up or with incoming records if u need make the records gets mutliple, then for all those reason u can use Start Routine.

So in short, if any modification needed from the source package u get go with Start Routine.

This will run only once for one set of packet during transformaiton.

End Routine: This end routine come into picture if u need to modify the final set of records which is going to be stored in your target, this particular set of packets will finalise your output data.

all these records will be stored in Result_package Internal table, by looping, or with whatever abap code u can modify the data, but this modiy data will be in your target.

This will run only once for one set of packet during transformaiton.

Field Routine: This applies, if u need to macke changes only for one field in your transformation, say with all your incoming data of Employee name, if u need to add suffix or prefiex in the field level routine u an use the code or Formula to achive this.

Note: field level Routine applies after start routine and before End routine, and this will run for each time dependign upon the number of records in the packets.

Expert Routine: THis is a complex one, and everyone cant write this, unless and until u have full control over trasnformation, so if you are going by this code, u have to write or manage whcih code or which field hat ot go first and which has to execute first and whole flow decideed by our own code, so i prefer not to g fot htis if you are not god at ABAP and if you are not good at flow control.

Note: As i told, this will execute only once, which means here, no start and end Routine, the compelte flow ends with the code written in Expert Routine.

Regards,

Nanda.S

Former Member
0 Kudos

Hi!

Here you can find link to HowTo about start abd and routine with detail example.

http://scn.sap.com/thread/1803753

Usually you use routine for some field in case of complex logic which is more complex than formula, or then you must read some external source (DSO, for example) to get value.

Start and End routine useful then you have to operate with full data package, not only one record. Start routine operate with source arrived data (for example, from PSA). End routine operate with package with all fields filled with transformation, this is more convenient sometimes.