Function module for getting teh last working day of a month.
Hi GURUS,
this is criteria,please help me
if V_T001B- FRYE1 < month entered in selection screen
Then throw the error message
Else
Find the previous period and its last working day from the function module
(i..e Assume entered date as June 2 2009 then
Period 6 -1 = 5.
Pass the month 05 to function module then
Find last working day.
Keep it in a variable (V_LAST_PRD_WRKDAY)
Proceed further.
thanks in advance,
Rajeev
Hi Rajeev,
You can use Function Module LAST_DAY_IN_PERIOD_GET.
Ex:
CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
EXPORTING
i_gjahr = p_gjahr
i_periv = lwa_t009b-periv
i_poper = lwa_t009b-poper
IMPORTING
e_date = s_audat-high.
Regards,
Ravi K
Similar Messages
-
Is there any function module to get the no. of days in a month?
hi all,
if i have the month and year then is there any FM by which i can get the no. of dayz in that month?
regards,
shweta upadhyay.Hi swetha,
i have written my own function module,may be it helps u.
""Local interface:
*" IMPORTING
*" VALUE(DAY_IN) LIKE SY-DATUM
*" EXPORTING
*" VALUE(FIRST_DAY_OF_MONTH) LIKE SY-DATUM
*" VALUE(LAST_DAY_OF_MONTH) LIKE SY-DATUM
*" VALUE(NUMBER_OF_DAYS) TYPE I
*" EXCEPTIONS
*" DAY_IN_NO_DATE
DATA: BEGIN OF DATE,
J(4),
M(2),
T(2),
END OF DATE.
DATA: ZAHL TYPE I.
DATA: DAYS_SUBTRACT TYPE I.
DATA: XDATUM TYPE D.
XDATUM = DAY_IN.
XDATUM+6(2) = '01'.
XDATUM = XDATUM + 35.
XDATUM+6(2) = '01'. XDATUM = XDATUM - 1.
NUMBER_OF_DAYS = XDATUM+6(2).
DATE = DAY_IN.
IF DATE-M LT JANUARY OR DATE-M GT DECEMBER.
raise DAY_IN_NO_DATE.
ENDIF.
IF DATE-J LT LOWDATE.
raise DAY_IN_NO_DATE.
ENDIF.
IF DATE-J EQ HIGHDATE-J AND
DATE-M EQ HIGHDATE-M.
LAST_DAY_OF_MONTH = HIGHDATE.
ELSE.
IF DATE-M EQ DECEMBER.
ZAHL = DATE-J + 1.
UNPACK ZAHL TO DATE-J.
DATE-M = FRIST.
DAYS_SUBTRACT = NUMBER_OF_DAYS - 1.
ELSE.
ZAHL = DATE-M + 1.
UNPACK ZAHL TO DATE-M.
DAYS_SUBTRACT = NUMBER_OF_DAYS - 0.
ENDIF.
First of the subsequent month
DATE-T = FRIST.
LAST_DAY_OF_MONTH = DATE.
FIRST_DAY_OF_MONTH = DATE.
SUBTRACT 1 FROM LAST_DAY_OF_MONTH.
SUBTRACT DAYS_SUBTRACT FROM FIRST_DAY_OF_MONTH.
ENDIF.
ENDFUNCTION.
regards,
nagaraj -
Function module for getting logo downloaded in excel/word
Hi All,
Can you please tell any function module in SAP through which we can download a logo in excel/word pad.
thanks
Gaurav MainiHope this helps: [Display Number of working and non working days on Remuneration Statment.|http://wiki.sdn.sap.com/wiki/display/Snippets/DisplayNumberofworkingandnonworkingdaysonRemunerationStatment.]
else find a FM to calculate the number of working days, in the given period...
if Nov 14 to Dec 15
there are FM's which can give the last working day of the month.. split leave period from Nov14th to last working day and then first working day of next month to dec15th.
Dont ask for date FM's that against rulez of the forum.. -
Any function module for getting fiscal year week numbers
can any one provide me function module for getting fiscal year week numbers ? if no function module please let me know work around.
Thanks!
Lakshmikandhhi,
Use FM <b>'DATE_GET_WEEK'</b>...
parameter D1 LIKE SCAL-DATE.
Data w like scal-week.
CALL FUNCTION <b>'DATE_GET_WEEK'</b>
EXPORTING
date = D1
IMPORTING
WEEK = W
EXCEPTIONS
DATE_INVALID = 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 W+4(2).
Regards,
Santosh -
Function Module for getting address from address number
Hi all,
Is there any function module for getting address from address number. kindly reply.
regards,
siyaHI,
just try this function module:
CALL FUNCTION 'HR_GET_ADDRESS'
EXPORTING
ankey = ankey
anart = anart
molga = '01'
IMPORTING
address_detail = adr_data
EXCEPTIONS
not_found = 1
OTHERS = 2.
HOPE IT WILL HELP YOU
regards
rahul -
Is there any function module for getting distribution list name
Hi all,
Is there any function module for getting distribution list name when there is same description for two distribution list name.
or
help me how to fetch the correct distribution name when there is same description.
In order to send mails.
Tell me ASAP.
thanks
sagar.http://www.sapbrainsonline.com/REFERENCES/FunctionModules/SAP_function_modules_list.html
list of Fms -
Any Function Module For getting Shipment Details
Hi All,
I want to get all details of shipment. i tired , but unable to get any function? I was able to find the creation or change shipment function modules, but not able to find the function module for getting the details for Shipment.
like BAPI_SHIPMENT_CHANGE Change Shipment
BAPI_SHIPMENT_CREATE Create Shipment
similary
Do you have any idea for getting (display)the details of Shipments?
Regards,
Rajuhi,
you can use
VTTP,VTTK
or
RV_SHIPMENT_READ -
Functional module for Getting Material classification data.
Please tell me Functional module for Getting Material classification data like class type , class, characteristics and characteristics values for material.
Dear,
FM:
CLAF_CLASSIFICATION_OF_OBJECTS
Table KLAH Class Header Data
- KSML Characteristics of a Class
Regards,
R.Brahmankar -
How to create a recurrent event on the first or last work day of the month
The lightning calendar allows selection of the first and last day of the month for recurrent events but for business I need to use the first and last WORK day of the month (Monday - Friday) to schedule particular tasks. In the calendar preferences under 'View' I can select the days that make up the work week but this does not transfer to an option in recurrent events. Is there another way to do this or is it just not available?
Hi there,
do know for the UlltimateBootCD4Win? This from CD bootable WinXP-BartPEedition with additional tools gives you the ability to make such things like partitioning, backup or formatting your HDD.
It has many more applications which help you to maintain your system without booting your original OS.
So I think that this CD will solve your partitioning issues.
Heres a link: www.ubcd4win.com/
Just try it and tell me your opinion.
Nice weekend and greetings from the sunny south ;) -
Function Module to get BEGIN and END date of a month?
Hello everybody,
Is there any function module to get BEGIN and END date of a month
GIVEN EITHER THE CURRENT SYSTEM DATE or MONTH?
Regards,
Sanghamitra.A.hi
CALL FUNCTION 'PA03_PERIODDATES_GET'
EXPORTING
f_abkrs = p_abkrs1
IMPORTING
f_permo = wf_permo
f_current_begda = wf_begda
f_current_endda = wf_endda
CHANGING
f_current_period = wf_pabrp
f_current_year = wf_pabrj
EXCEPTIONS
pcr_does_not_exist = 1
abkrs_does_not_exist = 2
period_does_not_exist = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
this is the function module to get the first date and last date of a particular month
if u have any doubts ask
regads
karthik
reward points if useful -
Function module for getting Vendor Address details
Hi,
Im new to this group,and new to ABAP
plz hep me out by solving ABAP Query...
i want to generate a report for getting Vendor Details
like Vendor address,Ph num and Email
input fields are Company code,country key and Account Group.
im Using Smart Forms for this..
but im not getting the Exact Function module to get All Required Details..
regards
Smithathanks for ur quick reply...
SELECT SINGLE LIFNR
FROM LFB1
INTO V_LIFNR
WHERE BUKRS EQ V_BUKRS.
CALL FUNCTION 'VENDOR_READ'
EXPORTING
i_bukrs = V_BUKRS
i_lifnr = V_LIFNR
EXCEPTIONS
NOT_FOUND = 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.
this is the code i have written...
but my problem is there no table in the Function module....
for Example...
CALL FUNCTION 'QPAX_PLMKB_READ_FROM_PLKO'
EXPORTING
i_plnty = 'Q'
i_plnnr = V_PLNNR
I_PLNAL = V_PLNAL
i_sttag = V_DATUV
TABLES
T_PLMKB_TAB = IT_TAB
i want the function modules with tables and proper input... -
Function module for getting the open qty
HI experts,
I have a PO quantity(EKPO_MENGE).against same PO and item item(EBELN and EBELP) if Goods receipt has happened (MSEG_ERFMG) then i need to calculate the open qty.and also by netting the open quantity if multiple GRs has done against the same PO and item.
Can you suggest any function module to get this open PO quantity.Hello,
Hope this link can help you.
[Po Open Quantity;
Thanks
Jayant -
Function module for getting the all PO waiting for release
Hi,
Is there any standard Function module for gettting all the PO's which all waiting for release.
Regards
Bala.hi Bala,
ECC 6.0 Exits for VA01
go through the above link i think that will help u...
Regards,
sindhu. -
Function module for getting starting day of a week form current data
Hi ,
Is there any function module that gives starting day of week when we give a particular date
eg: today date is 19-12-2007
if i give this date as input i should get 16-12-2007 because this is starting day of this week .Hi,
Use FM GET_WEEK_INFO_BASED_ON_DATE
You will get the first day of the week in export parameter MONDAY
Lokesh -
Function Module for getting the desired date
Hi All,
I need a function module where in get the date value from Current date - 540 days.
i,e System Date - 540 days = ????
Thanks
Sureshprevious FM works good , this is for ur info , to give in month, date and year instead of onlly days
CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
EXPORTING
date = sy-datum
months = '00'
days = '07'
years = '00'
signum = '-'
IMPORTING
calc_date = w_due_date.
Message was edited by: chandrasekhar jagarlamudi
Message was edited by: chandrasekhar jagarlamudi
Maybe you are looking for
-
How to Create Service Interface from WSDL file
Dear Experts, Required your help in below scenario resolution. I have a WSDL file , from that WSDL file can I create a service interface. If yes than what are the steps for creating the same. Thanks & Regards, Rathan.
-
I've never used Coldfusion and I'm not a web devleoper, I'm a server admin but I've been tasked with figuring out our problem. I've been searching all morning and I can't seem to find anything so I thougt I would post up. Here's what we have. A windo
-
File check in broken in SPD 13
Still works on a little (32bit) netbook with W7, but not on my gallumpin' 64 bit W7 Enterprise work desktop. I can check out okay but can only check in via browser or content/structure. It's a real pain.
-
How do I download images from a camera into Photoshop Elements 7?
Previously I've downloaded digital images directly from my camera into Photoshop Elements 7.0 In trying to do that today, I go to "File", choose "Get pictures from Camera", then see a "source" box, with an instruction to "Get Pictures from:" and of
-
Hello, I'm looking for a good solution to serve versions of demo reel videos as Flash and Quicktime? Does anyone know good methods to common approachs to do this? I'm looking for a way in particular to have an FLV fall back into a Quicktime movie if