Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8436

Re: How to derive Calender based on finshed date (not cal day)

$
0
0

Hi Martin,

 

I've to derived cal week from finished date and need to write code in field level routine (update rule).. Please see if below is correct. Syntax is correct but it is giving error when loading data into dso.

 

Please correct if something is wrong here.

 

data: lv_week type SCAL-WEEK.

 

 

  IF COMM_STRUCTURE-FINISHDATE NE '00000000'.

      CALL FUNCTION 'DATE_GET_WEEK'

        EXPORTING

          DATE               = COMM_STRUCTURE-FINISHDATE

       IMPORTING

         WEEK               = lv_week

       EXCEPTIONS

         DATE_INVALID       = 1

         OTHERS             = 2

                .

      IF sy-subrc = 0.

        RESULT = lv_week.

* Implement suitable error handling here

      ENDIF.

      ENDIF.


Viewing all articles
Browse latest Browse all 8436

Trending Articles



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