DoScript with a function as argument.
Is it possible to call functions in another script using doScript?
What I want to do is basically
ScriptA.funtionA= function() {
app.doScript(ScriptB.functionB);
When i try this I get the error message "ScriptB is undefined".
I defined it in ScriptB.jsx, but I guess that's not enough? I was under the impression that the script would be registered in InDesign during startup and then be reachable from other scripts.
Similar Messages
-
[AS] doScript with arguments
Hi,
I'm trying to execute a js script through applescript but can't get the syntax right.
I'd like to parse var myFolder to do script. Any hints?
Thanks
// execute js file
set myFile to choose file with prompt "Choose a script"
set myFolder to choose folder with prompt "Choose a folder"
display dialog "myFolder is " & myFolder
tell application "Finder"
set myFileExt to name extension of myFile
end tell
tell application "InDesignServer"
if myFileExt is "jsx" then
--call this method with argument myFolder?
do script myFile language javascript
else
--call this method with argument myFolder?
do script myFile language applescript language
end if
end tell
// js
// print arguments
i = 0;
while (i < withArguments.length) {
app.consoleout(withArguments[i]);
i++;Here below is example for doscript with arguments. Hope it will help you.
--DoScriptReturnValues.applescript
--An InDesign CS4 AppleScript
--Shows how to get values back from a script run using
--the do script command.
main()
on main()
mySetup()
mySnippet()
myTeardown()
end main
on mySetup()
end mySetup
on mySnippet()
tell application "Adobe InDesign CS4"
--<fragment>
set nameA to "ScriptArgumentA"
set nameB to "ScriptArgumentB"
set nAc to nameA & ": "
set nBc to nameB & ": "
--Create a string to be run as an AppleScript.
set p1 to "tell application \"Adobe InDesign CS4\"" & return
set p2 to "tell script args" & return
set p3 to "set value name \"ScriptArgumentA\" value "
set p4 to "\"This is the first AppleScript script argument value.\""
set p5 to "set value name \"ScriptArgumentB\" value "
set p6 to "\"This is the second AppleScript script argument value.\""
set p7 to "end tell" & return
set p8 to "end tell"
set myAppleScript to p1 & p2 & p3 & p4 & return & p5 & p6 & return & p7 & p8
--Run the AppleScript string.
do script myAppleScript language applescript language
--Retrieve the script argument values set by the script.
tell script args
set myScriptArgumentA to get value name nameA
set myScriptArgumentB to get value name nameB
end tell
--Display the script argument values in a dialog box.
display dialog nAc & myScriptArgumentA & return & nBc & myScriptArgumentB
--Create a string to be run as a JavaScript.
set p1 to "app.scriptArgs.setValue(\"ScriptArgumentA\", "
set p2 to "\"This is the first JavaScript script argument value.\");" & return
set p3 to "app.scriptArgs.setValue(\"ScriptArgumentB\", "
set p4 to "\"This is the second JavaScript script argument value.\");" & return
set myJavaScript to p1 & p2 & p3 & p4
--Run the JavaScript string.
do script myJavaScript language javascript
--Retrieve the script argument values set by the script.
tell script args
set myScriptArgumentA to get value name nameA
set myScriptArgumentB to get value name nameB
end tell
--Display the script argument values in a dialog box.
display dialog nAc & myScriptArgumentA & return & nBc & myScriptArgumentB
--</fragment>
end tell
end mySnippet
on myTeardown()
end myTeardown
Shonky -
OWB3i - Validate with DECODE function
Hi,
in OWB 3i when I validate an expression defined inside an expression operator with DECODE() function (which is not include in default transformation) come this error:
Line 1, Col 1:
PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL statement only
but it seems only a warning because when i generate the scripts and run no other error happen and all works fine.
RegardsHi,
Welcome to the forum!
When you use a default value, the last argument to DECODE is the actual value you want as a default.
For example:
SELECT ename
, deptno
, DECODE ( deptno
, 30 , 'Sales'
, 'All others' -- Default value
) AS dname
FROM scott.emp
ORDER BY ename
;Output:
ENAME DEPTNO DNAME
ADAMS 20 All others
ALLEN 30 Sales
BLAKE 30 Sales
CLARK 10 All others
FORD 20 All others
JAMES 30 Sales
JONES 20 All others
KING 10 All others
MARTIN 30 Sales
MILLER 10 All others
SCOTT 20 All others
SMITH 20 All others
TURNER 30 Sales
WARD 30 Sales
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
If you can show the problem using commonly available tables (such as those in the scott schema) then you don't need to post any sample data; just the results and the explanation.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ {message:id=9360002} -
I am using the existNode function to check whether a specific node exists or has a value for it in the XML.
So, am using it within an IF condition as below;
IF L_xml.existSNode('/ItemFamily/Style/Item/Attributes/ItemAttributes/ExtRefNo/text()') > 0 THEN
DBMS_OUTPUT.PUT_LINE('L_xml = Style exists');
END IF;
Here L_xml is my initial XML message received which is a CLOB converted to an XMLTYPE.
The above works fine.
But after I do an EXTRACT operation on the above XML to get only the portion of it (from a particular start tag to its corresponding end tag), and feed this output for my existNode function as below;
IF L_itm_xml.existSNode('/ItemFamily/Style/Item/Attributes/ItemAttributes/ExtRefNo') > 0 THEN
DBMS_OUTPUT.PUT_LINE('itm_xml = ');
END IF;
It does not give me the desired output.
I would like to know, if there is any restriction on the existNode usage.
Am asking this coz am a bit skeptical on whether this is happening due to XML being stripped off its header.
Could someone please help me find an answer for this.The sample data is as below;
<?xml version="1.0" encoding="utf-8"?>
<ItemFamily>
<Style>
<Item>
<ParentExtRefNo>str1234</ParentExtRefNo>
<PackInd>str1234</PackInd>
<ItemLevel>str1234</ItemLevel>
<TranLevel>str1234</TranLevel>
<Diff1>str1234</Diff1>
<Diff2>str1234</Diff2>
<Diff3>str1234</Diff3>
<Diff4>str1234</Diff4>
<ItemDesc>str1234</ItemDesc>
<ShortDesc>str1234</ShortDesc>
<SuggRetail>str1234</SuggRetail>
<HandlingTemp>str1234</HandlingTemp>
<HandlingSens>str1234</HandlingSens>
<SellableInd>str1234</SellableInd>
<OrderableInd>str1234</OrderableInd>
<ShipAloneInd>str1234</ShipAloneInd>
<Dept>str1234</Dept>
<Class>str1234</Class>
<Subclass>str1234</Subclass>
<Comments>str1234</Comments>
<GiftWrapInd>str1234</GiftWrapInd>
<CheckUDAInd>str1234</CheckUDAInd>
<OriginalRetail>str1234</OriginalRetail>
<LastUpdateId>str1234</LastUpdateId>
<ForecastInd>str1234</ForecastInd>
<Suppliers>
<ItemSupplier>
<Supplier>str1234</Supplier>
<PrimarySuppInd>str1234</PrimarySuppInd>
<VPN>str1234</VPN>
<DirectShipInd>str1234</DirectShipInd>
<LastUpdateId>str1234</LastUpdateId>
<Countries>
<SuppCountry>
<SuppCountryType>str1234</SuppCountryType>
<OriginCountryId>str1234</OriginCountryId>
<PrimarySupplierInd>str1234</PrimarySupplierInd>
<PrimaryCountryInd>str1234</PrimaryCountryInd>
<SuppPackSize>str1234</SuppPackSize>
<InnerPackSize>str1234</InnerPackSize>
<UnitCost>str1234</UnitCost>
<LastUpdateId>str1234</LastUpdateId>
<Dimensions>
<SuppCountryDim>
<DimType>str1234</DimType>
<DimObject>str1234</DimObject>
<Height>str1234</Height>
<Width>str1234</Width>
<Length>str1234</Length>
<LwhUOM>str1234</LwhUOM>
<Weight>str1234</Weight>
<NetWeight>str1234</NetWeight>
<WeightUOM>str1234</WeightUOM>
<LastUpdateId>str1234</LastUpdateId>
</SuppCountryDim>
</Dimensions>
</SuppCountry>
</Countries>
</ItemSupplier>
</Suppliers>
</Item>
</Style>
</ItemFamily>
The L_xml will have this as its value.
The L_itm_xml will have the subset of the XML extracted from it as its value.
As below;
<Item>
<ParentExtRefNo>str1234</ParentExtRefNo>
<PackInd>str1234</PackInd>
<ItemLevel>str1234</ItemLevel>
<TranLevel>str1234</TranLevel>
<Diff1>str1234</Diff1>
<Diff2>str1234</Diff2>
<Diff3>str1234</Diff3>
<Diff4>str1234</Diff4>
<ItemDesc>str1234</ItemDesc>
<ShortDesc>str1234</ShortDesc>
<SuggRetail>str1234</SuggRetail>
<HandlingTemp>str1234</HandlingTemp>
<HandlingSens>str1234</HandlingSens>
<SellableInd>str1234</SellableInd>
<OrderableInd>str1234</OrderableInd>
<ShipAloneInd>str1234</ShipAloneInd>
<Dept>str1234</Dept>
<Class>str1234</Class>
<Subclass>str1234</Subclass>
<Comments>str1234</Comments>
<GiftWrapInd>str1234</GiftWrapInd>
<CheckUDAInd>str1234</CheckUDAInd>
<OriginalRetail>str1234</OriginalRetail>
<LastUpdateId>str1234</LastUpdateId>
<ForecastInd>str1234</ForecastInd>
<Suppliers>
<ItemSupplier>
<Supplier>str1234</Supplier>
<PrimarySuppInd>str1234</PrimarySuppInd>
<VPN>str1234</VPN>
<DirectShipInd>str1234</DirectShipInd>
<LastUpdateId>str1234</LastUpdateId>
<Countries>
<SuppCountry>
<SuppCountryType>str1234</SuppCountryType>
<OriginCountryId>str1234</OriginCountryId>
<PrimarySupplierInd>str1234</PrimarySupplierInd>
<PrimaryCountryInd>str1234</PrimaryCountryInd>
<SuppPackSize>str1234</SuppPackSize>
<InnerPackSize>str1234</InnerPackSize>
<UnitCost>str1234</UnitCost>
<LastUpdateId>str1234</LastUpdateId>
<Dimensions>
<SuppCountryDim>
<DimType>str1234</DimType>
<DimObject>str1234</DimObject>
<Height>str1234</Height>
<Width>str1234</Width>
<Length>str1234</Length>
<LwhUOM>str1234</LwhUOM>
<Weight>str1234</Weight>
<NetWeight>str1234</NetWeight>
<WeightUOM>str1234</WeightUOM>
<LastUpdateId>str1234</LastUpdateId>
</SuppCountryDim>
</Dimensions>
</SuppCountry>
</Countries>
</ItemSupplier>
</Suppliers>
<UDAs>
<ItemUDA>
<UdaId>str1234</UdaId>
<UdaValue>str1234</UdaValue>
<LastUpdateId>str1234</LastUpdateId>
</ItemUDA>
</UDAs>
<Channels>
<ItemChannel>
<ChannelType>str1234</ChannelType>
</ItemChannel>
</Channels>
<Attributes>
<ItemAttributes>
<ExtRefNo>str1234</ExtRefNo>
<ParentExtRefNo>str1234</ParentExtRefNo>
<Collection>str1234</Collection>
<PerishableInd>str1234</PerishableInd>
<PersAvailInd>str1234</PersAvailInd>
<ShortDesc30>str1234</ShortDesc30>
<ItemType>str1234</ItemType>
<ConveyableType>str1234</ConveyableType>
<GiftWrapType>str1234</GiftWrapType>
<LastUpdateId>str1234</LastUpdateId>
</ItemAttributes>
</Attributes>
<Ticket>
<ItemTicket>
<TicketTypeId>str1234</TicketTypeId>
<LastUpdateId>str1234</LastUpdateId>
</ItemTicket>
</Ticket>
<Carriers>
<CarrierService>
<CarrierSvc>str1234</CarrierSvc>
<DefCarrierSvcInd>str1234</DefCarrierSvcInd>
</CarrierService>
</Carriers>
<Shipping>
<ShipRestrictions>
<Carrier>str1234</Carrier>
<AddressCode>str1234</AddressCode>
</ShipRestrictions>
</Shipping>
<Pricing>
<RetailPrice>
<ZoneId>str1234</ZoneId>
<UnitRetail>str1234</UnitRetail>
<LastUpdateId>str1234</LastUpdateId>
</RetailPrice>
</Pricing>
<PackItems>
<PackItem>
<CompExtRefNo>str1234</CompExtRefNo>
<Qty>str1234</Qty>
<LastUpdateId>str1234</LastUpdateId>
</PackItem>
</PackItems>
</Item>
The existNode is functioning with L_xml as the argument but not with L_itm_xml.
Hope you have the clarity you were seeking out for. -
We have downloaded and installed the HP Photosmart full feature Sostware and Drivers to Photosmart C3183 All-in-one.
Click the Scan document in Solution Center-
Error message displayed:
The scanning software was launched with improper command-line arguments"
Extended error information: 8,[(-1,0,0)]
When Hp scan diagnostic utility was used - the message was: no scanners installed.
how can we resolve the scanning problem
nidataytayI have the same problem on a HP 5610 Officejet All-in-One.
"The scanning software was launched with improper command-line arguments.
8, [(-1, 0, 0)]"
What is the solution? The scanner does not work. All other functions, print, fax, copy work from with in the HP Solutions Center software - but not the scanner. -
[SOLVED] dwm doesn't compile with moveresize function
I'am trying to compile dwm with moveresize function but I get this error:
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -DVERSION="5.7.2" -DXINERAMA
LDFLAGS = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC = cc
CC dwm.c
In file included from dwm.c:254:0:
config.h: In function 'moveresize':
config.h:23:7: error: dereferencing pointer to incomplete type
config.h:23:34: error: dereferencing pointer to incomplete type
config.h:26:9: error: dereferencing pointer to incomplete type
config.h:26:17: error: dereferencing pointer to incomplete type
config.h:27:6: error: dereferencing pointer to incomplete type
config.h:28:6: error: dereferencing pointer to incomplete type
config.h:29:6: error: dereferencing pointer to incomplete type
make: *** [dwm.o] Error 1
Here's my config.h
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-terminus-*-*-*-*-12-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#454545";
static const char normbgcolor[] = "#454545";
static const char normfgcolor[] = "#C0C0C0";
static const char selbordercolor[] = "#C0C0C0";
static const char selbgcolor[] = "#454545";
static const char selfgcolor[] = "#FFFFFF";
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const Bool showbar = True; /* False means no bar */
static const Bool topbar = True; /* False means bottom bar */
/* moveresize */
static void moveresize(const Arg *arg) {
XEvent ev;
Monitor *m = selmon;
if(!(m->sel && arg && arg->v && m->sel->isfloating))
return;
resize(m->sel, m->sel->x + ((int *)arg->v)[0],
m->sel->y + ((int *)arg->v)[1],
m->sel->w + ((int *)arg->v)[2],
m->sel->h + ((int *)arg->v)[3],
True);
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
/* tagging */
static const char *tags[] = { "term", "web", "fm", "im", "media", "float" };
static const Rule rules[] = {
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 1 << 5, True, -1 },
{ "Chromium", NULL, NULL, 1 << 1, True, -1 },
{ "MPlayer", NULL, NULL, 0, True, -1 },
{ "Wine", NULL, NULL, 1 << 5, True, -1 },
{ "Gpicview", NULL, NULL, 0, True, -1 },
{ "Pcmanfm", NULL, NULL, 1 << 2, True, -1 },
{ "Xarchiver", NULL, NULL, 0, True, -1 },
{ "Amsn", NULL, NULL, 1 << 3, True, -1 },
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const Bool resizehints = False; /* True means respect size hints in tiled resizals */
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *tdmenucmd[] = { "tdmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[] = { "roxterm", NULL };
static const char *mutecmd[] = { "amixer", "-q", "sset", "Master", "toggle", NULL };
static const char *volupcmd[] = { "amixer", "-q", "sset", "Master", "5-", "unmute", NULL };
static const char *voldowncmd[] = { "amixer", "-q", "sset", "Master", "5+", "unmute", NULL };
static const char *bgltupcmd[] = { "xbacklight", "-inc", "15", NULL };
static const char *bgltdowncmd[] = { "xbacklight", "-dec", "1", NULL };
static const char *displayoff[] = { "xset", "dpms", "force", "off", NULL };
static const char *suspend[] = { "sudo", "pm-suspend", NULL };
static Key keys[] = {
/* modifier key function argument */
{ 0, 0x1008ff12, spawn, {.v = mutecmd } },
{ 0, 0x1008ff11, spawn, {.v = volupcmd } },
{ 0, 0x1008ff13, spawn, {.v = voldowncmd } },
{ 0, 0x1008ff02, spawn, {.v = bgltupcmd } },
{ 0, 0x1008ff03, spawn, {.v = bgltdowncmd } },
{ 0, 0x1008ff59, spawn, {.v = displayoff } },
{ 0, 0x1008ff2f, spawn, {.v = suspend } },
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_r, spawn, {.v = tdmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_c, killclient, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_q, quit, {0} },
{ MODKEY, XK_Down, moveresize, {.v = (int []){ 0, 25, 0, 0 }}},
{ MODKEY, XK_Up, moveresize, {.v = (int []){ 0, -25, 0, 0 }}},
{ MODKEY, XK_Right, moveresize, {.v = (int []){ 25, 0, 0, 0 }}},
{ MODKEY, XK_Left, moveresize, {.v = (int []){ -25, 0, 0, 0 }}},
{ MODKEY|ShiftMask, XK_Down, moveresize, {.v = (int []){ 0, 0, 0, 25 }}},
{ MODKEY|ShiftMask, XK_Up, moveresize, {.v = (int []){ 0, 0, 0, -25 }}},
{ MODKEY|ShiftMask, XK_Right, moveresize, {.v = (int []){ 0, 0, 25, 0 }}},
{ MODKEY|ShiftMask, XK_Left, moveresize, {.v = (int []){ 0, 0, -25, 0 }}},
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
/* button definitions */
/* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkWinTitle, 0, Button2, zoom, {0} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY|ShiftMask, Button1, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
Last edited by Aakko (2010-05-30 18:21:30)ber_t wrote:A vanilla dwm compiles fine with your config.h. So I guess you're using other patches that rearrange the #include directive for config.h in dwm.c, e.g. pertag. If that's the case, you have to put the moveresize function in dwm.c and declare it before config.h get's included, just like any other function in dwm.c.
Yes I had dwm.c patched with pertag. Vanilla compiles fine. Thanks! -
Error while replacing IF statements with DECODE function in procedure
Hi All,
I have created a procedure which has nested IF statements. Now I want to replace the IF statements with DECODE functions to improve performance.
Procedure:
IF (var_int_sev = '0')
THEN
var_sev := '2';
ELSE
SELECT sev
INTO var_int_sev
FROM errorconfig
WHERE errorcode = var_errorcode;
var_sev := var_int_sev;
END IF;
I converted the above IF statement into DECODE function as mentioned below:
var_Sev := DECODE(var_int_sev,0,2,SELECT severity FROM errorconfig WHERE errorcode=var_ErrorCode)
But it throws below error at the select statement used inside DECODE.
Error(58,51): PLS-00103: Encountered the symbol "SELECT" when expecting one of the following: ( - + case mod new not null others <an identifier> <a double-quoted delimited-identifier> <a bind variable> avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character set specification> <an alternativ
Can someone help me in converting the IF to DECODE in the above case. Also how can we use a select statement inside decode.instead of trying to rewrite all your code and hoping that the performance will be better, it's a better option to investigate and find out which part of your application is slow
read this:
When your query takes too long ... -
How to find the number of data items in a file written with ArryToFile function?
I have written an array of number in 2 column groups to a file using the LabWindows/CVI function ArrayToFile...Now if I want to read the file with FileToArray Function then how do I know the number of items in the file. during the write time I know how many array items to write. but suppose I want the file to read at some later time then How to find the number of items in the file,So that I can read the exact number and present it. Thanks to all
If you are young work to Learn, not to earn.
Solved!
Go to Solution.What about:
OpenFile ( your file );
cnt = 0;
while ((br = ReadLine ( ... )) != -2) {
if (br == -1) {
// I/O error: handle it!
break;
cnt++;
CloseFile ( ... );
There are some ways to improve performance of this code, but if you are not reading thousands of lines it's quite fast.
After this part you can dimension the array to pass to FileToArray... unless you want to read it yourself since you already have it open!
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
Hi All,
We have SharePoint Production server 2013 where users are complaining that they are not able to copy or move files from one document library to another document library using “Open with Explorer” functionality.
We tried to activate publishing features on production server but it did not work. We users reported following errors:
Copying files from one document library to another document library:
Tried to map the document libraries and still not get the error to copy files:
In our UAT environment we are able to copy and move folders from using “Open with Explorer” though.
We have tried to simulate in the UAT environment but could not reproduce the production environment.
Any pointers about this issue would be highly appertained.
Thanks in advance
Regards,
Aroh
Aroh ShuklaHi John and all,
One the newly created web applications that we created few days back and navigated to document library, clicked on “Open with Explorer”, we get this error.
We're having a problem opening this location in file explorer. Add this website to your trusted and try again.
We added to the trusted site in Internet Explorer for this web application, cleared the cache and open the site with same document library but still get the same above error.
However, another existing web application (In same the Farm) that we are troubleshooting at the moment, we are able click on “Open with Explorer”, login in credentials opens and we entered the details we are able to open the document
library and tried to follow these steps:
From Windows Explorer (using with Open with Explorer), tried to copy or move a files to
source document library.
From Windows Explorer moved this file to another destination document library and we got this error.
What we have to achieve is users should be able to copy files and folders using
Open with Explorer functionality. We don’t know why Open with Explorer
functionality not work working for our environment.
Are we doing something wrong?
We have referred to following websites.
we hope concepts of copying / Moving files are similar as SharePoint 2010. Our production environment is SharePoint 2013.
http://www.mcstech.net/blog/index.cfm/2012/1/4/SharePoint-2010-Moving-Documents-Between-Libraries https://andreakalli.wordpress.com/2014/01/28/moving-or-copying-files-and-folders-in-sharepoint/
Please advise us. Thank you.
Regards,
Aroh
Aroh Shukla -
Slicer Time Dimension Issue with Cube Functions
Hi,
Hoping someone can help me figure out right approach here.
Summary:
Using Excel 2013 connected to a SSAS cube as data source, and cube functions with slicers to create a dashboard.
Have following time dimension slicers; Fiscal Year, Fiscal Quarter, Fiscal Month, Fiscal Week & Date, that are used to slice data based on user selection, along
with a sales measure.
Below is example of Slicer name and CubeMember function for each:
Slicer_Fiscal_Year:
=CUBEMEMBER("Cube","[Date].[Fiscal Year].&[2015]")
Slicer_Fiscal_Quarter:
=CUBEMEMBER("Cube","[Date].[Fiscal Quarter].[All]")
Slicer_Fiscal_Month:
=CUBEMEMBER("Cube","[Date].[Fiscal Month].&[201408]")
Slicer_Fiscal_Week:
=CUBEMEMBER("Cube","[Date].[Fiscal Week].&[201509]")
Slicer_Date:
=CUBEMEMBER("Cube","[Date].[Date].[All]")
Problem:
What I am trying to do is to build a table with cube functions that takes the lowest grain of the slicer time dimension selected, shows the current member, plus
the prior 7 so I can have an 8 period trending view table that I will build a chart from. In the above example that would mean that it would look at Slicer_Fiscal_Week since that is lowest grain that has an attribute other than All, and then show me the prior
7 periods. In this case 201509 means Week 9, so I would want to show in table Week 9 back to Week 2. But if Slicer_Fiscal_Week was set to All, along with Slicer_Date, then Fiscal Month would be lowest grain, so I would want to show Fiscal Months from August
(201408) back to January 2014. I know how to use CubeRankedMember to pull the value from what is selected in the slicer, the problem is figuring out how to pass the lowest grain time dimension so that I can use lag or some other MDX function to get the previous
periods.
Any help on this would be greatly appreciated.
<object height="1" id="plugin0" style=";z-index:1000;" type="application/x-dgnria" width="1"><param name="tabId" value="{28593A5C-70C0-4593-9764-80C76B51795C}"
/></object>Hello,
Thank you for your question.
I am trying to involve someone familiar with this topic to further look at this issue.
George Zhao
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
What's wrong with this function
What's wrong with this Function(PL/SQL) in this formaula column definition in Reports 6i
function currdateFormula return Date is
curr_date date;
begin
select to_char(sysdate, 'DD-MM-YYYY') into curr_date from dual;
return(curr_date);
end;
I get the following error in compiling
REP-1401. 'currdateformula'.Fatal PL/SQL error occured. ORA-01843 not a valid month.
The SQL select to_char(sysdate, 'DD-MM-YYYY') from dual; worked well in SQL Plus prompt.
I got a clean compile when i use just sysdate in the function (see below).
function currdateFormula return Date is
curr_date date;
begin
select sysdate into curr_date from dual;
return(curr_date);
end;
Appreciate your help
Raja Lakshmihello,
what you are trying to do :
fetch the current date and return it as the result of the formula-column.
what you are actually doing :
fetch the current date, convert it to text, assign this text to a date-variable which causes an implicit type-conversion.
in your case you create a date-string with the format dd-mm-yyyy. the implicit conversion then tries to convert this string back to date using the NLS settings of your session. depending on your NLS_LANG and NLS_DATE_FORMAT this might work, if your session-date-format is dd-mm-yyyy which obviously it is NOT as you get the error.
what you should do :
select sysdate into curr_date from dual;
this fetches the sysdate and stores it in your date-variable. there is no type conversion needed what so ever.
regards,
the oracle reports team -
Oracle Version: 10g
Operating System: Microsoft windows 2003
Hello, I need some help, I would appriciate if anyone could help me out.
on one hand, I have a table that contains a list of table names that are sensitive in my org.
In addition, not all the columns in the table are sensitive, some tables have only one or tow sensitive columns
on the other hand, I have another table that contains all the SQL Statements that passed through all my DB's in the org + some other details like username, machine name etc.
the sql statement is one columns - varchar2(4000). ALL the SQL TEXT is printed there.
I need to create a report of the SQL Statements and their details that have any reference to the sensitive entities.
I'm kind of new to PL/SQL or programming in DB in general.
Can you please assist me in designing the write function and script.
Additional details:
Sensitive_tables table:
table_name varchar2 (65) -- the names of the sensitive tables
All_fields number (1) -- 0=not all the fields are sensitive, 1=all the fields are sensitive
the conditions where the function should return true:
1. It's not a select/SELECT statement.
2. There is a relation to a sensitive table that all its columns are sensitive
3. There is a relation to a sensitive table and to a specific sensitive column.
below is the function.
There are 2 cursors - the first loop will check if the SQL Statement touches a sensitive column + a sensitive table.
The second one checks if the the SQL Statement a table that all its columns are sensitive.
CREATE OR REPLACE function sens_entity_match (p_statement varchar2)
return VARCHAR2
IS
v_match VARCHAR2(5);
sql_stmt VARCHAR2(4000);
TYPE tbls_wth_all_flds IS REF CURSOR;
tbls_all_fields tbls_wth_all_flds;
table_name_y varchar2(65);
TYPE tbls_wthout_all_flds IS REF CURSOR;
tbls_some_fields tbls_wthout_all_flds;
table_name_n varchar2(65);
BEGIN
sql_stmt:=upper(p_statement);
OPEN tbls_all_fields FOR select table_name from sens_tables where ALL_FIELDS='1';
OPEN tbls_some_fields FOR select table_name from sens_tables where ALL_FIELDS='0';
FETCH tbls_all_fields INTO table_name_y;
FETCH tbls_some_fields INTO table_name_n;
WHILE tbls_some_fields%FOUND LOOP
BEGIN
IF upper (sql_stmt) like 'SELECT%' THEN
BEGIN
RETURN ('FALSE');
v_match:='FALSE';
END;
ELSIF
( ((sql_stmt LIKE '%ID_NUMBER%' ) OR (sql_stmt LIKE '%id_number%' )) AND (sql_stmt LIKE table_name_n) )
OR
( ((sql_stmt LIKE '%ADDRESS%') OR (sql_stmt LIKE '%address%')) AND (sql_stmt LIKE table_name_n) )
OR
( (((sql_stmt LIKE '%EMAIL%') OR (sql_stmt LIKE '%E_MAIL%')) OR (sql_stmt LIKE '%email%') OR (sql_stmt LIKE '%e_mail%') ) AND (sql_stmt LIKE table_name_n) )
OR
(( (sql_stmt LIKE '%BANK%') or (sql_stmt LIKE '%bank%')) AND (sql_stmt LIKE table_name_n) )
OR
( ((sql_stmt LIKE '%PYM%') OR (sql_stmt LIKE '%PYM%')) AND (sql_stmt LIKE table_name_n) )
OR
( ((sql_stmt LIKE '%CREDIT_CARD%') OR (sql_stmt LIKE '%credit_card%')) AND (sql_stmt LIKE table_name_n) )
OR
( ( (sql_stmt LIKE '%USER%') OR (sql_stmt LIKE '%user%') )AND (sql_stmt LIKE table_name_n) )
OR
( ((sql_stmt LIKE '%CHURN%') OR (sql_stmt LIKE '%churn%') ) AND (sql_stmt LIKE table_name_n) )
OR
( ((sql_stmt LIKE '%LEGAL%') OR (sql_stmt LIKE '%legal%') ) AND (sql_stmt LIKE table_name_n) )
THEN
BEGIN
v_match:='TRUE';
RETURN ('TRUE');
END;
ELSE
v_match:='FALSE';
END IF;
FETCH tbls_some_fields INTO table_name_n;
END;
END LOOP;
WHILE tbls_all_fields%FOUND LOOP
BEGIN
IF upper (sql_stmt) like 'SELECT%' THEN
BEGIN
v_match:='FALSE';
RETURN ('FALSE');
END;
ELSIF (sql_stmt LIKE table_name_y) THEN
BEGIN
v_match:='TRUE';
RETURN ('TRUE');
END;
ELSE
BEGIN
v_match:='FALSE';
RETURN ('FALSE');
END;
END IF;
FETCH tbls_all_fields INTO table_name_y;
END;
END LOOP;
RETURN (v_match);
END;
Eexampls that should should be true:
select sens_entity_match ('update address_data set "EMAIL" = :24 where rowid= :old_rowid') from dual;
{address_data is a sensitive_table that exists in "sensitive_tables" table and email is a sensitive column}
select sens_entity_match ('isnert into legal (ssss) select bbbb from input where rowid = 666;') from dual;
{legal is a sensitive_table that exists in "sensitive_tables" table and all its columns are sensitive}
An example that shouldn't should be true:
select sens_entity_match ('select bank from bank_details where bank_id= 11;') from dual;
{The SQL text is a select statement}
The function complies and works, but it doesn't catch all the SQL Statements that are relevant.
How can I improve it?
What should I change?
I would appriricate any help.
Thanks,
Roni.Hi user611218!
If I understud right, then you want to have some kind of auditing. I suggest if want auditing than you should use the auditing capabilities of Oracle (Standard auditing and Fine Grained Auditing). It's much easier to generate a report from an Auditingtrail than to create a "Self-Made-Function".
But if you prefer the soluting with your function then you should change the following:
ELSIF( ((sql_stmt LIKE '%ID_NUMBER%' ) OR (sql_stmt LIKE '%id_number%' )) AND (sql_stmt LIKE table_name_n) )
CHANGE IT TO
ELSIF ((INSTR(LOWER(sql_stmt), 'id_number') > 0)) AND (INSTR(LOWER(sql_stmt), LOWER(table_name_n))))
Change all the LIKE ... Statements to INSTR ... like above.
Hope this helps! -
Sending XML file from SAP to Windows Based file server with FTP function
Hi Gurus,
We are using SAP BW 3.0B version.
I need to convert data in ODS to XML format and send this XML file to remote server which is not a SAP application server, it is just a Window Based file server with FTP function..
By writing some ABAP code I have converted ODS data into XML format (which gets saved in my local system)
(Is that I need to put this file in Application Server to send it to the other servers? )
Now the thing is how I can send this file to that Windows Based file server.
plz suggest me.... what can be done......
Thanks in Advance
Madhusudhan
Edited by: Madhusudhan Raju on Dec 3, 2009 4:25 AMI dont think the above code support windows OS. Because I always execute this script via UNIX.
I think you can try this option, go to command prompt, goto the destination path where you have an XML file using cd....
ftp (destination servername), specify the username and password.
afterthat, use the command put and filename.
check whether the file had reached destination successfully or not.
For automation purpose, you can use the following script like
ftp: -s: test.txt (servername)
In test.txt,
UserName
Password
bin
cd /files
put file.xml
bye
Also, you can check in SM69, there will be some SAP external commands to automate the file transfer.
Thanks
Sat
http://support.microsoft.com/?kbid=96269 -
Issue with gui_download function module
Hi All,
I have an issue with gui_download function module that it is creating one extra line while downloading my internal table data into text file,which i donot want.i have searched for various threads but couldnot get the proper reply.Or please provide me some other Function Module which will not create one extra line.Please help.part 2
INCLUDE RPPPXD00.
DATA : BEGIN OF COMMON PART A.
INCLUDE RPPPXD10.
DATA : END OF COMMON PART.
INCLUDE PC2RXTW0.
INCLUDE RPC2RX00.
DATA : BEGIN OF COMMON PART B.
INCLUDE RPC2CD00.
DATA : END OF COMMON PART.
INCLUDE RPPPXM00.
INCLUDE RPCMGR00.
AT SELECTION-SCREEN OUTPUT.
CONCATENATE SY-DATUM2(6) SY-UZEIT0(4) INTO REF_NO.
LOOP AT SCREEN.
IF R1 = 'X'.
IF SCREEN-NAME = 'FLN' OR SCREEN-NAME = '%_FLN_%_APP_%-TEXT' OR
SCREEN-NAME = 'BTC' OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT' OR
SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT'"SOC BY ANKITA"
OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
IF R2 = 'X'.
IF SCREEN-NAME = 'FLN' OR SCREEN-NAME = '%_FLN_%_APP_%-TEXT' OR
SCREEN-NAME = 'BTC' OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT' OR
SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'
OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
OR SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT' "SOC BY ANKITA
OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
IF R3 = 'X'.
IF SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'
OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
OR SCREEN-NAME = 'PY_DT' OR SCREEN-NAME = '%_PY_DT_%_APP_%-TEXT' "SOC BY ANKITA
OR SCREEN-NAME = 'ORG_ID' OR SCREEN-NAME = '%_ORG_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'ORG_AC' OR SCREEN-NAME = '%_ORG_AC_%_APP_%-TEXT'
OR SCREEN-NAME = 'REF_NO' OR SCREEN-NAME = '%_REF_NO_%_APP_%-TEXT'
OR SCREEN-NAME = 'DEPT_CD' OR SCREEN-NAME = '%_DEPT_CD_%_APP_%-TEXT'
OR SCREEN-NAME = 'PRS_BNK' OR SCREEN-NAME = '%_PRS_BNK_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_TY' OR SCREEN-NAME = '%_TRANS_TY_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_ID' OR SCREEN-NAME = '%_TRANS_ID_%_APP_%-TEXT'
OR SCREEN-NAME = 'TRANS_RK' OR SCREEN-NAME = '%_TRANS_RK_%_APP_%-TEXT'."EOC BY ANKITA
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
IF R4 = 'X'.
IF SCREEN-NAME = 'PREPBY' OR SCREEN-NAME = '%_PREPBY_%_APP_%-TEXT'"SOC BY ANKITA
OR SCREEN-NAME = 'APROBY' OR SCREEN-NAME = '%_APROBY_%_APP_%-TEXT'
OR SCREEN-NAME = 'BTC' OR SCREEN-NAME = '%_BTC_%_APP_%-TEXT'."EOC BY ANKITA
SCREEN-ACTIVE = 0.
ENDIF.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
START-OF-SELECTION.
SELECT SINGLE * FROM T549Q WHERE PERMO = '01'
AND PABRJ = PRD+0(4)
AND PABRP = PRD+4(2).
FR_DT = T549Q-BEGDA.
TO_DT = T549Q-ENDDA.
CONCATENATE FR_DT0(4) FR_DT4(2) INTO FR_P.
CONCATENATE TO_DT0(4) TO_DT4(2) INTO TO_P.
PN-PAPER = PRD.
PN-PERMO = '01'.
GET PERNR.
RP-PROVIDE-FROM-LAST P0003 SPACE PN-BEGDA PN-ENDDA.
RP_PROVIDE_FROM_LAST P0001 SPACE PN-BEGDA PN-ENDDA.
IF PNP-SW-FOUND EQ 1.
SN = SN + 1.
ITAB1-SNO = SN.
ITCC-SNO = SN.
ITAB1-ENO = PERNR-PERNR.
ITAB1-NAM = PERNR-ENAME.
ELSE.
REJECT.
ENDIF.
RP-INIT-BUFFER.
RP-SEL-CALC.
CALL FUNCTION 'RP_EVALUATION_PERIODS'
EXPORTING
LAST_CALCULATED_DAY = P0003-ABRDT
LAST_DAY_IN_PERIOD = TO_DT
RETROCALCULATED_DAY = RP-SEL-CALC-RRDAT
TABLES
DIR = RGDIR
EVP = EVP
EXCEPTIONS
RGDIR_EMPTY = 1
INTERNAL_ERROR = 2
OTHERS = 3.
DESCRIBE TABLE EVP LINES LIN.
IF LIN > 0.
LOOP AT EVP.
IF EVP-IAPER = TO_P AND EVP-PAPER = TO_P.
RX-KEY-PERNR = PERNR-PERNR.
UNPACK EVP-SEQNR TO RX-KEY-SEQNO.
RP-IMP-C2-TN.
READ TABLE BT INDEX 1.
READ TABLE WPBP INDEX 1.
READ TABLE TAX INDEX 1."CHANGES BY ANKITA
ITAB1-BAC = BT-BANKN.
ITAB1-BKEY = BT-BANKL .
ITAB1-DEP = WPBP-KOSTL.
ITAB1-BETRG = BT-BETRG."CHANGES BY ANKITA
ITAB1-TAXID = TAX-TAXID."CHANGES BY ANKITA
YEAR = VERSC-PAYDT+0(4) - 11.
MONTH = VERSC-PAYDT+4(2).
DAY = VERSC-PAYDT+6(2).
CONCATENATE YEAR MONTH DAY INTO ITAB1-PDT.
ITAB1-PDT = VERSC-PAYDT - 110000.
ITCC-DEP = WPBP-KOSTL.
LOOP AT RT WHERE LGART = '/559'.
ITAB1-BTFR = RT-BETRG.
ITCC-BTFR = RT-BETRG.
IF EVP-SRTZA = 'P'.
ITAB1-BTFR = ITAB1-BTFR - RT-BETRG.
ELSE.
ITAB1-BTFR = ITAB1-BTFR + RT-BETRG.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
APPEND: ITAB1, ITCC.
CLEAR: ITAB1, ITCC.
END-OF-SELECTION.
CONCATENATE 'Prepared By:' ` ` PREPBY INTO PREPBY.
CONCATENATE 'Approved By:' ` ` APROBY INTO APROBY.
IF R1 = 'X'.
FORMAT COLOR 2.
ULINE (127).
NEW-LINE.
WRITE: 2 'Sr No.', 10 'Emp Num', 27 'Name'.
WRITE: 57 'Department'.
WRITE: 72 ' Transfer Amount' RIGHT-JUSTIFIED.
WRITE: 92 'Bank Key', 107 'Bank AC. Number'.
WRITE:1 '|', 8 '|', 25 '|', 55 '|', 70 '|', 90 '|', 105 '|', 127 '|'.
NEW-LINE.
ULINE (127).
NEW-LINE.
FORMAT COLOR OFF.
LOOP AT ITAB1.
SN = SY-TABIX.
WRITE: 2 SN, 10 ITAB1-ENO, 27 ITAB1-NAM.
WRITE: 57 ITAB1-DEP.
WRITE: 72 ITAB1-BTFR.
WRITE: 92 ITAB1-BKEY, 107 ITAB1-BAC.
WRITE: 1 '|', 8 '|', 25 '|', 55 '|', 70 '|', 90 '|', 105 '|', 127 '|'.
ULINE (127).
NEW-LINE.
ENDLOOP.
SKIP 4.
ULINE 90(32).
NEW-LINE.
WRITE: 90 PREPBY.
SKIP 4.
ULINE 90(32).
NEW-LINE.
WRITE: 90 APROBY.
ENDIF.
IF R2 = 'X'.
LOOP AT ITCC.
COLLECT ITCC INTO ITCOL.
ENDLOOP.
FORMAT COLOR 2.
ULINE (44).
NEW-LINE.
WRITE:2 'Sr No.', 9 'Department'.
WRITE: 27 'Transfer Amount ' RIGHT-JUSTIFIED.
WRITE:1 '|', 8 '|', 25 '|', 44 '|'.
NEW-LINE.
ULINE (44).
NEW-LINE.
FORMAT COLOR OFF.
LOOP AT ITCOL.
SN = SY-TABIX.
WRITE: 2 SN, 9 ITCOL-DEP, 27 ITCOL-BTFR.
WRITE:1 '|', 8 '|', 25 '|', 44 '|'.
NEW-LINE.
ULINE (44).
NEW-LINE.
ENDLOOP.
ENDIF.
IF R3 = 'X'.
LOOP AT ITAB1.
CLEAR: ITTF, P3, P11, P13, P6, V_BAC.
LEN = STRLEN( ITAB1-BKEY ).
IF LEN < 3.
CONCATENATE ITAB1-BKEY '***' INTO P3.
ELSE.
LEN = LEN - 3.
LEN = 3.
P3 = ITAB1-BKEY+LEN(3).
ENDIF.
CLEAR LEN.
V_BAC = ITAB1-BAC.
REPLACE ALL OCCURRENCES OF '-' IN ITAB1-BAC WITH ''.
CONDENSE ITAB1-BAC NO-GAPS.
LEN = STRLEN( ITAB1-BAC )."if length of acc num > limit
IF LEN > 11.
IT_FAIL-EN = ITAB1-ENO.
IT_FAIL-BA = V_BAC.
APPEND IT_FAIL.
CLEAR: IT_FAIL.
CONTINUE.
ENDIF.
P11 = ITAB1-BAC.
CONCATENATE P11 '***********' INTO P11.
above step is for putting '' in place of unfilled chars of P11.
P13 = ITAB1-BTFR * 100.
P6 = ITAB1-PDT+2(6).
CONCATENATE ` ` P3 P11 BTC P13 P6 INTO STR.
ITTF-ROW = STR.
APPEND ITTF.
ENDLOOP.
IF ITTF[] IS NOT INITIAL.
CONCATENATE FLN SY-DATUM SY-UZEIT '.txt' INTO FILEPATH.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = FILEPATH
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITTF
OTHERS = 22
SKIP 2.
IF SY-SUBRC <> 0.
WRITE:/ 'Unable to Download file at ', FILEPATH.
ELSE.
WRITE:/ 'File with following data downloaded at ', FILEPATH.
NEW-LINE.
SKIP 2.
LOOP AT ITTF.
WRITE:/ ITTF.
ENDLOOP.
ENDIF.
ELSE.
WRITE 'No Data, no file was downloaded'.
ENDIF.
IF IT_FAIL[] IS NOT INITIAL.
SKIP 2.
FORMAT COLOR 2.
WRITE 'Acc. No. of following employees exceeded the length limit'.
WRITE:/ 'So their entry was not created in the file'.
SKIP 1.
WRITE : 'Employee Number', 20 'Bank Acc. No.'.
FORMAT COLOR OFF.
LOOP AT IT_FAIL.
NEW-LINE.
WRITE : IT_FAIL-EN, 20 IT_FAIL-BA.
ENDLOOP.
ENDIF.
ENDIF.
IF R4 = 'X'."CHANGES BY ANKITA
WRITE:/ 'ERROR LOG - BANK A/C NO. CONTAINS ALPHANUMERIC'.
WRITE:/ 'EMPID' COLOR COL_POSITIVE,12 '|',15 'Receiving Bank Code' COLOR COL_POSITIVE,
40 '|','Receiver A/C No' COLOR COL_POSITIVE.
PERFORM EXTRACT_DATA.
SKIP 2.
ENDIF."EOC
RP-READ-PAYROLL-DIR.
Edited by: ANKITA BHARDWAJ on Dec 9, 2009 10:36 AM -
My USB drives have "Disk Repair" issues, with "limited functionality."
The only way I can transfer files between my PowerMac G4 with OS X v10.5.2 and my PowerMac 5500/225 with OS 8.6 is with Iomega Zip drives. My 100 MB disks work perfectly in OS 8.6 but they seem to get corrupted when I open them on the G4. I've had this problem with other USB drives on the G4, including an external USB hard drive and my USB SD card reader. Things will seem to work fine transferring files but then I'll get the following message:
*+Disk Repair+*
+The disk "disk" was not repairable by this computer. It is being made available to you with limited functionality. You must back up your data and reformat the disk as soon as possible.+
Then I drag the files over with the Zip drive until everything blows up and I have to reformat the disk. I'm scared what might happen with the SD cards, if that will have any effect on the camera or if the disk will stop working entirely. The external hard drive was the first to blow up but we didn't know that this was going to be a trend so we had returned that to Best Buy. It had worked beautifully under OS X v.10.3.
Does anyone have any ideas on what is going on here and how to fix it? I do not have vast sums to upgrade hardware and software nor do I even really want to. I'm quite fond of the old Power Mac 5500 and OS 8.6.
Any suggestions are greatly appreciated!Have you tried backing up again by manually running a Time Machine backup? Unfortunately, if your backup is corrupted I don't know of a way to fix it except to start over.
Maybe you are looking for
-
Ipad 4th Gen not working at all
Hi I have an iPad 4th Generation WI-FI and I got it less than 2 years ago and now it doesn't work at all. I will explain a bit more about what happened to it in more detail below. So I was taking photos with it and after I was done I turned it off or
-
Visual Web - How to 'setObject' for an SQL query with an IN ? clause
Hello, I am relatively new to visual web pack. I am stuck at writing the java code for passing parameters to the SQL query. In a normal scenario, where we need to check if some variable is present in a column (= ?), we would pass the parameter as : s
-
CEPHtmlEngine quit unexpectedly
Am getting this error when trying to use new Illustrator Process: CEPHtmlEngine [6717] Path: /Applications/Adobe Illustrator CC 2014/Adobe Illustrator.app/Contents/MacOS/CEP/CEPHtmlEngine/CEPHtmlEngine.app/Contents/MacOS/CEPHtml En
-
Printer disconnect​s
i have a c5580 that always disconnects and it states "turn power off,then on again" how do i fix this problem?
-
Re: Installation of Windows XP on Satellite X200-23G - No HDD
I tried installing Windows XP on my Satellite X200-23g, once i got installed but as desktop was seen... blue screen of death. Error occur and it went into restarting cycle... so i again installed VISTA from reconvery cd. Now when i try to install XP