Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

IMPORT and EXPORT

Former Member
0 Kudos

I need to IMPORT the date and time stamp from last run and IMPORT the the date and time stamp from the current run every time a program is executed. I am using the following command. The time stamp is not gettign transferred.

tables: indx.

DATA:last_run(14), cur_run(14).

last_run = '20070123064526'.

IMPORT last_run FROM DATABASE indx(dt) ID 'S_INNAME'.

cur_run = '20070214100123'.

EXPORT cur_run TO DATABASE indx(dt) ID 'S_INNAME'

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

I tried your code..It works fine for me..

TABLES: indx.

DATA:last_run(14), cur_run(14).

last_run = '20070214100123'.

EXPORT last_run TO DATABASE indx(dt) ID 'S_INNAME'.

CLEAR last_run.

IMPORT last_run FROM DATABASE indx(dt) ID 'S_INNAME'.

WRITE: / last_run.

Thanks,

Naren

5 REPLIES 5

Former Member
0 Kudos

Hi!

There is a better option to store the last run of a program - create an own Z-table in SE11, for example: ZPROGRAMRUN.

Insert some fields, like PROGRAMNAME, LAST_RUN, USER.

And in your program you have to write the coding for writing and reading data.

I think this way is much more easier to trace.

Regards

Tamá

hermanoclaro
Participant
0 Kudos

Syed,

Depending on your application purpose, the solution Tamás showed would be a better resolution to your problem. To create a table where you store the programs last run.

Former Member
0 Kudos

Hi,

You have to use the same variable name..For both IMPORT and EXPORT.

tables: indx.

DATA:last_run(14), cur_run(14).

last_run = '20070123064526'.

IMPORT last_run FROM DATABASE indx(dt) ID 'S_INNAME'.

<b>last_run</b> = '20070214100123'.

EXPORT <b>last_run</b> TO DATABASE indx(dt) ID 'S_INNAME'

Thanks,

Naren

0 Kudos

Hi Naren,

I changed the variable to be the same name. Still it does not work.

Former Member
0 Kudos

Hi,

I tried your code..It works fine for me..

TABLES: indx.

DATA:last_run(14), cur_run(14).

last_run = '20070214100123'.

EXPORT last_run TO DATABASE indx(dt) ID 'S_INNAME'.

CLEAR last_run.

IMPORT last_run FROM DATABASE indx(dt) ID 'S_INNAME'.

WRITE: / last_run.

Thanks,

Naren