How to convert frames into hours:minutes:seconds?
if I have some columns which contains the time value in frames, i.e. Content_Duration, program_duration etc.
How can I convert those frames in hh:mm:ss?
Is it possible to do it with a function do that so that I can re-use it?
Thanks
I am not quite sure where you get content_interval from?CONTENT_INTERVAL comes from the function call "numtodsinterval( content_duration / 1500, 'MINUTE' )" in the inline view.
You might want to code it as "numtodsinterval( content_duration / 25, 'SECOND' )" to match the 25 frames/second standard you mentioned after I posted my reply.
will it allow more than 99 hours? i.e. 154:57:40?Actually, it won't work for more than 23 hours, 59 minutes, 59 seconds. For larger numbers this technique requires a field for the number of days, like this.
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 29 12:41:38 2007
create table t ( content_duration number );
Table created.
insert into t values ( 1500*60*99 /* = 99 hours */ );
1 row created.
commit;
Commit complete.
select
lpad(extract(DAY from content_interval),2,'0')||' '||
lpad(extract(HOUR from content_interval),2,'0')||':'||
lpad(extract(MINUTE from content_interval),2,'0')||':'||
lpad(extract(SECOND from content_interval),2,'0')
as result
from
( select numtodsinterval( content_duration / 25, 'SECOND' ) as content_interval
from t
RESULT
04 03:00:00
1 row selected.
-- if you're going to show DAYS though, the following way is simpler
select
cast
( numtodsinterval( content_duration / 25, 'SECOND' ) as interval day(2) to second(0))
as result
from t ;
RESULT
+04 03:00:00
1 row selected.If you really need output like 99:00:00 instead of +04 03:00:00 then take Volder's approach.
Is it possible to do it as a function?Anything you can do with a SQL query you can probably do inside a function, but for a line of code like "cast ( numtodsinterval( ..." I personally wouldn't bother.
Joe Fuda
SQL Snippets
Similar Messages
-
How to Convert frames into minutes and seconds
Hi,
does anyone know how to convert frames into time (minutes and
seconds). I need the users to view the swf with current time being
played and over time. I have 2152 frames in total and I want that
to be converted to time. Can anyone help me on this. I would really
appreciate it. It is very urgent!!!!
ThanksTime Indicator,
> does anyone know how to convert frames into time
(minutes
> and seconds).
That depends entirely on the framerate of the movie. At the
default
12fps, 12 frames would be one second; 24 frames would be two.
At 24fps, 24
frames would be one second.
> I need the users to view the swf with current time being
played
> and over time. I have 2152 frames in total and I want
that to be
> converted to time. Can anyone help me on this. I would
really
> appreciate it. It is very urgent!!!!
Judging by your four exclamation points, I'd say it's
definitely urgent!
Well, again, if you're at 12fps, 2152 frames would take 179
seconds, or 2
minutes and 59 seconds. I arrived at that number by dividing
2152 by 12.
Keep in mind, though, framerate is actually more of a
guideline than an
exact figure. Framerate determines the rate at which Flash
will *try* to
display content. On an especially slow computer, the Flash
Player may not
be able to keep up, and the same number of frames might
actually take more
time.
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design." -
Convert Format Day, Hour, Minute, Seconds in Hours
Hi all,
I have one report generate by VoIP application like this:
Total of hour has showed in Day (4). hour (20): Minute (26): seconds (06) summarize 4.20:26:06
I need convert this format only how like 116 (hours) 26 (twenty six) Minutes 06 (Six) seconds. summarize 116:26:06
How I can make this?
Regards!
Douglas Filipe http://douglasfilipe.wordpress.comHi,
I'm marking the reply as answer as there has been no update for a couple of days.
If you come back to find it doesn't work for you, please reply to us and unmark the answer.
Thanks
George Zhao
Forum Support
Come back and mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback on our support, please click "[email protected]" -
FM for microseconds to hours : minutes : seconds : microseconds conversion
Hi Expart ,
Is there is any Fm to Convert microseconds to hours : minutes : seconds : microseconds. Actually i get the runtime in Micro second and i need to display it in above format .
Please help me to get the fm or other simple way to do this
Thanks
RajuHi,
Use this link
FM to converts seconds into HH:MM:SS
Function Module for converting seconds into hours and minutes
Hope these will help you.
Regards,
Vijay -
Convert seconds to Days, hours, Minutes, Seconds in Reporting Services
Hi Guys,
Im currently reporting of an analysis services cube, however I have value which is in seconds and would like to report on this in reporting services as day:HH:MM:SS.
Has anyone got any experience reporting in this format?
Regards
DaveHi Dave,
We can use custom code to convert seconds to HH:MM:SS
Public Function Calculate(ByVal TotalSeconds as Integer) as String
Dim Hours, Minutes, Seconds As Integer
Dim Hour, Minute, Second As String
Hours = floor(TotalSeconds/ 3600)
IF Hours<10
Hour="0" & Hours.ToString
Else
Hour=Hours.ToString
End IF
Seconds = TotalSeconds Mod 3600
Minutes =floor( Seconds / 60)
IF Minutes<10
Minute="0" & Minutes.ToString
Else
Minute=Minutes.ToString
End IF
Seconds = Seconds Mod 60
IF Seconds<10
Second="0" & Seconds.ToString
Else
Second=Seconds.ToString
End IF
Return Hour & ":" & Minute & ":" & Second
End Function
Then we can use the expression to conver it.
=Code.Calculate(Fields!Column.Value)
The report looks like below:
If you have any questions, please feel free to ask.
Regards,
Charlie Liao
If you have any feedback on our support, please click
here.
Charlie Liao
TechNet Community Support -
Converting seconds to hours + minutes + seconds
hey all,
was just looking for the quickest way to convert seconds to hours + minutes + seconds
eg, 18084 s is 5h, 1m, 24s.You can use the Apache Commons Lang DurationFormatUtils class
import org.apache.commons.lang.time.*;
public class SecondsConversion {
public static void main(String[] args) {
try {
int seconds = 18084;
int milliseconds = seconds * 1000;
String[] values = DurationFormatUtils.formatDuration(milliseconds, "H m s").split(" ");
System.out.println(values[0] + "h " + values[1] + "m " + values[2] + "s ");
} catch (Exception e) {
e.printStackTrace();
} -
itune 11.0.0.163 shows silly date approximation on bottom bar rather than days, hours, minutes, seconds as before. How do I change this?
Apple buried the transfer purchases option, but it's still there. To transfer purchases from your iOS device in iTunes:
Select the device toward the top-middle of iTunes (underneath the status area/progress bar/Apple logo).
Go to the File menu.
Select Devices
Click on Transfer Purchases from [DeviceName]... -
Write elapsed time to a spreadsheet in hours:minutes:seconds format
Hi everyone,
I've been trying to write an elapsed time to a spreadsheet file in an hours:minutes:seconds format, but the time is displayed in a floating point value of seconds..
how can I write to a spreadsheet in an hours:minutes:seconds format.
Thank you,
James-I often use a subVI that converts Seconds to Hours, Minutes and Seconds. Use the Quotient and Remainder function to divide your elapsed time by 3600, 60 and 1. You can then convert those values to a modified string and use the Write to Spreadsheet File.
As Dennis said, newer versions of LabVIEW's Write to Spreadsheet File.VI can handle arrays of Double, Integer or String automatically, and in older versions, the Write to Spreadsheet File.VI can be modified and copied to handle strings.
Hope this helps.
(Written in 8.5)
Message Edited by LabViewGuruWannabe on 01-18-2008 09:28 PM
Attachments:
TimeToSpreadsheet.vi 26 KB
SecondstoHMS.png 32 KB -
Displaying the hour, minute, seconds.....
Hi fellow experts!
Once again I call upon you for help. I'm strugglng with the formatting of dates...specifically the hour, minute, seconds between two dates.
Sample data:
create table test (script_name varchar2(50),run_start date,run_end date, job_id number, parent_job_id number);
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('IMPORTMTM','09-FEB-10','09-FEB-10','2409671','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('INT_EOD_VALUATIONS','09-FEB-10','09-FEB-10','2409673','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('ACC_EOD_FXACCOUNTING','09-FEB-10','09-FEB-10','2409677','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('GLO_EOD_FXUPDATE ','09-FEB-10','09-FEB-10','2409679','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('MX_PREACCOUNTING_BACKUP_RP','09-FEB-10','09-FEB-10','2409683','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('DM_PREACCOUNTING_BACKUP_RP','09-FEB-10','09-FEB-10','2409684','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('IMP_FIXING','09-FEB-10','09-FEB-10','2409688','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('GLO_EOD_FIXINGIRD','09-FEB-10','09-FEB-10','2409690','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('WAIT_5_MINS','09-FEB-10','09-FEB-10','2409692','2409645');
The output of the time should look like the results from the query below:
select floor((run_end-run_start)*24) as Hrs ,floor(((run_end-run_start)*1440 - floor((run_end-run_start)*24)*60)) as Mins,
ceil(((run_end-run_start)*86400 - floor((run_end-run_start)*1440)*60)) as Secs
from (
select to_date('10-oct-2003 15:02:23','DD-Mon-YYYY HH24:Mi:SS') as run_start,
to_date('10-oct-2003 16:20:20','DD-Mon-YYYY HH24:Mi:SS') as run_end
from dual);
i.e
H M S
1 17 57
My current sql is:
select script_name,
run_start,
run_end,
floor((run_end-run_start)*24) as Hrs ,floor(((run_end-run_start)*1440 - floor((run_end-run_start)*24)*60)) as Mins,
ceil(((run_end-run_start)*86400 - floor((run_end-run_start)*1440)*60)) as Secs
from (
select lpad(' ',5*level,' ')||name script_name
,to_date(run_start,'dd-mon-yyyy hh24:mi:ss') run_start, to_date(run_end,'dd-mon-yyyy hh24:mi:ss') run_end,
sys_connect_by_path(to_date(run_start,'dd-mon-yyyy hh24:mi:ss'),'/') root_start
from jcs_jobs
connect by prior job_id = parent_job_id
start with PARENT_JOB_ID IS NULL and job_id = 2409645
I need a slight tweak somewhere, but can't quite get there!
Oracle version is 9i
Many thanks for your help in advance.
DevHi,
Devski Peters wrote:
......sorry, I didn't make myself clear.....Sorry, this message made things even less clear.
Like Bhushan, I don't see any relationship between the data you posted:
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('IMPORTMTM','09-feb-2010 20:00:02','09-feb-2010 20:00:44','2409671','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('INT_EOD_VALUATIONS','09-feb-2010 20:00:44','09-feb-2010 20:01:03','2409673','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('ACC_EOD_FXACCOUNTING','09-feb-2010 20:01:05','09-feb-2010 20:01:24','2409677','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('GLO_EOD_FXUPDATE ','09-feb-2010 20:01:24','09-feb-2010 20:01:43','2409679','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('MX_PREACCOUNTING_BACKUP_RP','09-feb-2010 20:01:45','09-feb-2010 20:01:49','2409683','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('DM_PREACCOUNTING_BACKUP_RP','09-feb-2010 20:01:45','09-feb-2010 20:01:49','2409684','2409645');
insert into test (script_name,run_start,run_end,job_id,parent_job_id) values ('IMP_FIXING','09-feb-2010 20:01:51','09-feb-2010 20:02:15','2409688','2409645');and the results you want:
NORMAL_DAY 09-feb-2010 18:05:00 10-feb-2010 04:22:45 20'681'879.88
Step 1 of NORMAL_DAY 09-feb-2010 18:05:00 09-feb-2010 18:05:24 575.88
Step 2 of NORMAL_DAY 09-feb-2010 18:05:24 09-feb-2010 18:05:46 527.88
EOD_FX_RATE_UPLOAD 09-feb-2010 18:05:24 09-feb-2010 18:05:46 527.88
Step 1 of EOD_FX_RATE_UPLOAD 09-feb-2010 18:05:24 09-feb-2010 18:05:30 143.88
FX_FTPS_GET_EOD 09-feb-2010 18:05:26 09-feb-2010 18:05:30 95.88
Step 2 of EOD_FX_RATE_UPLOAD 09-feb-2010 18:05:30 09-feb-2010 18:05:45 359.88
FXSPOTS 09-feb-2010 18:05:31 09-feb-2010 18:05:45 335.88
Step 3 of EOD_FX_RATE_UPLOAD 09-feb-2010 18:05:45 09-feb-2010 18:05:46 23.88
SEND_MAIL_FXSPOTS 09-feb-2010 18:05:45 09-feb-2010 18:05:46 23.88
Step 3 of NORMAL_DAY 09-feb-2010 18:05:46 09-feb-2010 18:06:10 1'535.88
CALENDAR_UPLOAD 09-feb-2010 18:05:47 09-feb-2010 18:06:10 1'511.88
Step 1 of CALENDAR_UPLOAD 09-feb-2010 18:05:47 09-feb-2010 18:05:53 143.88
CALENDAR 09-feb-2010 18:05:47 09-feb-2010 18:05:53 143.88
Step 2 of CALENDAR_UPLOAD 09-feb-2010 18:05:53 09-feb-2010 18:06:00 1'127.88
MDS_STOP 09-feb-2010 18:05:53 09-feb-2010 18:06:00 1'127.88
Step 3 of CALENDAR_UPLOAD 09-feb-2010 18:06:00 09-feb-2010 18:06:03 71.88
MDS_HOLIDAY 09-feb-2010 18:06:00 09-feb-2010 18:06:03 71.88
Step 4 of CALENDAR_UPLOAD 09-feb-2010 18:06:03 09-feb-2010 18:06:10 167.88Do you really want that data to produce that output?
If the results are not from that data, then post a consistent set of data and results.
When you have poted some sample data and the results you want from that data , explain how you get those results. Pick a couple of rows of output, and explain how you got every column in the results from the data. Be specific.
The table has a 'pig ear' relationship......so job_id can have the same parent_job_id.....What is a "pig ear" relationship? (I like the name.)
>
The connect by allows me display the results with indentation, so the results will look like:The results look completely unformatted on my browser.
When you post any formatted text on this site, type these 6 characters:
(small letters only, inside curly brackets) before and after each formatted section.
So for example,the first line shows a time of 20'681'879.88, which works out to 10:18 hours approx. Explain the relationship between 20'681'879.88 and "10:18 hours". (Do you mean 10 hours plus 18 minutes?) -
Adding day/hour/minute/second to a date value
How does one add a day/hour/minute/second to a date value?
SQL> select to_char(sysdate, 'DD/MM/YYYY HH24:MI:SS') to_day,
2 to_char(sysdate+1, 'DD/MM/YYYY HH24:MI:SS') add_day,
3 to_char(sysdate + 1/24, 'DD/MM/YYYY HH24:MI:SS') add_hour,
4 to_char(sysdate + 1/(24*60), 'DD/MM/YYYY HH24:MI:SS') add_minute,
5 to_char(sysdate + 1/(24*60*60), 'DD/MM/YYYY HH24:MI:SS') add_second
6 from dual
7 /
TO_DAY ADD_DAY ADD_HOUR ADD_MINUTE ADD_SECOND
10/10/2006 11:54:23 11/10/2006 11:54:23 10/10/2006 12:54:23 10/10/2006 11:55:23 10/10/2006 11:54:24
SQL>Cheers
Sarma. -
In DB2, I can get the value of year, month, date, hour, minute, second from current timestamp by year(), month(), date(), hour(), minute(), second(). Like below SQL,
SELECT current timestamp, year(current timestamp), month(current timestamp), date(current timestamp), hour(current timestamp), minute(current timestamp), second(current timestamp) FROM DUAL
In Oracle, how can I modify above SQL?
That is, do we have the corresponding function to each one of them in DB2?
Thanks,
JJHi Turloch,
Thanks for your help.
Here, I have another question.
How about the days caculation?
For example, in DB2, I have a SQL as below,
select
account_no
from
lit_transaction
where
( start_date + no_of_days days - exp_days days) <= CURRENT DATE
How can I modify above days caculation for Oracle?
Thanks,
J. -
How to convert report into alvgrid please hepl
how to convert report into alvgrid please hepl
BALVSD01 check this program u will know r see below code
sample prog
REPORT ZMAT11 .
TYPE-POOLS : slis.
TABLES : mkpf,
mseg,
t001w,
t001l.
TYPES : BEGIN OF ty_t001w,
werks TYPE t001w-werks,
name1 TYPE t001w-name1,
END OF ty_t001w,
BEGIN OF ty_makt,
matnr TYPE makt-matnr,
maktx TYPE makt-maktx,
END OF ty_makt,
BEGIN OF ty_t001l,
lgort TYPE t001l-lgort,
lgobe TYPE t001l-lgobe,
END OF ty_t001l.
DATA : BEGIN OF it_mat OCCURS 0,
mblnr LIKE mseg-mblnr,
zeile LIKE mseg-zeile,
mjahr LIKE mseg-mjahr,
bldat LIKE mkpf-bldat,
budat LIKE mkpf-budat,
bwart LIKE mseg-bwart,
matnr LIKE mseg-matnr,
maktx LIKE makt-maktx,
erfmg LIKE mseg-erfmg,
erfme LIKE mseg-erfme,
werks LIKE mseg-werks,
name1 LIKE t001w-name1,
lgort LIKE mseg-lgort,
lgobe LIKE t001l-lgobe,
umwrk LIKE mseg-umwrk,
name2 LIKE t001w-name1,
umlgo LIKE mseg-umlgo,
lgobe1 LIKE t001l-lgobe,
END OF it_mat.
DATA : it_t001w TYPE TABLE OF ty_t001w
WITH HEADER LINE,
it_makt TYPE TABLE OF ty_makt
WITH HEADER LINE,
it_t001l TYPE TABLE OF ty_t001l
WITH HEADER LINE.
DATA : ls_layout TYPE slis_layout_alv,
it_fcat TYPE slis_t_fieldcat_alv ,
wa_fcat TYPE slis_fieldcat_alv,
lh TYPE slis_t_listheader,
ls TYPE slis_listheader,
it_events TYPE slis_t_event ,
ls_event TYPE slis_alv_event ,
w_var TYPE i.
DATA : l_date(10).
DATA : l_date1(20),
ztabix LIKE sy-tabix.
DATA : l_repid LIKE trdir-name.
l_repid = 'ZMAT11'.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_werks FOR mseg-werks,
s_lgort FOR mseg-lgort,
s_umwrk FOR mseg-umwrk,
s_umlgo FOR mseg-umlgo,
s_bwart FOR mseg-bwart,
s_budat FOR mkpf-budat,
s_mjahr FOR mkpf-mjahr.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
SELECT SINGLE * FROM t001w INTO t001w
WHERE werks IN s_werks.
IF sy-subrc <> 0.
MESSAGE e000(8i) WITH 'Enter a Valid Supplying Plant'.
ENDIF.
SELECT SINGLE * FROM t001w INTO t001w
WHERE werks IN s_umwrk.
IF sy-subrc <> 0.
MESSAGE e000(8i) WITH 'Enter a Valid Receiving Plant'.
ENDIF.
SELECT SINGLE * FROM t001l INTO t001l
WHERE lgort IN s_lgort.
IF sy-subrc <> 0.
MESSAGE e000(8i) WITH 'Enter a Valid Supplying St.Loc'.
ENDIF.
SELECT SINGLE * FROM t001l INTO t001l
WHERE lgort IN s_umlgo.
IF sy-subrc <> 0.
MESSAGE e000(8i) WITH 'Enter a Valid Receiving St.Loc'.
ENDIF.
START-OF-SELECTION.
ls-typ = 'H'.
ls-info = 'Material Document List'.
APPEND ls TO lh.
ls-typ = 'S'.
WRITE: sy-datum TO l_date USING EDIT MASK '__/__/____'.
CONCATENATE 'DATE :' l_date INTO l_date1 SEPARATED BY space.
ls-info = l_date1.
APPEND ls TO lh.
PERFORM field_cat.
PERFORM f001_get_data.
END-OF-SELECTION.
IF it_mat[] IS INITIAL.
MESSAGE i000(8i) WITH 'No data Found'(m01).
EXIT.
ENDIF.
PERFORM process_data.
PERFORM display_data.
*& Form f001_get_data
text
--> p1 text
<-- p2 text
FORM f001_get_data .
SELECT amblnr azeile amjahr abwart a~matnr
aerfmg aerfme awerks algort aumwrk aumlgo
b~budat
b~bldat INTO CORRESPONDING FIELDS OF TABLE it_mat
FROM mseg AS a
INNER JOIN mkpf AS b
ON amblnr = bmblnr
AND amjahr = bmjahr
CLIENT SPECIFIED
WHERE a~mandt EQ sy-mandt
AND a~werks IN s_werks
AND a~lgort IN s_lgort
AND a~umwrk IN s_umwrk
AND a~umlgo IN s_umlgo
AND a~bwart IN s_bwart
AND b~budat IN s_budat
AND b~mjahr IN s_mjahr.
IF sy-subrc = 0.
SELECT matnr maktx INTO TABLE it_makt FROM makt
CLIENT SPECIFIED
FOR ALL ENTRIES IN it_mat
WHERE mandt EQ sy-mandt
AND matnr = it_mat-matnr.
ENDIF.
SELECT werks name1 INTO TABLE it_t001w FROM t001w
CLIENT SPECIFIED
WHERE mandt EQ sy-mandt.
IF sy-subrc <> 0.
MESSAGE i000(8i) WITH 'No Plant Found'(m02).
ENDIF.
SELECT lgort lgobe INTO TABLE it_t001l FROM t001l
CLIENT SPECIFIED
WHERE mandt EQ sy-mandt.
IF sy-subrc <> 0.
MESSAGE i000(8i) WITH 'No Storage Location Found'(m03).
ENDIF.
ENDFORM. " f001_get_data
*& Form field_cat
text
--> p1 text
<-- p2 text
FORM field_cat .
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'MBLNR'.
wa_fcat-key = 'X'.
wa_fcat-hotspot = 'X'.
wa_fcat-ref_fieldname = 'MBLNR'.
wa_fcat-ref_tabname = 'MSEG'.
wa_fcat-seltext_m = 'Material Doc'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'ZEILE'.
wa_fcat-ref_fieldname = 'ZEILE'.
wa_fcat-ref_tabname = 'MSEG'.
wa_fcat-seltext_m = 'Item No'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'MJAHR'.
wa_fcat-ref_fieldname = 'MJAHR'.
wa_fcat-ref_tabname = 'MSEG'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'BWART'.
wa_fcat-ref_fieldname = 'BWART'.
wa_fcat-ref_tabname = 'MSEG'.
wa_fcat-seltext_m = 'Mvmt Type'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'BLDAT'.
wa_fcat-ref_fieldname = 'BLDAT'.
wa_fcat-ref_tabname = 'MKPF'.
wa_fcat-seltext_m = 'Document Date'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'BUDAT'.
wa_fcat-ref_fieldname = 'BUDAT'.
wa_fcat-ref_tabname = 'MKPF'.
wa_fcat-seltext_m = 'Posting Date'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'MATNR'.
wa_fcat-ref_fieldname = 'MATNR'.
wa_fcat-ref_tabname = 'MSEG'.
wa_fcat-seltext_m = 'Material No'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'MAKTX'.
wa_fcat-ref_fieldname = 'MAKTX'.
wa_fcat-ref_tabname = 'MAKT'.
wa_fcat-seltext_m = 'Material Description'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'ERFMG'.
wa_fcat-ref_fieldname = 'ERFMG'.
wa_fcat-ref_tabname = 'MSEG'.
wa_fcat-seltext_m = 'Quantity'.
wa_fcat-do_sum = 'X'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'ERFME'.
wa_fcat-ref_fieldname = 'ERFME'.
wa_fcat-ref_tabname = 'MSEG'.
wa_fcat-seltext_m = 'Uom'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'WERKS'.
wa_fcat-seltext_m = 'Supplying Plant'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'NAME1'.
wa_fcat-seltext_m = 'S.Plnt Desc.'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'LGORT'.
wa_fcat-seltext_m = 'Supplying St.Loc'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'LGOBE'.
wa_fcat-seltext_m = 'Su.St.Loc Desc.'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'UMWRK'.
wa_fcat-seltext_m = 'Receiving Plant'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'NAME2'.
wa_fcat-seltext_m = 'R.Plnt Desc.'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'UMLGO'.
wa_fcat-seltext_m = 'Receiving St.Loc'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
wa_fcat-col_pos = w_var.
wa_fcat-tabname = 'IT_MAT'.
wa_fcat-fieldname = 'LGOBE1'.
wa_fcat-seltext_m = 'Re.St.Loc Desc.'.
APPEND wa_fcat TO it_fcat.
CLEAR wa_fcat.
ADD 1 TO w_var.
ENDFORM. " field_cat
*& Form process_data
text
--> p1 text
<-- p2 text
FORM process_data .
LOOP AT it_mat.
ztabix = sy-tabix.
READ TABLE it_makt WITH KEY matnr = it_mat-matnr.
IF sy-subrc = 0.
it_mat-maktx = it_makt-maktx.
ENDIF.
IF it_mat-bwart+2(1) = '2'.
it_mat-erfmg = - ( it_mat-erfmg ).
ENDIF.
READ TABLE it_t001w WITH KEY werks = it_mat-werks.
IF sy-subrc = 0.
it_mat-name1 = it_t001w-name1.
ENDIF.
READ TABLE it_t001w WITH KEY werks = it_mat-umwrk.
IF sy-subrc = 0.
it_mat-name2 = it_t001w-name1.
ENDIF.
READ TABLE it_t001l WITH KEY lgort = it_mat-lgort.
IF sy-subrc = 0.
it_mat-lgobe = it_t001l-lgobe.
ENDIF.
READ TABLE it_t001l WITH KEY lgort = it_mat-umlgo.
IF sy-subrc = 0.
it_mat-lgobe1 = it_t001l-lgobe.
ENDIF.
MODIFY it_mat INDEX ztabix .
ENDLOOP.
ENDFORM. " process_data
*& Form display_data
text
--> p1 text
<-- p2 text
FORM display_data .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = l_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'LINE'
i_callback_top_of_page = 'TOP'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
it_fieldcat = it_fcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_mat
EXCEPTIONS
PROGRAM_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.
ENDFORM. " display_data
*& Form TOP
text
FORM top.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = lh
I_LOGO =
I_END_OF_LIST_GRID =
ENDFORM. "TOP -
How to convert .class into .jar file
Hi,
How to convert .class into .jar filejsf_VWP5.5.1 wrote:
Hi,
How to convert .class into .jar fileFrom a command prompt, cd to the location of your .class file(s).
If you want to create a simple jar, use: jar -cf Whatever.jar Whatever.class
If you want to compile all .class files in a directory into a jar, use *.class instead.
Now, I'm going to assume you want to create an executable jar... here's how to do that:
1) Create a blank text file; for this example, lets call it main.txt.
2) In the first line of main.txt, type: Main-class: Whatever ('Whatever' should be the name of the class in your program where the main() method is located)
3) Press enter to go to the next line (someone please correct me if I'm wrong, but if you don't insert the line break/CR after the Main-class: statement, this will not work... in my experience, this is true)
4) Make sure you save this file in the same directory as your .class file(s).
5) Type: jar -cmf Whatever.jar main.txt Whatever.class
...and that's about it. For more information on the usage of the jar command and to understand the switches (such as -cmf), try jar --help.
Hope that helps. -
How to convert BLOB into a String
Hi,
I got a blob column from the database.
It contains one XML File.
How to convert it into String.
I need the code for how to convert the blob into String
Thanks in Advance.A blob would be a byte-array, which you can use in the String(byte[]) constructor
-
How to convert rows into columns with decode function
Hi,
How to convert rows into columns with the help of decode function in oracle.
thanks and regards
P Prakashsay
col1 col2
1 10
2 20
3 30
then use
select col1,
sum(decode(col2,10,10)) "new1"
sum(decode(col2,20,20))"new2"
sum(decode(col2,30,30))"new3"
from table_name
group by col1;
we used sum u can use ny function if wont u have to give the column name i.e col2 name also
so i think u got it nw
regards
Maybe you are looking for
-
Multiple domain mailboxes for one AD user in exchange 2013
I just wanted to make sure that this hasn't changed in exchange 2013 or if there's a better way to do this we have a few users that need an email for companyA.com and CompanyB.com. For easy separation we've decided to create a separate mailbox for ea
-
I have a 16GB 3GS phone since about20 months now. For the last few days, my phone is constantly giving me message that the accessory attached to my phone is not optimized for this iphone. You may experience noise or poor communication, while there is
-
File Name and Target Directory name issue in FTP CC
Hi All , I am using following code to assing file name and directory name in UDF. I don;t want these parameters to be part of my target structure. Since i have created these files names in UDF, what are the values do i need to mention in FTP CC's "Fi
-
DVD-rom Scratch my Snow Leopard Disc
Hi All, my early 08 mbp dvd rom put alot of scratch on my new snow leopard install disc. although the installation went through smoothly. I do heard that it was trying alittle hard to read the disc. In the end i found lot of scratch. Does anyone expe
-
WRVS4400N Firmware upgrade fails
I've trying to upgrade the Firmware of WRVS4400N from 2.0.0.9 to the newest 2.0.1.3. Backup setting, upload the new firmware in the webinterface. Everything ok. Then I wait almost an hour, but the router did not reboot and reconnect to the webinterfa