ALV Grid with Multiple Headers
Dear All ,
I want to know is it possible to display Multiple header in the ALV Grid Display it is possible in List Display that i dne but i want in
My requirment is :
Header 1 | Header 2
SubHeader 1 | SubHeader 2 | SubHeader 3 | SubHeader 4
R1 | R2 | R1 | R2 |
R1 | R2 | R1 | R2 |
R1 | R2 | R1 | R2 |
R1 | R2 | R1 | R2 |
R1 | R2 | R1 | R2 |
R1 | R2 | R1 | R2 |
Header line 1 and Header line 2 in this format .
How it could be possible Please suggest or its not at all possible . Please suggest .
Thanks & Regards,
Aryan
>
Aryan@sap wrote:
> That i will do in end but i want with ALV Grid . If it wont be possible with ALV grid i will finally do with ALV List .
> If any solution possible through ALV Grid then Please Suggest .
Then go for ALV List. But i am not sure if you can achieve this using the method suggested by Soumyaprakash.
You can give it a try though.
It is possible because that I have seen in standard here i cant paste the screen shot . but how its comming tht i am not able to analysis .
This is news to me now. Which standard code are you referring to?
Good luck !!
Similar Messages
-
ALV grid with 2 headers - using OOPS
Hi,
I have a requirement wherein I need to display 2 headers using ALV Grid. I am using cl_gui_alv_grid->set_table_for_first display.
Header1 Header2
Col1 Col2 Col3 Col4 Col5
1 2 3 4 5
Please suggest if this is possible, if yes, how to acheive it.
Thanks,
SmitaHI RAM,
I have did same like what you said. but iam not getting. Below is the pgm what i have dev. please correct it and let me knwo.
TYPE-POOLS: SLIS.
DATA: I_CATLOG TYPE slis_t_fieldcat_alv,
W_CATLOG TYPE SLIS_FIELDCAT_ALV,
I_CATLOG2 TYPE slis_t_fieldcat_alv,
W_CATLOG2 TYPE SLIS_FIELDCAT_ALV,
V_PGM TYPE SY-REPID.
data: begin of itab1 occurs 0,
HEADER1(10) TYPE C,
HEADER2(10) TYPE C,
end of itab1.
data: begin of itab occurs 0,
vbeln like vbak-vbeln,
posnr like vbap-posnr,
MATNR LIKE VBAP-MATNR,
MATWA LIKE VBAP-MATWA,
end of itab.
select vbeln
posnr
MATNR
MATWA
from vbap
up to 20 rows
into table itab.
w_catlog-seltext_l = 'HEADER1'.
w_catlog-datatype = 'CHAR'.
w_catlog-outputlen = 10.
W_CATLOG-tabname = 'ITAB1'.
append w_catlog2 to i_catlog2.
clear w_catlog2.
w_catlog-seltext_l = 'HEADER2'.
w_catlog-datatype = 'CHAR'.
w_catlog-outputlen = 10.
W_CATLOG-tabname = 'ITAB1'.
append w_catlog2 to i_catlog2.
clear w_catlog2.
w_catlog-seltext_l = 'Sales Document'.
w_catlog-datatype = 'CHAR'.
w_catlog-outputlen = 10.
w_catlog-fieldname = 'VBELN'.
W_CATLOG-tabname = 'ITAB'.
append w_catlog to i_catlog.
clear w_catlog.
w_catlog-seltext_l = 'ITEM'.
w_catlog-datatype = 'NUMC'.
w_catlog-outputlen = 6.
w_catlog-fieldname = 'POSNR'.
W_CATLOG-tabname = 'ITAB'.
append w_catlog to i_catlog.
clear w_catlog.
w_catlog-seltext_l = 'MATERIAL'.
w_catlog-datatype = 'CHAR'.
w_catlog-outputlen = 18.
w_catlog-fieldname = 'MATNR'.
W_CATLOG-tabname = 'ITAB'.
append w_catlog to i_catlog.
clear w_catlog.
w_catlog-seltext_l = 'Material entered'.
w_catlog-datatype = 'CHAR'.
w_catlog-outputlen = 18.
w_catlog-fieldname = 'MATWA'.
W_CATLOG-tabname = 'ITAB'.
append w_catlog to i_catlog.
clear w_catlog.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_PGM
IT_FIELDCAT = I_CATLOG2
TABLES
T_OUTTAB = ITAB1
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.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = V_PGM
IT_FIELDCAT = I_CATLOG
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. -
Back from ALV Grid with multiple refresh
I have a report that from a selection screen shows an editable ALV Grid, and after I save it, it will refresh the grid.
My problem is when I hit the BACK button it returns to the "previous grid" instead of the selection screen
I am using the following:
WHEN 'BACK_C'.
LEAVE to SCREEN '0'.
How can I force it to go back to the selection screen?
sidenote: I have tried using call
selection-screen '1000'
but it adds a new problem as in the selection screen hitting back will return to the grid and I can never exit the report.Neither solution works.
If it helps, I'm refreshing the grid with:
DATA : ref_grid TYPE REF TO cl_gui_alv_grid.
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
CALL METHOD ref_grid->refresh_table_display( ).
It seems when I refresh the grid it generates a completely independent grid screen and there's no way to skip them all and return to the selection screen. -
Hi Gurus,
I need to display ALV GRID as below.
Header1 Header2
col1col2 col3 col4
Here header1 and header2 are top headers. Both Header1(col1 , col2) and Header2 (col3 , col4) have 2 subheaders below them.
Could you please tell me, how to display in this format.
Thanks & Regards,
VinitHi Venkat and all,
Thanks for replying. I have already seen this thread.
Here using list display the program is mentioned, not by grid display.
Could you all please help me out from this.
Thanks & Regards,
Vinit -
Help req : alv grid with multiple row selection
Hi all sap gurus,
i have a alv list display program , in which i can select the o/p rows(multiple rows)
and perform some actiom based on some icons .
now i have to convert this in to grid display
this is initial code i.e for list
DATA : BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE ztest.
DATA : checkbox type c.
DATA : END OF itab.
s_layout-box_fieldname = 'CHECKBOX'.
ty_events-name = slis_ev_top_of_page.
ty_events-form = 'TOP_OF_PAGE'.
APPEND ty_events TO it_events.
ALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = v_repid
i_internal_tabname = 'ITAB'
i_inclname = v_repid
CHANGING
ct_fieldcat = build_fieldcatalog.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = v_repid
i_callback_pf_status_set = 'SET_PF_STATUS'
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'ITAB'
is_layout = s_layout
it_fieldcat = build_fieldcatalog[]
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
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
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 user_command USING ucomm LIKE sy-ucomm
selfield TYPE slis_selfield.
IF ucomm = 'DELE'.
LOOP AT iTAB WHERE CHECKbox = 'X' .
ENDLOOP.
MODIFY ztEST FROM TABLE itAB.
ENDIF.
selfield-refresh = 'X'.
ENDFORM.
NOW I HAVE A LIST O/P WHERE I CAN SELECT THE BOX AND CLICK DELETE ICON.
NOW I WANT TO CHANGE TO GRID, SO I KEPT EVERYTHING SAMRE AND I CHANGED " LIST" TO "GRID"
NOW TWO THINGS HAPPEND
1) I SEE A EMPTY COLUMN IN THE O/P , I GUESS THATS BECAUSE CHECKBOSX IN INTERNAL TABLE , SO I REMOVED IT
SO THIS MADE ME TO REMOVE
IF ucomm = 'DELE'.
LOOP AT iTAB." WHERE CHECKbox = 'X' .------PROBLEM
ENDLOOP.
MODIFY ztEST FROM TABLE itAB.
ENDIF.
selfield-refresh = 'X'.
NOW I DON'T SEE THE EMPTY COLUMN , BUT NOW PROBLEM IS I CANNNOT DISTINGUISH AS TO WHICH IS SELECTED AND AT ANY POINT OF TIME I CANSELECT ONLY ROW.
ALL I WANT IS
1) I WANT TO SELECT MULTIPLE ROWS AND SHOULD BE ABLE TO KNOW WHICH ROWS WERE SELECTED IN THE O/P SCREEN.
IN THE LIST DISPLAY I HAD CHECKBOX = 'X' FOR ALL THE ROWS THAT WERE SELECTED , I WANT THE SIMILAR THING in grid display
LET ME KNOW whether this can be done without USING 00 LANG.
thanksHi Swati,
Below code might help full for you. Description: is It selects multiple rows from ALV and display it on the next ALV.
*************************Reward Point If help full********************************************
*& Report z7cc_alv_oops_show_next_alv *
*& DEVELOPERS NAME : CHIDANAND CHAUHAN
*& DATE: SATURDAY 08-07-2006
*& DESCRIPTION: TO CREATE AN OBJECT ORIENTED ALV
REPORT z7cc_alv_oops_show_next_alv MESSAGE-ID z5hs .
DATA : BEGIN OF it_mara OCCURS 0,
mark TYPE flag,
matnr TYPE matnr,
mtart TYPE mtart,
meins TYPE meins,
END OF it_mara.
DATA : BEGIN OF it_mara1 OCCURS 0,
* mark type flag,
matnr TYPE matnr,
mtart TYPE mtart,
meins TYPE meins,
END OF it_mara1.
DATA : BEGIN OF it_mara2 OCCURS 0,
* mark type flag,
matnr TYPE matnr,
mtart TYPE mtart,
meins TYPE meins,
END OF it_mara2.
DATA : t_fieldcat TYPE lvc_t_fcat,
t_fieldcat1 TYPE lvc_t_fcat,
s_fieldcat LIKE LINE OF t_fieldcat.
DATA : s_layout TYPE lvc_s_layo.
DATA : control TYPE REF TO cl_gui_custom_container,
grid TYPE REF TO cl_gui_alv_grid.
DATA: BEGIN OF wa ,
mark TYPE flag,
matnr TYPE matnr,
mtart TYPE mtart,
meins TYPE meins,
END OF wa.
* CLASS lcl_events_box DEFINITION
CLASS lcl_events_box DEFINITION.
PUBLIC SECTION.
METHODS :
*Handler_Data_Changed for event Data_Changed of cl_gui_alv_grid
*imporTing er_data_changed,
handler_user_command FOR EVENT user_command OF cl_gui_alv_grid
IMPORTING e_ucomm,
handler_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive.
ENDCLASS. "lcl_events_box DEFINITION
* CLASS lcl_events_box IMPLEMENTATION
CLASS lcl_events_box IMPLEMENTATION.
* method to handle the user command.
METHOD handler_user_command.
PERFORM form_usercommand CHANGING e_ucomm.
ENDMETHOD. "Handler_user_command
*& Mehod to handle the toolbar.
METHOD handler_toolbar.
PERFORM form_toolbar CHANGING e_object e_interactive
e_object->mt_toolbar.
ENDMETHOD. "Handler_ToolBar
ENDCLASS. "lcl_events_box IMPLEMENTATION
START-OF-SELECTION.
DATA : w_events TYPE REF TO lcl_events_box.
SELECT matnr mtart meins FROM mara INTO CORRESPONDING FIELDS OF TABLE
it_mara.
CALL SCREEN 100.
*& Module pbo_module OUTPUT
* text
MODULE pbo_module OUTPUT.
IF grid IS INITIAL.
CREATE OBJECT control
EXPORTING
container_name = 'CUST_CTRL'.
CREATE OBJECT grid
EXPORTING
i_parent = control.
PERFORM build_catalog.
PERFORM build_catalog1.
PERFORM build_layout.
CALL METHOD grid->set_table_for_first_display
EXPORTING
is_layout = s_layout
CHANGING
it_outtab = it_mara[]
it_fieldcatalog = t_fieldcat.
CREATE OBJECT w_events.
SET HANDLER : w_events->handler_toolbar FOR grid,
w_events->handler_user_command FOR grid.
CALL METHOD grid->set_toolbar_interactive.
ELSE.
CALL METHOD grid->refresh_table_display.
ENDIF.
ENDMODULE. " pbo_module OUTPUT
*& Form BUILD_CATALOG
FORM build_catalog .
s_fieldcat-col_pos = '1'.
s_fieldcat-fieldname = 'MARK'.
s_fieldcat-checkbox = 'X'.
s_fieldcat-edit = 'X'.
APPEND s_fieldcat TO t_fieldcat.
CLEAR s_fieldcat.
s_fieldcat-col_pos = '2'.
s_fieldcat-fieldname = 'MATNR'.
s_fieldcat-scrtext_m = 'MATERIAL'.
APPEND s_fieldcat TO t_fieldcat.
s_fieldcat-col_pos = '3'.
s_fieldcat-fieldname = 'MTART'.
s_fieldcat-scrtext_m = 'MATERL TYPE'.
APPEND s_fieldcat TO t_fieldcat.
s_fieldcat-col_pos = '4'.
s_fieldcat-fieldname = 'MEINS'.
s_fieldcat-scrtext_m = 'UOM'.
APPEND s_fieldcat TO t_fieldcat.
ENDFORM. " BUILD_CATALOG
*& Form BUILD_LAYOUT
* text
* --> p1 text
* <-- p2 text
FORM build_layout .
s_layout-zebra = 'X'.
* S_LAYOUT-CWIDTH_OPT = 'X'.
s_layout-grid_title = 'Material Details'.
ENDFORM. "BUILD_LAYOUT
" BUILD_LAYOUT////////////////////////////////////
" USER_COMMAND_0100 INPUT
*& Form FORM_USERCOMMAND
* text
* <--P_E_UCOMM text
FORM form_usercommand CHANGING p_e_ucomm.
CASE p_e_ucomm.
WHEN 'INT1'.
DO.
READ TABLE it_mara INDEX sy-index TRANSPORTING mark matnr.
IF sy-subrc <> 0.
EXIT.
ENDIF.
IF it_mara-mark = 'X'.
READ TABLE it_mara INTO wa TRANSPORTING matnr mtart meins .
MOVE-CORRESPONDING wa TO it_mara1.
READ TABLE it_mara1 TRANSPORTING matnr mtart meins .
MOVE-CORRESPONDING it_mara1 TO it_mara2.
APPEND it_mara2.
CALL METHOD grid->set_table_for_first_display
EXPORTING
is_layout = s_layout
CHANGING
it_outtab = it_mara2[]
it_fieldcatalog = t_fieldcat1.
* SET PARAMETER ID 'MAT' FIELD IT_MARA-MATNR.
* CALL TRANSACTION 'MM02'.
ENDIF.
* ENDIF.
ENDDO.
ENDCASE.
ENDFORM. " FORM_USERCOMMAND
*& Form FORM_TOOLBAR
* text
* <--P_E_OBJECT text
* <--P_E_INTERACTIVE text
* <--P_E_OBJECT_>MT_TOOLBAR text
FORM form_toolbar CHANGING p_e_object TYPE REF TO
cl_alv_event_toolbar_set
p_e_interactive
mt_toolbar TYPE ttb_button.
DATA wal_button TYPE stb_button.
*WAL_BUTTON-ICON = ICON_status_reverse.
wal_button-text = 'GO'.
wal_button-quickinfo = 'PROCEED'.
wal_button-function = 'INT1'.
wal_button-butn_type = 0.
wal_button-disabled = space.
INSERT wal_button INTO p_e_object->mt_toolbar INDEX 1.
ENDFORM. " FORM_TOOLBAR
*& Module PF-STATUS OUTPUT
* text
MODULE pf-status OUTPUT.
SET PF-STATUS 'Z7CCSTAT'.
ENDMODULE. " PF-STATUS OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE PROGRAM.
WHEN 'CANCEL'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_CATALOG1
* text
* --> p1 text
* <-- p2 text
FORM build_catalog1 .
s_fieldcat-col_pos = '1'.
s_fieldcat-fieldname = 'MATNR'.
s_fieldcat-scrtext_m = 'MATERIAL'.
APPEND s_fieldcat TO t_fieldcat1.
s_fieldcat-col_pos = '2'.
s_fieldcat-fieldname = 'MTART'.
s_fieldcat-scrtext_m = 'MATERL TYPE'.
APPEND s_fieldcat TO t_fieldcat1.
s_fieldcat-col_pos = '3'.
s_fieldcat-fieldname = 'MEINS'.
s_fieldcat-scrtext_m = 'UOM'.
APPEND s_fieldcat TO t_fieldcat1.
ENDFORM. " BUILD_CATALOG1 -
Hello Experts,
Any examples would be highly appreciated.Thank you and take care!Hi,
Check this thread for ALVs -
Interactive ALV
ashish -
ABAP list with multiple headers
Hi experts,
i have to display a table with multiple headers. Example:
Header 1 = Sales order header
Header 2 = Sales order items
It's possible to create an ABAP list with 2 headers?
Thanks in advance.Hi Dan,
FYI .
[ALV Grid with Multiple Headers;
Regards
Abhii -
Hey @all,
I want to make a ALV Grid with a Popup Window. The idea is that there is a field for notes and when you click on this field a popup window should be opened where you can insert more text or if text already exists only the first column of the text is shown in field until you click on the field.
Is there any possibility to do it this way? Do I have to make a second Grid for this Popup Window? Do anybody have an example how to solve this problem?
Thank you in advance for your answers!
Greetings,
Alexander*& Report Z_VISHVAS_ALV1
report z_vishvas_alv1.
type-pools: slis.
data: begin of i_outtab occurs 0.
include structure sflight.
data: w_chk type c. "For multiple selection
data: end of i_outtab.
I_OUTTAB TYPE SFLIGHT OCCURS 0,
data: i_private type slis_data_caller_exit,
i_selfield type slis_selfield,
w_exit(1) type c.
parameters: p_title type sy-title.
start-of-selection.
select * from sflight into table i_outtab.
call function 'REUSE_ALV_POPUP_TO_SELECT'
exporting
i_title = p_title
i_selection = 'X'
i_zebra = 'X'
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
i_checkbox_fieldname = 'W_CHK'
I_LINEMARK_FIELDNAME =
I_SCROLL_TO_SEL_LINE = 'X'
i_tabname = 'I_OUTTAB'
i_structure_name = 'SFLIGHT'
IT_FIELDCAT =
IT_EXCLUDING =
I_CALLBACK_PROGRAM =
I_CALLBACK_USER_COMMAND =
IS_PRIVATE = I_PRIVATE
importing
es_selfield = i_selfield
e_exit = w_exit
tables
t_outtab = i_outtab
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE i000(0k) WITH sy-subrc.
endif.
*****the internal table is modified with a cross sign for marking the
***rows selected
loop at i_outtab where w_chk = 'X'.
write: / i_outtab-carrid, i_outtab-price.
endloop. -
ALV grid with 2 labels on the output
Hi,
I am trying ALV Grid with two labels using Function modules.
in the output, it should appear like...
Header1 | Header2 | Header3 | Header4 |
T21
T22
T31
T32
First line is for Header lable and second line is for item lable under corresponding Header labels.
Pls. can any suggest me a solution for this..
Thanks
PRaUsing the Gird Functions it is not possible, you can get the with the help of ALV list function.
If you use this aproach you will loose some Functionalities, Your Report Output will Distorted.
cehck this image..
http://img100.imageshack.us/img100/3846/output6ef.th.gif
REPORT ZTEST_ALV message-id zz .
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,
MALE type i,
female type i,
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_FIELDCAT-FIELDNAME = 'MALE'.
X_FIELDCAT-SELTEXT_L = 'MALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'FEMALE'.
X_FIELDCAT-SELTEXT_L = 'FEMALE'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
x_events-NAME = SLIS_EV_TOP_OF_PAGE.
x_events-FORM = 'TOP_OF_PAGE'.
APPEND x_events TO iT_EVENTS.
CLEAR x_events .
L_LAYOUT-NO_COLHEAD = 'X'.
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.
*-To display the headers for main list
FORMAT COLOR COL_HEADING.
WRITE: / SY-ULINE(103).
WRITE: / SY-VLINE,
(8) ' ' ,
SY-VLINE,
(8) ' ' ,
SY-VLINE,
(19) '***'(015) centered,
sy-vline.
WRITE: / SY-VLINE,
(8) 'VBELN'(013) ,
SY-VLINE,
(8) 'POSNR'(014) ,
SY-VLINE,
(8) 'MALE'(016) ,
sy-vline,
(8) 'FMALE'(017) ,
sy-vline.
FORMAT COLOR OFF.
ENDFORM. -
Display amount in ALV Grid with different Decimal Places based on Currency
HI Experts,
Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2.
we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
AED---22.56
KWD---225.65
i need to display values like AED : 22.56HI Experts,
Working with ALV Report i have one Amount field NETWR which is having Length 15 and Decimal Places 2. we have two different types of currency's AED and KWD and AED having 2 decimal Places and KWD having 3 decimal places.
im using FM: REUSE_ALV_GRID_DISPLAY for Display. value storing in Table was like this
AED---22.56
KWD---225.65 (converting this value to 22.565 using BAPI_CURRENCY_GETDECIMALS according to currency in my Report)
i need to display values like AED : 22.56
KWD---22.565 but here field is NETWR with 2 decimal.
Need to Display amount in ALV Grid with different Decimal Places based on Currency
Regards,
Dileep Kumar Reddy -
Dear Colleagues,
I develop an ALV grid with OO standard methods. Before the first display of the table I define the editable fields. It works fine.
I have a problem : if the table is empty and I press the standard icons "Append a line" or "Insert a line", the new line don't have the defined editable characteristics.for fields. Is there a standard method which I have forgotten ?
Thanks a lot and kind regards
Petervs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_delete_row.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_append_row.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_copy_row.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_insert_row.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_copy.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_cut.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_paste.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_undo.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
vs_toolbar_excluding = cl_gui_alv_grid=>mc_fc_loc_paste_new_row.
APPEND vs_toolbar_excluding TO i_toolbar_excluding.
* Displaying the output in ALV Grid
vs_layout_grid-no_rowmark = 'X'.
vs_layout_grid-zebra = 'X'.
vs_layout_grid-cwidth_opt = 'X'.
vs_layout_grid-edit = 'X'.
vs_layout_grid-ctab_fname = 'CT'.
vs_layout_grid-stylefname = 'CELLTAB'.
CALL METHOD v_grid->set_table_for_first_display
EXPORTING
i_save = 'X'
is_layout = vs_layout_grid
it_toolbar_excluding = i_toolbar_excluding[]
CHANGING
it_outtab = itab[]
it_fieldcatalog = it_fieldcat[]
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
OTHERS = 4.
IF sy-subrc NE 0.
MESSAGE 'ALV Grid display unsuccessful' TYPE 'I'.
STOP.
ENDIF. " IF sy-subrc NE 0
ELSE. " IF w_custom_container...
* Refresh the container if it already exists
CALL METHOD v_grid->refresh_table_display
EXCEPTIONS
finished = 1
OTHERS = 2.
IF sy-subrc NE 0.
MESSAGE 'Refreshing the container is not successful' TYPE 'I'.
STOP.
ENDIF. -
ALV GRID with own EXCEL-Template
Hallo,
I have Problem with using ALV-Grid with a own created
template.
At First I copy the SAP_OM.XLS template to CUS_OM.XLS.
Then I update it by deleting all sheets, but not RAWDATA.
When I use this template in ALV-GRID, it would be the right one, but it his no Data.
The security settings in Excel are correct.
Can anyone help me to show the data like the normal
ALV-GRID??
thanks DieterHi
Check this link...
How to send data to different tabs of an excel sheet? -
ALV GRID with icon fields. When exports to Excel, icon fields are emtpy.
Hi all,
In our SAP system (6.0 ECC) we've noticed the following behaviour:
In ALV GRID with icons (color lights for example...) when we export the list to Excel format with the standard button bat, the icon column is always empty.
We think that in previous SAP version (4.7), the code corresponding to the icon appeared (For example @08@ for green light).
It's possible to have tha same functionality in this new version like in 4.7?
Regards.
Edited by: Ole ES on Nov 17, 2010 6:05 PMHi,
Check the format in which you export to Excel (MHTML, XML, ...) and try antoher one.
http://help.sap.com/saphelp_erp60_sp/helpdata/en/66/79ad48157f11d2953700a0c930328a/content.htm
I think the integrated Excel mode shows '@08@'.
Best regards,
Guillaume -
OO ALV grid with a header line is this possible?
Howdy!
I have a requirement where I need to produce an ALV grid with the following format:
<b>Text 1 Text 2 Text 3 Text 4
Text 6
Col_1 Col_2 Col_3 Col_4 Col_5 Col_6 Col_7 Col_8 Col_9
Cell conents -
Cell conents -
Cell conents -
Cell conents -
Cell conents -
</b>
Anyone got any idea on how to get the 'TEXT' fields into the ALV grid? These are dynamic texts that would basically display details of data entered in the selection screen.
The ALV title line is limited to 70 characters and I can't think of another way of doing this.
The texts need to appear on the ALV grid becasue the user would like to download them to Excel in addition to the ALV cell contents using the standard ALV functionality.
Any ideas would be appreciated!
Message was edited by: RobertI'm thinking that this may not work because it is not a full screen grid and the grid container does not care about the container on top of it so, it most likely would not print it. Implement this example program, you can see how this would work for you if you were using the FM.
report zrich_0001
no standard page heading.
* Global ALV Data Declarations
type-pools slis.
data: begin of i_alv occurs 0,
matnr type mara-matnr,
end of i_alv.
* Miscellanous Data Declarations
data: fieldcat type slis_t_fieldcat_alv,
events type slis_t_event,
list_top_of_page type slis_t_listheader,
top_of_page type slis_formname value 'TOP_OF_PAGE'.
start-of-selection.
perform initialization.
perform get_data.
perform call_alv.
end-of-selection.
* Form Initialization
form initialization.
clear i_alv. refresh i_alv.
perform eventtab_build using events[].
endform.
* Form Get_Data
form get_data.
select matnr into table i_alv
from mara up to 100 rows.
endform.
* CALL_ALV
form call_alv.
data: variant type disvariant.
data: repid type sy-repid.
repid = sy-repid.
variant-report = sy-repid.
variant-username = sy-uname.
perform build_field_catalog.
perform comment_build using list_top_of_page[].
* Call ABAP List Viewer (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_fieldcat = fieldcat
i_callback_program = repid
is_variant = variant
it_events = events[]
i_save = 'U'
tables
t_outtab = i_alv.
endform.
* EVENTTAB_BUILD
form eventtab_build 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_FIELD_CATALOG
form build_field_catalog.
clear: fieldcat. refresh: fieldcat.
data: tmp_fc type slis_fieldcat_alv.
tmp_fc-reptext_ddic = 'Material'.
tmp_fc-fieldname = 'MATNR'.
tmp_fc-tabname = 'I_ALV'.
tmp_fc-outputlen = 18.
append tmp_fc to fieldcat.
endform.
* COMMENT_BUILD
form comment_build using list_top_of_page type
slis_t_listheader.
data: tmp_line type slis_listheader.
clear tmp_line.
tmp_line-typ = 'H'.
tmp_line-info = 'Here is a line of text'.
append tmp_line to list_top_of_page.
clear tmp_line.
tmp_line-typ = 'S'.
tmp_line-key = 'Key1'.
tmp_line-info = 'Here is a value'.
append tmp_line to list_top_of_page.
clear tmp_line.
tmp_line-typ = 'S'.
tmp_line-key = 'Key2'.
tmp_line-info = 'Here is another value'.
append tmp_line to list_top_of_page.
endform.
* TOP_OF_PAGE
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = list_top_of_page.
endform.
Regards,
Rich Heilman -
Revision: 949
Author: [email protected]
Date: 2008-03-27 07:12:59 -0700 (Thu, 27 Mar 2008)
Log Message:
Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name, it causes a ClassCastException in the server
QA: Yes - try again with legacy-collection true and false.
Doc: No
Checkintests: Pass
Details: Another try in fixing this bug. When legacy-collection is false, Actionscript Array on the client becomes Java Array on the server and my fix yesterday assumed this case. However, when legacy-collection is true, Actionscript Array becomes Java ArrayList on the server. So added code to handle this case.
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-96
Modified Paths:
blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/proxy/RequestF ilter.javaHi all!
Just to post the solution to this if anyone ever runs accross this thread...
For some reason i had it bad the first time, don't have time right now to see why but here is what worked for me:
HashMap primaryFile = new HashMap();
primaryFile.put("fileContent", bFile);
primaryFile.put("fileName", uploadedFile.getFilename());
operationBinding.getParamsMap().put("primaryFile", primaryFile);
HashMap customDocMetadata = new HashMap();
HashMap [] properties = new HashMap[1];
HashMap customMetadataPropertyRoom = new HashMap();
customMetadataPropertyRoom.put("name", "xRoom");
customMetadataPropertyRoom.put("value", "SOME ROOM");
properties[0] = customMetadataPropertyRoom;
customDocMetadata.put("property", properties);
operationBinding.getParamsMap().put("CustomDocMetaData", customDocMetadata);
Basically an unbounded wsdl type is an array of objects (HashMaps), makes sense, i thought i had it like this before, must have messed up somewhere...
Good luck all!
Maybe you are looking for
-
How to access my secure password on my IPad
HHow to access my secure passwords etc on Ipad
-
I can't get my blackberry registred
Hello, I've bought a BB Curve 8520 about a half year ago and in the mean time i switched GSM's with a friend of mine. Now the problem was i wanted my BB back (cuz it's awesome) but there was a bug that wouldn't go away so i have resetted my BB to fac
-
Mass change recipient and unloading point on material
Hello Experts, Is there a way to mass change recipient and unloading point on materials in PS? It is quite a task to go into every parts general data screen and enter it there rgds GAR
-
I need to set up folders in I pad and I phone to sort received and sent email
I need to learn how to create folders on I Phone and I pad to sort incoming and sent emails I need to save. Hope someone can help me?
-
i lost my iphone <Personal Information Edited by Host>