cancel
Showing results for 
Search instead for 
Did you mean: 

Table Display With Days

Former Member
0 Kudos

HiExperts,

when i select month . days between begin of month and end of month should display in table..Is their any FM to get days.Any suggestions..

Regards,

Rajesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Rajesh,

U need the number of days entries between two dates.....Use below FM to get days b/n dates..In the ouput u will get internal table with all dates...

   CALL FUNCTION 'DAY_ATTRIBUTES_GET'
        EXPORTING
          date_from                  = ls_book_bh-begda
          date_to                    = ls_book_bh-endda
          language                   = sy-langu
        TABLES
          day_attributes             = lt_days
        EXCEPTIONS
          factory_calendar_not_found = 1
          holiday_calendar_not_found = 2
          date_has_invalid_format    = 3
          date_inconsistency         = 4
          OTHERS                     = 5.
      IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF sy-subrc = 0.
        LOOP AT lt_days INTO ls_days.

//

Here u have to add records to u  r table and bind to node......

//

Endloop.

Regards,

Venkat.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

with the help of these function modules you will get the last day of the month so that you can display the no of days manually in a table.

LAST_DAY_OF_MONTHS

END_OF_MONTH_DETERMINE_2

JanarthananE
Contributor
0 Kudos