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: 

Storing the Timestamp field in the Table

Former Member
0 Kudos
5,425

Hi

I have a Z program and we need to store the timestamp field in the Z table . I have created the table with the dataelement

TIMESTAMP . Is there any system field that can be used to store the timestamp field from your program

say for example we have declared a work area of the structure of the Z table and Appended through the Internal Table and Modified that Z table.

My intention is store the Timestamp field in the Z table.

Nadesh

1 ACCEPTED SOLUTION

Former Member
0 Kudos
1,338

Yes, it's documented in the ABAP help files. There's a short form and a long form. See the help files for GET TIME STAMP or CONVERT TIME STAMP.

ref the link:

http://www.sapnet.ru/abap_docu/ABENTIME-STAMP-GENERAL.htm

Regards,

Dhina..

Edited by: Dhina DMD on Jun 23, 2011 6:53 AM

9 REPLIES 9

Former Member
0 Kudos
1,338

Hi,

IF you need to capture tiem you can use SY-uzeit.

awin_prabhu
Active Contributor
0 Kudos
1,338

Try GET TIME STAMP option in your program.

Use a small piece of code in your program like below,


TABLES: ztable    " Database table
DATA: wa TYPE ztable,     
      dbtab TYPE TABLE OF ztable.

GET TIME STAMP FIELD wa-timestamp. " Move timestamp value to work area
INSERT dbtab FROM wa.  " Insert an entry into database

Former Member
0 Kudos
1,339

Yes, it's documented in the ABAP help files. There's a short form and a long form. See the help files for GET TIME STAMP or CONVERT TIME STAMP.

ref the link:

http://www.sapnet.ru/abap_docu/ABENTIME-STAMP-GENERAL.htm

Regards,

Dhina..

Edited by: Dhina DMD on Jun 23, 2011 6:53 AM

0 Kudos
1,338

hello sir i am new to sap .

i am using smartforms (driver program)

i need to transfer two fields to smartform .

fkimg1 & fkimg1.

i need these two fields in the wa_output (coz wa_output is already being passed to that smartfom.)

(like wa_output-fkimg1 & wa_output-fkimg2.)

so can you please suggest me how to add these two fields in my report so that they are transferred to smartform

i need to add that two fields in the below structure , so that both the values will be passed to smartform via wa_output.

so please tell me how to include the both fields.


types : begin of st_output.
        include structure ztaxinvoice.
types : end of st_output.


data: it_output type standard table of st_output,
        wa_output type st_output.


thanks in advance.

0 Kudos
1,338

Hi,

you can add as below..

types : begin of st_output.
                         include structure ztaxinvoice.
                         FKIMG1 TYPE VBRP-FKIMG,
                         FKIMG2 TYPE VBRP-FKIMG,
                         types : end of st_output.

or you can add this field to your structure 'ztaxinvoice' as below

 'FKIMG1 TYPE FKIMG' 
                                   'FKIMG2 TYPE FKIMG'

.

Then you can declare internal table and work area as mentioned below..

 data: it_output type standard table of ztaxinvoice,
                        wa_output type ztaxinvoice.

here in this case no need of types declaration also you can pass the same type (wa_output type ztaxinvoice) in smartform.

hope this will help you,

Regards,

Renuka S.

0 Kudos
1,338

Is the Topic deviated

Nadesh

0 Kudos
1,338

Hi Nadesh,

Once your issue is solved mark as answered and close the thread.

Regards,

Dhina..

Former Member
0 Kudos
1,338

Hi,

Please refer following links,

Link: [Get Time Stamp and Insert|http://help.sap.com/abapdocu_70/en/ABAPGET_TIME-STAMP.htm]

Link: [Using TMG|;.

Hope this will helpful.

Regards,

Renuka S.

Former Member
0 Kudos
1,338

Thanks a lot