The Way To Use Return Table

Explain the way to use return table option.

The return table is basically another key for each key figure and since you have the possibility to dynamically update a key figure or not, (RETURN CODE), the qty can be updated, but not the value (or vice versa).

If you want to split data for more key figures it is better to do in start routine.

The main difference between start routine and field wise routine is:

You no need to maintain new or more fields in data target in infosource. But if you want to write start routine all the fields should available in infosource as well and you have to map one-to-one in updaterules.

If you loading into cube then time distribution is available,(ex: you are getting month level data want to distribute to week level, you can use time distribution, no need of coding).

For sample codes, plz search in this forum with search term " start routine" you will get a lot.
For simple example you are getting price and quantity from data source and you want calculate Value and you are having separate key figure for Value in your target.

You achive this in 2 ways.
1. Field wise routine.
2. Start Routine.

If you want to write at field level you no need to maintain new keyfigure(value) in infosurce, you can calculate this either by formula or by routine.

But if you want to calculate at start routine, this nes KF(value should available in infosouce), then only it will be available DATA_PACKAGE in start routine. Then only you can assign formula. and also you have to map one-to-one in update rules.

Actually if you are creating a new infosource you can modify accordingly by adding requed fields, but when you are loading from one ODS/CUBE to another ODS/CUBE, data mart scenario, system will generate datasource and infosources. Then it will be a bit difficult.

Get help for your SAP BW problems
SAP BW Forum - Do you have a SAP BW Question?

SAP BW Books
SAP Business Warehouse Certification, Interview Questions and Configuration Reference Books

SAP BW Tips
SAP BW Tips and Business Information Warehouse

Best regards,
SAP Basis, ABAP Programming and Other IMG Stuff
http://www.erpgreat.com

All the site contents are Copyright © www.erpgreat.com and the content authors. All rights reserved.
All product names are trademarks of their respective companies.  The site www.erpgreat.com is in no way affiliated with SAP AG.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
 The content on this site may not be reproduced or redistributed without the express written permission of
www.erpgreat.com or the content authors.