cancel
Showing results for 
Search instead for 
Did you mean: 

Insert an entry in Z Table after data load

Former Member
0 Kudos

Hi,

I'm using current date (sy-datum) as selection parameter in a DTP routine. I need to store this date in a Z table so that next data load can refrence this date. I have already created the Z table. Where should I write the code to update the sy-datum date into the Z table. SHould I write the code in DTP itself in the end? or after the process chain completion (run a different ABAP program at end of process chain?). I want to use this date in subsequent loads.

Thanks,

Nancy

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I wrote the following code in end routine:

DATA: wa_value TYPE Z_DB_TABLE.

CLEAR wa_value.

wa_value-mandt = sy-mandt.

wa_value-zdate = sy-datum.

insert into Z_DB_TABLE values wa_value.

I debugged teh routine. The INSERT statement is running fine but still, I'm not able to see my record in Z table. The content button is disabled. What's wrong with my code?

Thanks,

Nancy

Former Member
0 Kudos

Hi Nancy,

Sure it is a Transperant table. If Contents tab doesnt appear, it is not code issue.

Also, write the code as beliow, as wa_value is a work area not int. table,

insert Z_DB_TABLE from wa_value.

Former Member
0 Kudos

hi,

Instead of insert into Z_DB_TABLE values wa_value you can write

Append wa_value to Z_DB_TABLE.

regards,

Arvind.

Former Member
0 Kudos

Hi,

You can write in the DTP Selection - this will give it consistency. Suppose load starts one day and ends next day.

Can you not load this date in the target DSO as 'Load Date'?

Former Member
0 Kudos

Hi.

Write the code in end routine.

Regards.