|
Need to copy SOURCE_PACKAGE
in start routine to another inner table and increase the inner table's
volume.
But when I write the code like this "DATA ITAB4 TYPE _ty_t_SC_1." (Also Source_package is TYPE _ty_t_SC_1.) The system reports an error as: E:Type "_TY_T_SC_1" is unknown How to correct it? Can provide some sample codes like to copy Source_package to an inner table, increase some customized-fields in this inner table and then copy the inner table back to Source_package? Scenario 1: When you are modifying only the existing fields in the SOURCE_PACKAGE then you do not need to copy out to another internal table and back again. Just use the code below to loop over the existing SOURCE_PACKAGE and modify the records directly. Do not add or remove records while processing the loop. *--------------------------------------------------------------------*
loop at SOURCE_PACKAGE assigning <wa_sp>. * Example: Ensure 0CALDAY is always populated. if <wa_sp>-calday is initial.
* Example: Assign additional time dimension InfoObjects. <wa_sp>-calyear
= <wa_sp>-calday+0(4).
compute <wa_sp>-calquart1 = trunc( ( <wa_sp>-calmonth2 - 1 ) / 3 ) + 1. <wa_sp>-calquarter+0(4)
= <wa_sp>-calyear.
endloop. *--------------------------------------------------------------------* Scenario 2: Should you need to add new fields to the SOURCE_PACKAGE internal table then change the ETL to utilise an InfoSource. Add the new InfoObjects to the InfoSource. Use the code provided in solution 1 to fill in each new field as the loop processes each record. The above example code assumes that only the 0CALDAY InfoObject is available from the DataProvider and that the InfoSource has been extended with 0CALYEAR, 0CALMONTH, 0CALMONTH2, 0CALQUART1 and 0CALQUARTER. |
|
Get help for your SAP BW problems
Also read
SAP Business Warehouse Books
SAP BW Tips
Main Index
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|