cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Records in End Routine to result_package

Former Member
0 Kudos

Hi !

I am trying to add records in the result_package using end rutine on transformation.

the package comes with 26 records, and I generate 22 new records to insert, but when executing insert 26 and the rest is not inserted.

I read about a button, in the toolbar of transformation, to change the way update, but this button is in the 7.0 version and i'm using 7.3. that button doesn't exist in this version.

this is my code if it helps :

* I get new records here
LOOP AT wt_datapack INTO wa_datapack.
     *  insert here all the records values
ENDLOOP.
   *assign all the information generated to result_package
      RESULT_PACKAGE[] = wt_datapack[].

thanks and greetings to all

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Try this way:


data : wa_SOURCE type _ty_s_SC_1. 
data : wa_RESULT type _ty_s_TG_1.

loop at SOURCE_PACKAGE into wa_SOURCE
*      fill wa_RESULT with wa_SOURCE
       append wa_RESULT to RESULT_PACKAGE. 
endloop. 

loop at ADDITIONAL_SOURCE into wa_ADDITIONAL_SOURCE
*      fill wa_RESULT with wa_ADDITIONAL_SOURCE
       append wa_RESULT to RESULT_PACKAGE. 
endloop. 

Helped?

Regards,

Adam

Former Member
0 Kudos

thanks for answering Adam!

But not working.

When the routine finishes executing the result_package contains all the information to show (i put a break point to see that) including records that I add , but then these are not inserted.

I think it should be a configuration problem. I read that in the version 7.0 was to be set by a flag to allow adding new records in a end routine, but I do not know how to do it in version 7.3, which is the version that I use.

thanks anyway and greetings

Former Member
0 Kudos

Ok... Don't know how to change the setting in 7.3... I looked through notes, but couldn't find any...

But if it is urgent for you, try an Expert routine (test a dummy one to see whether it is working at first). It may require some copy and paste coding if you have complex / big transformation, but it may be faster then solving the issue....

Good luck