Function Module for selecting date by day
Is there any function module to choose date by day. for example if I give today's date the FM should give me next thursday's date.
Thanks
Tharani
this works good........
*& Report YCHATEST *
REPORT YCHATEST
data:day like DTRESR-WEEKDAY.
parameters:curr_dat like sy-datum default sy-datum.
CALL FUNCTION 'DATE_TO_DAY'
EXPORTING
DATE = CURR_DAT
IMPORTING
WEEKDAY = day.
write : / day.
case day.
when 'Monday'.
CURR_DAT = CURR_DAT + 3.
when 'Tuesday'.
CURR_DAT = CURR_DAT + 2.
when 'Wed.'.
CURR_DAT = CURR_DAT + 1.
when 'Thursday'.
CURR_DAT = CURR_DAT + 7.
when 'Friday'.
CURR_DAT = CURR_DAT + 6.
when 'Sat.'.
CURR_DAT = CURR_DAT + 5.
when 'Sunday'.
CURR_DAT = CURR_DAT + 4.
endcase.
write :/ CURR_DAT.
Similar Messages
-
Standard function modules for selection from vbak/vbup/ekko/ekpo
hi experts ,
do you know if there is an existing standard function modules for selection from vbak/vbup/ekko/ekpo.
please helpHi,
for VBAK
ADSPCM_READ_VBAK Read VBAK (with SPEC2KM-data)
PRS_GET_GLOBAL_VBAK Get global structure VBAK
Regards,
Jyothi CH.
Edited by: Jyothi Chinnabathuni on Feb 23, 2009 2:46 PM -
Function Modules for Format Date, Month Name and Quarter value.
Hi All,
1. I am getting the date field from the Flatfile, so i need to format the date to YYYYMMDD. Is there any Function module for that in BW.
2. Based on the above Formated Date i have to find out the Name of the Month like JANUARY, FEBUARY etc.
3. Based on the same above Formated Date i need to find out the Quarter like 1, 2 etc.
Could you please let me know if any function modules are there for the above questions in BW not in ABAP, why i mention is some Function modules are there in ABAP but not in BW.
Thanks in advance.
Regards,
srinivasHi ,
1.If your input date format is MMDDYYYY then Use SDATE as conversion routine in trans strucutre to convert into YYYYMMDD.
2.By passing year as input parameter for the following FM you would get all the months with text.Using READ statement in routine you can get month name
MONTH_NAMES_GET
3.For Quarters you can use the following FM:
TSTR_PERIODS_QUARTERS
hope it helps...
regards,
Raju -
Function Module for Discount Date
Hi,
Can somebody tell me whether there is any function module for determining the Discount Date (DATS) and Payment Due Date(DATS) based on Payment Terms (ZTERM)?
Thanks,
John.FI_FIND_PAYMENT_CONDITIONS
DETERMINE_DUE_DATE -
Function modules for selection ID of Demand planning
Hello All,
I need a function module which can return product / location combinations associated with a selection ID.
OR, a function module which can return me 1) Planning book 2) data view and 3) Version associated with a selection ID.
For the second case I have checked FM /SAPAPO/MCPSH_SELECTION_GET , however this function module is returning version and planning book only. But I also need dataview associated with the selection ID.
Kindly Help.
Thanks & Regards,
VivekHi Vivek,
I am not sure about the FM but, you can play with /sapapo/ts_sekpo (Item Selection Variants) and /SAPAPO/TS_SELKO (Header Selection Variants) table to get the infromation you need. First table will give you details and based on that selection profile GUID you can find PB/DV.
Hope this helps.
Regards,
Hashil Desai -
Function modules for Master Data
Does anyone know of any function modules that can be used to
update master data, i.e. change attribute values.
Obviously it can be done without going through a MD load, because you can manually edit master data directly in BW, but I was wondering if anyone knows of any function modules available to do this ...
Thanks for you help.
Mark.hi Mark,
take a look how to doc 'How to... update Master Data during upload of transaction data', there is sample code
https://websmp202.sap-ag.de/~sapdownload/011000358700002766042003E/HowToUplMasterDataTransact.pdf
you may need RSDDS_ATTRIBUTES_ACTIVATE to activate data.
hope this helps.
REPORT Z_UPLOAD_ATTR .
data: begin of custattr occurs 5000.
include structure /BI0/MD_SOLD_TO. "M-view
data: end of custattr.
start-of-selection.
*fill internal table all values in internal format (e.g. leading zeros)
custattr-D_SOLD_TO = '0000006000'.
custattr-D_COUNTRY = 'US'.
custattr-D_INDUSTRY = '111'.
append custattr.
custattr-D_SOLD_TO = '0000006001'.
custattr-D_COUNTRY = 'CA'.
custattr-D_INDUSTRY = '222'.
append custattr.
call function 'RSDMD_WRITE_ATTRIBUTES_TEXTS'
exporting
i_iobjnm = '0D_SOLD_TO'
i_tabclass = 'M'
tables
i_t_table = custattr
exceptions
attribute_name_error = 1
iobj_not_found = 2
generate_program_error = 3
others = 4. -
Function module for comparing dates and times
Hi,
I have a date and time stamp in one filed for example as below:
20070125183045
(the first 8 are date in YYYYMMDD format, the next 6 is time in HHMMSS format). Now I want to compare this value to another such value in terms of date and time. First I want to compare dates and then times. Do you know any function module that can serve this purpose?
Thanks very much!You can compare these using the function module DURATION_DETERMINE. This fuction will give you the difference, and it can be in a view different units, such as the difference in days, months, etc.
Funciton module takes in Start date and time and end date and time.
Regards,
RIch HEilman -
Error while activation Function module for generic data extraction
Hi,
I have created a generic data source ZMATERIAL in which i have selected the Extraction by Function module. I copied the function module RSAX_BIW_GET_DATA_SIMPL to ZMATERIAL_FM, but when i activate this module it gives me error
REPORT/PROGRAM statement missing, or program type is I (INCLUDE).
The main program of the function "Z_BWGENDATAMATERIAL" does not begin with "FUNCTION-POOL".
Please help me in this.Hi Dipika,
I think a similar issue is discussed
Refer this thread
REPORT/PROGRAM statement missing, or program type is I (INCLUDE).
Compiling INCLUDE progam
question related to includes
question related to includes
Hope these helps
Regards
Karthik -
Function module for select-options
Hi Colleagues !
Is there any function module to read select-options fields in a window ?
Thanks a lot and kind regards
PeterHi
I had this requirement as well, I came up with a workaround....
I ended up creating a Z structure EG. ZRANGESTRUC with the fields:
SIGN - CHAR1
ZOPTION - CHAR2
LOW - CHAR18
HIGH - CHAR18 (this would depend on your maximum length of field)
I had to make a ZOPTION field because option was a reserved system field.
I then declare tables in my function module pointing at ZRANGESTRUC data type.
Inside your function module declare ranges and then simply say S_MATNR[] = ZSTRUC_MATNR[] and then use the standard range inside your select statement.
I hope I understood your requirement correctly...
Edited by: Brad Gorlicki on Feb 10, 2010 9:36 PM -
Function module for convert date as sap internal format ?
Hi All,
Is there any standard function module to convert the date filed as SAP internal date?
My problem is while uploading data from excel sheet date filed can be any format
for exp: dd/mm/yyyy or mm/dd/yyyy or yyyy/dd/mm or dd-mm-yyyy,mm-dd-yyyy
dd-mm-yyyy or dd.mm.yyyy or mm.dd.yyyy etc...
In our case there is no particular format in excel it can be differ for each user. I know we have few FM's in standard.
But those are not working for my req. pls help me if you have any idea.
Thanks in advance.
Regards,
Venkat Mote.Hi Venkatesh,
Can you please check with the following function module. For my case, it is working fine.
CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
EXPORTING
datum = p_gs_date
dtype = 'DATS'
IMPORTING
idate = p_gs_date
Hope it helps to you.
Regards
Rajkumar Narasimman -
Function Module for Delivery date update
Hi all,
Can anybody help me to solve my problem. My requirement is to update order delivery date for a partner. But I am not getting any FM for that and not getting the table name also where I can update delivery date value. If you have any known FM or any suggestion please tell me.
Thanks in advance
ChandanHi,
The function module is
<b>/1CRMG0/CUST_CHAN_WRT_I01</b>
Best Regards,
Johnny. -
Dynamic select / function module for select queries
Hello experts,
Is there any function module to build dynamic select queries and also to build standard select queries .
Thanks,
krishnakumarWhat are you meaning by 'to build' ???
BR, JAcek
Message was edited by: Jacek Slowikowski -
Regarding Function module for validating Date
Hi ,
Cananybody tell me that is there any function mdoule for validating the BGDDA and ENDDA.dear ,
See if you are using it in the input parameter then you dont need to validate .
Beacuse selection option has that option .
secondlly if you are checking internally then is could be done simplly by if condition
regds ankit -
BP - CP: function modul for relationship-data ?
Hello forum,
we have relations between bp and cp. And in this relationship we have the
contact data like phone/mail etc.
Is there a function modul which gives me this relationship-data ?
Thanks
GerdHi Gerd,
Try the FM "BAPI_BUPA_ADDRESS_GETDETAIL", In this FM you need to pass the address GUID and the partner number whic you will get from the table BUT020.
In order to get the address GUID use the FM "BAPI_BUPA_ADDRESS_GET_NUMBERS" and pass the CP number.
<b>Reward points if my post helps!!</b>
Best regards,
Vikash -
Function module for sales data
Hi
I am new to BW. I have to write a FM for BW Team.
Here are the parameters:
VBAK-ERDAT
VBAP-VKORG
MARA-MATKL
I have to select all the data that match the above selection criteria and then display the summary as
For the date range entered and for each plant I have to display no. of orders.
BW Team wants detailed as well as summary data. What I am thinking is to write a FM that returns two internal tables - 1) Detailed data and 2) Summary data.
If I write like this, can the data source handle two internal tables?
Thanks
NagaHi Naga
Its always better to use two individual targets with a single infosource to avoid
confusions like siggi suggested Just place a Start Routine in the update rules level
and filter the data one is for Item and another is summaraised if they want both the
things then they will map this targets into a multiprovider or infoset depends on the
requirement..
Hope itz Helps..!
Regards
KISHORE M REDDY
**Winners Don't Do Different things,They Do things Differently...!**
> Siggi
>
> If I use one cube, How would I differentitate
> between detailed and summary data?
>
> Thanks
> Naga
Maybe you are looking for
-
Dear Community members, I am unable to synch photo albums from iPad 3 to iTunes on my Windows 7 pc. In addition to Camera roll and iPod cache default albums, I have 6 other albums made from pix derived from the camera roll. Eg - Family pix in a fold
-
Dear Gurus, I am going to configure wage types in IDES ECC6. I want to configure Wage Types for Infotype 0014 for Recurring Payments & Deductions. When I configure these wage types, it does not appear in infotype 0014 instead it appears in infotype 0
-
ITunes 9.0.3.15 refuses to install; lack admin priveleges
iTunes 9.0.3.15 installer seems quite happy to install quicktime and bonjour, but the actual iTunes won't, giving me this: iTunes + QuickTime The installer has insufficient priveleges to access this directory: C:\Program Files\Apple\Apple Application
-
HT1766 I don't know my iphone backup password and my contacts disappeared
My contacts disappear and I don't know my iphone backup password. How can I recover them?
-
Within my work i use a pdf based Availablity system. we send out pdf forms to our staff which they can fill in and automatically send back to us via our server by simply clicking a submit button within the form. All tests with windows based Adobe rea