Quantcast
Channel: SCN: Message List - ABAP Development
Viewing all articles
Browse latest Browse all 10425

Re: load system date into an internal table ?

$
0
0

Hi Daniel,

 

Say your internal table name is TABLEA.

Also your internal table contains a date field say DATE1 which is of type SY-DATUM.

 

Then you can use below logic to load the SY-DATUM value to DATE1 field of all records of the internal table TABLEA.

 

Case-1: If your internal table TABLEA is with header line

 

LOOP AT TABLEA.

     TABLEA-DATE1 = SY-DATUM.

     MODIFY TABLEA TRANSPORTING DATE1.

CLEAR TABLEA.

ENDLOOP.

 

Case-2:  if the TABLEA internal table is with out header line, then declare a workarea X_TABLEA of type TABLEA.

 

then use the below logic.

 

LOOP AT TABLEA INTO X_TABLEA.

     X_TABLEA-DATE1 = SY-DATUM.

     MODIFY TABLEA FROM X_TABLEA TRANSPORTING DATE1.

CLEAR X_TABLEA.

ENDLOOP.

 

Hope this will help you.

 

Thanks & Regards,

Venugopal M N


Viewing all articles
Browse latest Browse all 10425

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>