How to read IM_ATTABS_TAB structure to get Employee details..
Hello friends,
i am facing difficulty reading IM_ATTABS_TAB for getting employee details..
i need this to code in a BADI for validating Leave request..
i have to extract employee(who after logging in in ESS ,applies for leaves) information such as PERNR leave balance quotas,etc before i can display the suitable message...
Now the structure IM_ATTABS_TAB has PTARQ_ATTABSDATA_TAB as associated type...which has line type as PTARQ_ATTABSDATA_STRUC..
so now,what select statement or query gives me the desired information..
whioch is PERNR,and other leave quotas...
Hi bala,
Please tell me ur problem got resolved or not.
As i am also facing the same and it is exactly the same.
Please help me if you are done with the same!!!
Regards,
Sujit
Similar Messages
-
How to read node WWN from get-wmiobject
Hi,
I tried to read node WWN via get-wmiobject, but the result shows me:
PS H:\> Get-WmiObject -namespace root\wmi -class MSFC_FCadapterhbaattributes | select -property nodewwn
nodewwn
{32, 0, 0, 224...}
Why is that and how can I get a node WWN completely?
Thanks,
ShaChange your Select to be
Select -ExpandProperty nodewwn
If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.
Don't Retire Technet -
How to read configuration structure (SD)
Hello,
i've to read the whole configuration structure of an SD-order item, which isn't expanded to sub-positions. Means: the material in item 10 is an BOM head-material and a KMAT. The materials in the multi-level BOM are configured via the configuration of the head material. If you press the "Configuration" button in the SD-sales order, you see the whole configuration structure. Does anybody know how i can read the whole structure from the database if i know only the SD-order and the item number?
Thanks,
Richarduse FM to get config, you'll have to pass cuobj there.
call function 'CUCB_GET_CONFIGURATION'
exporting
instance = vbap-cuobj
importing
configuration = z_instance_tab
exceptions
invalid_instance = 1
instance_is_a_classification = 2
others = 3 -
SUM(Case how to use this structure to get average values over date range
I am using:
Oracle SQL Developer (3.0.04) Build MAin-04.34 Oracle Database 11g Enterprise Edition 11.2.0.1.0 - 64bit Production
How do I use the sum function with a case structure inside.
so I have data that looks like has an ID, date, and value. I am looking to get the 7 day average for the date range of 4/1/2013 thru 4/20/2013
with t as (
select 1 ID_Key,to_date('4/1/2013','mm-dd-yyyy') date_val, 10 Value_num from dual union all
select 1 ID_key,to_date('4/2/2013','mm-dd-yyyy'), 15 from dual union all
select 1 ID_key,to_date('4/3/2013','mm-dd-yyyy'), 20 from dual union all
select 1 ID_key,to_date('4/5/2013','mm-dd-yyyy'), 0 from dual union all
select 1 ID_key,to_date('4/8/2013','mm-dd-yyyy'), 12 from dual union all
select 1 ID_key,to_date('4/9/2013','mm-dd-yyyy'), 8 from dual union all
select 1 ID_key,to_date('4/10/2013','mm-dd-yyyy'), 6 from dual union all
select 1 ID_key,to_date('4/12/2013','mm-dd-yyyy'), 10 from dual union all
select 1 ID_key,to_date('4/13/2013','mm-dd-yyyy'), 0 from dual union all
select 1 ID_key,to_date('4/14/2013','mm-dd-yyyy'), 0 from dual union all
select 1 ID_key,to_date('4/15/2013','mm-dd-yyyy'), 10 from dual union all
select 1 ID_key,to_date('4/16/2013','mm-dd-yyyy'), 5 from dual union all
select 1 ID_key,to_date('4/17/2013','mm-dd-yyyy'), 2 from dual union all
select 1 ID_key,to_date('4/20/2013','mm-dd-yyyy'), 3 from dual union all
select 2 ID_key,to_date('4/3/2013','mm-dd-yyyy'), 12 from dual union all
select 2 ID_key,to_date('4/5/2013','mm-dd-yyyy'), 15 from dual union all
select 2 ID_key,to_date('4/6/2013','mm-dd-yyyy'), 5 from dual union all
select 2 ID_key,to_date('4/7/2013','mm-dd-yyyy'), 7 from dual union all
select 2 ID_key,to_date('4/9/2013','mm-dd-yyyy'), 10 from dual union all
select 2 ID_key,to_date('4/11/2013','mm-dd-yyyy'), 5 from dual union all
select 2 ID_key,to_date('4/12/2013','mm-dd-yyyy'), 0 from dual union all
select 2 ID_key,to_date('4/13/2013','mm-dd-yyyy'), 0 from dual union all
select 2 ID_key,to_date('4/15/2013','mm-dd-yyyy'), 6 from dual union all
select 2 ID_key,to_date('4/16/2013','mm-dd-yyyy'), 8 from dual union all
select 2 ID_key,to_date('4/17/2013','mm-dd-yyyy'), 0 from dual union all
select 2 ID_key,to_date('4/18/2013','mm-dd-yyyy'), 10 from dual union all
select 2 ID_key,to_date('4/19/2013','mm-dd-yyyy'), 5 from dual
)**Please let me know if the table does not load.
I would like to get the 7 day average as long as there is date for that row has enough previous dates, it not then it will return null.
the results should look like this
ID_Key date_val Value_num 7Day_Avg 7Day_Avg2
1 4/1/2013 10 null null
1 4/2/2013 15 null null
1 4/3/2013 20 null null
1 4/5/2013 0 null null
1 4/8/2013 12 6.71 11.75
1 4/9/2013 8 5.71 10.00
1 4/10/2013 6 3.71 6.50
1 4/12/2013 10 5.14 9.00
1 4/13/2013 0 5.14 7.20
1 4/14/2013 0 5.14 6.00
1 4/15/2013 10 4.86 5.67
1 4/16/2013 5 4.42 5.17
1 4/17/2013 2 3.85 4.50
1 4/20/2013 3 2.86 4.00
2 4/3/2013 12 null null
2 4/5/2013 15 null null
2 4/6/2013 5 null null
2 4/7/2013 7 5.57 9.75
2 4/9/2013 10 7.00 9.80
2 4/11/2013 5 6.00 8.40
2 4/12/2013 0 3.86 5.40
2 4/13/2013 0 3.14 4.40
2 4/15/2013 6 3.00 4.20
2 4/16/2013 8 2.71 3.80
2 4/17/2013 0 2.71 3.17
2 4/18/2013 10 3.43 4.00
2 4/19/2013 5 4.14 4.83As you may notice, there are gaps in the dates, so the value are then treated as zeros for the 7Day_Avg and then ignored for teh 7Day_Avg2 (not counted as number of days averaged do to no valu_num row)
I was trying something like this to start, but getting error "missing keyword"
select
t.*/,
sum(
case
when date_val between :day2 - 6 and :day2
then value_num between date_val - 6 and date_val
else null
end
as 7Day_avg
form tShould I have the case structure outside the sum function?
Any thoughts??
Edited by: 1004407 on Jun 7, 2013 11:06 AMHi,
If you want the average of the last 7 days, including the current day, then then RANGE should be 6 PRECEDING, not 7.
Try this:
WITH got_min_date_val AS
SELECT id_key, date_val, value_num
, MIN (date_val) OVER () AS min_date_val
FROM t
WHERE date_val BETWEEN TO_DATE ('04-01-2013', 'mm-dd-yyyy')
AND TO_DATE ('04-20-2013', 'mm-dd-yyyy')
SELECT id_key, date_val, value_num
, CASE
WHEN date_val >= min_date_val + 6
THEN SUM (value_num) OVER ( PARTITION BY id_key
ORDER BY date_val
RANGE 6 PRECEDING
/ 7
END AS avg_7_day
, CASE
WHEN date_val >= min_date_val + 6
THEN AVG (value_num) OVER ( PARTITION BY id_key
ORDER BY date_val
RANGE 6 PRECEDING
END AS avg_7_day_2
FROM got_min_date_val
ORDER BY id_key
, date_val
Output:
ID_KEY DATE_VAL VALUE_NUM AVG_7_DAY AVG_7_DAY_2
1 01-APR-13 10
1 02-APR-13 15
1 03-APR-13 20
1 05-APR-13 0
1 08-APR-13 12 6.71 11.75
1 09-APR-13 8 5.71 10.00
1 10-APR-13 6 3.71 6.50
1 12-APR-13 10 5.14 9.00
1 13-APR-13 0 5.14 7.20
1 14-APR-13 0 5.14 6.00
1 15-APR-13 10 4.86 5.67
1 16-APR-13 5 4.43 5.17
1 17-APR-13 2 3.86 4.50
1 20-APR-13 3 2.86 4.00
2 03-APR-13 12
2 05-APR-13 15
2 06-APR-13 5
2 07-APR-13 7 5.57 9.75
2 09-APR-13 10 7.00 9.80
2 11-APR-13 5 6.00 8.40
2 12-APR-13 0 3.86 5.40
2 13-APR-13 0 3.14 4.40
2 15-APR-13 6 3.00 4.20
2 16-APR-13 8 2.71 3.80
2 17-APR-13 0 2.71 3.17
2 18-APR-13 10 3.43 4.00
2 19-APR-13 5 4.14 4.83
Message was edited by: FrankKulash
Sorry; I meant to reply to OP, not to Greg -
How to read Blueprint Structure using ABAP
Hello All,
We are creating a report for which we need to read the projects blueprint structures (from ABAP).
Anyone any ideas what tables to read from, or what bapi calls we can make for this?
Thanks,
JurjenHi Jurjen
sorry for my late response, I was two days offsite at a customer ...
If you follow the description above you will get a list of entries of TTREE with different TTREE-TYPES. These types are giving you at least some information about their positions in the structure:
BMBS0 is a business scenario
BMPG1 is a business process
BMPS1 is a business process step
REFH0 is the top node of your structure
Unfortunately I didn't get the real structure hierarchy up to now to understand who is which parent or brother or child. Nevertheless you will have in the field TTREE-TEXT the description of the nodes in transaction SOLAR01.
Best regards, Alexander -
How to read spool file and get the spool file number
Hey everyone.
I created a program ztemp that is calling another program ztemp2 within, ztemp2 creates a spool file. Now the requirement is I need to write a code within ztemp to download that spool request and then convert it to the pdf file. I know I can use program rstxpdft4 to convert the spool file to the PDF but for this I need to give the spool number, so can you please tell me how can I get the spool number and then fetch it to the program rstxpdft4 .
Thank you.
Rhul goelHi,
Please check the [link|Convert ABAP List to PDF and display without downloading first; (Rich's reply) and get the spool similarly.
Or read from table TSP01 to get the latest spool using sy-uname.
Regards,
Srini. -
How to read text and it's font details (Family and size) using Acrobat plugin?
Hello,
I have query about reading PDF, I wanted to extract text and it's font details (Family and size) using Acrobat plugin. How can I achieve that?
Any suggestions are welcome.
Thanks
Rohit ShindeLook at the samples in the SDK around PDFEdit and the PDEdit APIs.
-
Hi,
Could anyone tell me how to read multiple structures in a single BPEL process?
I have a requirement to read multiple files with different structures to be read in a single BPEL process.
All these files will be ftped and read from a single source folder, this need to be transformed to common canonical xml format [OAGIS], Any possibilities?
Thanks in Advance
Regards
Sathish
Message was edited by:
user555459if Reading Multiple Structures mean by Reading Multiple FileType from FTP location then
the solution for above problem is to either fallow the naming convention or stick for on file type. (*.* is not allowed in FTP adapter)
fallowing the naming convention: uploaded files should start with somename_----.txt or csv or any structure, type......
then we can put a condition like somename*.* will pickup all the files start with somename.... instead of structure...
try this link.... study the documentaion
http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_file.htm#CIABDJEF
hope this will help you.... -
How to read the properties file available in Server File structure in webdy
hi all,
I have developed one webdynpro application. In this application i need to access mdm server to continue. For getting the connection i need to pass the IP addresses.
Can i have code how to read the properties file which is residing in the server file. with out included along with the application. keeping some where in the file structure in the server. I want to read that properties file by maintain the iP addresses and users in properties file based on the key i want to read like below.
servername="abcServer"
username="john"
password="test123"
Please send me the code how to read this properties file from the file structure and how to read this values by key in webdynpro application
Regards
VijayHi Vijay,
You can try this piece of code too:
Properties props = new Properties();
//try retrieve data from file
//catch exception in case properties file does not exist
try {
props.load(new FileInputStream("c:\property\Test.properties")); //File location
String serverName = props.getProperty("servername"); //Similarly, you can access the other properties
if(serverName==null)
//....do appropriate handling
} catch(IOException e)
e.printStackTrace();
Regards,
Alka. -
How to get Employee Picture in Smartforms
Hi Experts
Please help me out in getting employee picture in Smartforms
I have used the following FMs
1. HR_IMAGE_EXISTS
2. SCMS_DOC_URL_READ
By using these two FM i got the URL and i am able to get the picture in my Report Program,by using FM 'ISM_URL_SHOW'.
But Please tell how to get this picture in Smartform .
As i am generating Employee Biodata and in that i need employee Picture.
Please HELP me ....
Thanks & Regards
Shaveta PrabhakarHi,
U need pictures in smartforms for that just try this one I think so it will help full to u.
First Upload that picture in the se78 that photo must be in the bitmapformat(picture.bmp).
steps are:
goto se78>graphics->import--->it asks the file path here,fill those details
Then goto Smartform--->In which page u want to put the picture,
there click that page and goto Background picture,
here give the name of that picture and select the resolution and positin of the picture there.
Then u will get the picture in the output.
Regards,
Surya -
How to read data from a CLUSTER STRUCTURE not cluster table.
Hi,
how to read data from a CLUSTER STRUCTURE not cluster table.
regards,
Usha.Hello,
A structre doesnt contain data.. so u cannot read from it. U need to find out table of that structure and read data from it.
Regards,
Mansi. -
When I plug my ipod into my computer the computer dosnt read it and I get a messege saying that the device is drawing to much power. How do I solve this problem???
I had the same problem with mine when I connect the ipod when it's full charged and turn on. The problem never happen when the ipod is charging or i'ts full charged and it's turn off. So just turn off your ipod down and connect to your mac again.
-
Hello
How to make labview program to get average value of 200 reading from multimeter (I using using loop) to read voltage from mulmeter but I like to get average value of all of 200 reding how can I do that?
Thanks
Wee
Solved!
Go to Solution.Another idea with less programming - take advantage of the "free" array that comes with a Chart - i.e. the History Data.
1) Wire your DMM data to a Chart. (You can set the chart to invisible if you don't plan on using it in the GUI).
2) Set the Chart History Length to 200 (right click on the chart, click on Chart History Length...)
3) On the block diagram, use the History Data Property Node, wire it to Mean.vi, and you're done.
Easiest running average ever.
Message Edited by Broken Arrow on 04-07-2010 11:36 AM
Richard
Attachments:
EasyAvg.jpg 8 KB -
How to Read records from structure to internal table
HI,
Can any body know how to read the records from structure to internal table at runtime.
please give me sample program if possible.
thanks in advance
KPif your internal table is having the same structure as the structure you are reading the values from then you can directly assign like..
internatable table work area or header line = structure.
or else if they are different assign field by field like
internal table-field1 = structure-field1.
internal table-field2 = structure-field2.
award points if it helps. -
How to read/write .CSV file into CLOB column in a table of Oracle 10g
I have a requirement which is nothing but a table has two column
create table emp_data (empid number, report clob)
Here REPORT column is CLOB data type which used to load the data from the .csv file.
The requirement here is
1) How to load data from .CSV file into CLOB column along with empid using DBMS_lob utility
2) How to read report columns which should return all the columns present in the .CSV file (dynamically because every csv file may have different number of columns) along with the primariy key empid).
eg: empid report_field1 report_field2
1 x y
Any help would be appreciated.If I understand you right, you want each row in your table to contain an emp_id and the complete text of a multi-record .csv file.
It's not clear how you relate emp_id to the appropriate file to be read. Is the emp_id stored in the csv file?
To read the file, you can use functions from [UTL_FILE|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm#BABGGEDF] (as long as the file is in a directory accessible to the Oracle server):
declare
lt_report_clob CLOB;
l_max_line_length integer := 1024; -- set as high as the longest line in your file
l_infile UTL_FILE.file_type;
l_buffer varchar2(1024);
l_emp_id report_table.emp_id%type := 123; -- not clear where emp_id comes from
l_filename varchar2(200) := 'my_file_name.csv'; -- get this from somewhere
begin
-- open the file; we assume an Oracle directory has already been created
l_infile := utl_file.fopen('CSV_DIRECTORY', l_filename, 'r', l_max_line_length);
-- initialise the empty clob
dbms_lob.createtemporary(lt_report_clob, TRUE, DBMS_LOB.session);
loop
begin
utl_file.get_line(l_infile, l_buffer);
dbms_lob.append(lt_report_clob, l_buffer);
exception
when no_data_found then
exit;
end;
end loop;
insert into report_table (emp_id, report)
values (l_emp_id, lt_report_clob);
-- free the temporary lob
dbms_lob.freetemporary(lt_report_clob);
-- close the file
UTL_FILE.fclose(l_infile);
end;This simple line-by-line approach is easy to understand, and gives you an opportunity (if you want) to take each line in the file and transform it (for example, you could transform it into a nested table, or into XML). However it can be rather slow if there are many records in the csv file - the lob_append operation is not particularly efficient. I was able to improve the efficiency by caching the lines in a VARCHAR2 up to a maximum cache size, and only then appending to the LOB - see [three posts on my blog|http://preferisco.blogspot.com/search/label/lob].
There is at least one other possibility:
- you could use [DBMS_LOB.loadclobfromfile|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#i998978]. I've not tried this before myself, but I think the procedure is described [here in the 9i docs|http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl12bfl.htm#879711]. This is likely to be faster than UTL_FILE (because it is all happening in the underlying DBMS_LOB package, possibly in a native way).
That's all for now. I haven't yet answered your question on how to report data back out of the CLOB. I would like to know how you associate employees with files; what happens if there is > 1 file per employee, etc.
HTH
Regards Nigel
Edited by: nthomas on Mar 2, 2009 11:22 AM - don't forget to fclose the file...
Maybe you are looking for
-
Why Does iTunes Make Combining Songs Into a Single Album So Difficult?
Can anyone explain, or refer me to a website, that explains and lists in a "1,2,3" manner the illogic of the iTunes "get info" panes and why iTunes splits, combines and erases data depending upon what you put in the "get info" area. I have looked at
-
I have Windows 8.1 installed on my Macbook Pro Retina (Late 2013) and it keeps on crashing with a WHEA_UNCORRECTABLE_ERROR BSOD error. Is this an issue with the bootcamp driver not compatible with Windows 8.1? or is there something I can do to fix th
-
OEL 5.5 - Unable to configure xserver
Hi I have installed OEL 5.5 on a brand new laptop. Not on the VM. I formatted the HD and have done a complete OEL 5.5 install. This is a HP Pavilion dm4 system i 'm trying to configure and start xserver .. but getting the following error .. Error Syn
-
How can you tell if an unopened product is engraved?
I got an Ipod Touch for Christmas and was wondering if there is a way to tell if it is engraved without opening it. I googled it and couldn't really find a conclusive answer. I am interested in upgrading from an 8gb to a 32gb and read that apple does
-
Display photo of uut in labview
I'm using TestStand 3.5, but I'm developing the tests in LabVIEW8 (I'm also trying to customize the OI in LabVIEW - but that's an etirely different set of problems). Anyway, what I'd like to do is when an operator selects a sequence file to open, af