Function module to find number of table entries in Data base table
Hi All
I have the urgent requirement to find out the number of table entries in a table using the function Module.
if u know the Function Module name please let me know
Thanks & Regards
Rajmohan.G
You can calculate the total number of records like this.
TABLES : ztable.
DATA cnt type I.
Select count( * ) into cnt FROM ztable.
Regards,
Santosh
Similar Messages
-
Function module for finding number of records in table
Do we have any function module to find number of records in a table?
Thanks,
Shwetause the EM_GET_NUMBER_OF_ENTRIES. You just have to write your table name into the input table IT_TABLES in the TABNAME field
-
Function module to find no of days between two dates
hi everybody i want a function module to find no of days between two dates
Function module /SDF/CMO_DATETIME_DIFFERENCE
Uppercase/Lowercase
Runtime: 59,629 Microseconds
Import parameters Value
DATE1 01.01.2007
TIME1 00:00:00
DATE2 31.12.2007
TIME2 00:00:00
Export parameters Value
DATEDIFF 364 TIMEDIFF 0
EARLIEST 1 -
How to insert data from different internal table into a data base table
hi all,
I want to insert a particular field in an internal table to a field in a data base table.Note that the fields in the internal table and database table are not of the same name since i need to insert data from different internal tables.can some one tell me how to do this?
in short i want to do something like the foll:
INSERT INTO ZMIS_CODES-CODE VALUE '1'.
*INSERT INTO ZMIS_CODES-COL1 VALUE DATA_MTD-AUFNR .(zmis_codes is the db table and data_mtd is the int.table)REPORT ZINSERT.
tables kna1.
data: itab LIKE KNA1.
data lv_kUNAG LIKE KNA1-KUNNR.
lv_kuNAG = '0000010223'.
ITAB-kuNNR = lv_kuNAG.
ITAB-name1 = 'XYZ'.
INSERT INTO KNA1 VALUES ITAB.
IF SY-SUBRC = 0.
WRITE:/ 'SUCCESS'.
ELSE.
WRITE:/ 'FAILED'.
ENDIF.
Here lv_kunag is ref to kna1 kunnr passed in different name
In internal table .
Try and let me know if this logic dint work. -
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 module to find get the Fiscal period using date
Hi Experts,
I am need of getting fiscal period and year from the given date. Is there any function module exists. Please advise.
Thanks in advance,
VivenDATA: I_FYV1 LIKE T009-PERIV.
CALL FUNCTION 'CCODE_GET_FISCAL_YEAR_VARIANT'
EXPORTING
COMPANY_CODE = i_billno-bukrs
COMPANY_CODE = S_BUKRS-LOW
IMPORTING
FISCAL_YEAR_VARIANT = I_FYV1
EXCEPTIONS
COMPANY_CODE_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.
CALL FUNCTION 'ME_DETERMINE_GJAHR'
EXPORTING
I_BSTYP =
I_BEDAT = P_DATE
I_PERIV = I_FYV1
IMPORTING
E_H_MONAT =
E_H_GJAHR = GJAHR1
E_H_DATUM = -
Function Module to find number of days
Hi, In my program I need to calculate the number of working days, ie days excluding Saturday and Sunday s Also excluding the holidays if any. Could you please suggest me a way to find the same. A code snippet would be very appreciating
Hai,
check these links.
http://www.geocities.com/victorav15/sapr3/abapfun.html
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
Check this link:
http://help.sap.com/saphelp_erp2004/helpdata/en/9f/db988735c111d1829f0000e829fbfe/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/ef/d94b78ebf811d295b100a0c94260a5/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/43/41341147041806e10000000a1553f6/frameset.htm
See the following links:
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_erp2005vp/helpdata/en/9f/db970e35c111d1829f0000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
withregards,
sowjanya.b -
Table Name or Function Module to find out all the Screens & Subscreens for
Hello Experts,
Table Name or Function Module to find out all the Screens & Subscreens for all T-Codes
Helpful Answer will b rewarded
Arif ShaikHi Balaji,
But TSTC only Gives the Program Name , T-Code and Screen but not all the Subscreen details
Any other which U know -
Function module to find out the changed values from tables
What is the standard function module to find out the changed values (the old & new values) from tables in SAP ?
Hi Harish,
Please elaborate your requirement...
Please have a look on CDHDR AND CDPOS tables... it contains changed data... but all chages are not being tracked using it..
Try Below FMs as well..
For Header Level...
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
date_of_change = cdhdr-udate
objectclass = cdhdr-objectclas
objectid = cdhdr-objectid
time_of_change = cdhdr-utime
username = cdhdr-username
TABLES
i_cdhdr = icdhdr
EXCEPTIONS
no_position_found = 1
OTHERS = 2.
For Item Level
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = icdhdr-changenr
IMPORTING
header = cdhdr
TABLES
editpos = icdshw
EXCEPTIONS
no_position_found = 1
OTHERS = 2.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya -
Function module to find the attachment list for an accounting document?
Is there a function module to find the attachment list for an accounting document? Or which table stores such references?
I know I can find this info from the transaction FB03, but is there a function module to find the attachments for an accounting document? So far I only found the attachments are stored in the table SOOD, and archived documents in table TOA03, but I can't find the table that stores the links between the accounting document and its attachments?
<b><REMOVED BY MODERATOR></b>
Thanks,
Ning
Message was edited by:
Alvaro Tejada GalindoHi,
i_object1-typeid = 'YARSATTA'. "<<< Give your Object id name
i_object1-catid = 'BO'.
i_object1-instid = i_yarsitem-docno. "<<<< Document Number
call method cl_gos_attachment_query=>count_for_object
exporting
is_object = i_object1
ip_arl = space
receiving
rt_stat = i_stat1.
read table i_stat1 into wa_stat1 index 1.
if sy-subrc eq c_0.
move wa_stat1-counter to v_attno1.
endif.
For link you need to check for table SRGBTBREL
and also please check class CL_GOS*
a® -
Function Module to find out the release value in contract
Dear All,
I have to upload the contract with new accoutn assignment without changing the existing contract. For that i have to download all the existing contract data with value.
In that case i have some issues regarding the value.
For example : In the system old contract is created with value 1000 and the released value as 500.
In that case i have to uload the new contract with all the details of existing contract with value of 500 (1000-500=500).
How can i get the value (500) and from which table.Is there any functional module to find out the release value in contract.
Thanks and regads,
PM
Edited by: PM on Jan 21, 2010 8:40 AM
Edited by: PM on Jan 22, 2010 9:48 AMHi
You need to link the table VBFA and VBAK.
For a contract you can check all the subsequent document (which you can filter whether you want to see Order / delivery / Billing) in VBFA and then from there pick the subsequent document no. and then from VBAK you can pick the Net value of these subsequent documents, and so you will have both the values (value of Contract and value in subsequent document) and you can determine the balance value.
Regards
Amitesh Anand -
Function module to find both sold and ship to party
Is there any function module to find both sold-to-party and ship-to-party based on the sales Area.
That is if i give sales org , distribution channel , division as input . I must get Sold-to-party and Ship-to-party as output.
Regards,
S.VelsankarHi,
You can find sold to and ship to party customer from KNVP Table as below:-
SELECT KUNNR
FROM KNVP
INTO w_sold_to_party
WHERE VKORG = YOUR SALES ORG
AND VTWEG = dist channel
AND SPART = division
AND PARVW = 'SP'. "Sold to party depneds of how its configured in your system
Check TPAR table for description Sold to part and pass the PARVW value.
Similarly for ship to party
SELECT KUNNR
FROM KNVP
INTO w_sold_to_party
WHERE VKORG = YOUR SALES ORG
AND VTWEG = dist channel
AND SPART = division
AND PARVW = 'SH'. "Sold to party depneds of how its configured in your system
Regards,
Subhashini -
Function Module to find Fully Invoice PO
Hi all,
Is there any function module to find Fully Invoice PO?
Or
Tell me the tables from where can i get the details of Fully Invoiced PO?Hi,
My requirement is like this.
I have a company code on selection screen.
I have to take PO's based on company code.
Then I need to check whether that PO is fully invoiced or not.
Initial i was checking EKKO table. But I found that is not the correct table to find out. -
Function module to find category Guid
Hi all,
I need a Function Module to find the 'Category Guid' using 'Category Id' and 'Logical System Name', from table 'COMM_CATEGORY', to update category Guid in the database table ZSRM_BBP_DET_ACC. Please Help.
Regards,
Abhinay.Hello,
In SRM7.0 release, you have BBP_CATEGORY_GET_GUID function module.
Regards.
Laurent. -
Function Module to find the Last Execution date of Back ground Job
Hi,
Is there any function module to find the <b>last execution date of back ground job</b>.
So that I can transfer the data from SAP to Legacy system based on the document creation date should be in between last execution date and current date.
thanks in advance.
Eswar.Don't know of a function module, but you should be able to use the information in table TBTCO to get the last start date and time of the job you are interested in.
Maybe you are looking for
-
In the Data Template to import purchase orders for release 9, in the instructions sheet it is given as ''You can use SQL, ODI, or a similar tool to extract data into your staging tables''. So how exactly can we use it for exporting? Also, how to expo
-
Ituned cover artwork will not change
I am trying to change the cover artwork for a disk that I imported to itunes. I have used the feature in itunes under get info/artwork, and also used the program mp3tag, however neither program will change the artwork which is not for this album. I a
-
What the diff between Order Acquisition with Order management?
Hi, What's the diff between them in SAP, thanks!
-
15"MacBook Pro with retina display
My husband just purchased this machine for me as an early Christmas present and oh am I one lucky girl! So far I love it! My photographs look so much crisper and vivid on this display. I do need an external DVD drive though to load some of my pro
-
Jump On Single Click To another Template in WEB
Hi All, My requirement is to display reports on web with some tabs. I need to jump from one to tab1 to tab2 when i click inside the body of tab1(ex. when i click on the graph displayed in tab1 it should jump to tab2 where the table is displayed). I h