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

SMALL REQUIREMENT

Former Member
0 Likes
1,177

hi, i am in assignment as a fresher, i am sending one requirement can any one can help how to code in a report.

<b>Adigas food house bills their customers on every last working day of the month. Every day's catering to the respective customer is monitored in a log file signed by the concerned authority. This log file data helps the billing dept to raise their invoices on monthly basis to their customers</b>

how to know that month endig date that mean for feb in will end with 28 days and for dec it with 31 days.

how to know that last working day of that month

plz help on this

thanks in advance.

sarath

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,142

Hi,

Try using the FM DATE_CHECK_WORKINGDAY..

You need to pass date and factory calendar id..

Thanks,

Naren

hi, i am in assignment as a fresher, i am sending one requirement can any one can help how to code in a report.

<b>Adigas food house bills their customers on every last working day of the month. Every day's catering to the respective customer is monitored in a log file signed by the concerned authority. This log file data helps the billing dept to raise their invoices on monthly basis to their customers</b>

how to know that month endig date that mean for feb in will end with 28 days and for dec it with 31 days.

how to know that last working day of that month

plz help on this

thanks in advance.

sarath

9 REPLIES 9
Read only

Former Member
0 Likes
1,142

Check the below Function Modules...

HR_IE_DAT

LAST_FACTORYDATE_GET

or else...u need to write code as hard code..

if january...31

february...28/29 (depend on year). and so.on........

Read only

0 Likes
1,142

hi

is there any other chance,

bcz i dnt have experince in this,

any easy coding

Read only

Former Member
0 Likes
1,142

Hi Sharat,

Use any one of this FM's

SG_PS_GET_LAST_DAY_OF_MONTH

RP_LAST_DAY_OF_MONTHS

SLS_MISC_GET_LAST_DAY_OF_MONTH

Just pass '01012006' as import parameter and it will return you 31.01.2006. I hope this is the easiest and best way. Don't rely on hardcoding.

Regards,

Vivek

Read only

0 Likes
1,142

how to get the return date on out put screen?

that mean using write:/day_in or else how?

plz explain detail

thnaks

Read only

0 Likes
1,142

when i am trying by declaring one variable date like sy-darum and

in imporitng it giving run time errors. plz help me

data: date like sy-datum.

CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'

EXPORTING

day_in = 01012006

IMPORTING

LAST_DAY_OF_MONTH = date

  • EXCEPTIONS

  • DAY_IN_NOT_VALID = 1

  • OTHERS = 2

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

write:/ date.

Read only

Former Member
0 Likes
1,142

Hi,

Check this example..

DATA: v_input TYPE sydatum.

DATA: v_output TYPE sydatum.

v_input = sy-datum.

CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'

EXPORTING

day_in = v_input

IMPORTING

last_day_of_month = v_output

EXCEPTIONS

day_in_not_valid = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

WRITE: / v_output.

Thanks,

Naren

Read only

0 Likes
1,142

HI,ITS WORKING, I MA GETTING LAST DAY OF THE CURRENT MONTH

Read only

0 Likes
1,142

HOW TO CHECH WHETEHR IT IS WORKING DAY OR HOLIDAY.

Read only

Former Member
0 Likes
1,143

Hi,

Try using the FM DATE_CHECK_WORKINGDAY..

You need to pass date and factory calendar id..

Thanks,

Naren