Some times requirement comes like, we need to create multiple records from single record...

Scenario : We are getting data at month level and want to distribute to week or day level

If we are loading to cube then we can use time distribution option to split the records,
but if we are loading into an ODS time distribution option not available, and also distribution other than time char we need to write code to split the records.

Sample Code: This code is to generate multiple records based on number in keyfigure NONCNFRMTY.

*** Data Declaration
*** Declare one more internal table - Lt_data_package same as data_package.
Data : Lt_data_package like data_package occurs 0 with header line,
l_NONCNFRMTY type data_package-NONCNFRMTY or take reference.

Loop at data_package.l_NONCNFRMTY = data_package-NONCNFRMTY.
Do l_NONCNFRMTY times.
data_package-NONCNFRMTY = 1.
Append data_package to lt_data_package.
enddo.

Endloop.
*** Clear data_package contents using refresh statement
Refresh data_package.
*** Pust contents of lt_data_package contents to data_package
Insert lines of lt_data_package from 1 into data_package.

More info @ https://www.sdn.sap.com/irj/sdn/thread?threadID=610540&tstart=0