Error -2147417851 when writing report to Excel
I have taken the Active-X example code where a table is written to Excel and a macro is run and adjusted it to fit my purposes. In my case, an array is written to an Excel file and thereafter a macro is run which creates some graphs and a report. This works fine on my computer with Windows 95. But, when running it on the computer it is supposed to be used on, Excel gives an access error 0xc0000005 just before a copy operation resulting in the "error -2147417851 ocurred at the server through an exception at my.vi". I am using LabVIEW full development 6.1, Windows NT 4 with the latest SP and Office 97 SP2 both wit and without all upgrades. However, if I change my macro so that it doesn't do the copy operation, it works just fi
ne, and the error is delayed until I close the document. Since my LabVIEW vi ends when the macro is completed, I don't get any error in LabVIEW.
I have searched Microsoft technet and tried the suggestions I found there, read all similar problems I could find here (I found four) but nothing seems to help. I have also tried it on a machine with XP and Office 97 SP2. The macro works fine there without modification and LabVIEW ends without error and I can even close my Excel document without errors, but when I try to quit Excel I get the same error message as always, only a different address.
I have tried to terminate the refnums in different order, inserted a delay and so on, but nothing seems to help. I still believe the error is related to LabVIEW, since my macro runs without error when launched from Excel, but I encounter the same error if the macro is launched from Excel with LabVIEW open in the background, even without open vi:s.
I have run out of ideas, and even if I am abl
e to create the reports, it doesn't feel good when Excel crashes every time. Any help would be much appreciated.
Thanks
Hi Paol,
Try looking at this answer posted a while ago it may help.
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RNAME=ViewQuestion&HOID=506500000008000000192E0000&ECategory=LabVIEW.LabVIEW+General
Similar Messages
-
internal error problem when writing table:
Hi,
When my user try to access BEx queries, he is getting the following pop up messages
<internal error> problem when writing table: C_T_VARIABLES
<internal error> problem when writing table: E_T_DIM
<internal error> problem when writing table: E_T_MEM
<internal error> problem when writing table: E_T_ATR
<internal error> problem when writing table: E_T_PRPTYS
<internal error> problem when writing table: C_T_HRY_TYPES
<internal error> problem when writing table: E_T_CEL
<internal error> problem when writing table: E_T_FAC
<internal error> problem when writing table: E_T_CON
<internal error> problem when writing table: E_T_DRILL
and then report is getting diplayed. and when user try to edit properties again same pop up messages are coming.
when I access queries from my machine those are working fine..
Can some one help me to solve this ?
Regards,
HarishHi Harish,
Please go through following relevant threads ::
http://forums.sdn.sap.com/thread.jspa?threadID=137355
http://forums.sdn.sap.com/thread.jspa?threadID=644834
http://forums.sdn.sap.com/thread.jspa?threadID=1199718
http://forums.sdn.sap.com/thread.jspa?threadID=36530
Regards,
Arpit -
Internal error occured when writing
Hi all
I successfully imported an APO planning area into the quality systems, however the same request ends with error 12 in the production system. Landscape is SCM 5.0 sp8 with BI 7.0 sp12. When i checked the import job RDDEXECL (user DDIC), it shows:
Date Time Message text Message class Message no. Message type
07/08/2007 00:02:57 Job started 00 516 S
07/08/2007 00:02:57 Step 001 started (program RDDEXECL, variant , user ID DDIC) 00 550 S
07/08/2007 00:02:57 All DB buffers of application server <server_name> were synchronized PU 170 S
07/08/2007 00:03:17 <b>Internal error occurred when writing</b> D0 054 E
07/08/2007 00:03:17 Job cancelled after system exception ERROR_MESSAGE 00 564 A
I thought there will be an ABAP dump, I found this internal error (in bold in the log above). I tried searching for info on this but no help, it does not says error writing to what? Please help.
Thanks
AliIt seems a syncronization problem..
You can create a customer message providing the following information:
1. The symptoms that occurred
2. The highest Support Package
3. The current SAP_BASIS Support Package level
4. The queue that is currently selected
Header Data -
Open Hub DTP issue (Error 21 when writing to the local workstation)
Hi,
I am using an openhub destination to output my csv file. Its a local workstation share folder. Data Provider got around 50000 rows (expecting a 40MB file). When ever I execute the DTP, it run for first data package and fell down with below error message.
Error 21 when writing to the local workstation
Error while updating to target XXXXXXX (type Open Hub Destination)
Operation could not be carried out for
Exception CX_RS_FAILED logged
Exception CX_RS_FAILED logged
Sometimes the file get created with partial entries, most of the times the file wont even get created. I created new dtps and tried the same. Changed the package size, servers, parallel processes etc, but of no use.
Thanks NeoHi Neo,
Did you try to define the logical/physcal file path from tcode FILE? If not can you try to use this option and see if it works.
Also can you change your DTP settings by reducing the data packet size to see if your facing this error message?
Thanks
Abhishek Shanbhogue -
Internal error occurred when writing
Hi,
We have a brand new sandbox setup and I am trying to create a planning Object Structure. I added the objects and checked for errors, I got no errors. But when I try to activate the POS, I am getting the following error:
Internal error occurred when writing
Message no. D0054
Can somebody help me identify what the problem is?
Thanks.Hello Raj -
Look at the following note
647603 if you are using SCM 4.0.
Apply the corrections this might help.
Also if you are using SCM 5.0 try to go thru the post installation steps and you will come across activation of infoobjects that are relevant and are needed for POS.
Perform the steps as described and the message shud go away.
Hope this helps.
Regards,
Suresh Garg -
Fatal Error when exporting Report to Excel
Hi Everyone, I've been trying to export my report to excel. But I have exhausted all possible reasons and I just couldn't figure it out. Can someone please help me. Thanks in advance.
PROGRAM NAME : ZADC_PAYSUMNEW
REPORT ZADC_PAYSUMNEW
NO STANDARD PAGE HEADING
LINE-SIZE 450
LINE-COUNT 65 MESSAGE-ID zmes.
TABLE DECLARATION *
TABLES: cskt,
csks,
pa0009,
pcl1,
pcl2,
pernr,
t512t,
t549a,
t527x,
zhrprtype.
INFOTYPES DECLARATION
INFOTYPES: 0001, 0002.
INCLUDE DECLARATION
INCLUDE: rpc2rx00.
INCLUDE: rpc2rxx0.
INCLUDE: rpppxd00.
INTERNAL TABLE DECLARATION
DATA: BEGIN OF itab OCCURS 0,
khinr LIKE csks-khinr,
kostl LIKE p0001-kostl,
ltext(40),
p_date LIKE pc261-inper,
basic(7) TYPE p DECIMALS 2,
pera(7) TYPE p DECIMALS 2,
longp(7) TYPE p DECIMALS 2,
trall(6) type p decimals 2,
srvaw(6) TYPE p DECIMALS 2,
chall(7) TYPE p DECIMALS 2,
leave(7) TYPE p DECIMALS 2,
meal(7) TYPE p DECIMALS 2,
saldf(7) TYPE p DECIMALS 2,
sipps(7) TYPE p DECIMALS 2,
sipgs(7) TYPE p DECIMALS 2,
subs(7) TYPE p DECIMALS 2,
hzard(7) TYPE p DECIMALS 2,
lallw(7) TYPE p DECIMALS 2,
medps(7) TYPE p DECIMALS 2,
medgs(7) TYPE p DECIMALS 2,
pcontps(7) TYPE p DECIMALS 2,
pcontgs(7) TYPE p DECIMALS 2,
pagibps(6) TYPE p DECIMALS 2,
pagibgs(6) TYPE p DECIMALS 2,
lwop(7) TYPE p DECIMALS 2,
npay(7) TYPE p DECIMALS 2,
otime(7) TYPE p DECIMALS 2,
ec(7) TYPE p DECIMALS 2,
fr_date like sy-datum,
to_date like sy-datum,
END OF itab.
DATA: BEGIN OF jtab OCCURS 0,
khinr LIKE csks-khinr,
kostl LIKE p0001-kostl,
ltext(40),
basic(7) TYPE p DECIMALS 2,
pera(7) TYPE p DECIMALS 2,
longp(7) TYPE p DECIMALS 2,
trall(6) type p decimals 2,
srvaw(6) TYPE p DECIMALS 2,
chall(7) TYPE p DECIMALS 2,
leave(7) TYPE p DECIMALS 2,
meal(7) TYPE p DECIMALS 2,
saldf(7) TYPE p DECIMALS 2,
sipps(7) TYPE p DECIMALS 2,
sipgs(7) TYPE p DECIMALS 2,
subs(7) TYPE p DECIMALS 2,
hzard(7) TYPE p DECIMALS 2,
lallw(7) TYPE p DECIMALS 2,
medps(7) TYPE p DECIMALS 2,
medgs(7) TYPE p DECIMALS 2,
pcontps(7) TYPE p DECIMALS 2,
pcontgs(7) TYPE p DECIMALS 2,
pagibps(6) TYPE p DECIMALS 2,
pagibgs(6) TYPE p DECIMALS 2,
lwop(7) TYPE p DECIMALS 2,
npay(7) TYPE p DECIMALS 2,
otime(7) TYPE p DECIMALS 2,
ec(7) TYPE p DECIMALS 2,
END OF jtab.
DATA: it_list TYPE STANDARD TABLE OF itab WITH HEADER LINE.
CONSTANTS DECLARATION
CONSTANTS: basic TYPE pc207-lgart VALUE '0401',
basic2 TYPE pc207-lgart VALUE '0402',
basic3 TYPE pc207-lgart VALUE '0403',
PERA TYPE pc207-lgart VALUE '3104',
PERA2 TYPE pc207-lgart VALUE '3110',
longp TYPE pc207-lgart VALUE '1601',
longp2 TYPE pc207-lgart VALUE '1603',
trall TYPE pc207-lgart VALUE '3109',
srvaw TYPE pc207-lgart VALUE '2117',
leave TYPE pc207-lgart VALUE '2118',
chall TYPE pc207-lgart VALUE '3105',
chall2 TYPE pc207-lgart VALUE '3111',
chall3 TYPE pc207-lgart VALUE '3112',
meal TYPE pc207-lgart VALUE '3102',
saldf TYPE pc207-lgart VALUE '4103',
sipps TYPE pc207-lgart VALUE '/090',
sipps2 TYPE pc207-lgart VALUE '1121',
subs TYPE pc207-lgart VALUE '3101',
hzard TYPE pc207-lgart VALUE '1602',
lallw TYPE pc207-lgart VALUE '3103',
medps TYPE pc207-lgart VALUE '/313',
medgs TYPE pc207-lgart VALUE '/314',
pcontps TYPE pc207-lgart VALUE '/093',
pcontps2 TYPE pc207-lgart VALUE '1327',
pcontps3 TYPE pc207-lgart VALUE '1120',
pagibps TYPE pc207-lgart VALUE '/326',
pagibps2 TYPE pc207-lgart VALUE '1326',
lwop TYPE pc207-lgart VALUE '1102',
otime TYPE pc207-lgart VALUE '0101',
otime2 TYPE pc207-lgart VALUE '0102',
otime3 TYPE pc207-lgart VALUE '0103',
otime4 TYPE pc207-lgart VALUE '0104',
npay TYPE pc207-lgart VALUE '/559'.
DATA DECLARATION
DATA: BEGIN OF COMMON PART buffer.
INCLUDE: rpppxd10.
DATA: END OF COMMON PART buffer.
*Table data containing directory to PCL2 payroll results file DATA:
DATA: BEGIN OF rgdir OCCURS 100.
INCLUDE STRUCTURE pc261.
DATA: END OF rgdir.
DATA: BEGIN OF evpdir OCCURS 100.
INCLUDE STRUCTURE pc261.
DATA: END OF evpdir.
DATA: country LIKE t001p-molga,
lname LIKE t527x-orgtx,
filename2(128),
p_date LIKE pc261-inper,
w_basic LIKE pc207-lgart,
w_basic2 LIKE pc207-lgart,
w_basic3 LIKE pc207-lgart,
w_pera LIKE pc207-lgart,
w_pera2 LIKE pc207-lgart,
w_longp LIKE pc207-lgart,
w_longp2 LIKE pc207-lgart,
w_trall LIKE pc207-lgart,
w_srvaw LIKE pc207-lgart,
w_leave LIKE pc207-lgart,
w_chall LIKE pc207-lgart,
w_chall2 LIKE pc207-lgart,
w_chall3 LIKE pc207-lgart,
w_meal LIKE pc207-lgart,
w_saldf LIKE pc207-lgart,
w_sipps LIKE pc207-lgart,
w_sipps2 LIKE pc207-lgart,
w_subs LIKE pc207-lgart,
w_hzard LIKE pc207-lgart,
w_lallw LIKE pc207-lgart,
w_medps LIKE pc207-lgart,
w_medgs LIKE pc207-lgart,
w_pcontps LIKE pc207-lgart,
w_pcontps2 LIKE pc207-lgart,
w_pcontps3 LIKE pc207-lgart,
w_pagibps LIKE pc207-lgart,
w_pagibps2 LIKE pc207-lgart,
w_lwop LIKE pc207-lgart,
w_otime LIKE pc207-lgart,
w_otime2 LIKE pc207-lgart,
w_otime3 LIKE pc207-lgart,
w_otime4 LIKE pc207-lgart,
w_npay LIKE pc207-lgart,
tempgs(7) TYPE p DECIMALS 2,
ctr-basic(7) TYPE p DECIMALS 2,
ctr-pera(7) TYPE p DECIMALS 2,
ctr-longp(7) TYPE p DECIMALS 2,
ctr-trall(6) TYPE p DECIMALS 2,
ctr-srvaw(6) TYPE p DECIMALS 2,
ctr-leave(7) TYPE p DECIMALS 2,
ctr-chall(7) TYPE p DECIMALS 2,
ctr-meal(7) TYPE p DECIMALS 2,
ctr-saldf(7) TYPE p DECIMALS 2,
ctr-sipps(7) TYPE p DECIMALS 2,
ctr-sipgs(7) TYPE p DECIMALS 2,
ctr-subs(7) TYPE p DECIMALS 2,
ctr-hzard(7) TYPE p DECIMALS 2,
ctr-lallw(7) TYPE p DECIMALS 2,
ctr-medps(7) TYPE p DECIMALS 2,
ctr-medgs(7) TYPE p DECIMALS 2,
ctr-pcontps(7) TYPE p DECIMALS 2,
ctr-pcontgs(7) TYPE p DECIMALS 2,
ctr-pagibps(6) TYPE p DECIMALS 2,
ctr-pagibgs(6) TYPE p DECIMALS 2,
ctr-lwop(7) TYPE p DECIMALS 2,
ctr-otime(7) TYPE p DECIMALS 2,
ctr-npay(7) TYPE p DECIMALS 2,
ctr-ec(7) TYPE p DECIMALS 2.
DATA: BEGIN OF ph-version.
INCLUDE STRUCTURE pc201_pay. "XTWPH9K008656
DATA: END OF ph-version.
DATA: fr_date LIKE sy-datum,
to_date LIKE sy-datum.
SELECT-OPTIONS and PARAMETERS
SELECT-OPTIONS: p_status FOR rgdir-srtza DEFAULT 'A'.
DATA: DATE1(15),
mon(9).
DEFINITION
DEFINE rp-imp-c2-rx2.
clear:
orx-version, "OBJECTS_FOR_CLEAR
rt, rt[].
import
ph-version to orx-version "OBJECTS_FOR_IMPORT
rt
from database pcl2(ph) id rx-key using pcl2_exp_imp.
rp-imp-rx-subrc = sy-subrc.
if sy-subrc eq 0 and orx-version-number ne ph-version-number.
rp-imp-rx-subrc = 8.
endif.
END-OF-DEFINITION.
TYPE-POOLS: slis.
DATA: g_repid LIKE sy-repid,
gt_fieldcat TYPE slis_t_fieldcat_alv,
gt_events TYPE slis_t_event,
gt_top TYPE slis_t_listheader,
gt_eol TYPE slis_t_listheader,
gt_list_top_of_page TYPE slis_t_listheader,
gt_list_end_of_list TYPE slis_t_listheader,
gs_layout TYPE slis_layout_alv,
d_f2code LIKE sy-ucomm VALUE '&ETA'.
CONSTANTS: fn_top TYPE slis_formname VALUE 'TOP_OF_PAGE',
fn_eol TYPE slis_formname VALUE 'END_OF_LIST'.
DATA: it_alv_out TYPE STANDARD TABLE OF itab WITH HEADER LINE.
INITIALIZATION.
g_repid = sy-repid.
PERFORM f_fieldcat_init USING gt_fieldcat[].
PERFORM eventtab_build USING gt_events[].
START-OF-SELECTION.
START-OF-SELECTION.
fr_date = to_date = pn-endda.
fr_date+6(2) = '01'.
SELECT SINGLE * FROM t549a
WHERE abkrs = pnpxabkr.
GET PERNR.
CLEAR: itab, lname.
PERFORM get_rt_tab.
END-OF-SELECTION.
PERFORM display_grid.
INCLUDE rpppxm00.
USING DATM
FORM get_rt_tab *
FORM get_rt_tab.
rp_provide_from_last p0001 space pn-begda pn-endda.
rp_provide_from_last p0002 space pn-begda pn-endda.
CALL FUNCTION 'CU_READ_RGDIR'
EXPORTING
persnr = p0001-pernr
IMPORTING
molga = country
TABLES
in_rgdir = rgdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
IF sy-subrc = 0.
SELECT single ltext FROM cskt
INTO itab-ltext
WHERE kostl = p0001-kostl
AND datbi = '99991231'.
SELECT SINGLE * FROM csks
WHERE kostl = p0001-kostl
AND kokrs = 'GSIS'
AND datbi = '99991231'.
IF sy-subrc = 0.
MOVE: csks-kostl TO itab-kostl,
csks-khinr TO itab-khinr.
ENDIF.
p_date = pn-paper.
regular payroll run.
CALL FUNCTION 'CD_EVALUATION_PERIODS'
EXPORTING
bonus_date = '00000000'
inper_modif = t549a-permo
inper = p_date
pay_type = ' '
pay_ident = ' '
TABLES
rgdir = rgdir
evpdir = evpdir
EXCEPTIONS
no_record_found = 1
OTHERS = 2.
IF sy-subrc = 0.
LOOP AT evpdir WHERE srtza IN p_status and FPPER eq pn-begda+(6).
rx-key-pernr = p0001-pernr.
rx-key-seqno = evpdir-seqnr.
rp-imp-c2-rx2.
IF rp-imp-rx-subrc = 0.
PERFORM rt_to_itab.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDFORM.
FORM PRINT_RX *
FORM print_rx.
LOOP AT rt.
PERFORM re512t USING country rt-lgart.
ENDLOOP.
ENDFORM.
FORM RE512T *
--> VALUE(COUNTRY_GROUPING) *
--> VALUE(WTYPE) *
FORM re512t USING value(country_grouping)
value(wtype).
CHECK t512t-sprsl NE sy-langu
OR t512t-molga NE country_grouping
OR t512t-lgart NE wtype.
SELECT SINGLE * FROM t512t
WHERE sprsl EQ sy-langu
AND molga EQ country_grouping
AND lgart EQ wtype.
IF sy-subrc NE 0.
CLEAR t512t.
ENDIF.
ENDFORM.
FORM rt_to_itab *
FORM rt_to_itab.
MOVE: basic TO w_basic,
basic2 TO w_basic2,
basic3 TO w_basic3,
pera TO w_pera,
pera2 TO w_pera2,
longp TO w_longp,
longp2 TO w_longp2,
srvaw TO w_srvaw,
leave TO w_leave,
trall TO w_trall,
chall TO w_chall,
chall2 TO w_chall2,
chall3 TO w_chall3,
meal TO w_meal,
saldf TO w_saldf,
sipps TO w_sipps,
sipps2 TO w_sipps2,
subs TO w_subs,
hzard TO w_hzard,
lallw TO w_lallw,
medps TO w_medps,
medgs TO w_medgs,
pcontps TO w_pcontps,
pcontps2 TO w_pcontps2,
pcontps3 TO w_pcontps3,
pagibps TO w_pagibps,
pagibps2 TO w_pagibps2,
LWOP TO w_lwop,
otime TO w_otime,
otime2 TO w_otime2,
otime3 TO w_otime3,
otime4 TO w_otime4,
npay TO w_npay.
LOOP AT rt WHERE lgart = w_basic or lgart = w_basic2
or lgart = w_basic3.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-basic.
itab-ec = rt-betrg / 100.
if itab-ec > 100.
itab-ec = 100.
ENDIF.
ENDLOOP.
LOOP AT rt WHERE lgart = w_pera.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-pera.
ENDLOOP.
LOOP AT rt WHERE lgart = w_pera2.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-pera.
ENDLOOP.
LOOP AT rt WHERE lgart = w_longp or lgart = w_longp2.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-longp.
ENDLOOP.
LOOP AT rt WHERE lgart = w_trall.
if rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
endif.
ADD: rt-betrg TO itab-trall.
ENDLOOP.
LOOP AT rt WHERE lgart = w_srvaw.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-srvaw.
ENDLOOP.
LOOP AT rt WHERE lgart = w_leave.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-leave.
ENDLOOP.
LOOP AT rt WHERE lgart = w_chall or
lgart = w_chall2 or
lgart = w_chall3.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-chall.
ENDLOOP.
LOOP AT rt WHERE lgart = w_meal.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-meal.
ENDLOOP.
LOOP AT rt WHERE lgart = w_saldf.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-saldf.
ENDLOOP.
LOOP AT rt WHERE lgart = w_sipps or
lgart = w_sipps2.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-sipps.
itab-sipgs = itab-sipps / 9 * 12.
ENDLOOP.
LOOP AT rt WHERE lgart = w_subs.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-subs.
ENDLOOP.
LOOP AT rt WHERE lgart = w_hzard.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-hzard.
ENDLOOP.
LOOP AT rt WHERE lgart = w_lallw.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-lallw.
ENDLOOP.
LOOP AT rt WHERE lgart = w_medps.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-medps.
ENDLOOP.
LOOP AT rt WHERE lgart = w_medgs.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
MOVE: rt-betrg TO tempgs.
itab-medgs = itab-medps.
ENDLOOP.
LOOP AT rt WHERE lgart = w_pcontps OR
lgart = w_pcontps2 OR
lgart = w_pcontps3.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-pcontps.
ENDLOOP.
itab-pcontgs = itab-pcontps * 9.
LOOP AT rt WHERE lgart = w_pagibps OR
lgart = w_pagibps2.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-pagibps.
ENDLOOP.
LOOP AT rt WHERE lgart = w_pagibps.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-pagibgs.
ENDLOOP.
LOOP AT rt WHERE lgart = w_lwop.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-lwop.
ENDLOOP.
LOOP AT rt WHERE lgart = w_otime or
lgart = w_otime2 or
lgart = w_otime3 or
lgart = w_otime4.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-otime.
ENDLOOP.
LOOP AT rt WHERE lgart = w_npay.
IF rt-betrg < 0.
rt-betrg = abs( rt-betrg ).
ENDIF.
ADD: rt-betrg TO itab-npay.
ENDLOOP.
COLLECT itab.
CLEAR: itab.
REFRESH rt.
ENDFORM. " rt_to_itab
*& Form f_fieldcat_init
text
-->P_GT_FIELDCAT[] text
FORM f_fieldcat_init USING rt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: ls_fieldcat TYPE slis_fieldcat_alv.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 1.
ls_fieldcat-reptext_ddic = ' FXNAL Group'.
ls_fieldcat-fieldname = 'KHINR'.
ls_fieldcat-ref_tabname = 'ITAB'.
ls_fieldcat-outputlen = 12.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 2.
ls_fieldcat-reptext_ddic = ' OFFICE'.
ls_fieldcat-fieldname = 'LTEXT'.
ls_fieldcat-ref_tabname = 'ITAB'.
ls_fieldcat-outputlen = 40.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 3.
ls_fieldcat-reptext_ddic = ' RC #'.
ls_fieldcat-fieldname = 'KOSTL'.
ls_fieldcat-ref_tabname = 'ITAB'.
ls_fieldcat-outputlen = 5.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 4.
ls_fieldcat-reptext_ddic = 'Basic Salary'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'BASIC'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 5.
ls_fieldcat-reptext_ddic = 'PERA Allow'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'PERA'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 6.
ls_fieldcat-reptext_ddic = 'Longevity Pay'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'LONGP'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 7.
ls_fieldcat-reptext_ddic = 'Service Award'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'SRVAW'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 8.
ls_fieldcat-reptext_ddic = 'Child Allowance'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'CHALL'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 9.
ls_fieldcat-reptext_ddic = 'Leave Mone'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'LEAVE'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 10.
ls_fieldcat-reptext_ddic = 'Over-time'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'OTIME'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 11.
ls_fieldcat-reptext_ddic = 'Meal Subsidy'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'MEAL'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 12.
ls_fieldcat-reptext_ddic = 'Salary Diff.'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'SALDF'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 13.
ls_fieldcat-reptext_ddic = 'Subsistence'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'SUBS'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 14.
ls_fieldcat-reptext_ddic = 'Hazard Pay'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'HZARD'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
ls_fieldcat-col_pos = 15.
ls_fieldcat-reptext_ddic = 'Laundry Allow'.
ls_fieldcat-tabname = 'ITAB'.
ls_fieldcat-fieldname = 'LALLW'.
ls_fieldcat-datatype = 'CURR'.
ls_fieldcat-outputlen = 15.
APPEND ls_fieldcat TO rt_fieldcat.
ENDFORM. " f_fieldcat_init
*& Form display_grid
text
--> p1 text
<-- p2 text
FORM display_grid.
SORT itab BY kostl khinr.
LOOP AT itab.
AT NEW khinr.
MOVE-CORRESPONDING itab TO jtab.
APPEND jtab.
ENDAT.
ENDLOOP.
PERFORM my_top USING gt_top[].
PERFORM build_layout USING gs_layout.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
TABLES
t_outtab = itab.
ENDFORM. " display_grid
*& Form eventtab_build
text
-->P_GT_EVENTS[] text
FORM EVENTTAB_BUILD USING my_events TYPE SLIS_T_EVENT.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 1
IMPORTING
et_events = my_events.
*TOP OF PAGE
READ TABLE my_events
WITH KEY NAME = slis_ev_top_of_page
INTO LS_EVENT.
IF SY-SUBRC = 0.
MOVE fn_top TO ls_event-form.
APPEND ls_event TO my_events.
ENDIF.
CLEAR ls_event.
*END OF LIST
READ TABLE my_events
WITH KEY name = slis_ev_end_of_list
INTO ls_event.
IF sy-subrc = 0.
MOVE fn_eol TO ls_event-form.
APPEND ls_event TO my_events.
ENDIF. " SY-SUBRC for READ TABLE
ENDFORM. " eventtab_build
*& Form top_comment
text
-->P_MYTOP[] text
FORM top_comment USING my_top_of_page TYPE slis_t_listheader.
DATA: it_t247 LIKE t247 OCCURS 0 WITH HEADER LINE.
DATA: ls_line TYPE slis_listheader,
li_recs TYPE i,
lc_name(60) TYPE c,
lc_from(30) TYPE c,
lc_to(30) TYPE c.
CALL FUNCTION 'MONTH_NAMES_GET'
TABLES
month_names = it_t247.
Company Name
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = TEXT-001.
APPEND ls_line TO my_top_of_page.
CLEAR ls_line.
ls_line-typ = 'S'.
ls_line-info = TEXT-002.
APPEND ls_line TO my_top_of_page.
Date
CLEAR lc_name.
CONCATENATE sy-datum+6(2) ',' INTO lc_name.
READ TABLE it_t247 WITH KEY mnr = sy-datum+4(2).
CONCATENATE text-003 it_t247-ltx lc_name sy-datum(4)
INTO lc_name SEPARATED BY space.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = lc_name.
APPEND ls_line TO my_top_of_page.
ENDFORM. " top_comment
*& Form build_layout
text
-->P_GS_LAYOUT text
FORM build_layout USING my_layout TYPE slis_layout_alv.
my_layout-f2code = d_f2code.
my_layout-reprep = 'X'.
my_layout-confirmation_prompt = 'X'.
my_layout-flexible_key = 'X'.
ENDFORM. " build_layout
*& Form TOP_OF_PAGE
Writes comments on top of page
FORM top_of_page.
DATA: ls_line TYPE slis_listheader,
lc_name(60) TYPE c.
IF sy-ucomm = '&RNT_PREV'.
READ TABLE gt_top INTO ls_line INDEX 2.
lc_name = ls_line-info.
WRITE 'Page:' TO lc_name+45(5).
WRITE sy-pagno TO lc_name+52(5).
ls_line-typ = 'H'.
ls_line-info = lc_name.
MODIFY gt_top FROM ls_line INDEX 2.
ENDIF.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_top.
ENDFORM. " TOP_OF_PAGE
*& Form my_top
text
-->P_GT_TOP[] text
FORM my_top USING top TYPE slis_t_listheader.
DATA: it_t247 LIKE t247 OCCURS 0 WITH HEADER LINE.
DATA: ls_line TYPE slis_listheader,
li_recs TYPE i,
lc_name(60) TYPE c,
lc_from(30) TYPE c,
lc_to(30) TYPE c.
CALL FUNCTION 'MONTH_NAMES_GET'
TABLES
month_names = it_t247.
Company Name
CLEAR lc_name.
WRITE text-001 TO lc_name.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = lc_name.
APPEND ls_line TO top.
**Report Name
CLEAR lc_name.
WRITE text-002 TO lc_name.
CLEAR ls_line.
ls_line-typ = 'H'.
ls_line-info = lc_name.
APPEND ls_line TO top.
Range of date
CLEAR lc_name.
lc_name = p_date+4(2).
READ TABLE it_t247 WITH KEY mnr = p_date+4(2).
CONCATENATE: text-003 it_t247-ltx sy-datum(4)
INTO lc_name SEPARATED BY SPACE.
ls_line-typ = 'H'.
ls_line-info = lc_name.
APPEND ls_line TO top.
ENDFORM. " my_top
*& Form END_OF_LIST
Writes signature line at end of list
FORM end_of_list.
IF sy-ucomm = '&RNT_PREV' OR sy-ucomm = 'AUSW'.
REFRESH gt_eol.
PERFORM my_eol USING gt_eol[].
ELSE.
REFRESH gt_eol.
ENDIF.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_eol
i_end_of_list_grid = 'X'.
ENDFORM. " END_OF_LIST
*& Form my_eol
text
-->P_GT_EOL[] text
FORM my_eol USING eol TYPE slis_t_listheader.
DATA: ls_line TYPE slis_listheader,
lc_name(60) TYPE c.
Signature Line
CLEAR lc_name.
lc_name = '.'.
ls_line-typ = 'H'.
ls_line-info = lc_name.
APPEND ls_line TO eol.
CLEAR lc_name.
ls_line-typ = 'H'.
ls_line-info = lc_name.
APPEND ls_line TO eol.
CLEAR ls_line.
ls_line-typ = 'H'.
WRITE 'Submitted By:' TO lc_name(28).
WRITE 'Noted By:' TO lc_name+30(28).
ls_line-info = lc_name.
APPEND ls_line TO eol.
CLEAR: lc_name, ls_line-key.
lc_name = '.'.
ls_line-typ = 'H'.
ls_line-info = lc_name.
APPEND ls_line TO eol.
CLEAR lc_name. CLEAR ls_line.
WRITE sy-uline(28) TO lc_name(28).
WRITE sy-uline(28) TO lc_name+30(28).
ls_line-typ = 'H'.
ls_line-info = lc_name.
APPEND ls_line TO eol.
ENDFORM. " my_eol1.U are not getting the data into Excel when u client Excel Buttton from the ALV display ?
2.if yes then u will get one message stating that templet is Missing like this ?
Regards
prabhu -
Error while exporting crystal report to excel format or word format
i am using vs 2010 and sap crystal report(version 13.0.0.99) for vs 2010. when i export report to excel(97-2003 format) from crystalreportviewer, i am getting error that application has stopped working. I also have ms-office 2007 install on my pc.
when i see eventlog of system i notice following error:
Faulting application name: NBFCForms.exe, version: 1.0.0.0, time stamp: 0x4e170b01
Faulting module name: crxf_xls.dll, version: 13.0.0.99, time stamp: 0x4cc412ac
Exception code: 0xc0000409
Fault offset: 0x0009742e
Faulting process id: 0xc60
Faulting application start time: 0x01cc3e1e5657a4a4
Faulting application path: C:\Users\Harshada\Desktop\NBFCDeploy\NBFCForms.exe
Faulting module path: C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\crxf_xls.dll
Report Id: f0bae850-aa11-11e0-a98e-0019d144259bThanks Roberto and Kalpana.
This link solved the problem:
http://social.msdn.microsoft.com/Forums/en-US/bcf792f4-4da3-4dac-b689-60168e695683/error-internet-explorer-cannot-download-edreportviewerwebcontrolaxd-from-site?forum=vsreportcontrols -
Error while designing Deski reports using excel 2010(xslx) as data source
Hi All
We are using BOXI R3.3 on Windows 2003 Server.
When we are trying to create DESKTOP INTELLIGENCE REPORTS using EXCEL 2010(xlsx) format prompting with below error.
"Cannot update.Database or object is read only(3207) "
Could you please clarify whether BOXI supports MS EXCEL 2010 version(xslx) version or not?
If not what is the work around for this?
Regards
boseHere is what Supported Platforms Guide says : Microsoft Office 2010 (starting with FP 3.4)**
As you are on FP3.3, Office 2010 is not supported in your implementation.
You need to either upgrade, or use pre-Office 2010 formats. -
Error message when clicking hyperlink in Excel file
Hi all,
I am working on SSRS 2012. In main report having hyperlink. When click this hyperlink in browser (IE 11 or Chrome), it open sub report correctly.
But once i download the main report to Excel 2013 and click hyperlink, it can't open sub report.
I am getting following error message in Excel file.
Unable to open "http://...". Cannot download the information you requested.
In SSRS 2005, it is working fine.
How can i fix this issue in SSRS 2012?
Thanks,
Raja Shekhar ReddyHi Raja,
After testing the issue in my environment, I can reproduce the error message in Excel 2013. When the user who have no access to the report, it would display the error message that “Unable to open "http://...". Cannot download the information you requested.”
when he click the hyperlink in Excel. So we can try to directly type the URL in browser to make sure the users have view permission to the report.
Reference:
Tutorial: Setting Permissions in Reporting Services
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
I am using the save report.vi to save a Test result. When I start the test the first time, the file is deleted before saving. When I start it more often i receive and Error 8 at the delete file.
Because i ignore the error, save Report.vi opens a dialogue for replace or cancel. Replacing will overwrite the file.
When i stop the program and run it again, I do not receive the error or the dialog box for the fist saving action again.
I tried some application to delete the refnum but i couldn't. So what can i do to delete the file?
Attachments:
Report_save.zip 957 KBHi,
I've had a look at your application and the access denied error stopped when I closed the file.
Your application can't delete the file because it is still open. The first time, the file is not open so there is no problem but when you open it once, you're not allowed to delete it before closing the file.
To avoid this problem what you could do is go in the Save report to file vi (which is in your save report.vi) and close the file after writing into it.
See details on the picture attached.
Hope this helps !
Julien
Attachments:
Save_report_to_file.jpg 34 KB -
Error -2146827284 When Attempting to Open Excel Workbook
Using LabView 6.0 and OfficeXP's Excel... I am receiving an activex
error: -2146827284 when I try to programatically open an excel
workbook. The thing is, this is after I have previously opened
and closed another workbook via activex. I searched about this
error on the forums, and while there were a few entries there were no
hard solutions posted. Please help.Thanks for the help that fixed my problem for the initial error, but I
still get the same error when I am writing a U16 2-D array to a range
of cells. This is strange because the same code is used elsewhere and
does not throw the error, but the data type is instead a Dbl 2-D
array. Unfortunately, I am unable to post the code. It is
on a stand-alone classified pc. -
Error while exporting security report to Excel
Hi
We are using SAP BPC 7.5 MS sp07 version
In our application , particular user is unable to download/export the User security report to Excel.
I am able to do it successfully.
User encounters following error:
Unable to download …ed.ReportViewerWebControl.axd from servername.com
Unable to open this internet side. The requested site is either unavailable or cannot be found.
Please try again later.
can anyone please suggest?
Thanks,
Vanashree.Thanks Roberto and Kalpana.
This link solved the problem:
http://social.msdn.microsoft.com/Forums/en-US/bcf792f4-4da3-4dac-b689-60168e695683/error-internet-explorer-cannot-download-edreportviewerwebcontrolaxd-from-site?forum=vsreportcontrols -
Error 2032 when previewing report after apgrading to SP3
Dear experts,
I have a report that previously worked fine in 2008 SP1FP3 but now errors after upgrading to 2008 SP3. The report connects to an external data source using an XML Data refresh button sending some data to a URL and then loading a data table received back. The error message when previewing the report is as follows:
Cannot access external data
An error has occurred.
For more information , contact the file creator or your system administrator.
Error: Error no 2032
Connection Type: XML Data
Any advice will be appreciated...Hi,
the error 2032 is a general stream error. Did you mark your XML file as trusted in the adobe settings?:
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
Is the XML file on other domain than yours? Then you will need a crossdomain policy file on the root of that server:
http://ryangoodman.net/blog/index.php/2008/04/25/xcelsius_2008_cross_domain_policy_change
Regards
Victor -
Error when opening report in Excel
Hi all,
I'm trying to import an answer (which I made in OBI) to an Excel via sheet (Via the OBI office plugin).
So what I do is:
- I navigate to the report I want to open
- I expand the report so I can see all the views
- I double click the view I want to open
After doing this, I get following error:
Error while opening workbook. Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))
Can any of you help me with this issue?
Thank you very muchHi Srini,
Thanks for your reply, but -for the benefit of other readers- after some research we found that this issue seems to be caused by a Microsoft Office BUG, which is listed on their support website as Article ID 320369 ( BUG: "Old format or invalid type library" error when automating Excel )
The URL to access this article is: http://support.microsoft.com/kb/320369
Cheers!! -
Error while exporting BO Report to excel
Post Author: noble
CA Forum: .NET
When ever i try to export a Big BO 6.5 Report to (Almpst 8000 Pages ) to Excel 2003 I am getting BO Unhandiled exception. Anybody can advice how to solve this issue.Post Author: Argan
CA Forum: .NET
You will want to post this in the Business Intelligence section of the forums.
This forum is for .NET application integration, not BO or Enterprise specific issues.
Maybe you are looking for
-
IE9 problem linking to a specific tab
I have been happy with my website for almost a year now after asking a few questions relating to Tabbed panels and having my problems solved here. But I've realised there is a problem that didin't exist before! I have a Horizontal menu bar at the top
-
More Problems with my new computer
Well I'm beginning to think this new machine is acting very much like what happened back in 1996-97 when I rebuilt a Packard Bell Legend 1956 only to have the computer croak better than either a frog or my cartoon namesake on "South Park" because the
-
Formbuilder where does it work for sure?
I am finding that it is not true that formbuilder (11.1.1.4) is not compatible with 2008 r2 64 bits.... yet. I fear I will find out why it's not certified... sooner or later... But it is working with everything that should not work. 2008 r2 64 bits a
-
Flash CS3 w/ AS3 - Arrow key navagation help!
First, I'll appologize in advance for my lack of experience in Flash. I've used the product for about 2 weeks now to put a presentation together so my knowledge is still pretty thin. Here's my problem: I've created a Flash presentation that I hope to
-
How do I install Java on my iPad 2 ?