Vertical text in ALV header (WD4A)
HI,
Can anybody tell me how I can display ALV header text in WD4A as vertical text ?
Cheers, John
Hi,
DATA:
lr_alv_header TYPE REF TO cl_salv_wd_column_header.
Get the column reference of the ALV column.
CALL METHOD lr_column->set_width
EXPORTING
value = '70'.
lr_alv_header = lr_column->get_header( ).
lr_alv_header->set_text( 'Header' ).
lr_column->set_resizable( abap_true ).
lr_alv_header->set_header_text_wrapping( abap_true ).
Similar Messages
-
Vertical text in table heading
Hi,
I would like to save some space in some reports and I would like to change orientation of text in table heading.
Is it posible to have vertical text in table heading?
What I want is showed on this picture: [Vertical text|¨http://img179.imageshack.us/img179/234/obiverticaltext.jpg]
Thank you for some tips.Hi,
Go through this...will help you solve your requirement....http://blog.trivadis.com/blogs/andreasnobbmann/archive/2009/07/17/vertical-text-in-obiee.aspx
Use the same code Writing-mode: tb-rl; filter: flipv fliph; in custom css style of column heading.(column properties->column format->edit format icon beside column heading->css style)
Regards,
Srikanth -
How to use Standard Text in ALV
How to use Standard Text in ALV header part? Can you please help me by giving the answer?
Hi ,
You can read the Standard text using read_text function module and then print in LV header part. -
Reg: Adding spaces between texts in ALV list header
Hi All,
I was implementing a client requirement for ALV. The list header should contain something of this format.
Pgm Id: ZZZ01
After this list header it is ALV display.
I did this using the concatenate statement.
ex: Concatenate 'PgmID' sy-repid into listheader seperated by space.
But this is not showing spaces between text in ALV display. See I want a tabspace between the texts in headr. Any idea on how to mak it?
RakeshDepending on Fontsize the space might be so narrow that you believe its not there.
check in the debugger if there is really a space in the string, the clause "separated by space" will insert one for sure.
May be you'reshowing the ALV before you are modifying the listheader?
Another approach is using strings, blanks at the end of a string are not deleted
concatenate 'ABC ' 'XYZ' into s.
and
concatenate `ABC ` `XYZ` into s.
will give different results, be aware of the difference in the quots in both cases. Using the second example you can insert as many blanks as you want. -
Rename alv header text in webdynpro abap
Hi ,
I have created two attribute PART_NUMBER and TERM_CODE in context level with type CHAR10.
AND in ALV header PART_NUMBER and TERM_CODE is displaying, which is coming from context level.
i want to rename the header of ALV to PARTNUMBER and TERMCODE.
could any one send me the sampls code or any solution?
Thanks
RaksharFirst get access to the ALV Model object for your ALV usage:
data: l_ref_cmp_usage type ref to if_wd_component_usage.
l_ref_cmp_usage = wd_this->wd_cpuse_alv( ).
if l_ref_cmp_usage->has_active_component( ) is initial.
l_ref_cmp_usage->create_component( ).
endif.
data l_salv_wd_table type ref to iwci_salv_wd_table.
l_salv_wd_table = wd_this->wd_cpifc_alv( ).
data l_table type ref to cl_salv_wd_config_table.
l_table = l_salv_wd_table->get_model( ).
Then access the column you want to change the header on. In addition to setting the text of the header of the column, you must also force off the data dictionary binding for the field property text.
data l_column type ref to cl_salv_wd_column.
l_column = l_table->if_salv_wd_column_settings~get_column( 'POSTING_DATE' ).
data l_header type ref to cl_salv_wd_column_header.
l_header = l_column->get_header( ).
l_header->set_prop_ddic_binding_field(
property = if_salv_wd_c_ddic_binding=>bind_prop_text
value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
l_header->set_text( `Posting Date` ). -
How to set title/text for ALV table column header in WD ABAP
Hello,
I am working in WDA using SALV_WD_Table to display data in table. I need to change the column header text, the obvious way is to get the column header and call the method SET_TEXT to set new text / title. However, this method does NOT work, it does not change the column header text. I also tried the SET_TOOLTIP, this one works, but SET_TEXT does not work. Anyone has idea why this not working and do you find any go-around solution?
My version is NW 7.0
Thank
JaysonHi jason ,
For setting Heder text for your ALV table
ip_confing type ref to CL_SALV_WD_CONFIG_TABLE.
"set alv table header
ip_config->if_salv_wd_table_settings~r_header->set_text( 'Test ALV Header functionality' ).
first you have to hide the DDIC text and then try to set your own text .
"modify columns
LOOP AT lt_columns INTO ls_column.
lr_column = ls_column-r_column.
CASE ls_column-id.
WHEN 'MANDT'.
"hide this field
lr_column->set_visible( cl_wd_abstr_table_column=>e_visible-none ).
WHEN 'SEQNR'.
"set header to different string
lr_column->r_header->set_ddic_binding_field( if_salv_wd_c_column_settings=>ddic_bind_none )." use this line to hide ddic text
lr_column->r_header->set_text( 'Position' ).
endcase.
endloop.
Regards
Chinnaiya P -
How to wrap the heading text in alv.
HI all,
I need help, how to wrap the heading text in alv.
can any help ... plz..
Advanced Thanks
Regards
GUhapriyanHello GuhaPriyan,
I assume that you're referring to the ALV Grid's title. The maximum length for this title is 70 characters and this would generally fit in the one line.
Are you intending to wrap it because you purposefully want the text to come in two lines? In that case, I'm not sure that it's possible.
But otherwise, there's an option in the Layout called SMALLTITLE. You can set this attribute so that the title would be displayed in a amaller font and hopefully, all of your text shows up on the screen.
Regards,
Anand Mandalika. -
How to achive table column header style (vertical text)?
Hi,
Can we show adf table column headers with vertical text, and with rotation. For eg. "Dept Id" lable should show up as similar to what the below HTML does:
<html>
<div style="float: left;
position: relative;
-moz-transform: rotate(1000deg); /* FF3.5+ */
-o-transform: rotate(290deg); /* Opera 10.5 */
-webkit-transform: rotate(290deg); /* Saf3.1+, Chrome */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* IE6,IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3); /* IE8 */">Dept Id</div></html>
Edited by: pramod gujjeti on Sep 18, 2011 8:51 PM
Edited by: pramod gujjeti on Sep 18, 2011 8:51 PMHi,
I've used the below style classes in CSS, but still not getting the accurate Column Header Vertical Text. Also, in IE browser column header text is shrinked vertically when headerClass styles are applied!
Any help appreciated!
.sch af|column::column-header-cell {
vertical-align: bottom;
padding-bottom: 10px;
height: 80px;
.schc af|column::column-header-cell-content {
-moz-transform: rotate(270deg);
/* FF3.5+ */
filter: progid: DXImageTransform.Microsoft.BasicImage(rotation=3);
/*IE6,IE7*/
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
/*IE8*/
-o-transform: rotate(270deg);
/*Opera 10.5*/
-webkit-transform: rotate(270deg);
/*Saf3.1+, Chrome*/
position: relative;
vertical-align: bottom;
Edited by: pramod gujjeti on Sep 27, 2011 9:09 AM -
Hi!
I have written an ALV-report. Because I have to display many columns and the screen width is limited I would like to put the headertext vertical instead of horizontal. Is that an easy thing to do with ALV?
P S C
R T O
I O L
C C O
E K R
8.30 X RED
2.00 X YEL
5.82 X GRE
Best regards,
Patrick de SarrazinHI Patrick,
I doubt if you can do it using an alv.
Column headings will have a tool tip feature by default.
So, you can play with the display lengths of fields instead of diplaying columns headings as vertical text.
Try to set the output length to as minimum as possible., when you build the field catalog.
Regards,
Ravi -
ALV HEADER DISPLAY IN VERTICAL
HI,
IT IS POSSIBLE TO DISPLAY THE ALV HEADING IN VERTICAL .
PLZ GIVE ME THE DETAILS.
THANKS,
S.RANIHi,
You can refer the Link:
< link to blocked site removed by moderator>
Hope, this helps you,
Regards,
Kris
Edited by: Thomas Zloch on Oct 27, 2011 9:12 AM -
Hi friends,
I make one header alv ok I want and take one variable count in my program so I want to display its value in ALV HEADER
Total Target Qty:
Total EMP. Efficiency
Total Machine Effi.
I take may header like this and pass thre text here.ok Now I want to display value of this three.
Total Trget Qty: 2.23 like that.
CLEAR st_line.
st_line-typ = 'S'.
CONCATENATE 'Total Target Qty: ' count ' ' INTO st_line-info.
APPEND st_line TO t_list_top_of_page.
So I took like this in header count is my variable in which I take value.
So how can we pass the value in ALV Header please tell me.
its urgent so.
Thnaks in Advance.
Prashant.HI DHWANI,
*& Report ZPP_RE_EMP_DETAILS
*& This Report is used to check the Employee Performance And Used Machine Quantity
*& Rqueirement By Santhosh
*& Developed By Prashant On Date 01.02.2008
*& Created By: Prashant Brahmbhatt
*& Creation Date: 20080201
*& Module: PP (Production & Plannig)
*& Changed By Changed Date Reason
REPORT zpp_re_emp_details.
TABLES:zpplan.
TYPE-POOLS:slis.
DATA:BEGIN OF itab OCCURS 0,
zdate LIKE zpplan-zdate,
werks LIKE zpplan-werks,
mname LIKE zpplan-mname,
shftin LIKE zpplan-shftin,
iserh LIKE zpplan-iserh,
quaty LIKE zpplan-quaty,
plan_qty LIKE zpplan-plan_qty,
act_prod LIKE zpplan-act_prod,
temp TYPE c,
tar_qty(10) TYPE c,
ach_qty(10) TYPE c,
mch_eff(10) TYPE c,
a(10) TYPE c,
END OF itab.
DATA:BEGIN OF temp OCCURS 0,
zdate LIKE zpplan-zdate,
werks LIKE zpplan-werks,
mname LIKE zpplan-mname,
shftin LIKE zpplan-shftin,
iserh LIKE zpplan-iserh,
quaty LIKE zpplan-quaty,
plan_qty LIKE zpplan-plan_qty,
act_prod LIKE zpplan-act_prod,
temp TYPE c,
tar_qty(10) TYPE c,
ach_qty(10) TYPE c,
mch_eff(10) TYPE c,
a(10) TYPE c,
END OF temp.
DATA:BEGIN OF itab_t OCCURS 0,
zdate LIKE zpplan-zdate,
werks LIKE zpplan-werks,
mname LIKE zpplan-mname,
shftin LIKE zpplan-shftin,
iserh LIKE zpplan-iserh,
quaty LIKE zpplan-quaty,
plan_qty LIKE zpplan-plan_qty,
act_prod LIKE zpplan-act_prod,
temp TYPE c,
tar_qty(10) TYPE c,
ach_qty(10) TYPE c,
mch_eff(10) TYPE c,
a(10) TYPE c,
END OF itab_t.
DATA:BEGIN OF itab1 OCCURS 0,
zdate LIKE zpplan-zdate,
werks LIKE zpplan-werks,
mname LIKE zpplan-mname,
shftin LIKE zpplan-shftin,
act_prod LIKE zpplan-act_prod,
quaty LIKE zpplan-quaty,
planned LIKE zpplan-planned,
iserh LIKE zpplan-iserh,
temp TYPE c,
tar_qty TYPE p DECIMALS 2,
ach_qty TYPE p DECIMALS 2,
mch_eff TYPE p DECIMALS 2,
END OF itab1.
DATA: wa LIKE itab1.
DATA:BEGIN OF itab2 OCCURS 0,
zdate LIKE zpplan-zdate,
werks LIKE zpplan-werks,
mname LIKE zpplan-mname,
shftin LIKE zpplan-shftin,
act_prod LIKE zpplan-act_prod,
quaty LIKE zpplan-quaty,
planned LIKE zpplan-planned,
iserh LIKE zpplan-iserh,
temp TYPE c,
tar_qty(10) TYPE p DECIMALS 2,
ach_qty(10) TYPE p DECIMALS 2,
mch_eff(10) TYPE p DECIMALS 2,
count(10) TYPE c,
END OF itab2.
DATA: a(10) TYPE c,
b(10) TYPE c,
count(10) TYPE c,
count1(10) TYPE c.
c(2) TYPE p DECIMALS 2.
DATA:t_fcat TYPE slis_t_fieldcat_alv,
t_events TYPE slis_t_event,
t_list_top_of_page TYPE slis_t_listheader,
t_list_end_of_page TYPE slis_t_listheader.
CONSTANTS:c_formname_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE'.
CONSTANTS:c_formname_end_of_page TYPE slis_formname VALUE 'END_OF_PAGE'.
DATA: st_line TYPE slis_listheader.
SELECTION-SCREEN
SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
*PARAMETERS:shftin LIKE zpplan-shftin.
SELECT-OPTIONS:date FOR zpplan-zdate,
shftin FOR zpplan-shftin,
werks FOR zpplan-werks.
SELECTION-SCREEN:END OF BLOCK blk1.
ALV CALL
INITIALIZATION.
PERFORM build_fieldcatalog USING t_fcat .
PERFORM event_call.
PERFORM head_built USING t_events.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM display_alv.
*& Form build_fieldcatalog
text
-->P_T_FCAT text
FORM build_fieldcatalog USING temp_fcat TYPE slis_t_fieldcat_alv.
DATA:w_fcat TYPE slis_fieldcat_alv.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'MNAME'.
w_fcat-seltext_m = 'Machine Name'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'SHFTIN'.
w_fcat-seltext_m = 'Emp No'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'ZDATE'.
w_fcat-seltext_m = 'Pos Date'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'QUATY'.
w_fcat-seltext_m = 'Quantity'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'ACT_PROD'.
w_fcat-seltext_m = 'Actual Quantity'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'ISERH'.
w_fcat-seltext_m = 'Down Time'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'TAR_QTY'.
w_fcat-seltext_m = 'Target Qty.'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'ACH_QTY'.
w_fcat-seltext_m = 'EMP Effec.'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'MCH_EFF'.
w_fcat-seltext_m = 'Machine Effec.'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
w_fcat-tabname = 'ITAB2'.
w_fcat-fieldname = 'COUNT'.
w_fcat-seltext_m = 'Machine Effec.'.
APPEND w_fcat TO temp_fcat.
CLEAR w_fcat.
ENDFORM. " build_fieldcatalog
*& Form event_call
text
--> p1 text
<-- p2 text
FORM event_call .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = t_events
EXCEPTIONS
LIST_TYPE_WRONG = 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. " event_call
*& Form data_retrieval
text
--> p1 text
<-- p2 text
FORM data_retrieval .
IF shftin <> ''.
SELECT zdate werks mname shftin INTO CORRESPONDING FIELDS OF TABLE
temp FROM zpplan
WHERE shftin IN shftin
AND zdate IN date
AND werks IN werks.
ELSE.
SELECT zdate werks mname INTO CORRESPONDING FIELDS OF TABLE
temp FROM zpplan
WHERE zdate IN date
AND werks IN werks.
ENDIF.
SORT temp BY mname zdate shftin.
DELETE ADJACENT DUPLICATES FROM temp.
SORT temp BY mname shftin zdate.
DELETE ADJACENT DUPLICATES FROM temp.
APPEND temp.
LOOP AT temp.
SELECT zdate werks mname shftin act_prod quaty iserh FROM zpplan INTO CORRESPONDING FIELDS OF TABLE itab_t
WHERE mname = temp-mname
AND zdate = temp-zdate
AND werks = temp-werks.
LOOP AT itab_t.
MOVE-CORRESPONDING itab_t TO itab.
APPEND itab.
ENDLOOP.
ENDLOOP.
*******************************************8
SELECT zdate werks mname shftin act_prod quaty iserh FROM zpplan INTO CORRESPONDING FIELDS OF TABLE itab
FOR ALL ENTRIES IN temp
WHERE zdate = temp-zdate AND
werks = temp-werks
AND mname = temp-mname.
SELECT zdate werks mname shftin act_prod quaty iserh FROM zpplan INTO CORRESPONDING FIELDS OF TABLE itab
WHERE zdate IN date AND
werks IN werks AND
shftin = shftin.
SORT itab BY mname zdate.
DELETE ADJACENT DUPLICATES FROM itab.
LOOP AT itab.
MOVE-CORRESPONDING itab TO itab1.
COLLECT itab1.
ENDLOOP.
LOOP AT itab1.
itab1-tar_qty = itab1-tar_qty + ( itab1-quaty / 3 ).
IF ( itab1-tar_qty NE 0 ).
itab1-ach_qty = ( itab1-ach_qty + itab1-act_prod / itab1-tar_qty ) * 100.
ELSE.
itab1-ach_qty = 0 * 100.
ENDIF.
itab1-mch_eff = ( ( 8 - itab1-iserh ) / 8 ) * 100.
MODIFY itab1 TRANSPORTING tar_qty ach_qty mch_eff.
ENDLOOP.
LOOP AT itab1.
READ TABLE itab1 INDEX 1 INTO wa.
IF itab1-mname = wa-mname.
itab1-zdate = wa-zdate.
itab2-shftin = itab1-shftin.
itab2-mname = itab1-mname.
itab2-zdate = itab1-zdate.
itab2-quaty = itab2-quaty + itab1-quaty.
itab2-act_prod = itab2-act_prod + itab1-act_prod.
itab2-iserh = itab2-iserh + itab1-iserh.
itab2-tar_qty = itab2-tar_qty + itab1-tar_qty.
itab2-ach_qty = itab2-ach_qty + itab1-ach_qty.
itab2-mch_eff = itab2-mch_eff + itab1-mch_eff.
ELSE.
APPEND itab2.
CLEAR itab2.
MOVE-CORRESPONDING itab1 TO wa.
itab2-shftin = itab1-shftin.
itab2-mname = itab1-mname.
itab2-zdate = itab1-zdate.
itab2-quaty = itab2-quaty + itab1-quaty.
itab2-act_prod = itab2-act_prod + itab1-act_prod.
itab2-iserh = itab2-iserh + itab1-iserh.
itab2-tar_qty = itab2-tar_qty + itab1-tar_qty.
itab2-ach_qty = itab2-ach_qty + itab1-ach_qty.
itab2-mch_eff = itab2-mch_eff + itab1-mch_eff.
ENDIF.
ENDLOOP.
APPEND itab2.
LOOP AT itab2.
IF ( itab2-tar_qty NE 0 ).
itab2-ach_qty = ( itab2-ach_qty + itab2-act_prod / itab2-tar_qty(10) ) * 100.
ELSE.
itab2-ach_qty = 0 * 100.
ENDIF.
itab2-mch_eff = ( ( 8 - itab2-iserh ) / 8 ) * 100.
MODIFY itab2 TRANSPORTING tar_qty ach_qty mch_eff.
ENDLOOP.
APPEND itab2.
LOOP AT itab2.
count = sy-tfill.
a = a + itab2-tar_qty.
b = b + itab2-ach_qty.
ENDLOOP.
CLEAR itab2.
itab2-tar_qty = a.
itab2-ach_qty = b.
APPEND itab2.
CLEAR itab2.
count = a / sy-tfill.
count1 = b / sy-tfill.
itab2-tar_qty = count.
itab2-ach_qty = count1.
itab2-tar_qty = count.
APPEND itab2.
ENDFORM. " data_retrieval
*& Form head_built
text
-->P_T_EVE text
FORM head_built USING p_t_eve TYPE slis_t_event.
count = a / sy-tfill.
DATA: ls_event TYPE slis_alv_event.
REFRESH t_list_top_of_page.
READ TABLE p_t_eve WITH KEY name = slis_ev_top_of_page INTO ls_event.
IF sy-subrc = 0.
MOVE c_formname_top_of_page TO ls_event-form.
MODIFY p_t_eve FROM ls_event INDEX sy-tabix.
ENDIF.
CLEAR st_line.
st_line-typ = 'S'.
st_line-key = 'Total Target Qty: '.
st_line-info = count.
APPEND st_line TO t_list_top_of_page.
CLEAR st_line.
st_line-typ = 'S'.
st_line-info = count.
CONCATENATE 'Avg Target Qty.' count ' ' INTO st_line-info.
APPEND st_line TO t_list_top_of_page.
CLEAR st_line.
st_line-typ = 'S'.
st_line-key = 'Avg.EMP Efficiency: '.
st_line-info = count1.
APPEND st_line TO t_list_top_of_page.
CLEAR st_line.
st_line-typ = 'S'.
st_line-key = 'Avg. Machine Efficincy: '.
st_line-info = count.
APPEND st_line TO t_list_top_of_page.
REFRESH t_list_end_of_page.
READ TABLE p_t_eve WITH KEY name = slis_ev_end_of_list INTO ls_event.
IF sy-subrc = 0.
MOVE c_formname_end_of_page TO ls_event-form.
MODIFY p_t_eve FROM ls_event INDEX sy-tabix.
ENDIF.
CLEAR st_line.
st_line-typ = 'S'.
CONCATENATE 'END OF PAGE' ' ' INTO st_line-info.
APPEND st_line TO t_list_end_of_page.
ENDFORM. " head_built
*& Form top-of-page
text
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_list_top_of_page
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
ENDFORM. "top-of-page
*& Form display_alv
text
--> p1 text
<-- p2 text
FORM display_alv .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = 'ZPP_RE_EMP_DETAILS'
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
i_background_id = 'ALV_BACKGROUND'
i_grid_title = 'EMP Information'
I_GRID_SETTINGS =
IS_LAYOUT =
it_fieldcat = t_fcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = t_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 = itab2
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 -
Display a Long Text in ALV report
Hi,
I want to display the PO header long text in ALV Report that is 255 character width.
Please help me out how to do this.
please it is very urgent
Thanks and regards
KrishnaUse READ_TEXT and concatenate the first lines of the text.
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'F01'
language = sy-langu
name = lv_name " purchase order with leading zeroes
object = 'EKKO'
TABLES
lines = t_lines
EXCEPTIONS
OTHERS = 8.
Regards -
How to get Grand Total Text in ALV GRID
Hi Folks,
I am able to get the SUBTOTAL TEXT .....But i need...
How to get Grand Total Text in ALV GRID Display...
Can any one give a Solution for this...Hi Surendar,
Check out this code.. this is showing Total Text in Toal line in the very first column.
REPORT zsales_ord_det_1 .
TABLES: ztable_10.
TYPE-POOLS: slis.
DATA: BEGIN OF it OCCURS 0,
srno(6) type c,
name LIKE ztable_10-name,
age LIKE ztable_10-age,
END OF it.
DATA : BEGIN OF it_temp OCCURS 0,
name LIKE ztable_10-name,
age LIKE ztable_10-age,
END OF it_temp.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA: v_repid LIKE sy-repid,
i_index TYPE STANDARD TABLE OF i WITH HEADER LINE,
gs_layout TYPE slis_layout_alv,
gd_layout TYPE slis_layout_alv,
i_sort TYPE STANDARD TABLE OF slis_sortinfo_alv,
wa_sort TYPE slis_sortinfo_alv.
START-OF-SELECTION.
v_repid = sy-repid.
SELECT * FROM ztable_10 INTO TABLE it_temp.
LOOP AT it_temp .
it-srno = 'Total'.
it-name = it_temp-name.
it-age = it_temp-age.
APPEND it.
ENDLOOP.
END-OF-SELECTION.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_internal_tabname = 'IT'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
i_inclname = v_repid
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
ct_fieldcat = i_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'SRNO'.
wa_fieldcat-tabname = it.
append wa_fieldcat to i_fieldcat.
LOOP AT i_fieldcat INTO wa_fieldcat.
IF wa_fieldcat-fieldname = 'AGE'.
wa_fieldcat-do_sum = 'X'.
MODIFY i_fieldcat FROM wa_fieldcat.
ENDIF.
IF wa_fieldcat-fieldname = 'SRNO'.
Hide this field so that it can display it's content i.e.
Total text in Subtotal level
wa_fieldcat-tech = 'X'.
wa_fieldcat-no_out = 'X'.
MODIFY i_fieldcat FROM wa_fieldcat TRANSPORTING tech no_out.
ENDIF.
ENDLOOP.
wa_sort-spos = 1.
wa_sort-fieldname = 'SRNO'.
wa_sort-up = 'X'.
wa_sort-subtot = 'X'.
APPEND wa_sort TO i_sort.
gd_layout-no_totalline = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
I_CALLBACK_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 = gd_layout
it_fieldcat = i_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = i_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
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.
Regards,
Seema -
Problem displaying 'Total' text in ALV grid
My ALV works and displays correct output. However, I am struggling to display the text 'Total' on position in the last row of the grid. The total is for the salary. My code is below..
I have looked on numerous sites and forums for assistance.
*& Report ZALV
REPORT ZALV.
TABLES: ZCONTACT.
TYPE-POOLS: slis. "slis contains all of the ALV data types.
DATA: "fieldcatALOG TYPE slis_t_fieldcat_alv WITH HEADER LINE,
it_zcontact TYPE TABLE OF zcontact,"declares an internal table of type ZCONTACT
alv_prog_name LIKE sy-repid,
g_variant TYPE disvariant,
gx_variant TYPE disvariant,
g_save TYPE c VALUE 'X',
it_fieldcat TYPE slis_t_fieldcat_alv,"declares field catalog table of line type alv
wa_fieldcat TYPE slis_fieldcat_alv, "declares the work area of the field catalog
it_list_top_of_page TYPE slis_t_listheader,
izontact TYPE TABLE OF zcontact,
h1(10) TYPE c VALUE 'Toatall',
"i_logo TYPE OT.
gt_events TYPE slis_t_event,
gd_prntparams TYPE slis_print_alv,
text(40) type c,
wa_layout TYPE slis_layout_alv.
**Selection Screen details
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
PARAMETERS: variant like disvariant-variant.
SELECTION-SCREEN END OF BLOCK B1.
**Getting default variant
INITIALIZATION.
gx_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
I_SAVE = G_SAVE
CHANGING
CS_VARIANT = GX_VARIANT
EXCEPTIONS
NOT_FOUND = 2.
IF SY-SUBRC = 0.
VARIANT = GX_VARIANT-VARIANT.
ENDIF.
START-OF-SELECTION.
PERFORM DATA_RETRIEVAL.
PERFORM BUILD_FIELDCATALOG.
PERFORM DISPLAY_ALV_REPORT.
"PERFORM build_alv_header
FORM BUILD_FIELDCATALOG.
*Build field catalog
wa_fieldcat-fieldname = 'ID'.
wa_fieldcat-seltext_m = 'ID'.
wa_fieldcat-col_pos = 0.
wa_fieldcat-outputlen = 10.
wa_fieldcat-emphasize = 'X'.
wa_fieldcat-key = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'LASTNAME'.
wa_fieldcat-seltext_m = 'LASTNAME'.
wa_fieldcat-col_pos = 1.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'FIRSTNAME'.
wa_fieldcat-seltext_m = 'FIRSTNAME'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'DOB'.
wa_fieldcat-seltext_m = 'DOB'.
wa_fieldcat-col_pos = 3.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'TEL'.
wa_fieldcat-seltext_m = 'Tel'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ADDRESS'.
wa_fieldcat-seltext_m = 'ADDRESS'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'OCCUPATION'.
wa_fieldcat-seltext_m = 'OCCUPATION'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'WEIGHT'.
wa_fieldcat-seltext_m = 'WEIGHT'.
wa_fieldcat-do_sum = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'AGE'.
wa_fieldcat-seltext_m = 'AGE'.
wa_fieldcat-do_sum = 'X'. "Display column total
APPEND wa_fieldcat TO it_fieldcat.
"CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'SALARY'.
wa_fieldcat-seltext_m = 'SALARY'.
wa_fieldcat-do_sum = 'X'.
wa_fieldcat-cfieldname = 'CURRENCYKEY'.
APPEND wa_fieldcat TO it_fieldcat.
wa_fieldcat-fieldname = 'CURRENCY'.
wa_fieldcat-seltext_s = 'CURRENCY'.
APPEND wa_fieldcat TO it_fieldcat.
"CLEAR wa_fieldcat.
ENDFORM. "BUILDING THE FIELD CATALOG
**FORM layout.
*wa_layout-colwidth_optimize = 'X'.
*wa_layout-totals_text ='TOTAL'.
*wa_layout-zebra = 'X'.
*ENDFORM.
"ls_layout-cell_merge = 'X'.
FORM DISPLAY_ALV_REPORT.
alv_prog_name = sy-repid.
*Pass data and field catalog to ALV function module to display ALV list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = it_fieldcat[]
i_callback_program = alv_prog_name
is_layout = wa_layout
i_callback_top_of_page = 'TOP_OF_PAGE'
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'ZCONTACT'
i_save = 'X'
it_events = gt_events
is_print = gd_prntparams
is_variant = g_variant
"is_layout = ls_layout
TABLES
t_outtab = it_zcontact
EXCEPTIONS
program_error = 1
OTHERS = 2.
WRITE: H1 UNDER 'SALARY'.
ENDFORM.
**Fetch data from the database
FORM DATA_RETRIEVAL.
SELECT * FROM zcontact INTO TABLE it_zcontact.
ENDFORM.
FORM top_of_page.
*ALV Header declarations
DATA: it_listheader TYPE slis_t_listheader,
wa_listheader TYPE slis_listheader,
t_line like wa_listheader-info,
ld_lines TYPE I,
ld_linesc(10) TYPE C.
wa_listheader-typ = 'H'.
wa_listheader-info = 'Contact Details'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = sy-repid.
wa_listheader-key = 'Program Name:'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = sy-uname.
wa_listheader-key = 'User Name:'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-key = 'Run Date :'.
CONCATENATE sy-datum+6(2)
sy-datum+4(2)
sy-datum(4)
INTO wa_listheader-info
SEPARATED BY '/'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-key = 'Time :'.
CONCATENATE sy-uzeit(2)
sy-uzeit+2(2)
sy-uzeit+4(2)
INTO wa_listheader-info
SEPARATED BY ':'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader[]
i_logo = 'KLOGO'.
ENDFORM. "top_of_pageI did this but still i cant display the total text..I have reposted my code. please assist. Im only missing that total label
*& Report ZALV
REPORT ZALV.
TABLES: ZCONTACT.
TYPE-POOLS: slis. "slis contains all of the ALV data types.
TYPES: BEGIN OF t_zcontact,
text(40) TYPE c, "storing the total text
mandt TYPE mandt,
id TYPE zcontactid,
lastname type zcontactlname,
firstname TYPE zcontactfname,
dob TYPE zdateofbirth,
tel TYPE ztel,
address TYPE zaddress,
occupation TYPE zoccup,
weight type zweight,
age TYPE zage,
salary TYPE zsalary,
ecurrency TYPE curcy,
END OF t_zcontact.
TYPES: BEGIN OF wa_zcontact,
mandt TYPE mandt,
id TYPE zcontactid,
lastname type zcontactlname,
firstname TYPE zcontactfname,
dob TYPE zdateofbirth,
tel TYPE ztel,
address TYPE zaddress,
occupation TYPE zoccup,
weight type zweight,
age TYPE zage,
salary TYPE zsalary,
ecurrency TYPE curcy,
END OF wa_zcontact.
TYPES:
i_zcontact TYPE STANDARD TABLE OF t_zcontact." INITIAL SIZE 0.
DATA: itt_zcontact TYPE STANDARD TABLE OF wa_zcontact INITIAL SIZE 0,
wat_zcontact TYPE wa_zcontact.
DATA: "it_zcontact TYPE TABLE OF zcontact,"declares an internal table of type ZCONTACT
gd_repid LIKE sy-repid,
g_variant TYPE disvariant,
gx_variant TYPE disvariant,
g_save TYPE c VALUE 'X',
fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,"declares field catalog table of line type alv
gd_tab_group type slis_t_sp_group_alv,
gd_prntparams TYPE slis_print_alv,
fieldcat TYPE slis_fieldcat_alv, "declares the work area of the field catalog
it_list_top_of_page TYPE slis_t_listheader,
i_zcontact TYPE TABLE OF zcontact,
"h1(10) TYPE c VALUE 'Toatall',
"i_logo TYPE OT.
gt_events TYPE slis_t_event,
gd_layout TYPE slis_layout_alv."work area for the alv layout
data: it_sortcat type slis_sortinfo_alv occurs 1,
wa_sort LIKE LINE OF it_sortcat.
START-OF-SELECTION.
PERFORM DATA_RETRIEVAL.
PERFORM BUILD_FIELDCATALOG.
PERFORM DISPLAY_ALV_REPORT.
PERFORM BUILD_LAYOUT.
perform build_sortcat.
PERFORM sub_add_text.
"PERFORM build_events.
PERFORM top-of-page.
"PERFORM build_alv_header.
END-OF-SELECTION.
*DATA: gd_layout TYPE slis_layout_alv.
* gd_layout-totals_text = 'TOTAL'.
**Selection Screen details
*SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
*PARAMETERS: variant like disvariant-variant.
*SELECTION-SCREEN END OF BLOCK B1.
***Getting default variant
*INITIALIZATION.
*gx_variant-report = sy-repid.
*CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
*EXPORTING
* I_SAVE = G_SAVE
* CHANGING
* CS_VARIANT = GX_VARIANT
* EXCEPTIONS
* NOT_FOUND = 2.
*IF SY-SUBRC = 0.
* VARIANT = GX_VARIANT-VARIANT.
* ENDIF.
FORM BUILD_FIELDCATALOG.
*Build field catalog
fieldcatalog-fieldname = 'ID'.
fieldcatalog-seltext_m = 'ID'.
fieldcatalog-col_pos = 2.
fieldcatalog-outputlen = 10.
fieldcatalog-datatype = 'CHAR'.
"fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'LASTNAME'.
fieldcatalog-seltext_m = 'LASTNAME'.
fieldcatalog-col_pos = 3.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'FIRSTNAME'.
fieldcatalog-seltext_m = 'FIRSTNAME'.
fieldcatalog-col_pos = 4.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'DOB'.
fieldcatalog-seltext_m = 'DOB'.
fieldcatalog-col_pos = 5.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'TEL'.
fieldcatalog-seltext_m = 'Tel'.
fieldcatalog-col_pos = 6.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'ADDRESS'.
fieldcatalog-seltext_m = 'ADDRESS'.
fieldcatalog-col_pos = 7.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'OCCUPATION'.
fieldcatalog-seltext_m = 'OCCUPATION'.
fieldcatalog-col_pos = 8.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'WEIGHT'.
fieldcatalog-seltext_m = 'WEIGHT'.
"fieldcatalog-do_sum = 'X'.
fieldcatalog-col_pos = 9.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AGE'.
fieldcatalog-seltext_m = 'AGE'.
"fieldcatalog-do_sum = 'X'. "Display column total
fieldcatalog-col_pos = 10.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'SALARY'.
fieldcatalog-seltext_m = 'SALARY'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-outputlen = 15.
fieldcatalog-datatype ='CURR'.
fieldcatalog-col_pos = 11.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
"fieldcatalog-fieldname = 'ECURRENCY'.
"fieldcatalog-seltext_s = 'ECURRENCY'.
"APPEND fieldcatalog TO fieldcatalog.
"CLEAR fieldcatalog.
fieldcatalog-fieldname = 'TEXT'.
fieldcatalog-col_pos = 0.
"fieldcatalog-seltext_m = 'TEXT'.
fieldcatalog-tech = 'X'.
fieldcatalog-no_out = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
ENDFORM.
*& Form build_sortcat
* Build Sort catalog
FORM build_sortcat .
"wa_sort-spos = 1.
wa_sort-fieldname = 'TEXT'.
"wa_sort-SUBTOT = 'X'. "subtotals any totals column by this field
wa_sort-up = 'X'.
APPEND wa_sort TO it_sortcat.
CLEAR wa_sort.
ENDFORM. " build_sortcat
FORM BUILD_LAYOUT.
*gd_layout-no_input = 'X'.
*gd_layout-colwidth_optimize = 'X'.
*gd_layout-totals_text = 'Totals'(201).
*"gd_LAYOUT-coltab_fieldname = 'SALARY'.
gd_layout-no_totalline = 'X'.
ENDFORM.
*IF sy-subrc = 0.
* LOOP AT fieldcatalog INTO fieldcat.
* IF fieldcat-fieldname = 'WEIGHT' OR
* fieldcat-fieldname = 'AGE'.
** Summation for WEIGHT & AGE
* fieldcat-do_sum = 'X'.
* MODIFY fieldcatalog FROM fieldcat TRANSPORTING do_sum.
* ENDIF.
* IF fieldcat-fieldname = 'TEXT'.
** Hide this field so that it can display it's content i.e.
** Total text in Subtotal level
* fieldcat-tech = 'X'.
* fieldcat-no_out = 'X'.
* MODIFY fieldcatalog FROM fieldcat TRANSPORTING tech no_out.
* ENDIF.
* CLEAR fieldcat.
* ENDLOOP.
* ENDIF.
*ENDFORM. "BUILDING THE FIELD CATALOG
*form build_events.
* data: ls_event type slis_alv_event.
* call function 'REUSE_ALV_EVENTS_GET'
* exporting
* i_list_type = 0
* importing
* et_events = gt_events[].
* read table gt_events with key name = slis_ev_top_of_page
* into ls_event.
* if sy-subrc = 0.
* move 'TOP-OF-PAGE' to ls_event-form.
* append ls_event to gt_events.
* endif.
* read table gt_events with key name = slis_ev_end_of_list
* into ls_event.
* if sy-subrc = 0.
* move 'END_OF_LIST' to ls_event-form.
* append ls_event to gt_events.
* endif.
*endform. " BUILD_EVENTS
"ls_layout-cell_merge = 'X'.
FORM DISPLAY_ALV_REPORT.
gd_repid = sy-repid.
*Pass data and field catalog to ALV function module to display ALV list
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
it_fieldcat = fieldcatalog[]
it_sort = it_sortcat
i_callback_program = gd_repid
is_layout = gd_layout
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'ZCONTACT'
i_save = 'X'
it_events = gt_events
is_print = gd_prntparams
is_variant = g_variant
"is_layout = ls_layout
TABLES
t_outtab = itt_zcontact
EXCEPTIONS
program_error = 1
OTHERS = 2.
"WRITE: 'TOTAL' UNDER 'ID'.
ENDFORM.
**Fetch data from the database
FORM DATA_RETRIEVAL.
"DATA: ld_subtot(1) type c.
SELECT * FROM zcontact INTO TABLE itt_zcontact UP TO 10 ROWS.
ENDFORM.
FORM sub_add_text.
*Populate field with text value
DATA:
wt_zcontact TYPE t_zcontact,
last TYPE zcontact-ID,
l_text(40) type c,
num type n.
loop at itt_zcontact into wat_zcontact.
* Populate final table
wt_zcontact-TEXT = 'Total salary: '.
"ld_subtot = ld_subtot + 1.
"wat_zcontact-text = ld_subtot.
modify itt_zcontact FROM wat_zcontact.
clear wat_zcontact.
"APPEND wat_zcontact TO itt_zcontact.
endloop.
ENDFORM.
FORM top-of-page.
*ALV Header declarations
DATA: it_listheader TYPE slis_t_listheader,
wa_listheader TYPE slis_listheader,
t_line like wa_listheader-info,
ld_lines TYPE I,
ld_linesc(10) TYPE C.
wa_listheader-typ = 'H'.
wa_listheader-info = 'Contact Details'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = sy-repid.
wa_listheader-key = 'Program Name:'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-info = sy-uname.
wa_listheader-key = 'User Name:'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-key = 'Run Date :'.
CONCATENATE sy-datum+6(2)
sy-datum+4(2)
sy-datum(4)
INTO wa_listheader-info
SEPARATED BY '/'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
wa_listheader-typ = 'S'.
wa_listheader-key = 'Time :'.
CONCATENATE sy-uzeit(2)
sy-uzeit+2(2)
sy-uzeit+4(2)
INTO wa_listheader-info
SEPARATED BY ':'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader[]
i_logo = 'KLOGO'.
ENDFORM. "top_of_page -
Problem with vertical text in crystal report viewer
Hi,
I am displaying vertical text in crystal report designer and deploying the report in crystal reports server 2008. The deployed report is being displayed using JAVA in crystal report viewer control.
Problem: Vertical text header is getting collapsed wth other vertical headers.
Please help on this.
Thanks,Hi Vijay,
I found out another method of retaining all the chart formatting that is done in the preview pane.
Once you have done all the changes then you will find interestingly there is a chart menu option that appears in the tool bar. Once you click on it there is an option "Apply Changes to All Charts".
Select that option, close your preview. Open it once again and you will find that all the settings are still there and the Web Viewer is able to display them properly.
I think that I resolved this.
Regards,
Gourav
Maybe you are looking for
-
Can you buy Creative Cloud for a single month? Or do you have to buy the membership which lasts a year? If so can you cancel the membership after 1 month and only pay for that month? Thanks
-
Adding namespace prefix to the XMLa root element
I am facing a problem in our application. I am assigning an XML content to a XSD variable. While assignment operation is performed the prefix of the XML root element alone is getting replaced with default namespace, though the source XML has the pref
-
Yesterday, I could make calls on my new iPhone5. Today, it says "No SIM Card Installed." Now I can't make calls. Any help?
-
How to install oracle 9i application-Server to run D2K FORMS APPLICATION...
Hi, I am working on a application devlopment on d2k . i want to run this application on my pc using IE. So I want to configure oracle9i application server on my laptop. Please let me know how to install and configure oracle 9i AS. However i have 9i d
-
Hi, My problem is: I've a very simple function in the database: FUNCTION E return number is i number; begin select count(*) into i from ceg; return i; end; As you see it does nothing but gives back a count of any table. When I try to call this functi