Is there any function module? Fiscal week no problem
Hi friends,
I want how to get physical week for given date.
Ie for 01-04-2009 week no is 1.
Is there any function module?
Pls suggest
Regards
Moosa
Hi,
Use the below code.
DATA: v_ersda TYPE sy-datum VALUE '20090618'.
DATA: v_month(2) TYPE c,
v_week(2) TYPE c,
v_full_week LIKE scal-week.
MOVE v_ersda+4(2) TO v_month.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = v_ersda
IMPORTING
week = v_full_week
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.
MOVE v_full_week+4(2) TO v_week.
WRITE:/5 'Month = ', v_month.
WRITE:/5 'Week = ', v_week.
Regards,
Kumar Bandanadham
Similar Messages
-
Is there any Function module available for GR IR for purchase order
Hi
Is there any function module available in SAP to get the list of Goods Received and Invoice Reciept for a purchase order.
One way to create a custom fuction to fetch the details from MSEG and BKPF.
Can somebody suggest a better solution.
Thanks in advance.
Ruhi HiraWhich table in BAPI_PO_GETDETAILS exactly has these information ?
PO_HEADER_TEXTS
PO_ITEMS
PO_ITEM_ACCOUNT_ASSIGNMENT
PO_ITEM_SCHEDULES
PO_ITEM_CONFIRMATIONS
PO_ITEM_TEXTS
PO_ITEM_HISTORY
PO_ITEM_HISTORY_TOTALS
PO_ITEM_LIMITS
PO_ITEM_CONTRACT_LIMITS
PO_ITEM_SERVICES
PO_ITEM_SRV_ACCASS_VALUES
RETURN
PO_SERVICES_TEXTS
EXTENSIONOUT
NFMETALLITMS
Regards
Ruhi Hira -
Is there any function modules or BAPI's
Is there any function modules or BAPI's that would delete the original partner and then add a new partner.Iam using BAP
bapi_alm_notif_data_modify
But iam not able to change partner in notification header
Please give your input for sovling itDear Rama,
In the bapi_alm_notif_data_modify, there are 2 structure
NOTIFPARTNR STRUCTURE BAPI2080_NOTPARTNRI OPTIONAL
NOTIFPARTNR_X STRUCTURE BAPI2080_NOTPARTNRI_X OPTIONAL
Pass yr partner value in NOTIFPARTNR, and against the value make it "X" in the NOTIFPARTNR_X , then u can change the partner value.
Give point if helpfull
Thanks -
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 -
Is there any function module to get the variables used in a query?
Hi experts
Please, do you know if is there any function module to get the variables used in a query?
Thanks and regards
LuisHi Srini
Yes, I have checked the tables but I need a function module
Thanks anyway!
Luis -
Is there any function module to give absolute value of a number?
Hi,
Is there any function module to give absolute value of a number?
That has similar functionality to the Built in Function ABS.
Please let me know.
Thanks,
cshi,
why are you looking for any function module.
You can easily get it by mathematical function ABS .
Syntax : <Turget Variable> = ABS <Source Variable>
\[removed by moderator\]
Anirban Bhattacharjee
Edited by: Jan Stallkamp on Jun 27, 2008 4:19 PM -
Is there any function module to convert the date format
Dear ABAPers,
Is there any function module to convert the date format from dd.mm.yyyy to dd-mmm-yyyy.
I want to convert the date format from dd.mm.yyy to dd.mmm.yyy Eg.from 10.03.2008 to 10-mar-2009.
Thanks & Regards,
Ashok.hi,
create custom function module or copy the below code in the report ..and use it
the out put for below is :----Convert a DATE field into a full format date eg. March 23, 2000
FUNCTION Z_CONVERT_DATE_INTO_FULL_DATE.
""Local interface:
*" IMPORTING
*" VALUE(DATE) LIKE SY-DATUM
*" EXPORTING
*" VALUE(FORMATTED_DATE)
*" EXCEPTIONS
*" INVALID_DATE
TABLES: TTDTG.
DATA: BEGIN OF T_DATE,
YYYY(4) TYPE C,
MM(2) TYPE C,
DD(2) TYPE C,
END OF T_DATE.
DATA: DAY(3) TYPE N.
DATA: VARNAME LIKE TTDTG-VARNAME.
IF DATE IS INITIAL.
CLEAR FORMATTED_DATE.
EXIT.
ENDIF.
check document date format
CALL FUNCTION 'DATE_CHECK_PLAUSIBILITY'
EXPORTING
DATE = DATE
EXCEPTIONS
PLAUSIBILITY_CHECK_FAILED = 1.
IF SY-SUBRC NE 0.
RAISE INVALID_DATE.
ENDIF.
MOVE DATE TO T_DATE.
CONCATENATE '%%SAPSCRIPT_MMM_' T_DATE-MM INTO VARNAME.
SELECT SINGLE * FROM TTDTG WHERE SPRAS = 'EN' AND VARNAME = VARNAME.
WRITE T_DATE-DD TO DAY.
CONCATENATE DAY ',' INTO DAY.
CONCATENATE TTDTG-VARVALUE DAY T_DATE-YYYY INTO FORMATTED_DATE
SEPARATED BY SPACE.
ENDFUNCTION.
the output is :--Convert a DATE field into a full format date eg. March 23, 2000
Regards,
Prabhudas -
Is there any function module to convert date format?
Is there any function module to convert date format from mm/dd/yyyy to dd.mm.yyyy or sy-datum?
Hi,
wirte statement converts any date fomat in system date fromat
WRITE w_DateTO w_date_sys.
Regards,
Sriram -
QM : is there any function module to find inspection lot characterstics
Hi All,
is there any function module to find all characterstics for an inspection lot.
i need exact data which qe51n transaction is fetching .
thanks in adv ,
VarmaHi uvs,
1. we can use the fm BAPI_INSPOPER_GETCHAR.
regards,
amit m. -
Is there any function module that brings out profile planner
Hello experts,
Is there any function module that brings out profile planner (I want to set planner profile as u201CSAP800u201D. I am using 7KE1 transaction.
Example: I know, the FM - K_KOKRS_SET_BATCHINPUT will set the controlling area to 'CTIC' for the entire batch input process.
Thanks in advance.look at these fms..
CACS_PROFILE_PARTNER_READ
CACS_PROFILE_SHOW -
Is there any function module which will upload storage locations for a mat
Hi gurus,
Is there any function module or BAPI to extend the storage locations of material which is done through <b>MMSC</b> transaction. I need to write a program to upload new storage locations for some materials.Please advise.
Thanks ,
Sam.You can do this using the BAPI_MATERIAL_SAVEDATA
Regards,
Rich Heilman -
Is there any function module getting the cpu type?
Is there any function module getting the cpu type?
I guess the database server...
I would like to get the SAP system cpu type as done in transaction st06 under system information.
Thanks. -
Is there any function module for purchase order change
Hi Experts,
Is there any function module for purchase order change or i need to do new recording in me22n.
Thanks,
SenthilHi
Function module <b>BAPI_PO_CHANGE</b> enables you to change purchase orders. The Change method uses the technology behind transaction ME22N.
Regards,
Viven -
Is there any function module to trigger workflow template
Hi,
I have created a workflow template in tcode PFTC, which i am using to send email, this workflow needs to be triggered once the document is posted, there are no events being triggered at that stage, My query is 'Is there any function module to trigger this workflow template from the user exit'?.
Thanks in Advance
SantoshUse FM
SAP_WAPI_START_WORKFLOW.
or if you have triggering event for the wflow use
SWE_EVENT_CREATE
SAP_WAPI_CREATE_EVENT
Thanks
Arghadip -
Is there any function module or BAPI to create maintenance item.(Urgent)
Hi Experts,
I want to create an RFC which creates the maintenance item in the sap. The RFC is going to receive data from XI. So is there any function module or BAPI to create maintenance item? so that i can call that FM in my RFC.
Thanks,
Prasanna
Helpful answers will be rewarded.Check and implement your program accordingly:
*& Report ZMRS_BAPI_DEMO_ORDERS
REPORT ZMRS_BAPI_DEMO_ORDERS.
DATA: gs_method TYPE bapi_alm_order_method,
gs_header TYPE bapi_alm_order_headers_i,
gs_header_up TYPE bapi_alm_order_headers_up,
gs_return TYPE bapiret2,
gs_numbers TYPE bapi_alm_numbers,
gs_return_commit TYPE bapiret2,
gs_demo_order TYPE objidext,
gt_demo_order LIKE TABLE OF gs_demo_order,
gt_method LIKE TABLE OF gs_method,
gt_header LIKE TABLE OF gs_header,
gt_header_up LIKE TABLE OF gs_header_up,
gt_return LIKE TABLE OF gs_return,
gt_numbers LIKE TABLE OF gs_numbers,
gt_return_commit LIKE TABLE OF gs_return_commit.
DATA lv_not_successful TYPE c.
DATA lv_ref_cnt TYPE i.
IMPORT gt_method FROM MEMORY ID 'MET'.
IMPORT gt_header FROM MEMORY ID 'HED'.
IMPORT gt_header_up FROM MEMORY ID 'HUP'.
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = gt_method
it_header = gt_header
it_header_up = gt_header_up
return = gt_return
et_numbers = gt_numbers.
CLEAR lv_not_successful.
LOOP AT gt_return INTO gs_return.
IF gs_return-type = 'E'.
lv_not_successful = 'X'.
ELSEIF gs_return-type = 'W'.
lv_not_successful = 'X'.
ELSE.
do nothing
ENDIF.
ENDLOOP.
IF lv_not_successful <> 'X'.
commit changes
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'
IMPORTING
return = gs_return_commit.
ELSE.
rollback changes
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
IMPORTING
return = gs_return_commit.
ENDIF.
EXPORT gt_return TO MEMORY ID 'RET'.
EXPORT gs_return_commit TO MEMORY ID 'COM_RET'.
Maybe you are looking for
-
whenever I open firefox after closing it down, it always opens with the last page I was on. I have the settings to point to a specific homepage and have it set to always open on the homepage, but it doesn't.
-
How to remove old Windows files from partition other than C ?
hello , i have recently installed windows 7 but it installed on driver D then i reinstalled it on C but i can't get rid of the old program files and windows files located on D ... tried normal delete but keep telling that i need trusted installer per
-
Installing saved files from a hard drive on to a new mac!
My Mac Book Pro suffered damage and has been replaced. Everything had been saved via Time Machine on an external hard drive. This question may seem silly but before sinking it all across, do I have to re-install my programs such as Final Express or i
-
Restore in noarchivelog mode ( redo log files have been dropped )
1, A full backup taken using RMAN is available on disk. 2, The current control files were NOT damaged and do not need to be restored. 3, All data files are damaged . 4, The database is in NOARCHIVELOG mode. I restore database : 1. RMAN> STARTUP MOUNT
-
Data Warehouse Cubes Not Processing
With a customer now who is having data warehouse problems, the main issues being: - ETL jobs run fine (except MPSync which finishes with only 179/180 jobs complete) - Cube processes are stuck in a RUNNING loop, they never complete or fail out and all