ABAP WD: ALV merge cells
Hello,
I have a hierarchical ALV. I need to merge some cells in it.
For instance, there is a column name: Brand Name. There are multiple rows that have same brand name, let's say SONY.
Is it possible to merge these cells that have same brand name? If so what should I use?
Thank you.
Best Regards,
Georgy Norkin
Hi,
Go through the links,
Merging cells of a table in Webdynpro
merging cells in table
Regards,
Azaz.
Similar Messages
-
Hello gurus.
Please help me with merging cells.
I need to merge some cells in alv grid. To create grid i use reuse_alv FM. For example it is needed to merge all cells in several rows. What should i do ? I think that there should be some manipulations with fieldcatalog but i don't know the correct ones.
Thanks.
regards,
alex.If you would like to merge cells, meaning that you want to hide repeating values in a certain column, then you can simply sort by that column.
report zrich_0004
no standard page heading.
type-pools slis.
data: fieldcat type slis_t_fieldcat_alv.
data: sort type slis_t_sortinfo_alv.
data: begin of ivbap occurs 0,
vbeln type vbap-vbeln,
kunnr type vbak-kunnr,
vkorg type vbak-vkorg,
netwr type vbap-netwr,
end of ivbap.
* Selection Screen
start-of-selection.
select vbak~vbeln vbak~kunnr vbak~vkorg vbap~netpr
into table ivbap
from vbak
inner join vbap
on vbak~vbeln = vbap~vbeln
up to 100 rows.
perform write_report.
* WRITE_REPORT
form write_report.
data: tmp_sort type line of slis_t_sortinfo_alv.
data: fc_tmp type slis_fieldcat_alv .
* Build feildcat
clear fc_tmp. refresh fieldcat.
fc_tmp-reptext_ddic = 'Sales Org'.
fc_tmp-fieldname = 'VKORG'.
fc_tmp-tabname = 'IVBAP'.
fc_tmp-outputlen = '4'.
append fc_tmp to fieldcat.
clear fc_tmp.
fc_tmp-reptext_ddic = 'Customer'.
fc_tmp-fieldname = 'KUNNR'.
fc_tmp-tabname = 'IVBAP'.
fc_tmp-outputlen = '10'.
append fc_tmp to fieldcat.
clear fc_tmp.
fc_tmp-reptext_ddic = 'SD DOC'.
fc_tmp-fieldname = 'VBELN'.
fc_tmp-tabname = 'IVBAP'.
fc_tmp-outputlen = '10'.
append fc_tmp to fieldcat.
clear fc_tmp.
fc_tmp-reptext_ddic = 'Net'.
fc_tmp-fieldname = 'NETWR'.
fc_tmp-tabname = 'IVBAP'.
fc_tmp-outputlen = '15'.
fc_tmp-datatype = 'QUAN'.
append fc_tmp to fieldcat.
* Build sort table
clear sort. refresh sort.
clear tmp_sort.
tmp_sort-fieldname = 'VKORG'.
tmp_sort-tabname = 'IALV'.
tmp_sort-up = 'X'.
append tmp_sort to sort.
* CALL ABAP LIST VIEWER (ALV)
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
it_sort = sort
it_fieldcat = fieldcat
tables
t_outtab = ivbap.
endform.
Regards,
Rich Heilman -
In Web Dynpro ABAP, Can we merge two cells of a row in a table ?
In Web Dynpro ABAP, Can we merge two cells of a row in a table ?
Hallo Jagannatha,
the new table feature is available in SAP NetWeaver 7.0 EhP2 (SAP ERP 6.0 EhP5, SAP Business Suite 7i2010) named 'TableMultiEditorCell'. See [SAP Online Help|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9b/46bb0d339b42cc8d30636ca0c9f5b6/frameset.htm] for more details ...
"This UI element is a table cell variant that enables several UI elements to be placed in one table cell. This type of cell can be used for "one click actions". ...
Regards, Bertram -
Web Dynpro for ABAP alv table cell color
Hello,
I have a question about Web Dynpro for ABAP and ALV. I want to change the color of one cell as yellow. how to do it??in that method possible colors are
cellDesign: badvalue_dark
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-BADVALUE_DARK
cellDesign: badvalue_light
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-BADVALUE_LIGHT
cellDesign: badvalue_medium
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-BADVALUE_MEDIUM
cellDesign: criticalvalue_dark
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-CRITICALVALUE_DARK
cellDesign: criticalvalue_light
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-CRITICALVALUE_LIGHT
cellDesign: criticalvalue_medium
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-CRITICALVALUE_MEDIUM
cellDesign: goodvalue_dark
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GOODVALUE_DARK
cellDesign: goodvalue_light
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GOODVALUE_LIGHT
cellDesign: goodvalue_medium
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GOODVALUE_MEDIUM
cellDesign: group_level1
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GROUP_LEVEL1
cellDesign: group_level2
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GROUP_LEVEL2
cellDesign: group_level3
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-GROUP_LEVEL3
cellDesign: key_medium
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-KEY_MEDIUM
cellDesign: negative
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-NEGATIVE
cellDesign: positive
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-POSITIVE
cellDesign: standard
CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-STANDARD
not able to set column color as yellow.... -
Hi all,
I have a requirement to print an ALV grid display exactly in the same format as we see in output. That is, if the cells are merged in ALV then in Print also they should come as merged.
But when I am printing the ALV output it does not give merged cells. I am using OO ALV.
Is my requirement feasible. If yes, Please help me to proceed?
Thanks,
DayaHi Daya,
In the ALV grid control print or print preview, cells that have identical content are not merged. This is necessary in order to be able to distinguish between blank cells and cells that only become blank after merging. The standard behaviour for the different ALV lists is described in Note 447055.
Regards,
Md Ziauddin -
Merging ALV column Cells Vertically.
Hi all,
I have an ALV grid with 14 columns. I wish to merge cells vertically in columns 1 ( lot ) and column 2 ( sequence ) where the data is the same. I have managed to do this on column 1 successfully but now wish to merge column 2 cells that have common values in column 1. See before ( Raw format ) and after ( merged format ) examples below.
To edit correctly, I have used astericks to represent spaces ( as a result of merging cells ) and hyphens to prevent the editor compressing the spaces in the illustration !
Many thanks, in advance, for your time.
Nigel.
Raw format
Lot----
Sequence----
Payment-Posting Date-Etc
PA-000001----
1----
£100
PA-000001----
2----
£50
PA-000001----
3----
£2
PA-000002----
2----
£29
PA-000003----
2----
£20
PA-000003----
4----
£10
PA-000003----
4----
£33
PA-000005----
1----
£47
PA-000005----
1----
£100
PA-000005----
1----
£12
PA-000005----
3----
£116
Merged format.
Lot----
Sequence--Payment-Posting Date----
PA-000001----
1----
£100
2----
£50
3----
£2
PA-000002----
2----
£29
PA-000003----
2----
£20
4----
£10
£33
PA-000005----
1----
£47
£100
£12
3----
£116Nigel,
Did you get the answer to your query...
I have got a similar query...
Can you pls guide..
Thanks.
Abhishek -
Hi Experts,
I want to merge cells for columns having similar records.Is their any functionality in fieldcatlog.
SimranLocal variables
DATA: wal_sort TYPE lvc_s_sort,
wl_pos TYPE numc2.
wl_pos = 01.
sort by company code
wal_sort-spos = wl_pos.
wal_sort-fieldname = c_ccode.
wal_sort-up = c_check.
APPEND wal_sort TO t_sort.
wl_pos = wl_pos + 1.
Pass this t_sort to it_sort of set_table_for_first_display -
Merging Cells in Report Designer
Hi,
according to SAP Documentation http://help.sap.com/saphelp_nw2004s/helpdata/en/d7/6b9b41aa6ca309e10000000a155106/frameset.htm
it shall be possible to merge cells within Report Designer. However I have tried it on several ways but was never able to find this functionality.
Also I can not find many other of those cell properties described in the link above. Woeking with Frontend Patch 7, Revision 61
Any help is highly appreciated.
AndreasHi,
FYI. I am able to merge cells in the Report Designer by selecting multiple cells, and then selecting 'Merge Cells' from the context sensitive menu. I am using the latest SP for ABAP, JAVA, and front-end.
An alternative to merging cells is merging texts within one cell. This will often do.
Regards,
József. -
Abap WD ALV: Event for calculation row?
Hi,
i have one Abap WebDynpro ALV Component. It is possible to register an event (ON_CLICK) for Cells which are an Link_to_action for example.
My Table:
ID | Group | Var
A1 | Test | 4
A2 | Test | 5
A3 | Dev | 4
A4 | Dev | 6
If i create the ON_CLICK event for the last row, which is then a link_to_action column, i can click on the numbers and the event is triggered
Now i have a table which uses the ALV Calculation feature and the Intermediate Results for the grouping.
My new output view is:
ID | Group | Var
->---Test 9
A1 | Test | 4
A2 | Test | 5
->---Dev 10
A3 | Dev | 4
A4 | Dev | 6
(It calculates the sum of the vars and groups it by the second column)
Now I need an Event if someone clicks on the numbers in the Var Row of the intermediate results row (here: 9 and 10). How can i do this?
If this is not possible, how can i register an event if someone expands or collapses a intermediate result row?
Kind Regards,
Thomas
Edited by: Thomas Rodemer on Oct 9, 2008 3:30 PM
Edited by: Thomas Rodemer on Oct 9, 2008 3:30 PMHi,
Is the DDLBK is filled with support function? if yes then look if you can enhance the method by post method exit etc..
Thanks,
Chandra -
Displaying a multi-line text block in an ALV grid cell
Can I display a multi-line text block (i.e. a paragraph of text) in an ALV grid cell?
If yes, what properties do I set in the Field Catalaog (I tried the style and that didnt seem to work)
ThanksBy default ALV Grid merges fields with same values vertically.
Isn't that only when the column is part of the sort key? You also have to consider the user changing the sort sequence, which can make the text jumbled up. In one of my reports I have made the cell a hotspot and displayed the text in a popup. Of course you cannot print it.
Cheers,
Ramki. -
Excel export are merging cells for data on multiple lines !
Hello,
I'm using Crystal Report XI R2, when we are doing an export to Excel with have an unexpected formatting.
For example the value of the name is on 2 lines:
=> So, on Excel the result is on 2 lines but merged. We want to have this result only on one cells.
Remark: if we delete the 2nd lines, because cells are merged we obtain the expected result.
Proposal A:
Are they any set-up available concerning the formatting of Excel ?
Proposal B:
Could we run some VBA when we click on Export button to make queries on the Excel ?When they introduced Unicode support in Crystal 9 (I believe), they had to completely re-write the export routines. At that time, they made a decision to change the functionality of the excel export. Crystal is attempting to remain absolutely faithful to the graphical layout of the report as you see it in the viewer. So it creates merged cell sections, empty columns between columns, and empty rows to give you as close to exactly what you see in the viewer as possible. Unfortunately, the result is typically less than useful. Iu2019ve had several conversations with Business Objects (now SAP) with regards to this when they changed it between versions 8.5 and 10, and they have no intention of changing the functionality as it now exists.
There is a document which is now likely somewhere on the SAP portal that explains what you need to do to obtain the best results when exporting to excel.
The jist of it is this:
Line up all of the columns detail data with thier headers, and make sure that data fields are the same size as thier headers.
Line up all rows (headers and detail rows). (ie: select everything in the row, right click, align tops, and make the same height)
cram everything as close together as possible. zero space in the report translates to zero extra collumns and rows in the export.
the other option is to use the export to data only functionality, but that may not be what you're looking for either. -
Button in alv grid cell using REUSE_ALV_GRID_DISPLAY
Hi all,
I want to make the contents of 2 columns of my alv grid as push button with values as text on it. I am not using classes or methods but alv grid fm. On clicking the button one dialog box has to pop up which gives edit option for the values in that coloumn, my question is how to introduce button in alv grid cell? if i can use t_fieldcatalog-icon, then please give me the complete steps for that.
Thanks.this may helps u
u need to copy stadard screen elemetn to MARATAB1(at PF -STATUS)
You should copy the 'STANDARD' GUI status from program <b>SAPLSLVC_FULLSCREEN</b>
type this one in SE41 program name is:<b>SAPLSLVC_FULLSCREEN</b>
status : <b>STANDARD_FULLSCREEN</b>
and copy it ...
Type-pool
type-pools slis.
Tables
tables: mara,sscrfields.
Selection screen
select-options: s_matnr for mara-matnr.
PARAMETERS: p_email TYPE somlreci1-receiver.
TYPES: BEGIN OF t_charmara,
matnr(18) TYPE c, " Material Number
ernam(12) TYPE c, " Person Credited
aenam(12) TYPE c, " Person Changed Object
pstat(15) TYPE c, " Maintenance Status
END OF t_charmara.
Data Declarations
data: rt_extab type slis_t_extab, " Table of inactive function
codes
wa_charmara TYPE t_charmara, " work area of mara Table
fs_fieldcat type slis_t_fieldcat_alv,
" Field catalog with field
descriptions
t_fieldcat like line of fs_fieldcat,
" Table of Field catalog
r_ucomm like sy-ucomm, " User Command
rs_selfield TYPE slis_selfield. " cursor position ALV
data: filedlayout type slis_layout_alv,
heading type slis_t_listheader with header line,
t_event type slis_t_event.
data: fs_event like line of t_event.
data: fs_sort type slis_sortinfo_alv,
t_sort type slis_t_sortinfo_alv.
data: w_char(200) type c,
w_matnr type mara-matnr.
fs_sort-fieldname = 'MATNR'.
fs_sort-up = 'X'.
fs_sort-group = '*'.
append fs_sort to t_sort.
clear fS_sort.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
Internal Tables
data: begin of it_mara occurs 0,
matnr like mara-matnr, " Material Number
ernam like mara-ernam, " Person Credited
aenam like mara-aenam, " Person Changed Object
pstat like mara-pstat, " Maintenance Status
end of it_mara.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
*at selection-screen on field event
AT SELECTION-SCREEN on s_matnr.
PERFORM f0100_VALIDATE_MATERIAL_NUMBER.
start-of-selection.
retrive Data from the data base table Mara
perform retrive_data_from_mara.
end-of-selection.
*Field catalog with field descriptions
perform fieldcat.
*perform top_of_page.
PERFORM EVENT_LIST.
*ALV Grid Display
perform alv_display.
Creating one Push button ENTER
perform maratab1 USING RT_EXTAB.
*& Form f0100_VALIDATE_MATERIAL_NUMBER
text
There are no interface parameters to be passed to this subroutine
FORM F0100_VALIDATE_MATERIAL_NUMBER .
select matnr " Material Number
from mara
up to 1 rows
into mara-matnr
where matnr in s_matnr.
endselect.
IF sy-subrc NE 0.
clear sscrfields-ucomm.
MESSAGE e000 WITH 'Enter valid Material number'(003).
ENDIF. " IF sy-subrc NE 0
ENDFORM. " f0100_VALIDATE_MATERIAL_NUMBER
*& Form retrive_data_from_mara
text
*There are no interface parameters to be passed to this subroutine
FORM retrive_data_from_mara .
select matnr " Material Number
ernam " Person Credited
aenam " Person Changed Object
pstat " Maintenance Status
from mara
into table It_mara
where matnr in s_matnr.
IF sy-subrc NE 0.
MESSAGE i001 WITH 'Records are not found'.
exit.
stop.
ENDIF. " IF sy-subrc NE 0
ENDFORM. " retrive_data_from_mara
*& Form fieldcat
text
*There are no interface parameters to be passed to this subroutine
FORM fieldcat .
*field catalog for MATNR
t_FIELDCAT-REF_TABNAME = 'MARA'.
t_fieldcat-fieldname = 'MATNR'.
t_fieldcat-col_pos = 1.
append t_fieldcat to fs_fieldcat.
clear t_fieldcat.
*field catalog for ERNAM
t_FIELDCAT-REF_TABNAME = 'MARA'.
t_fieldcat-fieldname = 'ERNAM'.
t_fieldcat-col_pos = 2.
append t_fieldcat to fs_fieldcat.
clear t_fieldcat.
*field catalog for AENAM
t_FIELDCAT-REF_TABNAME = 'MARA'.
t_fieldcat-fieldname = 'AENAM'.
t_fieldcat-col_pos = 3.
append t_fieldcat to fs_fieldcat.
clear t_fieldcat.
*field catalog for PSTAT
t_FIELDCAT-REF_TABNAME = 'MARA'.
t_fieldcat-fieldname = 'PSTAT'.
t_fieldcat-col_pos = 4.
append t_fieldcat to fs_fieldcat.
clear t_fieldcat.
ENDFORM. " fieldcat
*& Form EVENT_LIST
text
*There are no interface parameters to be passed to this subroutine
FORM EVENT_LIST .
fs_event-name ='TOP_OF_PAGE'.
fs_event-form = 'TOP_PAGE'.
append fs_event TO t_EVENT.
CLEAR FS_EVENT.
fs_event-name ='END_OF_PAGE'.
fs_event-form = 'END_PAGE'.
append fs_event TO t_EVENT.
CLEAR FS_EVENT.
fs_event-name ='END_OF_LIST'.
fs_event-form = 'LIST_END'.
append fs_event TO t_EVENT.
CLEAR FS_EVENT.
ENDFORM. " EVENT_LIST
*& Form alv_display
text
*There are no interface parameters to be passed to this subroutine
FORM alv_display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'MARATAB1'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
I_STRUCTURE_NAME =
IS_LAYOUT =
IT_FIELDCAT = FS_FIELDCAT
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT = T_SORT
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS = T_EVENT
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
IR_SALV_LIST_ADAPTER =
IT_EXCEPT_QINFO =
I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = IT_MARA[]
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. " alv_display
form TOP_PAGE.
data:tbl_listheader type slis_t_listheader,
wa_listheader type slis_listheader .
wa_listheader-typ = 'S'.
wa_listheader-info = 'Created by : Vijay Pawar'.
append wa_listheader to tbl_listheader.
wa_listheader-typ = 'S'.
concatenate ' Date ' sy-datum into
wa_listheader-info separated by space.
append wa_listheader to tbl_listheader.
wa_listheader-typ = 'S'.
concatenate ' From ' s_matnr-low ' To ' s_matnr-high into
wa_listheader-info separated by space.
append wa_listheader to tbl_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = tbl_listheader
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
endform. " form TOP_PAGE.
form END_PAGE.
STATICS W_PAGE TYPE I .
data:tbl_listheader type slis_t_listheader,
wa_listheader type slis_listheader .
wa_listheader-typ = 'S'.
wa_listheader-info = W_PAGE.
append wa_listheader to tbl_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = tbl_listheader
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
add 1 to w_page.
endform. " form END_PAGE.
form list_end.
data:tbl_listheader type slis_t_listheader,
wa_listheader type slis_listheader .
wa_listheader-typ = 'S'.
wa_listheader-info = '......................................Last Page'
append wa_listheader to tbl_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = tbl_listheader
I_LOGO =
I_END_OF_LIST_GRID =
I_ALV_FORM =
endform. " form list_end.
*& Form maratab1
text
-->P_RT_EXTAB text
FORM maratab1 USING P_RT_EXTAB.
SET PF-STATUS 'MARATAB1' EXCLUDING rt_extab.
ENDFORM. " maratab1
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
case r_ucomm.
when 'ENTER'.
perform bulid_xls_data_table.
PERFORM send_file_as_email_attachment
tables it_message
it_attach
using p_email "'[email protected]'
'Example .xls documnet attachment'
'XLS'
'filename'
changing gd_error
gd_reciever.
perform populate_email_message_body.
PERFORM initiate_mail_execute_program.
endcase. " case r_ucomm.
endform. " FORM user_command
perform populate_email_message_body.
PERFORM initiate_mail_execute_program.
CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
EXPORTING
DATA_FILENAME = 'MARA.XLS'
DATA_PATH_FLAG = 'W'
DATA_ENVIRONMENT =
DATA_TABLE = ITAB[]
MACRO_FILENAME =
MACRO_PATH_FLAG = 'E'
MACRO_ENVIRONMENT =
WAIT = 'X'
DELETE_FILE = 'X'
EXCEPTIONS
NO_BATCH = 1
EXCEL_NOT_INSTALLED = 2
INTERNAL_ERROR = 3
CANCELLED = 4
DOWNLOAD_ERROR = 5
NO_AUTHORITY = 6
FILE_NOT_DELETED = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
leave to list-processing.
endcase.
*& Form bulid_xls_data_table
text
*There are no interface parameters to be passed to this subroutine
FORM bulid_xls_data_table .
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'matnr' 'ernam' 'aenam' 'pstat'
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
LOOP AT It_mara INTO wa_charmara.
CONCATENATE wa_charmara-matnr wa_charmara-ernam
wa_charmara-aenam wa_charmara-pstat
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
ENDLOOP. " LOOP AT it_mara INTO...
ENDFORM. " bulid_xls_data_table
*& Form send_file_as_email_attachment
Send email
-->P_IT_MESSAGE text
-->P_IT_ATTACH text
-->P_P_EMAIL text
-->P_0387 text
-->P_0388 text
-->P_0389 text
-->P_0390 text
-->P_0391 text
-->P_0392 text
<--P_GD_ERROR text
<--P_GD_RECIEVER text
FORM send_file_as_email_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM. " send_file_as_email_attachment
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
form populate_email_message_body.
REFRESH it_message.
it_message = 'Please find attached a list test mara records'.
APPEND it_message.
endform. "form populate_email_message_bod
rewards if it helps u -
Excel Merge Cells.vi throws an undefined error in Excel 2013?
Basically, I can't write text into an Excel spreadshoot using the Report Generation tools.
Using LabVIEW 2013 (SP1) I am writing to individual cells in an Excel (2013) template.
The error is coming from the Report Generation Toolkit>Excel Specific>Excel Easy Text.vi.>Excel Merge Cells.vi.
Inside of the "Excel Merge Cells.vi" is an "Invoke Node.Range". When the program hits this point, it throws out an undefined error.
My code has been running on multiple platforms in multiple programs with no problems using Office 2010.
NASA upgraded our Office Suit to 2013. I am now throwing an undefined error ( -2146827284).
I've got a service request in and have talked to an engineer. THey are looking at the problem. However, I thought I would throw it out here and see if anyone had seen this particular problem.
Bryan AlexanderProblem found, workaround implemented.
When you use the "New Report.vi", you have to wire in one of four choices for the state of the window. "Maximized", "Minimized", "Normal" and "No Change". If you use the "Excel Easy Text.vi" to insert data into an Excel 2013 Spreadsheet, it will generate an error if you opened the Excel file in "Minimized" mode. The other three states work fine. -
I have an error here in smartview 11.1.2.1.103. In HFM workspace, the form I designed has merged cell in row1. But I open the same form in smartview, row1 is not longer merged. Does anyone have the same problem?
PS: I've already set the option: excel formatting in smartview.Hi,
thanks for your answers. From all I could find out from Oracle support, I'll have to wait until 11.1.2.1 is GA and then try again :-(
Or will there be a patch for 11.1.2.0 as well?
Best regards,
Markus -
Takes a Long time to merge cells
Why does it take me forever to merge 4 cells in a table that
has over 100 rows. Is there anything that I can do to speed up the
process?Never merge cells? I rarely do this (of course I rarely use
tables, too) -
instead, I will stack tables vertically when I need a new
cell
configuration.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"PamVa" <[email protected]> wrote in message
news:f30u4t$o7u$[email protected]..
> Why does it take me forever to merge 4 cells in a table
that has over 100
> rows. Is there anything that I can do to speed up the
process?
Maybe you are looking for
-
How much will it cost to buy a new 15inch retina display for mac pro in Italy?
the old one was crashed..
-
Big lcd screen in conjunction with my laptop
I have been running LR on my laptop with a 15.4 screen. Although it isn't state of the art dual core pc, it runs ok and I am happy with it. I was thinking of getting a bigger laptop with a 17 inch screen, but now I'm thinking of getting a big 20 inch
-
CS5.5 Premiere Pro & After Effects launch in one user profile but not the other
I’m having two issues. One with AE getting hung up on loading the MediaCore and the other with Premiere Loading the ExpoerterQuickTime.bundle I’ve looked and looked for solutions and haven’t found any with my problem. I’m running a Mid-2010 MBP 8GB R
-
Organising a big project with sub-projects
So ,I'm laying out my project now, very large. Easily over 1000 topics, about 1000 images, some embedded, some not, variables all over the place etc., and this is for our generic help file. I'm thinking of how to proceed with the other versions of th
-
Hello ALL, I'm trying to create a new roadmap copying an old one, but whe the system ask about Package I choose $TMP and the following message appears: "System setting does not allow changes to be made to object SHI3 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"