Application Development and Automation 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: 
Read only

IMPORT and EXPORT

Former Member
0 Likes
906

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
Read only

Former Member
0 Likes
861

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
Read only

Former Member
0 Likes
859

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á

Read only

hermanoclaro
Participant
0 Likes
859

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.

Read only

Former Member
0 Likes
859

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

Read only

0 Likes
859

Hi Naren,

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

Read only

Former Member
0 Likes
862

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