ALV Top of Page Date format problem?
Dear All Abapper,
I have placed date(12.12.2007) format in ALV Top of Page, but it displayed
<u> <b> 20071212</b></u> in this format.
Pls, give me the suggestion to reclaim my problem.
Hi,
Cjeck the following code:
V_DATE = 'Run Date:'.
CONCATENATE V_DATE SY-DATUM6(2) '.' SY-DATUM4(2) '.' SY-DATUM(4)
INTO V_DATE .
REFRESH ITHED.
CLEAR SHED.
SHED-TYP = 'A'.
SHED-INFO = V_DATE.
APPEND SHED TO ITHED.
CLEAR SHED.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = ITHED.
I_LOGO =
I_END_OF_LIST_GRID =
ENDFORM.
Hope this helps.
Reward if helpful.
Regards,
Sipra
Similar Messages
-
Hi Experts,
In my Alv report top-of-page, i have a date . with name "Open Items As key Date" but i cant see
full text and if the date is 11.07.2008. its showing 11.07.20. so how to do this.
Correct answers will be fully rewarded.
Regards
Sunita.Hi,
data : lv_bldat(10) type c.
write p_bldat to lv_bldat.
pass lv_bldat inside of p_bldat.
What about this thread
ALV Top-Of -Page Display No respose for this.
If u got the solution close the THREAD.
Thanks,
Durai.V
Edited by: Durai V on Jul 11, 2008 12:04 PM -
To display posting date in alv top of page area for transaction KOB1
I want to display posting date given on selection screen of transaction KOB1 to the alv top of page area on final alv output .
what are the possible solutions ?I want to display posting date given on selection screen of transaction KOB1 to the alv top of page area on final alv output .
what are the possible solutions ? -
The no of character in alv top of page
i have to display k:
Share\MM_SCUBCode_PDAtxt_Upload\OUT-1090000017-200903171823 - LY 2.txt
in the alv top of page but it is taking k:
Share\MM_SCUBCode_PDAtxt_Upload\OUT-1090000017-200903171823.
any idea how to do it
please check my code
form top_of_page .
DATA: wa_header TYPE slis_listheader.
IF p_file IS NOT INITIAL.
wa_header-typ = 'S'.
wa_header-key = 'File Path:'.
wa_header-info = p_file.
APPEND wa_header TO it_header.
CLEAR wa_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_header.
ENDIF.Hi,
To overcome this limitation we can use dynamic document, which can be implemented through the class CL_DD_DOCUMENT. As dynamic documents use HTML viewer control so instead of triggering the TOP_OF_PAGE event we should trigger event of HTML TOP_OF_PAGE.
First create a subroutine for top of page in HTML format and send that name in I_CALLBACK_HTML_TOP_OF_PAGE parameter of ALV function module. The input parameter for this subroutine will be a variable of class CL_DD_DOCUMENT.
* FORM html_top_of_page *
FORM html_top_of_page USING top TYPE REF TO cl_dd_document.
data: l_text(255) type c.
l_text = 'k:\\Share\MM_SCUBCode_PDAtxt_Upload\OUT-1090000017-200903171823 - LY 2.txt'.
CALL METHOD top->add_text EXPORTING text = 'Hello world '
sap_style = 'heading' .
CALL METHOD top->add_gap EXPORTING width = 200.
CALL METHOD top->add_picture EXPORTING picture_id = 'ENJOYSAP_LOGO'.
CALL METHOD top->NEW_LINE( ).
CALL METHOD top->add_text EXPORTING
text = l_text.
ENDFORM.
* Display ALV grid
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
i_callback_program = g_repid
i_structure_name = 'STRUCTURE'
TABLES
t_outtab = gt_outtab.
Regards
Bala Krishna -
How to pass field in Alv Top-of-page
Edited by: Deepak Mathrani on Aug 12, 2008 12:40 PM
<THREAD LOCKED. Please read the [Rules of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] to discover why>
Edited by: Mike Pokraka on Aug 12, 2008 2:58 PMHi
sample program
*& Report ZNNR_ALVSAMPLE
REPORT znnr_alvsample NO STANDARD PAGE HEADING.
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid.
*Start-of-selection.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'. "Display column total
fieldcatalog-datatype = 'CURR'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
fieldcatalog-EDIT = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
FORM build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for when double
"click(press f2)
gd_layout-zebra = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'(001) "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
IT_EVENTS = GT_XEVENTS
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_ekko
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_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into table it_ekko.
endform. " DATA_RETRIEVAL
Form TOP-OF-PAGE *
ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform. -
ALV - Top of Page Trigger for Each New Page
Hi Abapers,
I am using the sortinfo_alv to get page break for each customer.Now my client is asking to display the cutomer name in the top of page insted in the main table. how will i do this .
I am using alv_commentary_write to display the top of page data.
Awaiting for reply.
Regards,
RahulHi
Follow the below steps.
Include the two forms in your program
Pass event internal table parameter to FM ALV display.
Declare the ALV parameter in Declaration part.
DATA: i_events TYPE slis_t_event. "(IT) for populating events
g_header TYPE slis_t_listheader, "Header for alv
g_events TYPE slis_alv_event, "Struc for populating events
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_events = i_events
*& Form EVENTTAB_BUILD
* Building Events table For ALV
* -->P_T_EVENTS[] text
FORM eventtab_build USING p_i_events.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = i_events
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
CLEAR: g_events.
READ TABLE i_events INTO g_events
WITH KEY name = 'TOP_OF_PAGE'. "slis_ev_top_of_page.
IF sy-subrc = 0.
MOVE 'TOP_OF_PAGE' TO g_events-form.
MODIFY i_events FROM g_events INDEX sy-tabix TRANSPORTING form.
CLEAR g_events.
ENDIF.
ENDFORM. " EVENTTAB_BUILD
*& Form top_of_page
* Header Data Population
FORM top_of_page.
DATA: l_htext TYPE slis_listheader,
l_text(200) TYPE c,
ld_lines TYPE i,
ld_linesc(9) TYPE c.
REFRESH g_header.
****************TOP OF PAGE HEADINGS****************************
* For Headers, Key is not printed and is irrelevant. Will not cause
* a syntax error, but is not used.
* TYP: Indicator: Header
l_htext-typ = 'H'. "H = Header,S = selection,a = action
CONCATENATE 'Planned Order: -' s_plnum-low 'To' s_plnum-high
INTO l_text SEPARATED BY space.
* INFO: Information
l_htext-info = l_text.
APPEND l_htext TO g_header.
* FM for dispalying text at Top of Page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = g_header
i_logo =
'ENJOYSAP_LOGO'. " From transaction "OAOR"
* I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE -
Hi All,
I have the same issue as mentioned in the thread
ALV - Top of Page Error
Please let me know the solution
Thanks
Bala Duvvuri
Moderator message: please describe the problem in your own thread, do not have people clicking on links first.
Edited by: Thomas Zloch on Mar 22, 2011 9:59 AMSolved by self
-
ALV- top-of-page: print varaibale in right corner,...
Hi,
In ALV (REUSE_ALV_GRID_DISPALY), i've requirement to print shop name at the top right corner of the top-of-page and sy-datum at top left corner.
How can I print a varaible at top right corner in top-of-page of ALV? and
how to print page no in ALV top-of-page?
How can I set portrait format to print the ALV?
regards,
Ravipls ignore
pk
Edited by: kishan P on Mar 9, 2009 6:01 PM -
How to write ICONS in ALV TOP of Page
Hai experts,
How to ICON in ALV Top of PAGE
i want to wrire
ICON_LED_RED for cancellation Invioce
ICON_LED_GREEN for Invioce
but i pass this values to wa_header-info it comes @5C@ @5B@
thanks
sitaramHi...
I think this code is help full for u....
*& Report ZFI_TEST *
REPORT ZFI_ICON_TEST MESSAGE-ID zz .
*& TABLES DECLARATION *
TABLES: vbak.
*& TYPE POOLS DECLARATION *
TYPE-POOLS: slis.
*& INTERNAL TABLE DECLARATION *
DATA: BEGIN OF itab OCCURS 0,
icon TYPE icon-id, "itab-icon = '@08@' -> Green ; '@09@' -> Yellow ; '@0A@' -> Red
vbeln LIKE vbak-vbeln,
audat LIKE vbak-audat,
vbtyp LIKE vbak-vbtyp,
auart LIKE vbak-auart,
augru LIKE vbak-augru,
netwr LIKE vbak-netwr,
waerk LIKE vbak-waerk,
END OF itab.
*INTERNAL TABLE FOR FIELD CATALOG
DATA: wa_fieldcat TYPE slis_fieldcat_alv,
it_fieldcat TYPE slis_t_fieldcat_alv.
IT_FIELDCAT TYPE STANDARD TABLE OF SLIS_FIELDCAT_ALV
WITH HEADER LINE,
*INTERNAL TABLE FOR EVENTS
DATA: it_event TYPE slis_t_event,
wa_event TYPE slis_alv_event,
*INTERNAL TABLE FOR SORTING
it_sort TYPE slis_t_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv,
*INTERNAL TABLE FOR LAYOUT
wa_layout TYPE slis_layout_alv.
*& VARIABLE DECLARATION *
DATA : v_repid TYPE sy-repid,
v_pagno(4) TYPE n,
v_date(8) TYPE c.
*& CONSTANTS *
CONSTANTS: c_x TYPE c VALUE 'X'.
*& SELECTION SCREEN *
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln,
s_vbtyp FOR vbak-vbtyp DEFAULT 'C'.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
SELECTION-SCREEN : BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) text-003.
PARAMETERS: p_list RADIOBUTTON GROUP rad1 DEFAULT 'X'.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN : BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(20) text-004.
PARAMETERS: p_grid RADIOBUTTON GROUP rad1.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN: END OF BLOCK b2.
AT SELECTION-SCREEN.
PERFORM validate_screen.
*& START OF SELECTION *
START-OF-SELECTION.
CLEAR: itab, itab[].
V_REPID = SY-REPID.
PERFORM get_data.
PERFORM display_data.
*& END OF SELECTION *
END-OF-SELECTION.
*--DO ALV Process
v_repid = sy-repid.
*--Sort the Output Fields
PERFORM sort_fields.
*--Build Field catalog for the Output fields
PERFORM BUILD_FIELDCAT.
*--Set the Layout for ALV
PERFORM set_layout.
*& Form GET_DATA
text
TO GET THE DATA FROM TABLES INTO ITAB
FORM get_data .
SELECT vbeln
audat
vbtyp
auart
augru
netwr
waerk
INTO CORRESPONDING FIELDS OF TABLE itab
FROM vbak
WHERE vbeln IN s_vbeln AND
audat > '04.04.2005'
AND netwr > 0.
LOOP AT itab.
IF itab-netwr < 10000.
itab-icon = '@08@'.
ELSEIF itab-netwr > 10000 AND itab-netwr < 100000.
itab-icon = '@09@'.
ELSEIF itab-netwr > 100000.
itab-icon = '@0A@'.
ENDIF.
MODIFY itab INDEX sy-tabix.
ENDLOOP.
ENDFORM. " GET_DATA
*& Form sort_fields
FORM sort_fields .
CLEAR wa_sort.
wa_sort-fieldname = 'VBTYP'.
wa_sort-spos = '1'.
wa_sort-up = 'X'.
APPEND wa_sort TO it_sort.
CLEAR wa_sort.
wa_sort-fieldname = 'NETWR'.
wa_sort-spos = '2'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO it_sort.
ENDFORM. " sort_fields
*& Form set_layout
FORM set_layout .
IF p_list = c_x .
wa_layout-window_titlebar = 'LIST DISPLAY'(016).
wa_layout-zebra = 'X'.
+
+
ALV LIST DISPLAY
PERFORM list_display TABLES itab.
o
+
+ ALV GRID DISPLAY
ELSEIF p_grid = c_x.
wa_layout-window_titlebar = 'GRID DISPLAY'(017).
wa_layout-zebra = 'X'.
PERFORM grid_display TABLES itab.
ENDIF.
ENDFORM. " set_layout
*& Form list_display
FORM list_display TABLES p_itab .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = wa_layout
it_fieldcat = it_fieldcat[]
it_sort = it_sort[]
i_save = 'U'
TABLES
t_outtab = itab
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. " list_display
*& Form GRID_DISPLAY
FORM grid_display TABLES p_itab .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = wa_layout
it_fieldcat = it_fieldcat[]
it_sort = it_sort[]
it_events = it_event
TABLES
t_outtab = itab
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. " GRID_DISPLAY
*& Form VALIDATE_SCREEN
text
--> p1 text
<-- p2 text
FORM validate_screen .
DATA: lv_vbeln LIKE vbak-vbeln.
IF NOT s_vbeln IS INITIAL.
SELECT vbeln
INTO lv_vbeln
UP TO 1 ROWS
FROM vbak
WHERE vbeln IN s_vbeln.
ENDSELECT.
IF sy-subrc <> 0.
MESSAGE e000 WITH 'INVALID SALES DOC'.
ENDIF.
ENDIF.
ENDFORM. " VALIDATE_SCREEN
*& Form display_data
text
--> p1 text
<-- p2 text
FORM display_data .
DEFINE m_fieldcat.
add 1 to wa_fieldcat-col_pos.
wa_fieldcat-fieldname = &1.
wa_fieldcat-ref_tabname = 'VBAK'.
wa_fieldcat-do_sum = &2.
wa_fieldcat-cfieldname = &3.
append wa_fieldcat to it_fieldcat.
END-OF-DEFINITION.
DATA:
ls_fieldcat TYPE slis_fieldcat_alv,
lt_fieldcat TYPE slis_t_fieldcat_alv.
m_fieldcat 'ICON' '' ''.
m_fieldcat 'VBELN' '' ''.
m_fieldcat 'AUDAT' '' ''.
m_fieldcat 'VBTYP' '' ''.
m_fieldcat 'AUART' '' ''.
m_fieldcat 'AUGRU' '' ''.
m_fieldcat 'NETWR' 'C' 'WAERK'.
m_fieldcat 'WAERK' '' ''.
ENDFORM. " display_data[/code]
Regards,
Rahul
Edited by: Rahul Reddy on Apr 14, 2008 12:33 PM -
Hello All
Can anyone help me to solve this data format problem? On the top of my program, I have declare the two variables "purchasePrice" and "purchaseAmount" as double. I dont know why, the compiler still think I didnt initialize this two variables? I have printed the error message below the code.
Thanks for your help : )
Jen
=============================================================================
double purchasePrice, purchaseAmount, GPS, total_gain, amount;
//Find the purchase stock price
rs = stmt.executeQuery("SELECT Price FROM PORTFOLIO WHERE Username = '"+ username+"' AND Symbol = '"+strsymbol+"'");
while (rs.next()){
purchasePrice = rs.getDouble("Price");
//Calculate the amount of Gain Per Share
GPS = intask - purchasePrice;
//Find the purchase stock amount
rs = stmt.executeQuery("SELECT Amount FROM PORTFOLIO WHERE Username = '"+ username+"' AND Symbol = '"+strsymbol+"'");
while (rs.next()){
purchaseAmount = rs.getDouble("Amount");
//Calculate the amount of Total Gain
total_gain = amount - purchaseAmount;
=============================================================================
Error message:
variable purchasePrice might not have been initialized
[javac] GPS = intask - purchasePrice;
[javac] ^
variable purchaseAmount might not have been initialized
[javac] total_gain = amount - purchaseAmount;
[javac] ^
[javac] 2 errorsInstance and class variables are automatically initialized to their default values if they are not initialized explicitly, but local variables are not. They have to be initialized explicitly before they can be referenced.
In your code:
while (rs.next()){
purchasePrice = rs.getDouble("Price");
...purchasePrice is initialized only if rs.next() returns true. purchaseAmount has the same problem. To avoid this problem, you could declare them by:
double purchasePrice = 0;
double purchaseAmount = 0; -
Hi,
Could any one tell how to use cl_gui_dialogbox_container to display pdf in a ALV top of pageHi,
It is not possible to change the color in ALV top of page.
Thanks,
Sriram Ponna. -
Change color in ALV top of page
Hi all,
Can anyone tell me how (if it is possible) to change color in ALV top-of-page?
Thank you in advance,
HagitHi,
It is not possible to change the color in ALV top of page.
Thanks,
Sriram Ponna. -
Date Format problem...
Hi users,
Forte version : 2.e.2 and ForteWebSDK
Datacase : Oracle
We have a problem with a simple HTML text field which acccepts
a date. When we try to update the record with some date, the following
exception occurs:
24-Jun-1998 04:32:28 : XV01086 : Execute failed for SQL statement in
project Rap
tServices, class RaptSqlMethods, method updateActivity, methodId 104,
line 51, e
rror from database is:
ORA-01830: date format picture ends before converting entire input
string
The Oracle manual says that the above exception occurs when there are
some extra characters on that field, which is not the case. In fact,
we raise our own exception for the cases like : o1-Apr-1997,
01-apr-97 etc. The correct format is 01-apr-1998.
Same date soemtimes is added to the database successfully. Waht I mean
to say that the exception deos not occur consistently.
We just conevert the String taken from the HTML field into a Forte
DateTimeData Object and send it to database. May be, the conversion
part is causing the problem. But, once again the problem is not
consistent.
Any ideas in this will be appreciated.
Thanx in advance
-Rajeev Talwar
Get Your Private, Free Email at http://www.hotmail.com
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>We had the same problem when our application first went live. The
default date format for our Oracle database is 'dd-mmm-yy' without the
time component. The default format for datatype DateTimeData is
'dd-mmm-yyyy hh:mm:ss'. Since we did not want to change the default date
format for the Database, we included in our service partitions an Alter
Session statement to change the NLS_Date_format attribute in Oracle to
conform to the Forte DateTimeData format. It worked.
Kam Chow
Mazda Australia
-----Original Message-----
From: Gary F Giger [mailto:[email protected]]
Sent: Thursday, June 25, 1998 4:11 AM
To: Rajeev Talwar
Cc: [email protected]
Subject: Re: Date Format problem...
I was having the same problem a few weeks back when I would
read/write
dates to Oracle. I was using objects of type DateTimeData and I would
occasionally get errors like you said you were. I found discovered my
problem. Sometimes I would process a null date and would get an error.
So to
resolve this issue, I simply changes my objects of type DateTimeData to
type
DateTimeNullable. This enabled my Forte Application to handle regular
dates
as well as null dates. I have not gotten any oracle errors since then
with
regards to dates. Hope this helps.
Rajeev Talwar wrote:
Hi users,
Forte version : 2.e.2 and ForteWebSDK
Datacase : Oracle
We have a problem with a simple HTML text field which acccepts
a date. When we try to update the record with some date, the following
exception occurs:
24-Jun-1998 04:32:28 : XV01086 : Execute failed for SQL statement in
project Rap
tServices, class RaptSqlMethods, method updateActivity, methodId 104,
line 51, e
rror from database is:
ORA-01830: date format picture ends before converting entire input
string
The Oracle manual says that the above exception occurs when there are
some extra characters on that field, which is not the case. In fact,
we raise our own exception for the cases like : o1-Apr-1997,
01-apr-97 etc. The correct format is 01-apr-1998.
Same date soemtimes is added to the database successfully. Waht I mean
to say that the exception deos not occur consistently.
We just conevert the String taken from the HTML field into a Forte
DateTimeData Object and send it to database. May be, the conversion
part is causing the problem. But, once again the problem is not
consistent.
Any ideas in this will be appreciated.
Thanx in advance
-Rajeev Talwar
Get Your Private, Free Email at http://www.hotmail.com
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
Gary Giger
Raytheon Systems Company
300 Science Park Road
State College, PA. 16804
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
This message has successfully passed virus checking.
Mazda Australia takes every precaution to ensure email messages are virus free. For complete protection, you should virus test this message.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/> -
Hi All,
I am having a ALV report .Once i execute the report there will be ALV output once i click on the Material no((Hot spot)) in the output it ll take to the another ALV report.The problem is how to get the top of page in the second alv...The top of page in the second ALV should be different..
Is it possible to do this?Pls reply asap.
Thanks
Raj.Hi Arun,
It is not working in the way you have given.
Hi All,
Is there any way to do this ???
Thanks
Raj. -
Top of page data is repeated while going back from alv report
Hi,
In my alv report , I call ed TOP_OF_PAGE. Data regatding top_of_page is stored in internal table.
After executing the report,while going back from report, a screen containing top_of_page data is appeaing.
Even though I cleared that table,still that data appeared.
Please resolve this.Hi all,
I cleared that table previously .
Still that screen appears.
This is my following code.
PERFORM top_of_page. " Subroutine for Top-of-page
*Display Report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = lv_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
i_callback_top_of_page = 'TOP_OF_PAGE'
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 = lt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = 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
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = lt_meter
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.
perform clear_data.
endif.
FORM top_of_page .
Declaration of local variables, structures and internal tables
Data : lv_count TYPE i,
lv_count_c(9) TYPE c,
lt_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader,
lt_line LIKE wa_header-info.
Title
clear lt_header[].
wa_header-typ = 'H'.
wa_header-info = 'Meter Readings Report'.
APPEND wa_header TO lt_header.
CLEAR wa_header.
Total No. of Records Selected
DESCRIBE TABLE lt_meter LINES lv_count.
lv_count_c = lv_count.
CONCATENATE 'Total Number of meters readed for given cycle: ' lv_count_c
INTO lt_line SEPARATED BY space.
wa_header-typ = 'A'.
wa_header-info = lt_line.
APPEND wa_header TO lt_header.
CLEAR: wa_header, lt_line.
*Display Top-of-page
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = lt_header.
ENDFORM. " TOP_OF_PAGE
*& Form CLEAR_DATA
text
--> p1 text
<-- p2 text
form CLEAR_DATA .
data : lt_header TYPE slis_t_listheader.
clear lt_header[].
endform.
Maybe you are looking for
-
Airport Express no longer joins network
Greetings, I have a cable modem internet connection; I use an older Airport Extreme (802.11n, without Time Capsule) to make a local wifi network with WPA2 Personal security, and an older Airport Express (802.11 b/g, firmware 6.3) to connect a laser p
-
How to find out height of text, given width?
Hello, I apologize in advance for this must be a stupid question, but I just can't seem to find an answer in the docs... If I have a text (string + font information), and I know how wide the display will be, how do I find the height?? The solution I
-
Unexplained code in "Classroom in a Book" on AS3
I'm slowly going through the Adobe "Classroom in a Book" on ActionScript. Every now and then the sample code includes what appears to be a property "e" as in "function doThis ( e:mouseEvent)" or "var rbg:RadioButtonGroup = e.target as RadioButtonGrou
-
How to use JMF to play the video data in a array(not in a local file)?
dear all: I am a newer to JMF. Now My program has a thread which is always inputing mpg video data into a static array, so I want to wrap this array as a DataSource, then let the player play the video. But I don't know how to wrap that as a DataSourc
-
Which XSLT Processor does CF8 use?
I'm writing some XSLTs and would like to use the fn:base-uri() that is accessible in Saxon-SA 9.1.0.7 or later editions. I cannot find any documentation on which XSLT processor(s) CF8 uses. Nor can I find anything on possibly upgrading it or using