Function Module to get planned Quantity from posting date
hi,
i need one function module which takes plant and posting date date as an input parameter and get the Planned quantity for that range of that ...i dont want to fetch it from material since the report is run for the whole plant(werks).so it has got a lot of data entries so i need a function for that...
is there any function module which will fetch this data ...
Edited by: sonal musale on Jun 23, 2008 3:53 PM
Hi,
I have also the same problem. Any solution you have for this one?
Thanks,
Raymond
Similar Messages
-
Function module required to subtract month from a date
I have a date field..
In that I want to subtract some months..
Date1 = 27.05.2007
Month = 3 months
Date2 = 27.02.2007
Help me to proceed this logic with function module.
...What is the function module to get this liogic.Hi,
I don't think any FM available for your purposes.
But you can try something like this.
DATA: BEGIN OF ITAB OCCURS 0,
SPMON TYPE UMC_Y_VALIDFR,
END OF ITAB.
PARAMETERS PSPMON TYPE UMC_Y_VALIDFR DEFAULT '2007004'.
START-OF-SELECTION.
ITAB-SPMON = PSPMON.
DO 12 TIMES.
IF ITAB-SPMON+4(3) = '000'.
ITAB-SPMON+4(3) = '012'.
ITAB-SPMON(4) = ITAB-SPMON(4) - 1.
ENDIF.
APPEND ITAB.
ITAB-SPMON = ITAB-SPMON - 1.
ENDDO.
READ TABLE ITAB INDEX 12.
WRITE: / ITAB-SPMON.
Kishi. -
Functional module to get the File from a given Directory
Hi all,
I am using a FM name 'subst_get_file_list' to get the file from a given directory but it is accepting only 40 Character length file only my requirement is to accept file name other than 40 char,
give me good sugestion
regards
paulHi Paul,
Check the Function Module Gayathri has given. ie. 'SO_SPLIT_FILE_AND_PATH'.
In the exporting parameter FULL_NAME , give the path name and in the importing parameter stripped_name , you will get the filename.
Check this code.
REPORT ZSHAIL_SPLITFILE.
data: it_tab type filetable with header line,
gd_subrc type i.
tables: rlgrap.
data: path type string,
file_name type string.
parameters file_nam type rlgrap-filename .
data: user_act type i.
at selection-screen on value-request for file_nam.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
WINDOW_TITLE = 'select a file'
DEFAULT_EXTENSION = '*.txt
DEFAULT_FILENAME = ''
FILE_FILTER = '*.txt'
INITIAL_DIRECTORY = ''
MULTISELECTION = abap_false
WITH_ENCODING =
CHANGING
file_table = it_tab[]
rc = gd_subrc
USER_ACTION = user_act
FILE_ENCODING =
EXCEPTIONS
FILE_OPEN_DIALOG_FAILED = 1
CNTL_ERROR = 2
ERROR_NO_GUI = 3
NOT_SUPPORTED_BY_GUI = 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 user_act = '0'.
loop at it_tab.
file_nam = it_tab-filename.
endloop.
endif.
path = file_nam.
CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
EXPORTING
full_name = path
IMPORTING
STRIPPED_NAME = file_name
FILE_PATH =
EXCEPTIONS
X_ERROR = 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.
at selection-screen.
message i001(zmess) with file_name.
Regards,
SP. -
Function module to get holiday class from work schedule for current day
I need to determine what the public holiday class value is for the current day in a user exit. Is there an SAP function module that can return me this data? This would be the information that is displayed when pressing the work schedule button from infotype 0007
Function module HOLIDAY_CHECK_AND_GET_INFO is closer to what I need. This function module returns an X if the day is a holiday. I will create a Z program and instead of returning an X for a holiday I will return the THOL-KLASS (holiday class) value.
-
Function Module to get hierarchy details from a customer account
Hi Experts,
There is certain hierarchy maintained among Business partners. We can see that in transaction BPH.
Now What I require is a function module which takes BP number as input and gives output the
BP number of child nodes of it . Is there a standard function module for it ?
Please help me move ahead.
Thanks in advanceHi ram.mahaseth ,
There are several tables:
BUT_HIER_NODE
BUT_HIER_NODE_BP
BUT_HIER_NODE_D
BUT_HIER_STRUCT
BUT_HIER_TREE_D
BUT_HIER_TREE
Hope this helps.
Regards, Kostya Khveshchenik -
Urgent: Function module for getting the input from user using a pop up
Hi all,
My requirement at user commmand a pop up should appear asking the user to enter the session name for the bdc session to be created.
My report allows the user to enter the session name of his choice.
I need the name of the function module which can do this.
Thanks
Pritishbetter to create one FM to pop-up.
check this :
function y_pop_up_get_distributor_time.
*"*"Local interface:
*" IMPORTING
*" REFERENCE(W_ROUTE) LIKE VBAP-ROUTE
*" REFERENCE(W_VBELN) LIKE VBAK-VBELN
*" REFERENCE(W_VGBEL) LIKE VBAK-VGBEL
*" REFERENCE(W_VSTEL) LIKE VBRP-VSTEL
*" REFERENCE(W_AUART) LIKE VBAK-AUART
*" EXPORTING
*" REFERENCE(W_FROM_DATE) TYPE SY-DATUM
*" REFERENCE(W_FROM_TIME) TYPE SY-UZEIT
*" REFERENCE(W_TO_DATE) TYPE SY-DATUM
*" REFERENCE(W_TO_TIME) TYPE SY-UZEIT
*" REFERENCE(W_TKNUM) TYPE VTTK-TKNUM
*" REFERENCE(W_RC) TYPE SY-SUBRC
*" REFERENCE(W_DEPT_DATE) TYPE SY-DATUM
*" REFERENCE(W_DEPT_TIME) TYPE SY-UZEIT
*" REFERENCE(W_REPO_DATE) TYPE SY-DATUM
*" REFERENCE(W_REPO_TIME) TYPE SY-UZEIT
*" REFERENCE(W_PLNT_DATE) TYPE SY-DATUM
*" REFERENCE(W_PLNT_TIME) TYPE SY-UZEIT
*" REFERENCE(W_TRUCK_NO) TYPE YW2_TIMEENTRY-TRUCKNO
*" REFERENCE(W_LIFNRN) TYPE YW2_TIMEENTRY-LIFNR
* SET PF-STATUS 'STATUS_100' OF PROGRAM SAPLZ2SLS.
*CLEAR:W_DATE_FROM, W_DS_TIME_1, W_ADATE,
* W_ATIME,W_BDATE,W_BTIME, W_CDATE, W_CTIME.
clear : w_route1, w_vbeln1,w_vgbel1,
w_vstel1,w_auart1.
w_route1 = w_route.
w_vbeln1 = w_vbeln.
w_vgbel1 = w_vgbel.
w_vstel1 = w_vstel.
w_auart1 = w_auart.
clear: w_date_to, w_date_from, w_adate,w_atime,
w_ds_time_1, w_ds_time_2,
w_bdate, w_btime, w_cdate, w_ctime.
call screen 100 starting at 10 2 ending at 115 13.
if w_ok_code = 'SAVE'.
w_rc = 0.
w_from_date = w_date_from.
w_from_time = w_ds_time_1.
w_to_date = w_date_to.
w_to_time = w_ds_time_2.
w_tknum = w_tknum.
w_dept_date = w_adate.
w_dept_time = w_atime.
w_repo_date = w_bdate.
w_repo_time = w_btime.
w_plnt_date = w_cdate.
w_plnt_time = w_ctime.
w_truck_no = sg_truckno.
w_lifnrn = w_lifnr.
else.
w_rc = 1.
endif.
* IF w_ok_code = 'CANC'.
* W_rc = 1.
* ELSE.
* W_rc = 0.
* W_FROM_DATE = w_date_from.
* W_FROM_TIME = w_ds_time_1.
* W_TO_DATE = w_date_to.
* W_TO_TIME = w_ds_time_2.
* W_TKNUM = W_TKNUM.
* W_DEPT_DATE = W_ADATE.
* W_DEPT_TIME = W_ATIME.
* W_REPO_DATE = W_BDATE.
* W_REPO_TIME = W_BTIME.
* W_PLNT_DATE = W_CDATE.
* W_PLNT_TIME = W_CTIME.
* ENDIF.
clear w_ok_code.
endfunction.
Regards
Prabhu -
Function Module for getting public holidays between two dates
Dear Freinds,
I want a function module which checks a day is public holiday or not based on the "HOLIDAY CALENDAR ID", i have
found a function moudule('DATE_CHECK_WORKINGDAY') which checks a holiday or not but based on Factory Calender id,
so could any one please let me know how can i get a day is a public holiday or not based on "HOLIDAY CALENDAR ID".
regards
divya.Hi,
Use HR_FORMS_READ_HOLIDAYS.
pass calendar id, begin date, end date, holiday date.
it will fetch the text of holiday... u can put a check that if the text fetched in initial then the holiday date u have passed is not a holiday..
hope it helps -
Function Module to get days by putting input dates
Hi All,
could anybody tell me which Function Module can be used to get the number of days by giving two dates.
for ex: suppose if i will substract 04.01.2008 - 03.01.2008 = 1 day.
Please reply ASAP.
Thanks,
MadhuHello,
Check this sample:
DATA: G_F_DIFF TYPE I.
CLEAR G_F_DIFF.
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
I_DATUM_BIS = ENDATE
I_DATUM_VON = STARTDATE
IMPORTING
E_TAGE = G_F_DIFF
EXCEPTIONS
DAYS_METHOD_NOT_DEFINED = 1
OTHERS = 2.
Cheers,
Vasanth
Edited by: Vasanth M on Jan 25, 2008 10:41 PM -
Function module to get month lists for entered date
Hi Experts,
Is there any function module which gives me output as mentioned below.
Eg Input : 01.10.2010 - 01.02.2011
OUTPUT : OCT 2010
NOV 2010
DEC 2010
JAN 2011
FEB 2011
Please suggest.
Regards,
Kaustubh.Moderator message - Please see How to post code in SCN, and some things NOT to do... before posting - post locked
Please do not ask basic date questions
Rob -
Function module for getting ekko ekpo ekbe, eket data for material & plant
Hi experts,
I need to get data for me31l transactional data......for that i need ekbe purchasing document and
material documents based on given material and plant and posting date or crop.....
Please reply as soon as possible..
Thanks in advance
M PrasannaHi ,
Try this FM
ISIDE_PDI_PDOC_INFO_READ
Its get you all the purchase doc's info for creating outline agreement for the vendor..
check and let me know... -
Function module to get the details from table COEP
hi all,
I have to select the data from COEP table based on OBJNR.i don't have any other key information.so i have to select the data based on OBJNR only.
can any one please tell me is there any function to get the data from this table.
Thanks.Hi
Try the fun module
K_CO_OBJECT_BALANCE_GET
see the sample select statement for COEP
clear cobrb_tab.
refresh cobrb_tab.
select objnr " Object No
rec_objnr1 " Ref Object No
bureg " Dostribution Rule
lfdnr " Sequence No
perbz " Settlement Rule
konty " Acct Assign Category
bukrs " Company Code
kostl " Cost Center
into table cobrb_tab
from cobrb
where kostl in rn_kostl.
sort cobrb_tab by objnr rec_objnr1.
delete adjacent duplicates from cobrb_tab comparing objnr.
Get the Settlement Costs from COEP Table
clear it_set_tab.
refresh it_set_tab.
if not cobrb_tab[] is initial.
select kokrs " Controlling Area
belnr " Acc Document
buzei " Line Item
perio " Period Block
wkgbtr " Value in CO Curr
lednr " Ledger No
objnr " Object No
gjahr " Fiscal Year
wrttp " Actuals
versn " Version
kstar " Cost Element
beknz " Dr/Cr Indicator
parob1 " Partner Object
into table it_set_tab
from coep
for all entries in cobrb_tab
where lednr = c_lednr and
wrttp = c_wrttp2 and
versn = c_versn and
gjahr = p_gjahr and
objnr = cobrb_tab-objnr and
parob1 = cobrb_tab-rec_objnr1 and
beknz in (c_o, c_a).
endif.
Reward points for useful Answers
Regards
Anji -
Function module to get the difference of dates ..
Hi ,
Can somebody pls help me with the function module to get the difference between two dates?
I need to find the difference value and delete records if >1.
Thanks in advance.
Regds,
Leeza.Leeza,
When I tested the FM in my Program, it is <b>working</b>!!!!!
Note that the Two Input Dates are to be in the format of <b>DATS</b> type (Eg: <b>vimimv-dmibeg</b>).
U can want the Day which u have specified in the parameter I_DATUM_BIS (eg: 20050101) to be included for
the calculation , then put X in the parameter I_KZ_INCL_BIS.
Sample Code :
report zkam01.
data:
<b>sav_nlaufz like rf60v-nlaufz,
date1 type vimimv-dmibeg,
date2 type vimimv-dmiend.</b>
date1 = '20050101'.
date2 = '20051001'.
call function 'MONTHS_BETWEEN_TWO_DATES'
exporting
i_datum_von = date1
i_datum_bis = date2
i_kz_incl_bis = 'X'
importing
e_monate = sav_nlaufz.
write:
date1,
/ date2,
/ sav_nlaufz.
Please allot points if the problem is solved.
Thanks
Kam
Message was edited by: Kam -
BAPI or Function Module to get MSEG table data based on PO Number (EBELN)
Hi
1. Is there any BAPI / Function Module to get PO details based on Plant and PO date?
2. Is there any BAPI / Function Module to get Material document details(MSEG data) based on PO number?
Thanks
NarendraHi,
check the Bapis Givem below
BAPI_PO_GETITEMS
http://abap.wikiprog.com/wiki/BAPI_PO_GETDETAIL1
you will get the detail.
Regards -
Table or Function module to get Internal order planning and Cost element pl
Dear All,
Table or Function module to get Internal order planning and Cost element planning.
Internal order planning from T-code KO13.
Thanks in advance.
Regards,
Ravi
Edited by: Ravi Chandra on Sep 13, 2011 8:08 AMBPEJ, BPEG, BPEP
-
Function module to get the details (WTGBTR) from table COEP
Hi all,
I have to select the data from COEP table based on OBJNR, KSTAR and KOKRS.I want WTGBTR from COEP Table.
Right now Iam using select query.But i want to use function module.
Can any one please tell me is there any function module to get WTGBTR from COEP table.
Thanks.This'll work:
SELECT objnr bukrs wtgbtr
INTO CORRESPONDING FIELDS OF TABLE gt_coep
FROM coep
WHERE lednr = '00' "<========
and kokrs = '1000'
AND kstar IN ('0000810001' , '0000830001')
AND objnr IN s_objnr
AND bukrs IN s_bukrs.
Rob
Maybe you are looking for
-
What headphone/mic set will work with BB
I hate the headphones that come the the bb, they are uncomfortable, don't fit the ear properly and the sound quality is crap, as for the microphone, people tell me it sounds of static and is distorted. Today the clip broke as well. I have to use hand
-
Problem in exporting logical schema
Hi, I exported my logical schema(master repository1) into a xml file. But when i imported it into another master repository2, i did not show up the logical schema present in masterrepository1. What could be the reason for this? Thanks.
-
I get the error message: The System Administrator has set Policies to prevent this installation. What do I do?
-
TS3297 I get a R6025 runtime error when signing in to itune
I receive a R 6025 run time error when starting a search in I Tunes Store. I have downloaed the latest version of itunes.
-
Is it better to leave Microsft IIS 6/7 HTTP compression enabled on a website or is the performance better over the WAN if it's disabled and the WAE/WAAS's are allowed to accelerate.?