Function Module for getting Number ranges between two number
Hi guys,
Is there any Function module which provide us the number range between two numbers?
For Ex:If i give 1 and 10 to FM it must give me 1
2
3
4.....upto 10.
is there any FM for doing this,but i'm not able to find exact Fm for same.
I can write small piece of code for getting number ranges, but if i get FM it could save little work.
Hi
But why do u need a fm, can't you do it by yourself?
DATA: FROM_NUMBER TYPE I VALUE 1,
TO_NUMBER TYPE I VALUE 15.
DATA: NUMBER TYPE I.
DATA: BEGIN OF T_NUMBER OCCURS 0,
NR TYPE I,
END OF T_NUMBER.
NUMBER = FROM_NUMBER.
DO.
IF NUMBER <= TO_NUMBER.
T_NUMBER-NR = NUMBER.
APPEND T_NUMBER.
ELSE.
EXIT.
ENDIF.
NUMBER = NUMBER + 1.
ENDDO.
LOOP AT T_NUMBER.
WRITE: / T_NUMBER-NR.
ENDLOOP.
Max
Similar Messages
-
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 the difference between two times.
Hi All,
I want to know if there is any function module that gives me the difference between two specified times.
For Ex: Time 1: 12/01/2007 00:01 A.M
Time 2: Time 1 - 180 Seconds. This changes the time, also may even change the Date. (As in above situation, the Time 2 will be 11/30/2007 11:58 P.M)
Could some one please suggest if there is any function module for this case.
Thanks in Advance.Hi, You can use the following function module to calculate the diffrence between to dates in the unit that you want.
COPF_DETERMINE_DURATION calculates the difference between two dates and time in minutes and hours.
Parameters:
EXPORTING
I_START_DATE "The start date of the time interval
I_START_TIME "The start time of the time interval
I_END_DATE "The end date of the time interval
I_END_TIME "The end time of the time interval
I_UNIT_OF_DURATION "Time unit of the duration if not to be calculated in days.
Value ===== Meaning
' ' ===== Day (default)
D ===== Days
H ===== Hours
MIN ===== Minutes
MON ===== Months
S ===== Seconds
WK ===== Weeks
YR ===== Years
I_FACTORY_CALENDER "A factory calender if not using the Gregorian calender
IMPORTING
E_DURATION "Time difference in unit specified.
Message was edited by:
Rajesh Soman -
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 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 to find the Difference between two times.
Hi All,
Wud you plz let me know the Function Module to find the Difference between two times.
Input Time1( Hours:Minutes) Time2 ( Hours:Minutes)
Need Output in Hours:Minutes only . ( No seconds Needed )
Ex :
Input :
06:00 to 18:00 Output : 12:00
and 20:00 to 06:00 Output: 10:00 with +ve sign only. No -ve sign.
Thanks,
N.L.Narayanacheck this .
data : p_timel like sy-uzeit,
p_timeh like sy-uzeit,
diff like sy-uzeit,
di(8) type c .
p_timel = '200000'.
p_timeh = '060000'.
diff = p_timeh - p_timel.
concatenate diff+0(2) ':' diff+2(2) into di.
write:/ di.
also check for this.
p_timel = '060000'.
p_timeh = '180000'.
see if this can be implemented in ur code .
or else u can try with Fm L_TO_TIME_DIFF passing startdate enddate starttime endtime with UOM as MIN
hope this helps regards,
vijay -
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 -
Function module for converting number to exponential???
Hi All
please tell me Function module for converting number to exponential.
Deepaktry:
REPORT Zconvertf.
parameters p1 type p decimals 2 default '4711.99'.
data f1 type f.
move p1 to f1.
write: / p1, f1.
hope that helps
Andreas -
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 -
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... -
How to config Check Digits function module for Student Number Validation
Hi SLCM Experts,
In the SAP-SLCM, How to use check digits function module for validate student number. Just only config it or need to customizing program.
*Any idea to student number validation in SLCM?*
Best Regards,
Suvatchai K.Hi ,
Can you expalin it further ?
You configure the St. no in piq_matr . And set it as external or internal no. range which suits your business .
What is the validation you are looking for ?
Regards
Gajalakshmi -
Function module for adding number of months to the date
Hi,
Is there any function module to get the date by adding number of months...
Regards,
YadagiriNormally all SAP FM will return that value. As 1 month in general means 30 days only.
You can check the code in this link for logig of 31 -
add month in the date to find next date
Regards,
Amit -
Function Modul for Order Number from VA02
Hallo
i have a delivery number and want read the order number from VA02.
Of course, select the database from LIKP --> LIPS --> VBKD is possible but
maybe it has function modul for read the order number from transaction VA02.
THX ANUHi,
I think is better recover the data directly from DB tables (in table LIPS you have the fields VGBEL, VGPOS, VGTYP ) if you only want the order number.
With the delivery number you only need to acces 1 table. If you use a FM, you will recover this data and a few fields that is not interesting for you. The access to table LIPS is using table index (delivery number)
Regards,
Pepe -
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
Maybe you are looking for
-
If I have an IPhone and my mother has an IPod, how can we share an iTunes account on a Mac without sharing the music?
-
RSR_VARIABLE_F4_RESTRICT_BADI not working in Qua system after move
Hi Experts, i have a requirement to diplay the WBS elemnt based on the 0project on the screnn for this i have implemented the BADI RSR_VARIABLE_F4_RESTRICT_BADI for the 0WBS_ELEMT infoobject and its woring in Dev system. But when transported it i
-
Trying to update 10.4.11
I am trying to update 10.4.11. I need to get to 10.4.3. Installer will not let me install on to my hardrive. What can I do? I have tried 10.4.2 as well, same error? It says volume doesn't meet requirements for this update.
-
Late 2013 macbook pro question
Hi there, Im new to the mac laptop world. I received the late 2013 Macbook Retina as a gift and I do some gaming or mixing for a few hours at a time. Now the core temperatures never exceed 76 C (typically 68-72). Are these volatile temperatures for t
-
Hi, We have one table which is copied to another schema and added some new columns to it, SQL>desc Source.content Name Null? Type ID NOT NULL NUMBER(9) RESOURCEID