How to download data into one cell of excel in different lines
Hi All,
My Report downloads data from R/3 to excel. Now one particular field contains multiple lines, which i needs to download into different lines into that particular cell(of excel). how can i do this.
I found one method for this and that is cl_abap_char_utilities=>newline.But this is in abap version 6.0.
But i am working in version 4.6c. do we have any method or anything that meets my requirement in 4.6c.
Please let me know.
Thanx in Advance
Subhani.
why do you split them to the internal table ,then download it?
Is you special field long text?
If is ,you can use FM READ_TEXT to put it into an internal table ,then download it.
Similar Messages
-
How to download data from abap-ouput to excel sheet with logo
how to download data from abap-ouput to excel sheet with standard logo
Edited by: Harish Kasyap on Nov 18, 2008 8:19 AM
Edited by: Harish Kasyap on Nov 18, 2008 8:20 AMFor saving the report you can goto System -> List -> Save -> Local File -> Location where you want to save in your presentation server.
You can also give a option in your selection screen to save the file to Presentation server using FM GUI_DOWNLOAD.
Hope it helps.
Thanks,
Jayant. -
How to download data into two different columns 2003 excel format in ole
Hi ALL
when we download data into excel using ole with delimiter it works fine in 2007 but when we check this with 2003 format
both fields come in only one column .Can any one suggest
CONCATENATE WA_ALL-PERNR LV_ICNUM INTO WA_PERNR SEPARATED BY W_DELI IN CHARACTER MODE.If you're already using OLE, you can fill in value for each cell separately instead of using a delimiter. Something like this fragment:
FORM fill_cell USING p_row p_col p_value.
CALL METHOD OF obj_excel 'CELLS' = obj_cell
EXPORTING
#1 = p_row
#2 = p_col.
SET PROPERTY OF obj_cell 'VALUE' = p_value.
ENDFORM. "fill_cell -
Hi ABAP Exterts,
Any one help on this , there is a requirement to download the data into XLSX file only.
I am able to to download the data into XLS file using the FM: GUI_DOWNLOAD in SAP ECC 6.0and also opening the file . But when i download the data into XLSX file . I am able to download the data into GUI_DOWNLOAD. But while opening the file i am getting the below mentioned error.
'Excel cannot open the file 'filename.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file'
Ok buttom is coming not able to open the file.
When i use the FM: SAP_CONVERT_TO_XLS_FORMAT to download the XLS it self it is going abap DUMP that file type error.
Any one help any Function Module or how to download data through abap programing into XLSX file.
Thanks.
Murali.
Message was edited by: Matthew Billingham - adjusted wording...If you want to download your ALV to an .XLXS format file, with all the formatting intact, please try the following code. I have tried to create a custom Function module Z_EXCEL_DOWNLOAD_TEST wherein I pass all the callback variables, the final ALV internal table and all the ALV details like field catalog, sort, layout, event list and so on, along with the concatenated file path and file name in I_FILE. I have used a custom class ZCL_SALVEXPORT_XML which is a copy of the standard class CL_SALV_EXPORT_XML_DIALOG, with few modifications in Method: EXECUTE and Method: DOWNLOAD. The methods where I have modified the code are also shown at the end.
****************Global declarations***********************
TYPE-POOLS: slis,
kkblo.
TYPES: t_fccls(1) TYPE c OCCURS 0.
TYPES: BEGIN OF ty_nosum,
fieldname TYPE kkblo_fieldname, "Field name
tabname TYPE kkblo_tabname, "Table name
fieldname_dep TYPE kkblo_fieldname, "Field name
tabname_dep TYPE kkblo_tabname, "Table name
index TYPE sy-index, "Index
END OF ty_nosum.
TYPES: t_nosum TYPE TABLE OF ty_nosum INITIAL SIZE 0 WITH NON-UNIQUE DEFAULT KEY.
TYPES: BEGIN OF ty_dep_field,
s_dep_fieldcat TYPE kkblo_fieldcat, "Field cat
t_ref_fieldcat TYPE kkblo_t_fieldcat, "Field cat
END OF ty_dep_field.
TYPES: BEGIN OF ty_ref_field,
s_ref_fieldcat TYPE kkblo_fieldcat, "Field cat
s_dep_fieldcat TYPE kkblo_fieldcat, "Field cat
END OF ty_ref_field.
TYPES: t_dep_field TYPE ty_dep_field OCCURS 0. "
TYPES: t_ref_field TYPE ty_ref_field OCCURS 0.
TYPES: BEGIN OF ty_memory,
object(20) TYPE c, "Object
memcount(4) TYPE c, "count
END OF ty_memory.
*ALV Customer Wrapper
TYPES: BEGIN OF ty_type_header_info,
tabname TYPE kkblo_tabname, "Table name
fieldname TYPE kkblo_fieldname, "Field name
sequence TYPE i, "Sequence
field TYPE char80, "Field
pagno TYPE sypagno, "Page num
linno TYPE sy-linno, "Current Line in List
colno TYPE sy-colno, "Current List Column
END OF ty_type_header_info,
t_type_header_info TYPE SORTED TABLE OF ty_type_header_info
WITH UNIQUE KEY tabname fieldname.
TYPES: BEGIN OF ty_type_row_info,
tabname TYPE kkblo_tabname, "Table name
tabindex TYPE syindex, "Index
field TYPE char80, "Field name
pagno TYPE sypagno, "Page num
linno TYPE sy-linno, "Current Line in List
colno TYPE sy-colno, "Current List Column
END OF ty_type_row_info,
t_type_row_info TYPE SORTED TABLE OF ty_type_row_info
WITH UNIQUE KEY tabname tabindex.
TYPES: BEGIN OF ty_type_sel_header,
tabname TYPE kkblo_tabname, "table name
fieldname TYPE kkblo_fieldname, "field name
END OF ty_type_sel_header,
t_type_sel_header TYPE SORTED TABLE OF ty_type_sel_header
WITH UNIQUE KEY tabname fieldname.
TYPES: BEGIN OF ty_type_sel_row,
tabname TYPE kkblo_tabname,
tabindex TYPE syindex,
END OF ty_type_sel_row,
t_type_sel_row TYPE SORTED TABLE OF ty_type_sel_row
WITH UNIQUE KEY tabname tabindex.
TYPES: BEGIN OF ty_type_sel_cell,
tabname TYPE kkblo_tabname,
tabindex TYPE syindex,
fieldname TYPE kkblo_fieldname,
END OF ty_type_sel_cell.
TYPES: BEGIN OF ty_type_selections,
t_row_info TYPE t_type_row_info,
t_header_info TYPE t_type_header_info,
t_selected_headers TYPE t_type_sel_header,
t_selected_rows TYPE t_type_sel_row,
s_current_cell TYPE ty_type_sel_cell,
set_headers TYPE sap_bool,
set_rows TYPE sap_bool,
set_current_cell TYPE sap_bool,
END OF ty_type_selections.
TYPES: BEGIN OF ty_stack3,
r_grid TYPE REF TO cl_gui_alv_grid, "Y6DK050176
r_salv_adapter TYPE REF TO if_salv_adapter,
s_selections TYPE ty_type_selections,
r_print_state TYPE REF TO if_alv_print_parameter_proxy, "Y6DK075821
suppress_empty_data TYPE abap_bool,
END OF ty_stack3.
TYPES: t_stack3 TYPE ty_stack3 OCCURS 0.
TYPES: BEGIN OF ty_stack,
i_callback_program TYPE sy-repid,
i_callback_user_command TYPE kkblo_formname,
i_callback_top_of_page TYPE kkblo_formname,
i_callback_top_of_list TYPE kkblo_formname,
i_callback_end_of_page TYPE kkblo_formname,
i_callback_end_of_list TYPE kkblo_formname,
i_callback_pf_status_set TYPE kkblo_formname,
i_callback_fieldcat_save TYPE kkblo_formname,
i_callback_layout_save TYPE kkblo_formname,
i_tabname TYPE kkblo_tabname,
i_tabname_slave TYPE kkblo_tabname,
is_keyinfo TYPE kkblo_keyinfo,
is_layout TYPE kkblo_layout,
it_fieldcat TYPE kkblo_t_fieldcat,
i_fctype(1) TYPE c,
it_excluding TYPE kkblo_t_extab,
it_special_groups TYPE kkblo_t_sp_group,
it_sort TYPE kkblo_t_sortinfo,
it_except_qinfo TYPE kkblo_t_qinfo,
is_sel_hide TYPE kkblo_sel_hide,
t_columns TYPE kkblo_t_columns,
t_filter TYPE kkblo_t_filter,
s_lprint TYPE kkblo_lprint,
print_line_break TYPE char1,
t_isetab TYPE kkblo_seldis,
t_fccls TYPE t_fccls,
t_sfinfo TYPE kkblo_t_sfinfo,
t_ref_field TYPE t_ref_field,
t_dep_field TYPE t_dep_field,
flg_default_status(1) TYPE c,
flg_selections TYPE char1,
flg_allow_no_selection TYPE char1,
flg_input TYPE char1,
flg_called TYPE char1,
flg_popup TYPE char1,
flg_endlist TYPE char1,
listtype TYPE char1,
actcols TYPE i,
is_list TYPE char1,
END OF ty_stack.
TYPES: t_stack TYPE ty_stack OCCURS 0.
TYPES: BEGIN OF ty_stack2,
button_col1(20) TYPE c,
button_col2(20) TYPE c,
button_col3(20) TYPE c,
button_col4(20) TYPE c,
button_col5(20) TYPE c,
s_header TYPE kkblo_header,
t_sfinfo_slave TYPE kkblo_t_sfinfo,
t_suminfo TYPE kkblo_t_sfinfo,
t_sfsave TYPE kkblo_t_sfinfo,
t_nosum TYPE t_nosum,
window_title TYPE rsmpe-tittext, " Item_selection
flg_scroll_to_line(1) TYPE c, " Item_selection
flg_top_of_page(1) TYPE c,
flg_subtot(1) TYPE c,
flg_output_in_progress(1) TYPE c,
flg_grouplevels(1) TYPE c,
flg_groupedit(1) TYPE c,
flg_calculate_totals(1) TYPE c,
sumlevel TYPE sy-tabix,
memory_stack1 TYPE ty_memory,
memory_stack2 TYPE ty_memory,
memory_outtab TYPE ty_memory,
t_colmark TYPE kkblo_t_colmark,
t_rowmark TYPE kkblo_t_rowmark,
it_event_exit TYPE kkblo_t_event_exit,
t_groups TYPE kkblo_t_grouplevels,
t_filter_groups TYPE kkblo_t_grouplevels,
s_subtot_options TYPE kkblo_subtot_options,
flg_append_mode(1) TYPE c,
is_reprep_id TYPE kkblo_reprep_id,
i_callback_before_line_output TYPE kkblo_formname,
i_callback_after_line_output TYPE kkblo_formname,
i_callback_foreign_top_of_page TYPE kkblo_formname,
i_callback_foreign_end_of_page TYPE kkblo_formname,
i_callback_list_modify TYPE kkblo_formname,
i_callback_top_of_coverpage TYPE kkblo_formname,
i_callback_end_of_coverpage TYPE kkblo_formname,
i_callback_grouplevel_change TYPE kkblo_formname,
i_callback_item_data_expand TYPE kkblo_formname,
i_callback_header_transport TYPE kkblo_formname,
i_callback_reprep_sel_modify TYPE kkblo_formname,
i_callback_subtotal_text TYPE kkblo_formname,
END OF ty_stack2.
TYPES: t_stack2 TYPE TABLE OF ty_stack2 INITIAL SIZE 0.
** *--- iTables
DATA: it_stack TYPE t_stack WITH HEADER LINE.
DATA: it_stack2 TYPE t_stack2 WITH HEADER LINE.
***ALV Customer Wrapper
DATA: it_stack3 TYPE t_stack3 WITH HEADER LINE.
CONSTANTS: BEGIN OF c_con_listtype,
simple(1) TYPE c VALUE 'S',
hier_sequ(1) TYPE c VALUE 'H',
matrix(1) TYPE c VALUE 'M',
END OF c_con_listtype.
DATA: gv_callback_program1 TYPE sy-repid,
gv_callback_user_command1 TYPE kkblo_formname,
gv_callback_top_of_page1 TYPE kkblo_formname,
gv_callback_top_of_list1 TYPE kkblo_formname,
gv_callback_end_of_page1 TYPE kkblo_formname,
gv_callback_end_of_list1 TYPE kkblo_formname,
gv_callback_pf_status_set1 TYPE kkblo_formname,
gv_callback_layout_save1 TYPE kkblo_formname,
gv_callback_fieldcat_save1 TYPE kkblo_formname,
gv_callback_grouplevel_change1 TYPE kkblo_formname,
gv_callback_before_line_otput1 TYPE kkblo_formname,
gv_callback_after_line_otput1 TYPE kkblo_formname,
gv_callback_foreign_top_of_pg1 TYPE kkblo_formname,
gv_callback_foreign_end_of_pg1 TYPE kkblo_formname,
gv_callback_list_modify1 TYPE kkblo_formname,
gv_callback_top_of_coverpge1 TYPE kkblo_formname,
gv_callback_end_of_coverpge1 TYPE kkblo_formname,
gv_callback_item_data_expand1 TYPE kkblo_formname,
gv_callback_header_transport1 TYPE kkblo_formname,
gv_callback_reprep_sel_modify1 TYPE kkblo_formname,
gv_callback_subtotal_text1 TYPE kkblo_formname,
gv_layout1 TYPE kkblo_layout,
gv_fieldcat1 TYPE kkblo_t_fieldcat,
gv_fctype1 TYPE c,
gv_event_exit1 TYPE kkblo_t_event_exit,
gv_excluding1 TYPE kkblo_t_extab,
gv_special_groups1 TYPE kkblo_t_sp_group,
gv_sort1 TYPE kkblo_t_sortinfo,
gv_filter1 TYPE kkblo_t_filter,
gv_except_qinfo1 TYPE slis_t_qinfo_alv,
gv_sel_hide1 TYPE slis_sel_hide_alv,
gv_reprep_id1 TYPE slis_reprep_id,
gv_screen_start_column1 TYPE i,
gv_salv_adapter1 TYPE REF TO if_salv_adapter,
gv_suppress_empty_data1 TYPE sap_bool.
FUNCTION z_excel_download_test.
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(I_BYPASSING_BUFFER) TYPE CHAR01 OPTIONAL
*" REFERENCE(I_BUFFER_ACTIVE) OPTIONAL
*" REFERENCE(I_CALLBACK_PROGRAM) TYPE SY-REPID OPTIONAL
*" REFERENCE(I_CALLBACK_USER_COMMAND) OPTIONAL
*" REFERENCE(I_CALLBACK_TOP_OF_PAGE) OPTIONAL
*" REFERENCE(I_CALLBACK_TOP_OF_LIST) OPTIONAL
*" REFERENCE(I_CALLBACK_END_OF_PAGE) OPTIONAL
*" REFERENCE(I_CALLBACK_END_OF_LIST) OPTIONAL
*" REFERENCE(I_CALLBACK_PF_STATUS_SET) OPTIONAL
*" REFERENCE(I_CALLBACK_LAYOUT_SAVE) OPTIONAL
*" REFERENCE(I_CALLBACK_FIELDCAT_SAVE) OPTIONAL
*" REFERENCE(I_CALLBACK_GROUPLEVEL_CHANGE) OPTIONAL
*" REFERENCE(I_CALLBACK_BEFORE_LINE_OUTPUT) OPTIONAL
*" REFERENCE(I_CALLBACK_AFTER_LINE_OUTPUT) OPTIONAL
*" REFERENCE(I_CALLBACK_FOREIGN_TOP_OF_PAGE) OPTIONAL
*" REFERENCE(I_CALLBACK_FOREIGN_END_OF_PAGE) OPTIONAL
*" REFERENCE(I_CALLBACK_LIST_MODIFY) OPTIONAL
*" REFERENCE(I_CALLBACK_TOP_OF_COVERPAGE) OPTIONAL
*" REFERENCE(I_CALLBACK_ITEM_DATA_EXPAND) OPTIONAL
*" REFERENCE(I_CALLBACK_END_OF_COVERPAGE) OPTIONAL
*" REFERENCE(I_CALLBACK_HEADER_TRANSPORT) OPTIONAL
*" REFERENCE(I_CALLBACK_REPREP_SEL_MODIFY) OPTIONAL
*" REFERENCE(I_CALLBACK_SUBTOTAL_TEXT) OPTIONAL
*" REFERENCE(I_TABNAME) TYPE SLIS_TABNAME OPTIONAL
*" REFERENCE(I_FCTYPE) DEFAULT 'R'
*" REFERENCE(IT_EXCEPT_QINFO) TYPE SLIS_T_QINFO_ALV OPTIONAL
*" REFERENCE(IS_SEL_HIDE) TYPE SLIS_SEL_HIDE_ALV OPTIONAL
*" REFERENCE(IS_REPREP_ID) TYPE SLIS_REPREP_ID OPTIONAL
*" REFERENCE(I_SCREEN_START_COLUMN) DEFAULT 0
*" REFERENCE(I_OO_ALV) OPTIONAL
*" REFERENCE(IR_SALV_ADAPTER) TYPE REF TO IF_SALV_ADAPTER OPTIONAL
*" REFERENCE(I_SUPPRESS_EMPTY_DATA) TYPE SAP_BOOL DEFAULT
*" ABAP_FALSE
*" REFERENCE(I_FILE) TYPE STRING OPTIONAL
*" REFERENCE(IT_FIELDCAT) TYPE SLIS_T_FIELDCAT_ALV OPTIONAL
*" REFERENCE(IS_LAYOUT) TYPE SLIS_LAYOUT_ALV OPTIONAL
*" REFERENCE(IT_SORT) TYPE SLIS_T_SORTINFO_ALV OPTIONAL
*" REFERENCE(IT_FILTER) TYPE SLIS_T_FILTER_ALV OPTIONAL
*" REFERENCE(IT_EXCLUDING) TYPE SLIS_T_EXTAB OPTIONAL
*" REFERENCE(IT_SPECIAL_GROUPS) TYPE SLIS_T_SP_GROUP_ALV OPTIONAL
*" REFERENCE(IS_KEYINFO) TYPE SLIS_KEYINFO_ALV OPTIONAL
*" REFERENCE(IT_EVENT_EXIT) TYPE SLIS_T_EVENT_EXIT OPTIONAL
*" REFERENCE(IS_LIST_SCROLL) TYPE SLIS_LIST_SCROLL OPTIONAL
*" REFERENCE(IS_PRINT) TYPE SLIS_PRINT_ALV OPTIONAL
*" REFERENCE(IS_LINEINFO) TYPE SLIS_LINEINFO OPTIONAL
*" REFERENCE(I_REPID) TYPE SYREPID OPTIONAL
*" TABLES
*" T_OUTTAB TYPE STANDARD TABLE OPTIONAL
*********** Local data declarations******************
DATA: gv_list TYPE char1.
DATA: gv_fcat_complete TYPE sap_bool.
DATA: gv_buffer_active TYPE char01,
wa_variant TYPE disvariant.
DATA: gv_controller TYPE REF TO cl_salv_export_c8r.
DATA: gv_xml TYPE xstring.
DATA: gv_s_xml_choice TYPE if_salv_bs_xml=>s_type_xml_choice.
DATA: gv_t_xml_choice TYPE if_salv_bs_xml=>t_type_xml_choice.
DATA: gv_param_lvc TYPE if_salv_export=>s_type_param_lvc.
DATA: gv_data TYPE REF TO data.
DATA: gv_result_data TYPE REF TO cl_salv_ex_result_data_table.
DATA: gv_flavour TYPE string.
DATA: gv_version TYPE string.
DATA: -
How to Download data into Chunks?
Hi Guys,
Can anybody tell me How to download the data into chunks for ex consider BSEG table for this table ?how can we download the data into chunks from SAP Database?
Can anybody tell me how to use Open Cursor and what is meant by Open Cursor?
Thanks,
Gopi.Hi Gopi,
The only change that you have to do is vary the PACKAGE SIZE according to your need. Instead of 300,000 which is set right now, give the PACKAGE SIZE as 1,000,000. But that all depends upon your requirement.
Now, I think your limit is 350,000. If that is the case, then give PACKAGE SIZE 350,000 and instead of writing open dataset outside SELECT, put in before ENDSELECT.
i.e.
DATA : it_bseg TYPE TABLE OF bseg,
v_size TYPE i VALUE '350000',
v_filename TYPE string VALUE give application server path + file name.
SELECT *
FROM bseg
INTO TABLE it_bseg PACKAGE SIZE v_size
WHERE condition.
IF it_bseg[] IS NOT INITIAL.
OPEN DATASET v_filename FOR APPENDING IN TEXT MODE ENCODING DEFAULT.
SORT IT_BSEG BY BELNR.
LOOP AT it_bseg INTO x_bseg
TRANSFER x_bseg TO v_filename.
ENDLOOP.
CLOSE DATASET v_filename.
ENDIF.
ENDSELECT.
Reward points if the answer is helpful.
Thankx,
Mukul -
How to fetch the data into one out parameter from two different queries
Hi,
I have an a problem how to implement condition in above procedure,and scenario is
i have to get the output into one out parameter from two queries.i.e if one query data is null
then i have to pick out data from another query into same out parameter.
CREATE OR REPLACE PROCEDURE GET_POLICIESMAP_BASEDON_GHPLID(I_COMPANYID IN NUMBER,
I_CARDID IN VARCHAR2,
PR_RESULTSET OUT SYS_REFCURSOR) IS
/* LOC_INSUREDID VARCHAR2(200);
LOC_RELATIONCODE VARCHAR2(200);
LOC_CURRENTPOLICYID VARCHAR2(4000);*/
BEGIN
OPEN PR_RESULTSET FOR
WITH A AS
(SELECT DISTINCT PM.MAINPOLICYID MAINPOLICYID,
id INSUREDID,
RELATIONCODE,
CURRENTPOLICYID
from INSUREDPERSONS IP
LEFT OUTER JOIN POLICIES_RULES_MAPPING PM
ON PM.POLICYID = IP.Currentpolicyid
where EIN IN (SELECT EIN
FROM INSUREDPERSONS ipp
JOIN VW_INSUREDINFO vw
ON IPP.ID = vw.insuredid
and vw.cardid = I_CARDID)
AND IP.CURRENTPOLICYID in
(SELECT ID
from policies
where companyid = I_COMPANYID
and dead = 0
AND POLICYTO > SYSDATE - 1))
SELECT INSUREDID, RELATIONCODE, CURRENTPOLICYID
FROM A
WHERE RELATIONCODE = 0
AND (A.MAINPOLICYID is null or
RELATIONCODE = 0 AND CURRENTPOLICYID = MAINPOLICYID)
UNION
SELECT INSUREDID, RELATIONCODE, CURRENTPOLICYID
FROM A
WHERE RELATIONCODE > 0;
/* HERE I NEED TO GET THE DATA FROM THIS BELOW QUERY INTO SAME OUT PARAMETER
WHEN ABOVE QUERY DATA CONTAINS NULLS */
/* IF PR_RESULTSET IS NULL THEN*/
OPEN PR_RESULTSET FOR
WITH A AS
(SELECT DISTINCT PM.MAINPOLICYID MAINPOLICYID,
id INSUREDID,
RELATIONCODE,
CURRENTPOLICYID
from INSUREDPERSONS IP
LEFT OUTER JOIN POLICIES_RULES_MAPPING PM
ON PM.POLICYID = IP.Currentpolicyid
where FAMILYID IN (SELECT FAMILYID
FROM INSUREDPERSONS ipp
JOIN VW_INSUREDINFO vw
ON IPP.ID = vw.insuredid
and vw.cardid = I_CARDID)
AND IP.CURRENTPOLICYID in
(SELECT ID
from policies
where companyid = I_COMPANYID
and dead = 0
AND POLICYTO > SYSDATE - 1))
SELECT INSUREDID, RELATIONCODE, CURRENTPOLICYID
FROM A
WHERE RELATIONCODE = 0
AND (A.MAINPOLICYID is null or
RELATIONCODE = 0 AND CURRENTPOLICYID = MAINPOLICYID)
UNION
SELECT INSUREDID, RELATIONCODE, CURRENTPOLICYID
FROM A
WHERE RELATIONCODE > 0;
/* END IF;*/
END GET_POLICIESMAP_BASEDON_GHPLID;
Thanks in Advance,
vvr.SELECT DISTINCT PM.MAINPOLICYID MAINPOLICYID,
id INSUREDID,
RELATIONCODE,
CURRENTPOLICYID
from INSUREDPERSONS IP
LEFT OUTER JOIN POLICIES_RULES_MAPPING PM
ON PM.POLICYID = IP.Currentpolicyid
where EIN IN (SELECT EIN
FROM INSUREDPERSONS ipp
JOIN VW_INSUREDINFO vw
ON IPP.ID = vw.insuredid
and vw.cardid = I_CARDID)In this code
where EINEIN is a column in INSUREDPERSONS?
and in the sub query below
(SELECT EIN
FROM INSUREDPERSONS ipp
JOIN VW_INSUREDINFO vw
ON IPP.ID = vw.insuredid
and vw.cardid = I_CARDID)EIN belongs to INSUREDPERSONS or VW_INSUREDINFO?
Please use Alias as we dont know your table structure. -
How to download data into excel by displaying field names in top 2 rows
Hi experts,
i am trying to download an internal table data into excel(open office) by reserving top 2 rows. In 1st row i want to display tech.name where as in 2nd row i want to display discription of tech name of the fields. Well, i tried with FM gui_upload and used fieldnames parameter and even its working too but i'm unable to work with 2nd col.
Please help me out....
with regards.
Praveen.Try this code:
If IT_FINAL is the internal table containing the data that you want to download :
IF IT_FINAL[] IS INITIAL.
WRITE : 'No Data Fetched'.
ELSE.
Build header table Field catelague
PERFORM UR_FIELDCAT_BUILD USING G_F_REPNM
'IT_FINAL'
CHANGING IT_FCAT_001.
DATA: L_F_LINES TYPE I,
L_F_FROM TYPE I,
L_F_TO TYPE I,
L_F_DIFF TYPE I,
L_TEMP_FINAL LIKE TABLE OF IT_FINAL.
DESCRIBE TABLE IT_FINAL LINES L_F_LINES.
IF L_F_LINES > 16000.
L_F_FROM = 1.
L_F_TO = 16000.
DO.
APPEND LINES OF IT_FINAL FROM L_F_FROM
TO L_F_TO TO L_TEMP_FINAL.
PERFORM DOWNLOAD_DATA_HEADER TABLES L_TEMP_FINAL
IT_FCAT_001
USING GF_FILE1.
IF L_F_TO >= L_F_LINES.
EXIT.
ENDIF.
L_F_FROM = L_F_TO + 1.
L_F_DIFF = L_F_LINES - L_F_TO.
IF L_F_DIFF >= 16000.
L_F_TO = L_F_TO + 16001.
ELSE.
L_F_TO = L_F_LINES.
ENDIF.
REFRESH: L_TEMP_FINAL.
ENDDO.
ELSE.
PERFORM DOWNLOAD_DATA_HEADER TABLES IT_FINAL
IT_FCAT_001
USING GF_FILE1.
ENDIF.
ENDIF.
FORM UR_FIELDCAT_BUILD
USING P_REPID
P_TABNAM
CHANGING C_T_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
REFRESH C_T_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = P_REPID
I_INTERNAL_TABNAME = P_TABNAM
I_STRUCTURE_NAME = 'TY_FLODAT'
I_INCLNAME = P_REPID
I_BYPASSING_BUFFER = 'X'
CHANGING
CT_FIELDCAT = C_T_FIELDCAT
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
ENDFORM.
FORM DOWNLOAD_DATA_HEADER
TABLES T_OUTTAB
T_FIELDCAT
USING P_FILENAM.
TYPE-POOLS: SLIS.
REPLACE 'YYYYMMDD' WITH SY-DATUM INTO P_FILENAM.
DATA: T_GXXLT_O TYPE TABLE OF GXXLT_O WITH HEADER LINE,
T_GXXLT_H TYPE TABLE OF GXXLT_H WITH HEADER LINE,
T_GXXLT_H_TEMP TYPE TABLE OF GXXLT_H WITH HEADER LINE,
T_GXXLT_P TYPE TABLE OF GXXLT_P WITH HEADER LINE,
T_GXXLT_S TYPE TABLE OF GXXLT_S WITH HEADER LINE,
T_GXXLT_V TYPE TABLE OF GXXLT_V WITH HEADER LINE,
L_S_FIELDCAT TYPE SLIS_FIELDCAT_ALV..
DATA: F_FILE TYPE GXXLT_F-FILE,
F_ATT_COLS TYPE I,
F_HRZ_KEYS TYPE I,
F_VRT_KEYS TYPE I.
TYPES: BEGIN OF TY_FLDNM,
FIELDNAME(30) TYPE C,
END OF TY_FLDNM.
DATA : L_T_FLDNAME TYPE TABLE OF TY_FLDNM,
L_R_FLDNAME TYPE TY_FLDNM.
REFRESH: L_T_FLDNAME.
LOOP AT T_FIELDCAT INTO L_S_FIELDCAT .
CLEAR L_R_FLDNAME.
CONCATENATE L_S_FIELDCAT-SELTEXT_S '_'
L_S_FIELDCAT-FIELDNAME
INTO L_R_FLDNAME-FIELDNAME.
APPEND L_R_FLDNAME TO L_T_FLDNAME.
ENDLOOP.
IF T_OUTTAB[] IS INITIAL.
WRITE : /'No data Fetch !'.
ELSE.
DESCRIBE TABLE T_FIELDCAT LINES F_ATT_COLS.
LOOP AT T_FIELDCAT INTO L_S_FIELDCAT.
T_GXXLT_H-COL_NO = L_S_FIELDCAT-COL_POS.
T_GXXLT_H-ROW_NO = 1.
T_GXXLT_H-COL_NAME = L_S_FIELDCAT-FIELDNAME.
APPEND T_GXXLT_H.
CLEAR T_GXXLT_S.
T_GXXLT_S-COL_NO = L_S_FIELDCAT-COL_POS.
T_GXXLT_S-COL_OPS = 'NOP'.
T_GXXLT_S-COL_SRC = L_S_FIELDCAT-COL_POS.
CASE L_S_FIELDCAT-INTTYPE.
WHEN 'Z' OR 'P' OR 'I' OR 'F'.
T_GXXLT_S-COL_TYP = 'NUM'.
WHEN 'C' OR 'X' OR 'T' OR 'N'.
T_GXXLT_S-COL_TYP = 'STR'.
WHEN 'D'.
T_GXXLT_S-COL_TYP = 'DAT'.
WHEN OTHERS.
T_GXXLT_S-COL_TYP = 'STR'.
ENDCASE.
APPEND T_GXXLT_S.
IF L_S_FIELDCAT-KEY EQ 'X'.
CLEAR T_GXXLT_H.
T_GXXLT_H-COL_NO = L_S_FIELDCAT-COL_POS.
T_GXXLT_H-ROW_NO = 1.
T_GXXLT_H-COL_NAME = L_S_FIELDCAT-FIELDNAME.
APPEND T_GXXLT_H.
ENDIF.
ENDLOOP.
MOVE P_FILENAM TO F_FILE.
LOOP AT T_FIELDCAT INTO L_S_FIELDCAT.
READ TABLE T_GXXLT_H WITH KEY COL_NAME = L_S_FIELDCAT-FIELDNAME.
IF SY-SUBRC EQ 0.
T_GXXLT_H_TEMP-COL_NO = T_GXXLT_H-COL_NO.
T_GXXLT_H_TEMP-ROW_NO = 2.
T_GXXLT_H_TEMP-COL_NAME = L_S_FIELDCAT-SELTEXT_S.
APPEND T_GXXLT_H_TEMP TO T_GXXLT_H.
CLEAR T_GXXLT_H.
ENDIF.
ENDLOOP.
CALL FUNCTION 'XXL_FULL_API'
EXPORTING
FILENAME = F_FILE
NO_START = ''
N_ATT_COLS = F_ATT_COLS
N_HRZ_KEYS = F_HRZ_KEYS
N_VRT_KEYS = F_VRT_KEYS
SEMA_TYPE = ''
SO_TITLE = ''
TABLES
DATA = T_OUTTAB
HKEY = T_GXXLT_H
ONLINE_TEXT = T_GXXLT_O
PRINT_TEXT = T_GXXLT_P
SEMA = T_GXXLT_S
VKEY = T_GXXLT_V
EXCEPTIONS
CANCELLED_BY_USER = 1
DATA_TOO_BIG = 2
DIM_MISMATCH_DATA = 3
DIM_MISMATCH_SEMA = 4
DIM_MISMATCH_VKEY = 5
ERROR_IN_HKEY = 6
ERROR_IN_SEMA = 7
FILE_OPEN_ERROR = 8
FILE_WRITE_ERROR = 9
INV_DATA_RANGE = 10
INV_WINSYS = 11
INV_XXL = 12
OTHERS = 13.
ENDIF.
ENDFORM. -
How to move data from one cell/sheet to another
Hi - Help! I have a spreadsheet with multiple columns & rows for ordering clothes. The first column is text of each item & it's size. What I want to do is:
IF D15 has a number in it, I want that number and the text from A15 to populate into another sheet.
Then I want to re-create this function in all the cells, so that if ANY cell has a number in it, that number and the text in the A column of that row shows up in the new sheet, in the corresponding cell.
here's a screen shot of my sheet:
Any help would be great!!
KimHi Kim,
I got the same error message when building the formula—it's easy to get lost in all the parentheses!
Here's a breakdown of the formula I used.
=IF(OFFSET(Data :: $A$1,ROW()-1,COLUMN())>0,OFFSET(Data :: $A$1,ROW()-1,COLUMN())&" - "&OFFSET(Data :: $A$1,ROW()-1,0),"")
The overall stucture is an IF statement:
IF(test,"Yes","No")
IF(there is a value greater than zero in this cell's 'partner' on the main table,
(then) copy that value here and append the label in column A of the main table, separated by a space, a dash, and a second space,
(otherwise) put an empty text string here)
Test: OFFSET(Data :: $A$1,ROW()-1,COLUMN())>0
The 'partner' cell on the main table is the one on the same row and one column to the right of the cell containing the formula. (eg. for Summary::B2, the 'partner cell to be tested is Data::C2, the first data cell for Person 2)
OFFSET(base,r,c)>0 compares the value in the cell r rows below and c columns to the right of the base cell with the value zero.
Data::$A$1: A1 is my usual choice for the base cell, as it usually simplifies the calculations for r and c.
ROW()-1: ROW() returns the row number of the row in which it is located. In B2, it will return 2. '-1' reduces that value to 1, the row offset necessary to get from Data::A1 to Data::b2.
COLUMN(): COLUMN() returns the column number of the column in which it is located. In B2 it will return 2. No adjustment is necessary, as 2 is the column offset necessary to get from Data::A1 to Data::C2
OFFSET returns the value in Data::C2 and compares it with 0 (zero). The value (1) is greater than 0, so the test returns TRUE, and the IF function acts on the "yes" section.
Yes: OFFSET(Data :: $A$1,ROW()-1,COLUMN())&" - "&OFFSET(Data :: $A$1,ROW()-1,0)
This section contains two OFFSET statements.
The first is the same as the one in Test, and returns the value in the tested cell (1).
The second is the same, except for the third argument (c) which is fixed at 0 (zero). This returns the value in the cell in column A (zero columns to the right of A1) in the same row as the tested cell.
The two returned values are linked by this expression: &" - "&
"&" is the concatenation operator, which joins the values left and right of it into a text string. Here, the value returned by the first OFFSET (1) is joined to the text (space-space) contained between the double quotes, and that is joined to the value returned by the second OFFSET function (Item 1)
No: ""
If there is no number entered in the Data cell being tested, IF acts on the "no" section of the formula, and inserts an empty string ( "" ) in the cell containing the formula. An empty string displays as 'blank', and is the closest one can get to an 'empty' cell using a formula.
Regarding your questions:
"I seem to not understand what I'm supposed to put in the () and " " 's. I copied and pasted it and got the error message "the formula contains an invalid referance". DO i put certain row/cell numbers in somewhere?"
ROW() and COLUMN() should have no argument entered between the parentheses. Each returns the row or column number of the cell containing the formula.
The double quotes at the end of the IF statement define a text string with no text. You can put any text between them, but that text will then appear in all cells whose 'partner' cell does not contain a number greater than zero.
The 'invalid reference' error message usually means a formula is referencing a cell that is not on the table. My guess is that your Summary table includes a copy of column A from your Data table. That would place "Person 1" in column B on both tables, and would require an adjustment of 'COLUMN()' to 'COLUMN()-1' in the first two OFFSET functions.
Another possibility is a mismatch between the Data table name in the formula and the actual name of the Data table.
Beyond those possibilities, I'd need to see either the document or screen shots of both tables and a copy of the actual formula as you've entered it.
Regards,
Barry -
How to download data into a text file format ?
Hi, all.
My situation now is: I have a report pogram which can retrieve data from database, and I would like to export or download those data to outside as a text file (.txt) in my local computer.
So, does anyone know how to do it? i mean my report coding should add on or enhance with what coding in order to do like that.
Thanks in advance.Hi,
Use GUI_DOWNLOAD Function module.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = 'FILEPATH'*
FILETYPE = 'ASC'
APPEND = ' '
WRITE_FIELD_SEPARATOR = 'X' (Field separator )
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
IMPORTING
FILELENGTH =
tables
data_tab = t_customer ( give internal tablename )
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22 .
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. " IF SY-SUBRC -
How to determine data type of cell in Excel file
I have a company standard Excel file that needs to be read to determine what tests to run. I have no control over its format. I need to be able to tell what the data type is in order to read it using the LabView sample code. It is a hodge poge of numbers and strings. Some of the numeric fields are formated as hex while some are floating point. There does not appear to be a vi that I can call to determine info about the cell formating. As I remember it, the Windows Active X control for accessing Excel support that. I really was hoping to avoid dealing with the Active X control for Excel directly.
Any help/ideas?
Outputting it in CSV or similar is not an option.
Solved!
Go to Solution.If you have to deal with Excel directly, I don't see how you're going to get around using Active X.
MSDN page on using ActiveX -
How save data from the one row of db to the one cell of excel sheet
hi
how to save data from one row of db to the one cell of excel sheet and so on..............hi,
see this link
http://poi.apache.org/hssf/quick-guide.html
Regards,
Ram -
How can I select rows of cells and merge them vertically into one cell in each column?
I'm working in CS4 and need to be able to select 2 to 6 rows of cells (with many columns) in a table and then merge the selected cells vertically into one cell in each column. A few cells in the chart will not need to merge so I must select the ones that do. I have almost 100 pages of charts with cells that need merged this way by Tuesday. Please help!
Top chart example needs to change to the bottom example.
Header 1
Header 2
Header 3
Header 4
Header 5
Header 6
100
600
300
600
20000
120000
2000
500
400
50000
10000
5000
3000
200
700
67
122
600
900
100
2
7
123
1110
Header 1
Header 2
Header 3
Header 4
Header 5
Header 6
100
500
200
100
600
400
700
900
300
5000
30000
2
600
10000
67
7
20000
2000
122
123
120000
5000
600
1110SmartCellMerge may help you:
http://www.indiscripts.com/post/2012/04/improve-the-way-you-merge-cells-in-indesign
@+
Marc -
How to insert data into the mysql table by giving as a text file
Hi,
Any one know's how to insert data into the mysql table by giving as a text file as the input in JSP.Please respond ASAP.
Thanks:)At least you can try StringTokenizer to parse your text files. Or download a text JDBC driver to parse your files, for instance, HXTT Text(www.hxtt.net) or StelsCSV(www.csv-jdbc.com).
-
How to insert " into a cell in excel
Hi,
I have a z function module to download data into excel file .
Types: begin of t_file,
line(1000) type c,
end of t_file.
I need to create an internal table of above type and send it to z function module to create excel.While creating internal table one of the fields values should be something like "2(starting with ") .During debugging I am able to see " but after download there are some junk characters in that field instead of ".
Please let me know how to send " into excel file
Thanks
Bala DuvvuriHi Bala,
I would suggest to go to your code in debugging and chek giving the hwx value for " and dowmload to excel. I faced a similar problem and used this method. But i had to go for other method as my requirement was to download and both upload.
I think hex value for " is 2200.
sample codes for FMs for conversion can be easily find in net.
Please try and reply.
Ben. -
Downloading data into multiple work sheets in excel
Hi All,
Could you please tell me the way of downloading data into multiple work sheets .
Now, we are downloading data into multiple excel files and after that copying all the excel file data in to different work sheets of the single excel manually.
So , here I want directly download the data into different work sheets of single excel file.
Regards,
Siddivinesh JoguHi,
Down load into three worksheets in one XL
REPORT ZKC_TEST1.
INCLUDE ole2incl.
DATA: w_cell1 TYPE ole2_object,
w_cell2 TYPE ole2_object.
*--- Ole data Declarations
DATA: h_excel TYPE ole2_object, " Excel object
h_mapl TYPE ole2_object, " list of workbooks
h_map TYPE ole2_object, " workbook
h_zl TYPE ole2_object, " cell
h_f TYPE ole2_object, " font
gs_interior TYPE ole2_object, " Pattern
worksheet TYPE ole2_object,
h_cell TYPE ole2_object,
h_cell1 TYPE ole2_object,
range TYPE ole2_object,
h_sheet2 TYPE ole2_object,
h_sheet3 TYPE ole2_object,
gs_font TYPE ole2_object,
e_color TYPE ole2_object,
gs_italic TYPE ole2_object,
flg_stop(1) TYPE c.
** Internal table Declaration
DATA: BEGIN OF t_excel OCCURS 0,
MATNR type mara-matnr, "(18) type c,
ERSDA type mara-ersda, " (8) type c,
ERNAM type mara-ernam, "(12) type c,
LAEDA type mara-laeda, "(8) type c,
AENAM type mara-aenam, "(12) type c,
VPSTA type mara-vpsta, "(15) type c,
PSTAT type mara-pstat, "(15) type c,
END OF t_excel.
DATA: t_excel_bckord LIKE t_excel OCCURS 0 WITH HEADER LINE,
t_excel_bcklog LIKE t_excel OCCURS 0 WITH HEADER LINE,
t_excel_blkord LIKE t_excel OCCURS 0 WITH HEADER LINE.
data: wa_excel_bckord like line of t_excel.
TYPES: data1(1500) TYPE c,
ty TYPE TABLE OF data1.
DATA: it TYPE ty WITH HEADER LINE,
it_2 TYPE ty WITH HEADER LINE,
it_3 TYPE ty WITH HEADER LINE,
rec TYPE sy-tfill,
deli(1) TYPE c,
l_amt(18) TYPE c.
DATA: BEGIN OF hex,
tab TYPE x,
END OF hex.
FIELD-SYMBOLS: <fs> .
CONSTANTS cns_09(2) TYPE n VALUE 09.
ASSIGN deli TO <fs> TYPE 'X'.
hex-tab = cns_09.
<fs> = hex-tab.
DATA gv_sheet_name(20) TYPE c .
*---selecting into tables
select MATNR
ERSDA
ERNAM
LAEDA
AENAM
VPSTA
PSTAT
from mara into table t_excel_bckord
where pstat = 'KVELBCD'.
wa_excel_bckord-matnr = 'MATNR'.
wa_excel_bckord-ersda = 'ERSDA'.
wa_excel_bckord-ernam = 'ERNAM'.
wa_excel_bckord-laeda = 'LAEDA'.
wa_excel_bckord-aenam = 'AENAM'.
wa_excel_bckord-vpsta = 'VPSTA'.
wa_excel_bckord-pstat = 'PSTAT'.
INSERT wa_excel_bckord
INTO t_excel_bckord INDEX 1 .
select MATNR
ERSDA
ERNAM
LAEDA
AENAM
VPSTA
PSTAT
from mara into table t_excel_bcklog
where pstat = 'KVELBCDP'.
INSERT wa_excel_bckord
INTO t_excel_bcklog INDEX 1 .
select MATNR
ERSDA
ERNAM
LAEDA
AENAM
VPSTA
PSTAT
from mara into table t_excel_blkord
where pstat = 'KEBC'.
INSERT wa_excel_bckord
INTO t_excel_blkord INDEX 1 .
LOOP AT t_excel_bckord.
CONCATENATE
t_excel_bckord-MATNR
t_excel_bckord-ERSDA
t_excel_bckord-ERNAM
t_excel_bckord-laeda
t_excel_bckord-aenam
t_excel_bckord-vpsta
t_excel_bckord-pstat
INTO it
SEPARATED BY deli.
APPEND it.
CLEAR it.
ENDLOOP.
LOOP AT t_excel_bcklog.
CONCATENATE
t_excel_bcklog-matnr
t_excel_bcklog-ersda
t_excel_bcklog-ernam
t_excel_bcklog-laeda
t_excel_bcklog-aenam
t_excel_bcklog-vpsta
t_excel_bcklog-pstat
INTO it_2
SEPARATED BY deli.
APPEND it_2.
CLEAR it_2.
ENDLOOP.
LOOP AT t_excel_blkord.
CONCATENATE
t_excel_blkord-matnr
t_excel_blkord-ersda
t_excel_blkord-ernam
t_excel_blkord-laeda
t_excel_blkord-aenam
t_excel_blkord-vpsta
t_excel_blkord-pstat
INTO it_3
SEPARATED BY deli.
APPEND it_3.
CLEAR it_3.
ENDLOOP.
*--- start Excel
IF h_excel-header = space OR h_excel-handle = -1.
CREATE OBJECT h_excel 'EXCEL.APPLICATION'.
ENDIF.
*--- get list of workbooks, initially empty
CALL METHOD OF h_excel 'Workbooks' = h_mapl.
SET PROPERTY OF h_excel 'Visible' = 1.
CALL METHOD OF h_mapl 'Add' = h_map.
gv_sheet_name = 'Back Orders'.
GET PROPERTY OF h_excel 'ACTIVESHEET' = worksheet.
SET PROPERTY OF worksheet 'Name' = gv_sheet_name .
*--Formatting the area of additional data 1 and doing the BOLD
CALL METHOD OF h_excel 'Cells' = w_cell1
EXPORTING
#1 = 1
#2 = 1.
CALL METHOD OF h_excel 'Cells' = w_cell2
EXPORTING
#1 = 1
#2 = 50.
CALL METHOD OF h_excel 'Range' = h_cell
EXPORTING
#1 = w_cell1
#2 = w_cell2.
GET PROPERTY OF h_cell 'Font' = gs_font .
SET PROPERTY OF gs_font 'Bold' = 1 .
SET PROPERTY OF gs_font 'Name' = 'Arial' .
GET PROPERTY OF h_cell 'Interior' = e_color.
SET PROPERTY OF e_color 'ColorIndex' = 35.
GET PROPERTY OF h_cell 'Font' = gs_italic .
SET PROPERTY OF gs_italic 'Italic' = 1 .
DATA l_rc TYPE i.
CALL METHOD cl_gui_frontend_services=>clipboard_export
IMPORTING
data = it[]
CHANGING
rc = l_rc
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
CALL METHOD OF h_excel 'Cells' = w_cell1
EXPORTING
#1 = 1
#2 = 1.
CALL METHOD OF h_excel 'Cells' = w_cell2
EXPORTING
#1 = 1
#2 = 1.
CALL METHOD OF h_excel 'Range' = range
EXPORTING
#1 = w_cell1
#2 = w_cell2.
CALL METHOD OF range 'Select'.
CALL METHOD OF worksheet 'Paste'.
gv_sheet_name = 'Backlog'.
GET PROPERTY OF h_excel 'Sheets' = h_sheet2 .
CALL METHOD OF h_sheet2 'Add' = h_map.
SET PROPERTY OF h_map 'Name' = gv_sheet_name .
GET PROPERTY OF h_excel 'ACTIVESHEET' = worksheet.
*--Formatting the area of additional data 1 and doing the BOLD
CALL METHOD OF h_excel 'Cells' = w_cell1
EXPORTING
#1 = 1
#2 = 1.
CALL METHOD OF h_excel 'Cells' = w_cell2
EXPORTING
#1 = 1
#2 = 50.
CALL METHOD OF h_excel 'Range' = h_cell
EXPORTING
#1 = w_cell1
#2 = w_cell2.
GET PROPERTY OF h_cell 'Font' = gs_font .
SET PROPERTY OF gs_font 'Bold' = 1 .
GET PROPERTY OF h_cell 'Interior' = e_color.
SET PROPERTY OF e_color 'ColorIndex' = 40.
CALL METHOD cl_gui_frontend_services=>clipboard_export
IMPORTING
data = it_2[]
CHANGING
rc = l_rc
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
CALL METHOD OF h_excel 'Cells' = w_cell1
EXPORTING
#1 = 1
#2 = 1.
CALL METHOD OF h_excel 'Cells' = w_cell2
EXPORTING
#1 = 1
#2 = 1.
CALL METHOD OF h_excel 'Range' = range
EXPORTING
#1 = w_cell1
#2 = w_cell2.
CALL METHOD OF range 'Select'.
CALL METHOD OF worksheet 'Paste'.
gv_sheet_name = 'Blocked Orders'.
GET PROPERTY OF h_excel 'Sheets' = h_sheet3 .
CALL METHOD OF h_sheet3 'Add' = h_map.
SET PROPERTY OF h_map 'Name' = gv_sheet_name .
GET PROPERTY OF h_excel 'ACTIVESHEET' = worksheet.
*--Formatting the area of additional data 1 and doing the BOLD
CALL METHOD OF h_excel 'Cells' = w_cell1
EXPORTING
#1 = 1
#2 = 1.
CALL METHOD OF h_excel 'Cells' = w_cell2
EXPORTING
#1 = 1
#2 = 50.
CALL METHOD OF h_excel 'Range' = h_cell
EXPORTING
#1 = w_cell1
#2 = w_cell2.
GET PROPERTY OF h_cell 'Font' = gs_font .
SET PROPERTY OF gs_font 'Bold' = 1 .
GET PROPERTY OF h_cell 'Interior' = e_color.
SET PROPERTY OF e_color 'ColorIndex' = 45.
CALL METHOD cl_gui_frontend_services=>clipboard_export
IMPORTING
data = it_3[]
CHANGING
rc = l_rc
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
CALL METHOD OF h_excel 'Cells' = w_cell1
EXPORTING
#1 = 1
#2 = 1.
CALL METHOD OF h_excel 'Cells' = w_cell2
EXPORTING
#1 = 1
#2 = 1.
CALL METHOD OF h_excel 'Range' = range
EXPORTING
#1 = w_cell1
#2 = w_cell2.
CALL METHOD OF range 'Select'.
CALL METHOD OF worksheet 'Paste'.
*--- disconnect from Excel
FREE OBJECT h_zl.
FREE OBJECT h_mapl.
FREE OBJECT h_map.
FREE OBJECT h_excel.
Thanks,
Krishna..
Maybe you are looking for
-
Hp officejet pro 576 prints but won't scan
Friends, We recently bought and installed an HP Office Jet Pro x576 dw. After initial setup, it seemed to work fine. Shortly afterwards, however, the scanning to computer feature has failed. Here is what I have tried so far: I uninstalled and rein
-
i have one doubt i have 4 table this table have record a is 11,b is 3,c is 1 and d_city is 0 and field is a(city_code,name ,dept) b(dept,dname) c(dept,salary) d_city(city_code,city_name) all table dont have index,con. ect just simple create.. my quer
-
My lenovo t520 just came back from the repair center to get a new motherboard and I have started noticing a weird issue with the screen. Whenever I go on a website that is primarily dark (like the bckground is black), the screen gets quite dark. And
-
W7 won't load or unstable..help
I have just put together a new computer using an MSI GD80 motherboard, OCZ Agility 60Gb HD, i5 750 CPU, 4GB Mushkin 12900 mem, Corsair H50 CPU water cooler and HX850W PSU. On initial boot up I went into the bios and set the Integrated Peripheral IDE/
-
I am looking for best practice advice. In a network I have two Nexus 5548UP switches that are connected together with a port channel. I have created a layer 3 link over the port channel using vlan 1152 192.168.150.8/30. A management vlan has been