Problems with ALV header
Hi there,
i've got a little problem with my ALV header. every time when i run my program and want to go back to the selection screen with the BACK-button i see my header again. so i've got to push the BACK-button again to get to the selection screen.
here's my alv-code
FORM TOP_OF_PAGE.
REFRESH header_itab[].
CLEAR wa_header.
wa_header-typ = 'H'.
* wa_header-key = 'ausw1'.
wa_header-info = text-001.
APPEND wa_header TO header_itab.
CLEAR wa_header.
IF radio1 = 'X'.
wa_header-typ = 'S'.
wa_header-key = 'Radiobutton1'.
wa_header-info = text-002.
APPEND wa_header TO header_itab.
CLEAR wa_header.
ELSEIF radio2 = 'X'.
wa_header-typ = 'S'.
wa_header-key = 'Radiobutton2'.
wa_header-info = text-003.
APPEND wa_header TO header_itab.
CLEAR wa_header.
ELSEIF radio3 = 'X'.
wa_header-typ = 'S'.
wa_header-key = 'Radiobutton3'.
wa_header-info = text-004.
APPEND wa_header TO header_itab.
CLEAR wa_header.
ELSEIF radio4 = 'X'.
wa_header-typ = 'S'.
wa_header-key = 'Radiobutton4'.
wa_header-info = text-005.
APPEND wa_header TO header_itab.
CLEAR wa_header.
ELSE.
wa_header-typ = 'S'.
wa_header-key = 'Radiobutton5'.
wa_header-info = text-006.
APPEND wa_header TO header_itab.
CLEAR wa_header.
ENDIF.
wa_header-typ = 'S'.
wa_header-key = 'Benutzer:'.
wa_header-info = sy-uname.
APPEND wa_header TO header_itab.
CLEAR wa_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = header_itab.
ENDFORM.
* FORM alv_füllen *
FORM alv_fuellen .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = my_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
* i_grid_title = my_title
it_fieldcat = feldkatalog_itab
is_layout = gs_layout
* it_events = event_itab
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM.
* FORM layout_allg_build *
FORM layout_allg_build.
gs_layout-zebra = 'X'.
gs_layout-colwidth_optimize = 'X'.
ENDFORM.
hope someone can help me.
regards tobias
hi,
i tried some of your ideas but none helped my.
so here's my complete code
maybe this is helpful.
*& Report z_cd_tool_awdimaiob
REPORT z_cd_tool_awdimaiob.
* G L O B A L I N T E R N A L T A B L E S
DATA: BEGIN OF itab OCCURS 100,
status TYPE dimaiobpar-zstatus,
rtyp TYPE dimaiobpar-zrtyp,
zahlweg TYPE dimaiobpar-ezawe_x,
a_status TYPE i,
a_rtyp TYPE i,
a_partner TYPE i,
a_vertraege TYPE i,
END OF itab .
* G L O B A L D A T A
DATA: ok_code LIKE sy-ucomm,
wa_test_tab LIKE dimaiobpar,
my_title TYPE lvc_title,
my_repid LIKE sy-repid.
TYPE-POOLS: slis.
DATA: feldkatalog_itab TYPE slis_t_fieldcat_alv,
wa_feldkatalog TYPE slis_fieldcat_alv,
event_itab TYPE slis_t_event,
header_itab TYPE slis_t_listheader,
gs_layout TYPE slis_layout_alv,
alv_event TYPE slis_alv_event,
wa_header TYPE slis_listheader.
DATA: t_tab LIKE dimaiobpar.
*selection-screen
SELECTION-SCREEN: SKIP, BEGIN OF BLOCK test WITH FRAME TITLE text-010.
SELECT-OPTIONS: partner FOR t_tab-partner,
astatus FOR t_tab-zstatus.
SELECTION-SCREEN END OF BLOCK test.
*Radiobutton
SELECTION-SCREEN: SKIP, BEGIN OF BLOCK test2 WITH FRAME TITLE text-020.
PARAMETERS: radio1 RADIOBUTTON GROUP test DEFAULT 'X',
radio2 RADIOBUTTON GROUP test,
radio3 RADIOBUTTON GROUP test,
radio4 RADIOBUTTON GROUP test,
radio5 RADIOBUTTON GROUP test.
SELECTION-SCREEN END OF BLOCK test2.
* S T A R T - O F - S E L E C T I O N.
START-OF-SELECTION.
* Select-Abfrage
PERFORM select_data.
*END-OF-SELECTION.
* Feldkatalog fuellen.
PERFORM feldkatalog_fuellen .
* Feldkatalog übergeben
PERFORM alv_feldkatalog.
* ALV-Event
perform alv_event.
* Layout bestimmen.
PERFORM layout_allg_build.
* header aufbau
PERFORM top_of_page.
SORT itab.
my_title = 'Auswertung Dimaiobpar'.
my_repid = sy-repid.
PERFORM exit_program.
END-OF-SELECTION.
* ALV mit daten füllen
PERFORM alv_fuellen.
* FORM alv_event *
FORM alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = event_itab.
READ TABLE event_itab
WITH KEY name = 'TOP_OF_PAGE'
INTO alv_event.
IF sy-subrc EQ 0.
MOVE 'TOP_OF_PAGE' TO alv_event-form.
APPEND alv_event TO event_itab.
ENDIF.
ENDFORM.
* FORM alv_feldkatalog *
FORM alv_feldkatalog.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = my_repid
i_internal_tabname = 'ITAB'
i_inclname = my_repid
* i_bypassing_buffer = 'X'
CHANGING
ct_fieldcat = feldkatalog_itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM.
* FORM header *
FORM top_of_page.
CLEAR wa_header.
wa_header-typ = 'H'.
* wa_header-key = 'ausw1'.
wa_header-info = text-001.
APPEND wa_header TO header_itab.
CLEAR wa_header.
IF radio1 = 'X'.
wa_header-typ = 'S'.
wa_header-key = 'Radiobutton1'.
wa_header-info = text-002.
APPEND wa_header TO header_itab.
CLEAR wa_header.
ELSEIF radio2 = 'X'.
wa_header-typ = 'S'.
wa_header-key = 'Radiobutton2'.
wa_header-info = text-003.
APPEND wa_header TO header_itab.
CLEAR wa_header.
ELSEIF radio3 = 'X'.
wa_header-typ = 'S'.
wa_header-key = 'Radiobutton3'.
wa_header-info = text-004.
APPEND wa_header TO header_itab.
CLEAR wa_header.
ELSEIF radio4 = 'X'.
wa_header-typ = 'S'.
wa_header-key = 'Radiobutton4'.
wa_header-info = text-005.
APPEND wa_header TO header_itab.
CLEAR wa_header.
ELSE.
wa_header-typ = 'S'.
wa_header-key = 'Radiobutton5'.
wa_header-info = text-006.
APPEND wa_header TO header_itab.
CLEAR wa_header.
ENDIF.
wa_header-typ = 'S'.
wa_header-key = 'Benutzer:'.
wa_header-info = sy-uname.
APPEND wa_header TO header_itab.
CLEAR wa_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = header_itab.
REFRESH header_itab.
ENDFORM.
* FORM alv_füllen *
FORM alv_fuellen .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = my_repid
i_callback_top_of_page = 'TOP_OF_PAGE'
* i_grid_title = my_title
it_fieldcat = feldkatalog_itab[]
is_layout = gs_layout
* it_events = event_itab
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM.
* FORM layout_allg_build *
FORM layout_allg_build.
gs_layout-zebra = 'X'.
gs_layout-colwidth_optimize = 'X'.
ENDFORM.
* FORM feldkatalog_fuellen *
FORM feldkatalog_fuellen.
*Feldkatalog erstellen/füllen mit hilfe der if-schleife anhand des
*gewählten Radiobuttons
IF radio1 = 'X'.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'STATUS'.
wa_feldkatalog-seltext_m = 'Status'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'RTYP'.
wa_feldkatalog-seltext_m = 'Rechungstyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'A_RTYP'.
wa_feldkatalog-seltext_m = 'Anzahl Rechungstyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
ELSEIF radio2 = 'X'.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'RTYP'.
wa_feldkatalog-seltext_m = 'Rechungstyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'A_STATUS'.
wa_feldkatalog-seltext_m = 'Anzahl Status'.
APPEND wa_feldkatalog TO feldkatalog_itab.
ELSEIF radio3 = 'X'.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'STATUS'.
wa_feldkatalog-seltext_m = 'Status'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'RTYP'.
wa_feldkatalog-seltext_m = 'Rechungstyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'A_VERTRAEGE'.
wa_feldkatalog-seltext_m = 'Anzahl Verträge'.
APPEND wa_feldkatalog TO feldkatalog_itab.
ELSEIF radio4 = 'X'.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'STATUS'.
wa_feldkatalog-seltext_m = 'Status'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'RTYP'.
wa_feldkatalog-seltext_m = 'Rechungstyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'A_PARTNER'.
wa_feldkatalog-seltext_m = 'Anzahl GPartner'.
APPEND wa_feldkatalog TO feldkatalog_itab.
ELSE.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'STATUS'.
wa_feldkatalog-seltext_m = 'Status'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'RTYP'.
wa_feldkatalog-seltext_m = 'Rechungstyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'ZAHLWEG'.
wa_feldkatalog-seltext_m = 'Zahlweg'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'A_PARTNER'.
wa_feldkatalog-seltext_m = 'Anzahl GPartner'.
APPEND wa_feldkatalog TO feldkatalog_itab.
ENDIF.
ENDFORM.
* FORM select_data *
FORM select_data.
*select-abfrage mit hilfe der if-schleife, analog zum Feldkatalog
IF radio1 = 'X'.
* Radiobutton1: Rechungstypen je Satus
SELECT
zstatus AS status
zrtyp AS rtyp
COUNT( DISTINCT zrtyp ) AS a_rtyp
INTO CORRESPONDING FIELDS OF itab
FROM dimaiobpar
WHERE
insobject LIKE 'V%' AND
partner IN partner AND
zstatus IN astatus
GROUP BY ZSTATUS zrtyp
ORDER BY zstatus.
APPEND itab.
ENDSELECT.
ELSEIF radio2 = 'X'.
* Radiobutton2: Status je Rechungstyp.
SELECT
zrtyp AS rtyp
COUNT( DISTINCT zstatus ) AS a_status
INTO CORRESPONDING FIELDS OF itab
FROM dimaiobpar
WHERE
insobject LIKE 'V%' AND
partner IN partner AND
zstatus IN astatus
GROUP BY ZRTYP
ORDER BY zrtyp.
APPEND itab.
ENDSELECT.
ELSEIF radio3 = 'X'.
* Radiobutton3: Anzahl Verträge je Status und Rtyp.
SELECT
zstatus AS status
zrtyp AS rtyp
COUNT( DISTINCT insobject ) AS a_vertraege
INTO CORRESPONDING FIELDS OF itab
FROM dimaiobpar
WHERE
insobject LIKE 'V%' AND
partner IN partner AND
zstatus IN astatus
GROUP BY ZSTATUS zrtyp
ORDER BY zstatus.
APPEND itab.
ENDSELECT.
ELSEIF radio4 ='X'.
* Radiobutton4: Anzahl GPartner je Status und RTyp.
SELECT
zstatus AS status
zrtyp AS rtyp
COUNT( DISTINCT partner ) AS a_partner
INTO CORRESPONDING FIELDS OF itab
FROM dimaiobpar
WHERE
insobject LIKE 'V%' AND
partner IN partner AND
zstatus IN astatus
GROUP BY ZSTATUS zrtyp
ORDER BY zstatus zrtyp.
APPEND itab.
ENDSELECT.
ELSE.
* Radiobutton5: Anzahl Kunden nach Zahlweg.
SELECT
zstatus AS status
zrtyp AS rtyp
ezawe_x AS zahlweg
COUNT( DISTINCT partner ) AS a_partner
INTO CORRESPONDING FIELDS OF itab
FROM dimaiobpar
WHERE
insobject LIKE 'V%' AND
partner IN partner AND
zstatus IN astatus AND
ezawe_x IN ('E', 'F', space)
GROUP BY ZSTATUS zrtyp EZAWE_X
ORDER BY zstatus zrtyp.
APPEND itab.
ENDSELECT.
ENDIF.
ENDFORM.
* FORM EXIT_PROGRAM *
FORM exit_program.
IF sy-ucomm = 'BACK' OR
sy-ucomm = 'EXIT' OR
sy-ucomm = 'CANCEL'.
LEAVE PROGRAM.
endif.
ENDFORM.
Similar Messages
-
I have a problem with ALV Grid User Command?
Hi Experts,
I have a problem with ALV GRID User Command.
I am calling TCODE IW33 (Order Display) from the ALV output at first time by selecting an order. But, User command is calling IW33 Initial screen with blank value of order. Even I checked in debugging the value what I selected is passing properly, but once that screen (IW33 Initial) displays, value doesn't appear. Then, Manually, I created another session and gone to TCODE IW33 and displayed an order. After that I came out from that order. Then again run my ALV program and selected another order, now order is displaying, but not what I selected current order instead of displaying previous order what I just displayed manually. If I selected any other order, system will display the same order what I dislayed manually.
Here is my code.
FORM user_command_alv USING u_ucomm TYPE sy-ucomm
us_self_field TYPE slis_selfield.
CASE u_ucomm.
WHEN '&IC1'.
READ TABLE it_final INDEX us_self_field-tabindex INTO wa_final.
WHEN 'ORDER'.
IF NOT wa_final-order IS INITIAL.
SET PARAMETER ID 'COK' FIELD wa_final-order.
CALL TRANSACTION 'IW33' AND SKIP FIRST SCREEN.
ENDIF.
endform.
PARAMETER ID 'COK' also the standard one.
Could you please help me out, Where I did wrong?
If I select any order, that order only should display.
Thanks in advance.
Regards,
Sarayu.
Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 2:33 PMhi,
Please check it once the Paramater ID is 'ANR' for IW33 order number.
Hope this may help.
Regards,
Sravanthi -
Problem with ALV grid in edit mode
Hello, gurus!
I have a problem with ALV-grid. Sometimes when I call F4 help for a cell, data is inserted in a different cell. And when I call check_changed_data method, my internal table (passed to ALV-control in set_table_for_first_display) does not updates properly. In what can be a problem?
Thanks,
MikhailHi Prabhu,
MODULE pbo_100 OUTPUT.
SET PF-STATUS 'MAIN100'.
title_of_report = text-010.
SET TITLEBAR '0100' WITH title_of_report.
DATA: g_event_receiver TYPE REF TO lcl_event_handler.
IF z_custom_container IS INITIAL .
CREATE OBJECT z_custom_container
EXPORTING
container_name = 'ALV_ZAC'.
CREATE OBJECT alv_grid
EXPORTING
i_parent = z_custom_container.
g_repid = sy-repid.
gs_variant-report = g_repid.
x_save = 'A'.
PERFORM check_alv_grid_fields.
ps_layout-cwidth_opt = 'X'.
ps_layout-edit = 'X'.
CALL METHOD alv_grid->set_ready_for_input
EXPORTING
i_ready_for_input = '1'.
* CALL METHOD alv_grid->register_edit_event
* EXPORTING
* i_event_id = cl_gui_alv_grid=>mc_evt_enter.
APPEND s_list_rec to it_list_rec.
CALL METHOD alv_grid->set_table_for_first_display
EXPORTING
is_layout = ps_layout
is_variant = gs_variant
i_save = x_save
CHANGING
it_fieldcatalog = pt_fieldcat
it_outtab = it_list_rec[].
CALL METHOD alv_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_enter.
CALL METHOD alv_grid->register_edit_event
EXPORTING
i_event_id = cl_gui_alv_grid=>mc_evt_modified.
ENDIF.
FORM check_alv_grid_fields .
DATA: ls_fcat LIKE LINE OF pt_fieldcat.
REFRESH pt_fieldcat .
CLEAR: ps_layout, ls_fcat.
ls_fcat-fieldname = 'VBELN'.
ls_fcat-ref_field = 'VBELN'. ls_fcat-ref_table = 'LIPS'. " .
ls_fcat-outputlen = 9.
* ls_fcat-datatype = 'CHAR'.
* ls_fcat-inttype = 'C'.
APPEND ls_fcat TO pt_fieldcat.
CLEAR: ls_fcat.
ls_fcat-fieldname = 'ERDAT'.
ls_fcat-ref_field = 'ERDAT'. ls_fcat-ref_table = 'LIPS'.
ls_fcat-outputlen = 9.
* ls_fcat-f4availabl = 'X' .
* ls_fcat-datatype = 'DATS'.
* ls_fcat-inttype = 'D'.
APPEND ls_fcat TO pt_fieldcat.
CLEAR: ls_fcat.
ENDFORM. " check_alv_grid_fields
FORM save_p .
CLEAR l_valid.
CALL METHOD alv_grid->check_changed_data
IMPORTING
e_valid = l_valid.
IF l_valid IS INITIAL.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = text-i01
txt1 = text-i02
txt2 = text-i03
txt3 = text-i04.
ELSE.
i_dat_reg = zrumm_prr-cdprr.
CLEAR is_temp_otc.
freshit i_prrpus_fax.
freshit i_list2_ot.
LOOP AT it_list_rec INTO s_list_rec.
MOVE-CORRESPONDING s_list_rec TO i_list2_ot.
i_list2_ot-fgrup = 'RECE'.
i_list2_ot-prrnu = i_num_prr.
APPEND i_list2_ot.
MOVE-CORRESPONDING s_list_rec TO i_prrpus_fax.
APPEND i_prrpus_fax.
ENDLOOP.
ENDIF.
Edited by: Mikhail Sarychev on Mar 16, 2011 6:41 AM
Edited by: Mikhail Sarychev on Mar 16, 2011 6:49 AM
Edited by: Mikhail Sarychev on Mar 16, 2011 6:49 AM -
Problem with ALV filter functionality when filtered for multiple values
Hi,
I am facing a problem with ALV filter functionality.
I have displayed an ALV with some columns col_A, col_B and col_C
col_A---- col_B -
col_C
1----
a -
abc
2----
b -
pqr
3----
c -
lmn
4----
d -
xyz
5----
f -
stu
From the settings link I am applying filter on column col_C and selected multiple values say 'pqr', 'xyz' and 'lmn'.
Now the ALV is showing rows only for last selection i.e . results are fetched only for value 'lmn'.
i.e. after applying the filter the ALV table looks as below:
col_A---- col_B -
col_C
3----
c -
lmn
But ideally it should be:
col_A---- col_B -
col_C
2----
b -
pqr
3----
c -
lmn
4----
d -
xyz
I could not find any OSS note related to this issue.
Please help me resolve this issue.
Thanks,
FerozHi,
I am facing a problem with ALV filter functionality.
I have displayed an ALV with some columns col_A, col_B and col_C
col_A---- col_B -
col_C
1----
a -
abc
2----
b -
pqr
3----
c -
lmn
4----
d -
xyz
5----
f -
stu
From the settings link I am applying filter on column col_C and selected multiple values say 'pqr', 'xyz' and 'lmn'.
Now the ALV is showing rows only for last selection i.e . results are fetched only for value 'lmn'.
i.e. after applying the filter the ALV table looks as below:
col_A---- col_B -
col_C
3----
c -
lmn
But ideally it should be:
col_A---- col_B -
col_C
2----
b -
pqr
3----
c -
lmn
4----
d -
xyz
I could not find any OSS note related to this issue.
Please help me resolve this issue.
Thanks,
Feroz -
Problem with ALV search help Dictionary Search Help
Hello experts
I have a problem with ALV search help.
I use DDIC table ZXXX with text table ZXXX_T. I created DDIC search help form table ZXXX. In my WD application, in context on COMPONENTCONTROLLER i set on attribute: 'Input help mode' as 'Dictionary Search Help' and in 'Dictionary Search Help' I pass name of new created DDIC search help.
I create a input field from that atrribute and search help works fine (there was a value and description for value from text table). So I created ALV witch contains that attribute too.
Next I set column for this attribute in ALV as editable but on Serch help for this collumn I have only value. I DON'T HAVE TEXT DESCRIPTION FOR VALUE.
Please help me and tell me what I do wrong?
MikoHello,
Thank's for your help. I create DDic Search help for all fields from my ALV. Next I changed 'TYPE' for all ALV fields in COMPONENTCONTROLLER from ZXXX-Zfield to Zfield, and I changed 'Input help mode' from 'Automatic' to 'Dictionary Search Help'. Now I see Value and Description for value in Search Help in my ALV.
Regards
Miko -
Problems with ALV - Excel after changing from 640 to 710
Hi all,
first i have to say, that i have tried to set this thread in the SAPGUI-Forum,
but i didn't get any answers, therefore i try it here.
I have changed our SAPGUI from 640 to 710. Now i get problems
with ALV-GRID display.
When i change the output to EXCEL-Inplace i get the Error-Message:
0K000
View cannot be switched: Product is not installed or integration is not active.
In 640 i don't have any problems. We have ECC6.
When i use GUI710 and SAP 4.6C i don't have any problems.
Simple Test is possible with SE16N and change ALV output to excel-inplace.
Can anybody help?
Thanks.
Regards, DieterHi Dieter,
we had a similar problem who we resolved installing path the GUI710_1-10002995.EXE.
Have you tried to install the patch?
Bye
Giovanni Mortati -
Problems with ALV - Excel after changin from 640 to 710
Hi all,
i have changed our SAPGUI from 640 to 710. Now i get problems
with ALV-GRID display.
When i change to EXCEL-Inplace i get the Error-Message:
0K000
View cannot be switched: Product is not installed or integration is not active.
in 640 i don't have any problems.
Can anybody help?
Thanks.
Regards, DieterHi Roman,
in Service.sap.com there is the first patch-level of the new GUI7.10.
i have install it without any problems.
The problem i had with excal-inplace is solved.
Regards, Dieter -
Hi friends,
I have created one program with alv list, but i am unable to add one header and footer, also i have to add one logo to the program. Plese some one tell me a easy procedure to add a header, footer and also a logo. If you can show me one with example that would be very helpful.
This is my program, plz add the necessary parts.
*& Report Y_BOM2_ALV
REPORT y_bom2_alv LINE-SIZE 350 LINE-COUNT 350.
*& Include YINCLUDE1
TABLES : mast, stko, stpo.
TYPE-POOLS : slis.
DATA : BEGIN OF iall OCCURS 10,
matnr LIKE mast-matnr,
werks LIKE mast-werks,
stlan LIKE mast-stlan,
stlal LIKE mast-stlal,
stlst LIKE stko-stlst,
posnr LIKE stpo-posnr,
idnrk LIKE stpo-idnrk,
menge LIKE stpo-menge,
meins LIKE stpo-meins,
ausch LIKE stpo-ausch,
lgort LIKE stpo-lgort,
END OF iall.
DATA : i_repid LIKE sy-repid,
i_lines LIKE sy-tabix.
DATA : int_fcat TYPE slis_t_fieldcat_alv.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE title1.
PARAMETER : p_werks LIKE mast-werks.
SELECT-OPTIONS : s_matnr FOR mast-matnr.
SELECTION-SCREEN END OF BLOCK a1.
INITIALIZATION.
title1(50) = ' Bill Of Material Input Screen '.
*& Include YINCLUDE2
START-OF-SELECTION.
SELECT mastmatnr mastwerks maststlan maststlal stko~stlst
stpoposnr stpoidnrk stpomenge stpomeins stpo~ausch
stpo~lgort INTO TABLE iall FROM stpo INNER JOIN stko ON
stpostlnr = stkostlnr INNER JOIN mast ON
stpostlnr = maststlnr WHERE mast~werks EQ
p_werks AND mast~matnr IN s_matnr.
IF sy-subrc <> 0 OR p_werks EQ ' ' OR s_matnr EQ ' '.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
EXPORTING
titel = 'ERROR MESSAGE ( INPUT ERROR / WRONG INPUT ) '
textline1 = ' PLANT / MATERIAL Invalid or Empty '
textline2 = ' Plese enter plant no / material no again '
start_column = 20
start_row = 5.
EXIT.
ENDIF.
CLEAR i_lines.
DESCRIBE TABLE iall LINES i_lines.
IF i_lines LT 1.
WRITE: /
'No materials found.'.
EXIT.
ENDIF.
END-OF-SELECTION.
i_repid = sy-repid.
*& Include YINCLUDE3
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = i_repid
i_internal_tabname = 'IALL'
i_inclname = i_repid
CHANGING
ct_fieldcat = int_fcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
WRITE: /
'Returncode',
sy-subrc,
'from FUNCTION REUSE_ALV_FIELDCATALOG_MERGE'.
ENDIF.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = i_repid
it_fieldcat = int_fcat
i_save = 'A'
TABLES
t_outtab = iall
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE: /
'Returncode',
sy-subrc,
'from FUNCTION REUSE_ALV_LIST_DISPLAY'.
ENDIF.Hi Tapodipta,
See below example and modify ur code according to ur requirement..
REPORT ZTEST_ALV_CHECK .
TYPE-POOLS: SLIS.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
L_LAYOUT type slis_layout_alv,
x_events type slis_alv_event,
it_events type SLIS_T_EVENT.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
END OF ITAB.
SELECT VBELN
POSNR
FROM VBAP
UP TO 20 ROWS
INTO TABLE ITAB.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
x_events-NAME = SLIS_EV_END_OF_PAGE.
x_events-FORM = 'END_OF_PAGE'.
APPEND x_events TO iT_EVENTS.
CLEAR x_events .
x_events-NAME = SLIS_EV_TOP_OF_PAGE.
x_events-FORM = 'TOP_OF_PAGE'.
APPEND x_events TO iT_EVENTS.
CLEAR x_events .
x_events-NAME = slis_ev_end_of_list.
x_events-FORM = 'END_OF_LIST'.
APPEND x_events TO iT_EVENTS.
CLEAR x_events .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT = L_LAYOUT
IT_FIELDCAT = IT_FIELDCAT
it_events = it_events
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.
FORM TOP_OF_PAGE.
* BREAK-POINT.
WRITE: / 'TOP_OF_PAGE'.
ENDFORM.
FORM END_OF_LIST.
* BREAK-POINT.
"here you can use this for footer
WRITE: / 'FOR FOOTER'.
ENDFORM.
FORM END_OF_PAGE.
* BREAK-POINT.
WRITE: / 'END_OF_PAGE'.
ENDFORM.
Go through the link as well..
Re: ALV Footer
Hope it will solve ur problem..
<b>Reward points if useful..</b>
Thanks & Regards
ilesh 24x7 -
Problem with ALV Report Column
Hi
I have ALV report that got tons of columns and most of them are showing correctly. But there are two or three where i have a do sum checked got a small problem. The HEADING of the columns says NUMBER instead of its column name...
Look at my code:
ls_fieldcat-fieldname = 'ETIME'.
ls_fieldcat-ref_tabname = 'REC'.
ls_fieldcat-ref_fieldname = 'ETIME'.
ls_fieldcat-seltext_s = 'ET '.
ls_fieldcat-seltext_m = 'Et Tm '.
ls_fieldcat-seltext_l = 'End Time '.
append ls_fieldcat to pt_fieldcat.
ls_fieldcat-fieldname = 'HOURS'.
ls_fieldcat-ref_tabname = 'PC2BF'.
ls_fieldcat-ref_fieldname = 'ANZHL'.
ls_fieldcat-seltext_s = 'Hrs '.
ls_fieldcat-seltext_m = 'Hors '.
ls_fieldcat-seltext_l = 'Hours'.
ls_fieldcat-decimals_out = 2.
ls_fieldcat-no_zero = 'X'.
ls_fieldcat-datatype = 'DEC'.
ls_fieldcat-do_sum = 'X'.
append ls_fieldcat to pt_fieldcat.
ls_fieldcat-no_zero = ''.
ls_fieldcat-datatype = ''.
ls_fieldcat-outputlen = ''.
ls_fieldcat-do_sum = ''.
ls_fieldcat-decimals_out = ''.
ls_fieldcat-fieldname = ''.
ls_fieldcat-fieldname = 'PNUMB'.
ls_fieldcat-ref_tabname = 'PC20E'.
ls_fieldcat-ref_fieldname = 'PRAKN'.
ls_fieldcat-seltext_s = 'P# '.
ls_fieldcat-seltext_m = 'Pre # '.
ls_fieldcat-seltext_l = 'Premium # '.
ls_fieldcat-datatype = 'NUMC'.
append ls_fieldcat to pt_fieldcat.
ls_fieldcat-datatype = ''.
The column with Hours is showing NUMBER with the total sum but the column before and after that shows correctly.
I have tried taken out the
<b> ls_fieldcat-do_sum = 'X'.</b>
Then its shows correctly but i need it to do the sum.
Is there anything i need to do in order to show the columns correctly?
Please help. <b><REMOVED BY MODERATOR></b>. thanks
Message was edited by:
Anwarul Kabir
Message was edited by:
Anwarul Kabir
Message was edited by:
Alvaro Tejada Galindohere is the whole program. you can upload this run it for your self if that helps in any way...
*& Report ZHEADCOUNT *
REPORT ZHEADCOUNT no standard page
heading message-id zw line-size 255.
* Dictionary tables/structures
tables: teven,
ZSHIFTS,
ZHEADCT.
* Global ALV Data Declarations
type-pools slis.
include: rpcxB200, RPTBAL01.
DATA: BEGIN OF REC OCCURS 0,
PERNR LIKE TEVEN-PERNR,
LDATE LIKE TEVEN-LDATE,
LTIME LIKE TEVEN-LTIME,
SATZA LIKE TEVEN-SATZA,
TERID LIKE TEVEN-TERID,
PLANS LIKE TEVEN-PLANS.
DATA: END OF REC.
data:
begin of x_sortinfo_alv occurs 0,
spos like alvdynp-sortpos,
fieldname type slis_fieldname,
tabname type slis_fieldname,
up like alvdynp-sortup,
down like alvdynp-sortdown,
group like alvdynp-grouplevel,
subtot like alvdynp-subtotals,
comp(1) type c,
expa(1) type c,
obligatory(1) type c,
end of x_sortinfo_alv,
d like scal-indicator,
v_variant like disvariant,
v_repid like sy-repid,
v_save(1) type c,
lv_sortseq type i,
s_title(20),
fieldcat type slis_t_fieldcat_alv,
ls_line type slis_listheader,
gd_layout type slis_layout_alv,
gt_sp_group type slis_t_sp_group_alv,
gt_sort type slis_t_sortinfo_alv,
ls_sort type slis_sortinfo_alv,
events type slis_t_event,
list_top_of_page type slis_t_listheader,
top_of_page type slis_formname value 'TOP_OF_PAGE',
v_exit(1) type c,
v_pdsnr like assob-pdsnr,
ls_fieldcat type slis_t_fieldcat_alv.
constants:
alv_slis_formname type slis_formname value 'ALV_USER_COMMAND',
c_yes like space value 'X',
c_no like space value space,
c_dev LIKE sy-sysid VALUE 'DEV',
c_device(4) TYPE c VALUE 'LOCL'.
* define selection screen
selection-screen begin of block elmo with frame title text-001.
selection-screen begin of line.
selection-screen comment 1(30) text-002.
select-options p_terid for TEVEN-TERID.
selection-screen end of line.
selection-screen begin of line.
selection-screen comment 1(30) text-003.
select-options p_shift for ZSHIFTS-DWS.
selection-screen end of line.
selection-screen end of block elmo.
selection-screen begin of block blk2 with frame title text-004.
PARAMETERS: p_vari like disvariant-variant.
selection-screen end of block blk2.
* Form Initialization
initialization.
v_repid = sy-repid.
v_save = 'A'.
clear v_variant.
v_variant-report = v_repid.
* Get default variant
alv_variant = v_variant.
call function 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = v_save
CHANGING
cs_variant = alv_variant
EXCEPTIONS
not_found = 2.
if sy-subrc = 0.
p_vari = alv_variant-variant.
endif.
* At Selection-Screen event (value help)
at selection-screen on value-request for p_vari.
perform f4_for_variant.
* At Selection-Screen event (check input data)
at selection-screen on p_vari.
if p_vari <> space.
v_variant-report = v_repid.
v_variant-variant = p_vari.
call function 'REUSE_ALV_VARIANT_SELECT'
EXPORTING
i_dialog = c_no
it_default_fieldcat = field_tab[]
i_layout = gs_layout
CHANGING
cs_variant = v_variant.
if sy-subrc <> 0.
call function 'REUSE_ALV_VARIANT_SELECT'
EXPORTING
i_dialog = c_yes
it_default_fieldcat = field_tab[]
i_layout = gs_layout
CHANGING
cs_variant = v_variant.
endif.
endif.
* main logic
TOP-OF-PAGE.
START-OF-SELECTION.
GET PERNR.
RP-PROVIDE-FROM-LAST P0001 SPACE PNPBEGDA PNPENDDA.
* process the data according to the payroll area
IF PERNR-WERKS EQ P0001-WERKS AND PERNR-BTRTL EQ P0001-BTRTL
AND PERNR-KOSTL EQ P0001-KOSTL AND PERNR-BUKRS EQ P0001-BUKRS
AND PERNR-ABKRS EQ P0001-ABKRS AND PERNR-KOKRS EQ P0001-KOKRS.
PERFORM RETRIEVE_Time.
ENDIF.
END-OF-SELECTION.
Perform call_alv.
*==================================*
*=================================*
FORM RETRIEVE_Time.
Clear: REC.
Select * from teven where PERNR EQ PERNR-PERNR
AND TERID IN p_terid
AND LDATE >= PNPBEGDA
AND LDATE <= PNPENDDA.
MOVE:
TEVEN-PERNR TO REC-PERNR,
TEVEN-LDATE TO REC-LDATE,
TEVEN-LTIME TO REC-LTIME,
TEVEN-SATZA TO REC-SATZA,
TEVEN-TERID TO REC-TERID,
TEVEN-PLANS TO REC-PLANS.
APPEND REC.
endselect.
ENDFORM. " RETRIEVE_PAYROLL
* CALL_ALV
form call_alv.
perform build_field_catalog using field_tab[].
perform build_eventtab using events[].
perform comment_build using header_alv[].
perform build_sorttab using gt_sort[].
perform build_layout.
* Call ABAP List Viewer
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = v_repid
i_callback_user_command = 'ALV_USER_COMMAND'
i_structure_name = 'REC'
it_fieldcat = field_tab
it_special_groups = gt_sp_group
it_sort = gt_sort
i_save = v_save
is_variant = v_variant
it_events = events
is_layout = gd_layout
tables
t_outtab = REC
exceptions
program_error = 1
others = 2.
endform. "call_alv
* BUILD_FIELD_CATALOG
form build_field_catalog USING pt_fieldcat type
slis_t_fieldcat_alv.
* data: ls_fieldcat type slis_fieldcat_alv.
clear: fieldcat, pt_fieldcat[].
data : l_tabname type slis_tabname. " Table Name
l_tabname = 'REC'.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = v_repid
i_internal_tabname = l_tabname
i_inclname = v_repid
changing
ct_fieldcat = ls_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.
else.
* append ls_fieldcat to pt_fieldcat.
endif.
endform. "build_field_catalog
* BUILD_EVENTTAB
form build_eventtab using events type slis_t_event.
* Registration of events to happen during list display
data: tmp_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = events.
read table events with key name = slis_ev_top_of_page into tmp_event.
if sy-subrc = 0.
move top_of_page to tmp_event-form.
append tmp_event to events.
endif.
endform. "build_eventtab
* COMMENT_BUILD
form comment_build using pt_top_of_page type slis_t_listheader.
data: v_head_string(255) value space, d1(2), m1(2), y1(2), d2(2), m2(2), y2(2).
clear: ls_line, pt_top_of_page.
ls_line-typ = 'H'.
data pnpfrom(10).
data pnpto(10).
data: print_date(10).
data: print_time(10).
d1 = PNPBEGDA+6(2). d2 = PNPENDDA+6(2).
m1 = PNPBEGDA+4(2). m2 = PNPENDDA+4(2).
y1 = PNPBEGDA+2(2). y2 = PNPENDDA+2(2).
concatenate m1 '/' d1 '/' y1 into pnpfrom.
concatenate m2 '/' d2 '/' y2 into pnpto.
ls_line-info = sy-repid.
append ls_line to pt_top_of_page.
concatenate 'Printed by:' sy-uname 'on' print_date 'at' print_time
into ls_line-info separated by space.
append ls_line to pt_top_of_page.
ls_line-info = 'BGM INDUSTRIES, INC.'.
append ls_line to pt_top_of_page.
concatenate 'Period:' pnpfrom 'to' pnpto
into ls_line-info separated by space.
append ls_line to pt_top_of_page.
endform. "comment_build
* Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
* gd_layout-totals_text = 'Totals'(255).
* gd_layout-info_fieldname = 'LINE_COLOR'.
endform. " BUILD_LAYOUT
* TOP_OF_PAGE
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'Z_BGLOGO'
it_list_commentary = header_alv.
endform. "top_of_page
*& Form build_sorttab
* Set up the sorting for the report.
form build_sorttab using pt_sort type slis_t_sortinfo_alv.
clear lv_sortseq.
perform build_sort tables pt_sort changing ls_sort.
ls_sort-fieldname = 'PERNR'.
ls_sort-subtot = 'X'.
endform. " build_sorttab
* Use to add another sort field.
form build_sort
tables pt_sort
changing ls_sort structure x_sortinfo_alv.
clear ls_sort.
add 1 to lv_sortseq.
ls_sort-spos = lv_sortseq.
ls_sort-up = 'X'.
ls_sort-tabname = 'REC'.
endform. "build_sort
*& Form f4_for_variant
form f4_for_variant.
call function 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = v_variant
i_save = v_save
IMPORTING
e_exit = v_exit
es_variant = alv_variant
EXCEPTIONS
not_found = 2.
if sy-subrc = 2.
message id sy-msgid type 'S' number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
else.
if v_exit = space.
p_vari = alv_variant-variant.
endif.
endif.
endform.
Message was edited by:
Anwarul Kabir -
Hi,
I am using alv grid, there is a problem with print, when i look at print preview it shows only 1 row and even the values in that row are incorrect.
Please help me solv the problem.
Thanks,
Sai.Here is the code
*& Form DISPLAY
text
FORM display.
DATA : fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE.
*data : wa_fieldcat type slis_fieldcat_alv.
DATA : t_header TYPE slis_t_listheader,
wa_header TYPE slis_listheader.
DATA : cnt(3) TYPE c VALUE 0.
cnt = cnt + 1.
fieldcatalog-fieldname = 'XBLNR'.
fieldcatalog-seltext_m = 'Invoice No'.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 8.
fieldcatalog-tabname = 'it_final'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
cnt = cnt + 1.
fieldcatalog-fieldname = 'BLDAT'.
fieldcatalog-seltext_m = 'Invoice Date'.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 9.
fieldcatalog-tabname = 'it_final'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
*CT3 No.
cnt = cnt + 1.
fieldcatalog-fieldname = 'SGTXT'.
fieldcatalog-seltext_m = 'CT3 No'.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 8.
fieldcatalog-tabname = 'it_final'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
cnt = cnt + 1.
fieldcatalog-fieldname = 'MBLNR'.
fieldcatalog-seltext_m = 'GRR No.'.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 10.
fieldcatalog-tabname = 'it_final'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
cnt = cnt + 1.
fieldcatalog-fieldname = 'BUDAT'.
fieldcatalog-seltext_m = 'GRR DATE'.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 9.
fieldcatalog-tabname = 'it_final'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
cnt = cnt + 1.
fieldcatalog-fieldname = 'NAME1'.
fieldcatalog-seltext_m = 'Vendor Name'.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 30.
fieldcatalog-tabname = 'it_final'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
cnt = cnt + 1.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material No'.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 18.
fieldcatalog-tabname = 'it_final'.
fieldcatalog-no_zero = 'X'.
fieldcatalog-key = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
cnt = cnt + 1.
fieldcatalog-fieldname = 'MAKTX'.
fieldcatalog-seltext_m = 'Matdesc'.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 30.
fieldcatalog-tabname = 'it_final'.
fieldcatalog-key = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
**Excise Duty
cnt = cnt + 1.
fieldcatalog-fieldname = 'EDUTY'.
fieldcatalog-seltext_m = 'EXCISE DUTY '.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 30.
fieldcatalog-tabname = 'it_final'.
fieldcatalog-do_sum = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
*Excise Duty
cnt = cnt + 1.
fieldcatalog-fieldname = 'DBDTY'.
fieldcatalog-seltext_m = 'DEBIT DUTY '.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 12.
fieldcatalog-tabname = 'it_final'.
fieldcatalog-do_sum = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
*Excise Duty
cnt = cnt + 1.
fieldcatalog-fieldname = 'CRDTY'.
fieldcatalog-seltext_m = 'CREDIT DUTY '.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 12.
fieldcatalog-tabname = 'it_final'.
fieldcatalog-do_sum = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
*Credit Date
cnt = cnt + 1.
fieldcatalog-fieldname = 'CRDAT'.
fieldcatalog-seltext_m = 'Cr. DATE'.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 9.
fieldcatalog-tabname = 'it_final'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
*Closing Balance
cnt = cnt + 1.
fieldcatalog-fieldname = 'CL_BALANCE'.
fieldcatalog-seltext_m = 'BALANCE AMT'.
fieldcatalog-col_pos = cnt.
fieldcatalog-outputlen = 15.
fieldcatalog-tabname = 'it_final1'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_top_of_page = 'TOP-OF-PAGE'
it_fieldcat = fieldcatalog[]
i_save = 'X'
TABLES
t_outtab = it_final[]
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. "DISPLAY
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,
v_date1(10),
v_date2(10).
Title
wa_header-typ = 'H'.
wa_header-info = 'B-17 BOND REGISTER - INDIGENOUS RAW MATERIALS'.
APPEND wa_header TO t_header.
CLEAR wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = ' Report generated on 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.
opening balance
wa_header-typ = 'S'.
wa_header-key = ' Opening Amount: '.
wa_header-info = gv_op_balance. "Opening amount
APPEND wa_header TO t_header.
CLEAR: wa_header.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "top-of-page -
Hi ,
I am having a problem with Hotspot <<removed_by_moderator>>
I need to Open up SE16 and need to skip the first screen of the Table 'ZLE_WH01' and display the selection screen with the MATNR passed from my ALV Report.
I tried using Call Transaction and Submit commands, but couldn't achive my target.
when I used SUBMIT and pass the MATNR Value to the SE16 selection screen for the corresponding Table, the value is appearing in the MATNR field of the Selection screen but the Execute button is not working.
When I try the Call Transaction Method, the value is not capturing in the 2nd screen. Table name is capturing in the first screen.
Kindly advice me how to resolve this issue.
Regards,
Srinivas
Edited by: Vijay Babu Dudla on Feb 25, 2009 11:08 PMFor se16
Use fm SE16N_INTERFACE
a® -
Background task problem with alv grid display
Hello !
I have a problem when executing my program in background.
In foreground I have no problem, my ALV appears. In the background I have a dump.
The current ABAP program "SAPLKKBL" had to be terminated because one of the statements could not be executed.
I use the function module 'REUSE_ALV_GRID_DISPLAY'
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_user_command = 'F533_USER_COMMAND'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = i_fgroup[]
i_save = 'X'
it_sort = gd_sort
i_buffer_active = ' '
i_callback_pf_status_set = 'F534_SET_PF_STATUS'
TABLES
t_outtab = mytab
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.
I don't understand where the problem is. Please help me.
Thank you.I love replying to old threads:
Try this link
http://scn.sap.com/people/prashant.patil12/blog/2007/02/20/displaying-alv-grid-in-background-job -
I have a website setup and running for at least a year. We just changed to a dedicated server and for some reason I am experiencing trouble with the header image of the general web. When I load the page the header is now loading behind the flash window and then on a second hit of the enter key will load to the top where it should be. This site has been up and running for almost a year, can't figure why the problem now. But need to know what I need to look at. The flash content has been there since the beginning too.
Any help would be appreciated.
I have a copy at http://www.nepa-alliance.org/index2.htm
Would appreciate any guidance. One more thing if I may. I ran it through the w3c validator and got a terrific amount of errors for the code "<", "&", "> in the various scripts in the head. It recommends replacing it with the "<" , & but won't this screw up the script.
Thanks for any help.
rakeekaChances are you site has always been this way but you were unaware of the extent to which your APDivs / Layers / code validation errors have tripped you up bigtime.
How APDivs work
http://apptools.com/examples/pagelayout101.php
Code Validation Tools
CSS - http://jigsaw.w3.org/css-validator/
HTML - http://validator.w3.org/
HTML & CSS Tutorials
http://w3schools.com/
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
http://alt-web.blogspot.com -
hello all,
i've got a little problem with the output of an internal table with the ALV Grid.
i have made the declaration of my internal table (itab) with DATA: Begin of itab... and i have build my own fieldcatalog.
the output of the fieldcatalog is correct but i don't get the results of my itab shown.
it only shows me the numbers of lines in my itab but not the content.
for this im using 'REUSE_ALV_FIELDCATALOG_MERGE' and 'REUSE_ALV_GRID_DISPLAY'
*ALV-Grid
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'itab'
i_structure_name = 'itab'
i_client_never_display
i_inclname = sy-repid
CHANGING
ct_fieldcat = feldkatalog_itab
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*ALV call
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = feldkatalog_itab
i_structure_name = 'itab'
it_events = event_itab
TABLES
t_outtab = itab[]
EXCEPTIONS
program_error = 1
OTHERS = 2.
when i debug my programm the lines of the itab are filled.
thanks and regards
Ayse
REPORT z_test_auswertung.
G L O B A L I N T E R N A L T A B L E S
DATA: BEGIN OF itab OCCURS 100,
status TYPE dimaiobpar-zstatus,
rtyp TYPE dimaiobpar-zrtyp,
zahlweg TYPE dimaiobpar-ezawe_x,
a_status TYPE i,
a_rtyp TYPE i,
a_partner TYPE i,
a_vertraege TYPE i,
END OF itab .
G L O B A L D A T A
DATA: ok_code LIKE sy-ucomm,
wa_test_tab LIKE dimaiobpar,
my_title TYPE lvc_title.
TYPE-POOLS: slis.
DATA: feldkatalog_itab TYPE slis_t_fieldcat_alv,
wa_feldkatalog TYPE slis_fieldcat_alv,
event_itab TYPE slis_t_event,
header_itab TYPE slis_t_listheader,
wa_header TYPE slis_listheader.
DATA:
mycontainer TYPE scrfname VALUE 'BCALV_VARIANTS_0100_C1',
my_grid TYPE REF TO cl_gui_alv_grid,
my_custom_container TYPE REF TO cl_gui_custom_container.
DATA: t_tab LIKE dimaiobpar.
*selection-screen
SELECTION-SCREEN: SKIP, BEGIN OF BLOCK test WITH FRAME TITLE text-010.
SELECT-OPTIONS: partner FOR t_tab-partner,
astatus FOR t_tab-zstatus.
SELECTION-SCREEN END OF BLOCK test.
*Radiobutton
SELECTION-SCREEN: SKIP, BEGIN OF BLOCK test2 WITH FRAME TITLE text-020.
PARAMETERS: radio1 RADIOBUTTON GROUP test DEFAULT 'X',
radio2 RADIOBUTTON GROUP test,
radio3 RADIOBUTTON GROUP test,
radio4 RADIOBUTTON GROUP test,
rafio5 RADIOBUTTON GROUP test.
SELECTION-SCREEN END OF BLOCK test2.
S T A R T - O F - S E L E C T I O N.
START-OF-SELECTION.
PERFORM select_data.
CALL SCREEN 100.
DATA ttab LIKE itab.
MOVE itab TO ttab.
Feldkatalog fuellen.
PERFORM feldkatalog_fuellen .
Feldkatalog übergeben
PERFORM alv_feldkatalog.
ALV mit daten füllen
PERFORM alv_füllen.
END-OF-SELECTION.
SORT itab.
my_title = 'Auswertung Dimaiobpar'.
PERFORM exit_program.
FORM alv_feldkatalog *
FORM alv_feldkatalog.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_internal_tabname = 'ITAB[]'
i_structure_name = 'TTAB'
i_client_never_display
i_inclname = 'ITAB[]'
i_bypassing_buffer = 'X'
CHANGING
ct_fieldcat = FELDKATALOG_ITAB
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM.
FORM alv_füllen *
FORM alv_füllen .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_grid_title = my_title
it_fieldcat = FELDKATALOG_ITAB
i_structure_name = 'ITAB'
it_events = event_itab
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM.
FORM EXIT_PROGRAM *
FORM exit_program.
CALL METHOD G_CUSTOM_CONTAINER->FREE.
CALL METHOD CL_GUI_CFW=>FLUSH.
LEAVE PROGRAM.
ENDFORM.
FORM feldkatalog_fuellen *
FORM feldkatalog_fuellen.
IF radio1 = 'X'.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'status'.
wa_feldkatalog-seltext_m = 'Status'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'rtyp'.
wa_feldkatalog-seltext_m = 'RTyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'a_rtyp'.
wa_feldkatalog-seltext_m = 'Anzahl RTyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
ELSEIF radio2 = 'X'.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'rtyp'.
wa_feldkatalog-seltext_m = 'RTyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'a_status'.
wa_feldkatalog-seltext_m = 'Anzahl Status'.
APPEND wa_feldkatalog TO feldkatalog_itab.
ELSEIF radio3 = 'X'.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'status'.
wa_feldkatalog-seltext_m = 'Status'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'rtyp'.
wa_feldkatalog-seltext_m = 'RTyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'a_vertraege'.
wa_feldkatalog-seltext_m = 'Anzahl Vertraege'.
APPEND wa_feldkatalog TO feldkatalog_itab.
ELSEIF radio4 = 'X'.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'status'.
wa_feldkatalog-seltext_m = 'Status'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'rtyp'.
wa_feldkatalog-seltext_m = 'RTyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'a_gpartner'.
wa_feldkatalog-seltext_m = 'Anzahl GPartner'.
APPEND wa_feldkatalog TO feldkatalog_itab.
ELSE.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'status'.
wa_feldkatalog-seltext_m = 'Status'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'rtyp'.
wa_feldkatalog-seltext_m = 'RTyp'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'zahlweg'.
wa_feldkatalog-seltext_m = 'Zahlweg'.
APPEND wa_feldkatalog TO feldkatalog_itab.
CLEAR wa_feldkatalog.
wa_feldkatalog-fieldname = 'a_gpartner'.
wa_feldkatalog-seltext_m = 'Anzahl GPartner'.
APPEND wa_feldkatalog TO feldkatalog_itab.
ENDIF.
ENDFORM.
FORM select_data *
FORM select_data.
IF radio1 = 'X' .
WRITE / 'Radiobutton1: Rechungstypen je Satus'.
WRITE / 'Status, Rtyp, Anzahl-Rtyp'.
ULINE.
SELECT
zstatus AS status
zrtyp AS rtyp
COUNT( DISTINCT zrtyp ) AS a_rtyp
INTO CORRESPONDING FIELDS OF itab
FROM dimaiobpar
WHERE
insobject LIKE 'V%' AND
partner IN partner AND
zstatus IN astatus
GROUP BY ZSTATUS zrtyp
ORDER BY zstatus.
APPEND itab.
WRITE: / itab.
ENDSELECT.
ELSEIF radio2 = 'X'.
WRITE / 'Radiobutton2: Status je Rechungstyp'.
WRITE /.
SELECT
zrtyp AS rtyp
COUNT( DISTINCT zstatus ) AS a_status
INTO CORRESPONDING FIELDS OF itab
FROM dimaiobpar
WHERE
insobject LIKE 'V%' AND
partner IN partner AND
zstatus IN astatus
GROUP BY ZRTYP
ORDER BY zrtyp.
APPEND itab.
WRITE: / itab-rtyp, itab-a_status.
ENDSELECT.
ELSEIF radio3 = 'X'.
WRITE / 'Radiobutton3: Anzahl Verträge je Status und Rtyp'.
WRITE /.
SELECT
zstatus AS status
zrtyp AS rtyp
COUNT( DISTINCT insobject ) AS a_vertraege
INTO CORRESPONDING FIELDS OF itab
FROM dimaiobpar
WHERE
insobject LIKE 'V%' AND
partner IN partner AND
zstatus IN astatus
GROUP BY ZSTATUS zrtyp
ORDER BY zstatus.
APPEND itab.
WRITE: / itab-status, itab-rtyp, itab-a_vertraege.
ENDSELECT.
ELSEIF radio4 ='X'.
WRITE: / 'Radiobutton4: Anzahl GPartner je Status und RTyp'.
WRITE: /.
SELECT
zstatus AS status
zrtyp AS rtyp
COUNT( DISTINCT partner ) AS a_partner
INTO CORRESPONDING FIELDS OF itab
FROM dimaiobpar
WHERE
insobject LIKE 'V%' AND
partner IN partner AND
zstatus IN astatus
GROUP BY ZSTATUS zrtyp
ORDER BY zstatus zrtyp.
APPEND itab.
WRITE: / itab-status, itab-rtyp, itab-a_partner.
ENDSELECT.
ELSE.
WRITE / 'Radiobutton5: Anzahl Kunden nach Zahlweg'.
WRITE /.
SELECT
zstatus AS status
zrtyp AS rtyp
ezawe_x AS zahlweg
COUNT( DISTINCT partner ) AS a_partner
INTO CORRESPONDING FIELDS OF itab
FROM dimaiobpar
WHERE
insobject LIKE 'V%' AND
partner IN partner AND
zstatus IN astatus AND
ezawe_x IN ('E', 'F', space)
GROUP BY ZSTATUS zrtyp EZAWE_X
ORDER BY zstatus zrtyp.
APPEND itab.
WRITE: / itab-status, itab-rtyp, itab-zahlweg, itab-a_partner
ENDSELECT.
ENDIF.
APPEND itab.
ENDFORM=Hi,
Make itab into capital letters as below
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
it_fieldcat = feldkatalog_itab
i_structure_name = 'ITAB'
* it_events = event_itab
TABLES
t_outtab = itab[]
EXCEPTIONS
program_error = 1
OTHERS = 2.
<b>Reward for helpful answers</b> -
Problems with http header "Content-Location"
Does anyone know how to override the
"Content-Location" http header. We are having issues with search engines and this header being returned from Apache/oc4j. In a nutshell, I have a site that uses the
Struts framework, where the actual urls submitted would be for example
(http://mysite/home.do), where ".do" is just a servlet mapping. When we have
tried to follow the one link that has been spidered, it actually contains
the full path that appears in the "Content-Location" header (i.e.
http://mysite/web-inf/jsps/bogus.jsp) which in this case can't even be
accessed. The feedback we get from third-party utilities that try to spider
the site is that it is stopping because it has already indexed "bogus.jsp",
which in reality will always appear since it is a template, where the actual
urls will be different as is above.
Because the "Content-Location" header is being returned to any
client hitting the site, search engine spiders stop indexing at the first page because the value in "Content-Location" is the same.
Solutions tried:
mod_headers in Apache - have tried "Header unset"
HttpServletResponse.setHeader()
Any help would be appreciatedHi there,
i'm having a similar problem to this when trying to run some web page speed optimisation software...
i think the issue also causes problems with the Opera browser (although this may have been fixed in the latest version).
anybody any ideas how to stop the header being sent in the response?
many thanks,
Andy
Maybe you are looking for
-
The strangest thing has happened twice on my family plan. Two people in my family went on trips out of the country. We got an international data plan, which all worked fine. But I thought it was safe to presume that while out of the country, none of
-
I get an web service error when trying enable web services. I have latest update and rebooted
i get an web service error when trying enable web services. I have latest update and rebooted
-
Mail crashes every time I reply to an email on 10.4.10
Since uploading to 10.4.10 I have found that when I try to reply to an email it seems to not respond and that irritating beach ball just keeps on spinning. I have repaired my permissions numerous times and there are no problems there. Any one have an
-
Hi I was trying to trigger an Idoc from QAS. This Idoc has not been triggered before. I went to BD10 but then I couldn't as I don't have authorization. I went to WE19, I click on Standard Outbound Processing, I get an error that Port doesn not exist
-
Windows Client (delegated)
Hi, My client has one windows user who they want to access the ical server. I have configured sunbird which is seeing the users own server cal, but they cannot see the calendars they have been delegated too. Is this possible for a windows client? Tha