ColdFusion 11: cfclient seems to require /CFIDE to be available

G'day:
I am reposting this from my blog ("ColdFusion 11: <cfclient> seems to require /CFIDE to be available") at the suggestion of Adobe support:
@dacCfml @ColdFusion Can you post your queries at http://t.co/8UF4uCajTC for all cfclient and mobile queries.— Anit Kumar Panda (@anitkumar85) April 29, 2014
I have edited this in places to remove language that will be deemed inappropriate by the censors here. Changes I have made are in [square brackets]. The forums software here has broken some of the styling, but so be it.
G'day:
This will be a short one... I just want to trot out various observations I make about <cfclient> as I make them. I don't want to waste too much effort on it.
I also feel a bit dirty round about now... I'm about to use a <cfform> tag.
As should everyone, I do not expose /CFIDE to the outside world. This is a terrible vector for security vulnerabilities. One that Adobe seems to be dragging its heels about resolving once and for all ("Isolate the /CFIDE/scripts directory from the rest of /CFIDE" (3732913)).
So when I'm using <cfform> (which is only ever when I am writing example code like this), I need to redirect ColdFusion to look in my isolated directory which just has the script stuff in it:
<cfajaximport scriptsrc="/lib/js/CF/scripts"> <cfform method="post" action="#CGI.script_name#">     <cfinput type="dateField" name="date">     <input type="submit" name="submitButton" value="Go"> </cfform> <cfdump var="#form#">
Note: do not use <cfform> or any of ColdFusion's other UI wizard tags. Just don't. See here: "ColdFusion UI the Right Way", here: "I'm not going to tell you to stop using ColdFusion UI tags anymore...", and here: "Oi! You [naughty] [people]! Stop using ColdFusion UI controls".
Anyway, back to the code. The poorly-named <cfajaximport> tag allows one to point ColdFusion at a different, isolated directory. That's quite handy.
Now I try it with my <cfclient> code:
<cfajaximport scriptsrc="/lib/js/CF/scripts"> <cfclient> <cfset message = "G'day World"> <cfoutput>#message#</cfoutput> </cfclient>
and I get this:
14:46:11.292
GET
http://localhost:8511 /shared/scratch/blogExamples/coldfusion
/CF11/cfclient/moveScriptDir.cfm
[HTTP/1.1 200 OK 284ms]
14:46:11.655
GET
http://localhost:8511 /lib/js/CF/scripts/ajax/messages/cfmessage.js
[HTTP/1.1 200 OK 5ms]
14:46:11.655
GET
http://localhost:8511 /lib/js/CF/scripts/ajax/package/cfajax.js
[HTTP/1.1 200 OK 10ms]
14:46:11.656
GET
http://localhost:8511/CFIDE/cfclient/cfclient_main.js
[HTTP/1.1 404 /CFIDE/cfclient/cfclient_main.js 3ms]
14:46:11.656
GET
http://localhost:8511/CFIDE/cfclient/cffunctions.js
[HTTP/1.1 404 /CFIDE/cfclient/cffunctions.js 3ms]
14:46:11.657
GET
http://localhost:8511/CFIDE/cfclient/cfclient_main.js
[HTTP/1.1 404 /CFIDE/cfclient/cfclient_main.js 1ms]
14:46:11.657
GET
http://localhost:8511/CFIDE/cfclient/cffunctions.js
[HTTP/1.1 404 /CFIDE/cfclient/cffunctions.js 0ms]
Groan. Because <cfclient> doesn't put its script files in the scripts dir, does it? No. Of course it doesn't. Muppets.
But this could still be solved if one could specify some other way of pointing it to a different location for its resources, but... no. There's not a way of doing this that I can find. Short of [messing] around on the web server and setting up virtual directories pointing to /CFIDE/cfclient. This isn't really a hardship, but still, it just shouldn't be necessary, and I can't help but think this is a bit sloppy on the part of Adobe.
It also demonstrates that for their internal testing they don't test this sort of thing. Which is odd, as it's the second thing I tested: you know, that it even works on a secured server.
That's it. I've nothing else to say on this topic. I'll raise a bug for this shortly, once I have the article published so I can refer back to it: 3750729.
Adam

The functions defined in the cffunctions.js are not namespaced. If it is namespaced, you would have to add the namespace while using a function inside cfclient.
These functions are not namespaced, so that you can use the same syntax for using a function inside and outside the cfclient block.
This is indicative of everyone's concern that you guys would just implement / encourage poor practice in your <cfclient> implementation.
How is it - given you're "compiling" the CFML anyway - you cannot translate source code that says "listlen()" into "compiled" JS that is CF.listLen() or something? Thus good CFML can be translated into good JS.
You seem to think that there's a one-to-one mapping between what the CFML says and what the resultant JS needs to be.
You've basically written a mechanism for a CFML developer to write bad JavaScript.
Well done.
Adam

Similar Messages

  • ColdFusion 11: cfclient in the context of the CFML language, not the tooling

    G'day:
    I am reposting this from my blog ("ColdFusion 11: <cfclient> in the context of the CFML language, not the tooling") at the suggestion of Adobe support:
    @dacCfml @ColdFusion Can you post your queries at http://t.co/8UF4uCajTC for all cfclient and mobile queries.— Anit Kumar Panda (@anitkumar85) April 29, 2014
    I have edited this in places to remove language that will be deemed inappropriate by the censors here. Changes I have made are in [square brackets]. The forums software here has broken some of the styling, but so be it. There is worthwhile discussion in the comments of the article on my blog: perhaps go have a read.
    G'day:
    This article could end up being a complete waste of space, as I am operating under more real-world re-interpretation of the raison d'être of <cfclient>, as described by Ram:
    ColdFusion [11] has added support for client side CFML (<cfclient>) and this code is translated to JavaScript
    Mike Henke has pointed out that the first part of this "CF11 has added support for client-side CFML" is actually ******** (my wording, not his):
    "ColdFusion Splendor has added support for client side CFML" is probably phrased wrong and gave me flash backs to VBScript or CFML running in the client browser.
    Maybe this is better verbiage. "ColdFusion Splendor has added support for CFML to generate JS".
    Because... there's not such thing as "client-side CFML". That would imply CFML actually running on the client (ie: the browser, or the mobile device, as is the target of <cfclient> as a concept). This is absolutely not true. I know Ram went on to qualify what he meant there, but the messaging from Adobe on <cfclient> has been inaccurate. Possibly I think to the point of actual misrepresentation (in the legal sense, I mean).
    What <cfclient> does is... convert CFML code to JavaScript. So let's look at that idea.
    Why I say this article could be a complete waste of space is that I dunno if this is the intent of <cfclient>; because, really, the messaging from Adobe as to what <cfclient> is for is very muddied. In general the narrative about it is bundled-in with various features of ColdFusion Builder 3.0, in regards to mobile application creation and packaging (and debugging, and all sort of stuff that sounds quite nice but I don't care about as I don't use CFB).
    However <cfclient> has to stand on its own merit in the CFML language, completely decoupled from CFB features. And as far as I can tell, Mike is right: as far as CFML goes, <cfclient> is a tag which tells ColdFusion to - instead of compiling to byte code - compiles the enclosed CFML code to JavaScript instead.
    This of course just sets my alarm klaxons going.  Because Adobe are (I choose my words carefully) [not very good] at converting CFML to client-side code. This has been borne out by <cfform>, <cflayout>, <cfpod> etc. Back in the days of CFMX7 the "CFML-to-client-side" wizards had some merit, because the client-side arena was still immature, and the team at Macromedia actually had some exposure to the idea of "website development", so they knew where the pain points were that they could possible ameliorate. Times have changed, and the client-side of things is probably now more mature an environment than CFML is - Javascript is probably are more coherent language than CFML is, now - and it is very very very clear that the current Adobe ColdFusion Team don't know the first thing about web development (they can't even write decent CFML for their own documentation, before we get onto how they'd be doing web work!), so they are completely out of their depth when it comes to addressing pain points that web devs might have these days. Not only have they not walked a mile in a web dev's shoes, they don't even - as far as I can tell - know what shoes are, or why someone would be wearing them.
    And <cfclient> is a far more "meta" solution than <cfform> or <cfpod> were... at least the CFML-to-client-side solution there had a tangible target in mind. <cfclient> has removed the targets, and is just a tag designed for converting general CFML to general JS. Yikes.
    600-odd words in, here's some code. This is the first-ever code I have written using <cfclient>:
    <cfclient> <cfset msg = "G'day World"> <cfoutput>#message#</cfoutput> </cfclient>
    So I'm off to a false start: I admit I'm sitting in the pub and I've had a few pints (probably four, I guess; this is "having some drinks before deciding to actually drink this evening" sort of level for me), and I inadvertently [messed-up] my variable names here. And this did not yield a compile error. The error just fell through to JS, where it did error
    Uncaught ReferenceError: message is not defined gdayWorld.cfm:4
    If, in contrast, I tried this in CoffeeScript, I'd get this:
    coffee> msg = "G'day world"
    'G\'day world'
    coffee> alert msg
    undefined
    coffee>
    alert message
    ReferenceError: message is not defined
        at eval (eval at  (http://larryng.github.io/coffeescript-repl/js/main.js:96:26), :1:9)
    Important note: I know nothing about CoffeeScript - it seems like a solution to a non-existent problem to me - so I just googled "hello world coffeescript" and REPLed the code on http://larryng.github.io/coffeescript-repl/.
    The point is here is that ColdFusion, during the "compile" process should actually notice I am referencing a variable that doesn't exist. I'm OK with this being a runtime error in the normal CFML-compile process, because there could be many moving parts (and other files) involved in the runtime environment, but I don't think this is a valid notion with <cfclient>? Or maybe it is?
    Update:As Ray points out and Aaron agrees with below: I was being unduly harsh here... it's entirely reasonable for variables to be declared in other JS code elsewhere in the response.
    Anyway, once I actually write my code properly, I get this:
    G'day World
    On the screen. What CF actually sends back in the response is this:
    <script type="text/javascript" src="/CFIDE/cfclient/cfclient_main.js"></script> <script type="text/javascript" src="/CFIDE/cfclient/cffunctions.js"></script> <meta name="viewport" content="width=device-width"> <script type='text/javascript'>globalDivStruct=null;var _$gdayWorld_func=function(){var self=this;var variables={};self.__init=function(){var localdivstruct=globalDivStruct;var __output_var="";var tmpVarArray={};message="G'day World";localdivstruct.outputvar+=message;return""}}; function __startPage__$gdayWorld(){document.write("\x3cdiv id\x3d'__cfclient_0'\x3e\x3c/div\x3e");window.ispgbuild=false;var clientDivStruct={divId:"__cfclient_0",outputvar:""};globalDivStruct=clientDivStruct;try{_$gdayWorld=new _$gdayWorld_func;_$gdayWorld.__init()}catch(__eArg){if(__eArg!=="$$$cfclient_abort$$$")throw __eArg;}__$cf.__flush(clientDivStruct)}__startPage__$gdayWorld(); </script>
    [Blimey]. To output a string variable? Really? That's what you compile my CFML down to?
    Gobsmacked.
    And [forget] emotive things like "gobsmacked"... if one looks at the size of the response, it's 128kB to represent "G'day World" on the screen. 128kB might not be a great deal these days when it comes to a web page, but when it comes to rendering "G'day world", it's lunacy. And on a mobile phone - which intrinsically might be in an area in which one is paying a premium for data - it's just irresponsible. This is before we get to the point that it seriously should not take 128kB of data to render 11 bytes.
    Blimey. To be honest I was gonna try some more tricky CFML and see how it compiled, but I've run out of will to live (and I have to concede the beer is getting the better of me, and my laptop battery is almost dead). I'll continue this, but I will let this article stand or fall on its own merit; something <cfclient> certainly seems to be unable to do, thusfar.
    I'll be back on the case with this tomorrow.
    Adam

    The functions defined in the cffunctions.js are not namespaced. If it is namespaced, you would have to add the namespace while using a function inside cfclient.
    These functions are not namespaced, so that you can use the same syntax for using a function inside and outside the cfclient block.
    This is indicative of everyone's concern that you guys would just implement / encourage poor practice in your <cfclient> implementation.
    How is it - given you're "compiling" the CFML anyway - you cannot translate source code that says "listlen()" into "compiled" JS that is CF.listLen() or something? Thus good CFML can be translated into good JS.
    You seem to think that there's a one-to-one mapping between what the CFML says and what the resultant JS needs to be.
    You've basically written a mechanism for a CFML developer to write bad JavaScript.
    Well done.
    Adam

  • ColdFusion 11: cfclient ports a lot of CFML functions to JS

    G'day:
    I am reposting this from my blog ("ColdFusion 11: cfclient ports a lot of CFML functions to JS") at the suggestion of Adobe support:
    @dacCfml @ColdFusion Can you post your queries at http://t.co/8UF4uCajTC for all cfclient and mobile queries.— Anit Kumar Panda (@anitkumar85) April 29, 2014
    I have edited this in places to remove language that will be deemed inappropriate by the censors here. Changes I have made are in [square brackets]. The forums software here has broken some of the styling, but so be it. There are comments back against the original article - linked to above - which are worth reading too.
    G'day:
    I will start this article - which won't be a long one - by stating I am an adequate JavaScript developer, but I am by no means an expert. I'm at that stage wherein I'm au fait with the syntax and the nuts and bolts of writing OO-esque JS, but I don't spend enough time doing it to know the minutiae of "best practice" and don't automatically know the differences between the "best" way of doing something, and just "a way of doing something". Hence this article asks a question, rather than making any concrete statements.
    A few days ago I wrote my first <cfclient> hello world (or in my case "G'day World") example. I'm not compiling it to a mobile app as I'm not really testing the ColdFusion Builder app packagings stuff (I simply don't care about that), I'm only interested in how <cfclient> performs / works in the context of a tag in the CFML language. See this article for more on that: "ColdFusion 11: <cfclient> in the context of the CFML language, not the tooling".
    One thing I noticed in my "G'day World" code, is that to output those 11 bytes on the screen, <cfclient> loads around 128kB of data, in the form of various tracts of line code and external libraries. Describing this as "egregious" is an understatement.
    One of the libraries particularly caught my interest, as it's called "cffunctions.js", and - as the name suggests - contains a port of alla lot of CFML's built-in functions to JS.
    My first observation is its inclusion is completely unnecessary as I'm not using any functions in my code, and it would be reasonable to think that the <cfclient> CFML to JS compiler might notice that and save people a download. Secondly... it's a single, monolithic 106kB file. Let's have a look at it:
    Well actually when I suggest we should have a look at it, I am actually inviting the JavaScript aficionados amongst us to offer their input. I'm not going to be able to lend much expert analysis to it.
    Observations I will make:
    as I said above: including this file when it's not necessary seems wrong.
    Every single function is just slapped into one huge file. This to me seems equivalent to having a CFC called AllMyCode.cfc, containing... everything, including kitchen sinks and family pets.
    Connected to that: the functions are all declared straight in the global scope, which seems a bit "pollute-y" to me. I can't help but think they ought to be grouped together in a CF namespace, within that some sort of type-centric namespace like CF.List.listAppend(), CF.Math.abs() etc?
    A lot of the code seems rather "longhand", eg: someVar = SomeVar+1 instead of perhaps someVar++; using an indexed for() loop to loop over arrays etc.
    The file's not minified: this would almost halve its size. I dunno if this is such a consideration these days with responses being GZipped?
    Is there anything else you've spotted?
    I might sound a bit nit-picky here (hey: it would not be the first time, and someone needs to ask these questions), but equally if I want someone writing a wizard to write my JS for me, then I want to know that person actually knows what they're doing. And if I can raise code-quality questions... I suspect the answer is I don't want this person writing my JS for me.
    But I completely accept that perhaps there's not an issue to answer here... this article is more soliciting other - more expert - people's opinions.
    What do you think?
    Adam

    The functions defined in the cffunctions.js are not namespaced. If it is namespaced, you would have to add the namespace while using a function inside cfclient.
    These functions are not namespaced, so that you can use the same syntax for using a function inside and outside the cfclient block.
    This is indicative of everyone's concern that you guys would just implement / encourage poor practice in your <cfclient> implementation.
    How is it - given you're "compiling" the CFML anyway - you cannot translate source code that says "listlen()" into "compiled" JS that is CF.listLen() or something? Thus good CFML can be translated into good JS.
    You seem to think that there's a one-to-one mapping between what the CFML says and what the resultant JS needs to be.
    You've basically written a mechanism for a CFML developer to write bad JavaScript.
    Well done.
    Adam

  • TS4006 I want to set up "find my ipad" on my sister's ipad, so we can find each other's iPads. However, this seems to require differing individual cloud email addresses, so one ipad wouldn't recognise the other one. How do I get round this?

    I want to set up "find my ipad" on my sister's ipad, so we can find each other's iPads. However, this seems to require differing individual cloud email addresses, so one ipad wouldn't recognise the other one. How do I get round this?

    Many thanks for the quick response.
    I'm fine with using the same ID for iCloud, so I'll give that a try.
    You mention that a lost ipad can be found from any computer. As a relative computer novice, I didn't know this. How would I go about carrying out such a search?
    I don't think I'd use the find friends app. My concern is to find a lost or stolen ipad.
    Thanks

  • How do I install updated Flash drive? It seems to require OSX 12.

    How do I install the latest version of Adobe Flash Drive ??  It seems to require a12.1 version and I have a 10.68.  How do I expand to a 12.1 ??

    First, you have posted in a PPC forum, but your profile shows you have Snow Leopard installed. That requires an Intel Mac.
    If you have a PPC then you cannot upgrade Adobe Flash from where you are. If you have an Intel Mac you will have to upgrade to Adobe Flash Player 12.0.0.77.

  • I have an iPad1 which I have reset and am preparing to give to a kid.  I now find that I can't reinstall many apps as they now seem to require IOS 6 or greater.  This is IOS 5 and can't be upgraded.  Is there a way to find the older versions of the apps?

    I have an iPad1 which I have reset and am preparing to give to a kid.  I now find that I can't reinstall many apps as they now seem to require IOS 6 or greater.  This is IOS 5 and can't be upgraded.  Is there a way to find the older versions of the apps?

    One of these links may help:
    iOSSearch - search the iTunes store for compatible apps.
    Vintapps 3.1.3 - paid app.
    Apple Club - filter apps by iOS version.

  • The document "mpg" could not be opened. A required codec isn't available.

    I have loaded some home movies from my video camera and when I try to view these I receive the error message The document “filename:MPG” could not be opened. A required codec isn't available.
    I cannot seem to do anything with these files. I can view them on another PC. I have tried to add them to iTunes with no luck, and tried to install an add on for quicktime however it does not download.
    Any suggestions?

    Have you tried VideoLAN? It can often play videos that won't play with Quicktime.
    http://www.videolan.org/vlc/download-macosx.html

  • Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data)

    Dear all,
    Can any one explain about this error,
    2014-11-02 19:19:29.58    *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
    2014-11-02 19:19:29.58    *** Error: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.(System.Data) ***
    2014-11-02 19:19:29.58    Deleting log backup file. File: '\\Jdccb-mis\logshipping\JDCCBPROD_20141030134512.trn', Last Write Time (UTC): '10/30/2014 1:45:13 PM'
    2014-11-02 19:19:29.60    *** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) *****
    This errors comes on My Secondary server during log shipping and database goes to restore mode.
    satish Kumar

    Hi Krishnp,
    These are the latest jobs in queue:
    89 Quadro de Horários 28/6/2014 1:45  N/D Arquivar Configurações do Sistema Aguardando Processamento 0%  
     88 Quadro de Horários 28/6/2014 1:30  N/D Arquivar Modos de Exibição do Project Web App Aguardando Processamento 0%  
     87 Quadro de Horários 28/6/2014 1:00  N/D Arquivar Campos Personalizados Aguardando Processamento 0%  
    When I delete the last work automatically related are excluded.
    Currently the queue is 406 jobs.
    David Soares MCTS:MBS - MCTS - MCITP

  • HT3775 I have a bunch of .MOD files I cannot play from our Canon video cam. I tried renaming the files as MPEG or MOV, I get the message "The document "001.MPEG" could not be opened. A required codec isn't available." Any advice on getting these to play?

    I have a slew of .MOD files I cannot play from our Canon video cam. I tried renaming the files as MPEG or MOV, I get the message "The document “001.MPEG” could not be opened. A required codec isn't available." Any advice on getting these to play? Thanks!

    Try installing Perian or VLC. Some AVIs require a codec which simply isn't available for Mac OS X.
    (85018)

  • HT3775 I recently upgraded my OS to Mountain Lion 10.8.2 and cannot open up .avi files now in Quicktime. I get this error message: The document "ANDREW_McD_MEDIA_VERSION.avi" could not be opened. A required codec isn't available.

    I recently upgraded my OS to Mountain Lion 10.8.2 and cannot open up .avi files now in Quicktime. These same files opened up with no problem prior to my upgrade.  Additionally, I had upgraded to the Pro version of Quicktime recently, but it appears I've retrograded back to the basic version, unexplainably.
    I get this error message: The document “ANDREW_McD_MEDIA_VERSION.avi” could not be opened. A required codec isn't available.

    Hi,
    I had exactly the same problem & found the answer here  https://discussions.apple.com/thread/3219982?start=0&tstart=0 . Download a program called Perian, very easy to download worked a treat. I wish all fixes were this easy - Debbie

  • HT3775 I get the following message when trying to open an .avi downloaded from my video cam, need help, can not find the codec, thank you.The document "IMAG0026.AVI" could not be opened. A required codec isn't available.

    I get the following message when trying to open an .avi downloaded from my video cam, need help, can not find the codec, thank you. This is for Quicktime Player.
    "The document “IMAG0026.AVI” could not be opened. A required codec isn't available."

    Try Perian.
    http://perian.org/

  • HT3775 bought Bushnell trail cam: worked,got 2nd cam: worked. Got 3rd cam which needed DIV X,so downloaded, now can't view 1st 2 cams. msg " required codec is not available" ***? worked for 2 years till downloaded DIV X now can't view old cams. Suggestion

    I bought a Bushnell trail cam. Worked well, each video presented on the screen with the opening frame of the 10 second video. I could tell at a glance what the video was.( I have to guess it used quicktime ). I bought a second cam, same results as first. I bought a 3rd cam ,( all bushnell ), which required me to download " DIV X ", which I did. Now, I can no longer view the first frame of the 10 sec video, it just has an icon that says "AVI XXX"   ( XXXbeing the number of the video ). I now have to click the icon, go to "Action" drop down "open with" and select DIV X , for each "anonymous" video, ( as I cant see what they are  any more , just a number).  Furthermore, I can no longer view my old videos. A message shows up saying " a required codec is not available"    ***????
    The 2 original cams worked for 2 years with no problem, but since downloading DIV X I cant play the older ones. I should point out that even if I select a (now) anonymous video, go to " Action", drop down "open with" and manually select quicktime,  the message still shows up about the codec.
    Suggestions??
    Thanks for any help

    hello sir,
    i want to your help
    i was installed fresh windows 7 via cd rom and then after installed all software.
    and now after 1 day customer complained me that cd rom not read any cd and i m also check when i insurt cd so its not read and when i am double click on cd rom icon its eject so what i do for that please reply on my email address.
    [text removed for privacy]
    VIMAL

  • Error on extend an internal table, but the required space was not available

    Hi All,
    I am trying to retrieve cost data from COVP tables, as well as the quantity, cost centre, and price unit fields from MSEG / BSEG tables. Thing is, if the AWTYP value in COVP table = 'MKPF', i have to get the data from MSEG, otherwise, I need to get it from BSEG table.
    I kept getting this error message:
    <i>You attempted to extend an internal table, but the required space was not available.</i>
    Anyone have any idea how to make my codes more efficient?
    Please help. Thanks!
    Regards,
    Cecilia
    REPORT  ZMISCY004.
    TABLES : COVP, BSIS, BSEG, MSEG, MAKT, CSKU.
    PARAMETERS :
    P_FILE(300) DEFAULT '\sapdcdatasaprptoh.txt' LOWER CASE.
    DATA MSG_TEXT(50).
    DATA :
    XKOKRS LIKE COVP-KOKRS,
    XBELNR LIKE COVP-BELNR,
    XBUZEI LIKE COVP-BUZEI,
    XGJAHR LIKE COVP-GJAHR,
    XPERIO LIKE COVP-PERIO,
    XWKGBTR LIKE COVP-WKGBTR,
    XWTGBTR LIKE COVP-WTGBTR,
    XREFBN LIKE COVP-REFBN,
    XREFBZ LIKE COVP-REFBZ,
    XKSTAR LIKE COVP-KSTAR,
    XBEKNZ LIKE COVP-BEKNZ,
    XMATNR LIKE COVP-MATNR,
    XBUKRS LIKE COVP-BUKRS,
    XREFGJ LIKE COVP-REFGJ,
    XREFBK LIKE COVP-REFBK,
    XLTEXT LIKE CSKU-LTEXT,
    XMAKTX LIKE MAKT-MAKTX,
    XAWTYP LIKE COVP-AWTYP,
    XTWAER LIKE COVP-TWAER,
    XSGTXT LIKE COVP-SGTXT,
    BSEG_KOSTL LIKE BSEG-KOSTL,
    BSEG_MEINS LIKE BSEG-MEINS,
    BSEG_MENGE LIKE BSEG-MENGE,
    MSEG_KOSTL LIKE MSEG-KOSTL,
    MSEG_MENGE LIKE MSEG-MENGE,
    MSEG_MEINS LIKE MSEG-MEINS.
    DATA : BEGIN OF ITAB_COVP OCCURS 10,
    KOKRS LIKE COVP-KOKRS,
    BELNR LIKE COVP-BELNR,
    BUZEI LIKE COVP-BUZEI,
    GJAHR LIKE COVP-GJAHR,
    PERIO LIKE COVP-PERIO,
    WKGBTR(15) TYPE C,
    WTGBTR(15) TYPE C,
    REFBN LIKE COVP-REFBN,
    REFBZ(3) TYPE C,
    KSTAR LIKE COVP-KSTAR,
    BEKNZ LIKE COVP-BEKNZ,
    MATNR LIKE COVP-MATNR,
    BUKRS LIKE COVP-BUKRS,
    REFGJ LIKE COVP-REFGJ,
    REFBK LIKE COVP-REFBK,
    LTEXT LIKE CSKU-LTEXT,
    MAKTX LIKE MAKT-MAKTX,
    AWTYP LIKE COVP-AWTYP,
    TWAER LIKE COVP-TWAER,
    SGTXT LIKE COVP-SGTXT,
    BSIS_WRBTR(13) TYPE C,
    BSEG_KOSTL LIKE BSEG-KOSTL,
    BSEG_MEINS LIKE BSEG-MEINS,
    BSEG_MENGE LIKE BSEG-MENGE,
    MSEG_KOSTL LIKE MSEG-KOSTL,
    MSEG_MENGE LIKE MSEG-MENGE,
    MSEG_MEINS LIKE MSEG-MEINS.
    DATA : END OF ITAB_COVP.
    SELECT M1~KOKRS
           M1~BELNR
           M1~BUZEI
           M1~GJAHR
           M1~PERIO
           M1~WKGBTR
           M1~WTGBTR
           M1~REFBN
           M1~REFBZ
           M1~KSTAR
           M1~BEKNZ
           M1~MATNR
           M1~BUKRS
           M1~REFGJ
           M1~REFBK
           M1~AWTYP
           M1~TWAER
           M1~SGTXT
           M4~KOSTL
           M4~MENGE
           M4~MEINS
    INTO (XKOKRS,
          XBELNR,
          XBUZEI,
          XGJAHR,
          XPERIO,
          XWKGBTR,
          XWTGBTR,
          XREFBN,
          XREFBZ,
          XKSTAR,
          XBEKNZ,
          XMATNR,
          XBUKRS,
          XREFGJ,
          XREFBK,
          XAWTYP,
          XTWAER,
          XSGTXT,
          MSEG_KOSTL,
          MSEG_MENGE,
          MSEG_MEINS
    FROM COVP AS M1
    LEFT OUTER JOIN MSEG AS M4
    ON M1~REFBN = M4~MBLNR AND M1~REFBZ = M4~ZEILE AND M1~REFGJ = M4~MJAHR
    WHERE M1~SCOPE = 'OCOST' AND M1~AWTYP = 'BKPF'
      OR M1~SCOPE = 'OCOST' AND M1~AWTYP = 'MKPF'
      OR M1~KSTAR = '972022'.
    IF XAWTYP = 'BKPF'.
    SELECT KOSTL MENGE MEINS INTO (BSEG_KOSTL, BSEG_MENGE, BSEG_MEINS) FROM
    BSEG WHERE BELNR = XREFBN AND BUZEI = XREFBZ AND GJAHR = XREFGJ AND
    BUKRS = XREFBK.
    ENDSELECT.
    MOVE BSEG-KOSTL TO BSEG_KOSTL.
    MOVE BSEG-MEINS TO BSEG_MEINS.
    MOVE BSEG-MENGE TO BSEG_MENGE.
    ELSE.
    MOVE ' ' TO BSEG_KOSTL.
    MOVE ' ' TO BSEG_MEINS.
    MOVE ' ' TO BSEG_MENGE.
    ENDIF.
    *GET LTEST
    SELECT LTEXT INTO XLTEXT
    FROM CSKU
    WHERE KTOPL = 'COAA' AND SPRAS = 'EN'.
    *GET MAKTX
    IF XMATNR <> ' '.
    SELECT SINGLE * FROM MAKT WHERE MATNR = XMATNR.
    MOVE MAKT-MAKTX TO XMAKTX.
    ELSE.
    MOVE ' ' TO XMAKTX.
    ENDIF.
    MOVE : XKOKRS TO ITAB_COVP-KOKRS,
           XBELNR TO ITAB_COVP-BELNR,
           XBUZEI TO ITAB_COVP-BUZEI,
           XGJAHR TO ITAB_COVP-GJAHR,
           XPERIO TO ITAB_COVP-PERIO,
           XWKGBTR TO ITAB_COVP-WKGBTR,
           XWTGBTR TO ITAB_COVP-WTGBTR,
           XREFBN TO ITAB_COVP-REFBN,
           XREFBZ TO ITAB_COVP-REFBZ,
           XKSTAR TO ITAB_COVP-KSTAR,
           XBEKNZ TO ITAB_COVP-BEKNZ,
           XMATNR TO ITAB_COVP-MATNR,
           XBUKRS TO ITAB_COVP-BUKRS,
           XREFGJ TO ITAB_COVP-REFGJ,
           XREFBK TO ITAB_COVP-REFBK,
           XLTEXT TO ITAB_COVP-LTEXT,
           XMAKTX TO ITAB_COVP-MAKTX,
           XAWTYP TO ITAB_COVP-AWTYP,
           XTWAER TO ITAB_COVP-TWAER,
           XSGTXT TO ITAB_COVP-SGTXT,
           BSEG_KOSTL TO ITAB_COVP-BSEG_KOSTL,
           BSEG_MEINS TO ITAB_COVP-BSEG_MEINS,
           BSEG_MENGE TO ITAB_COVP-BSEG_MENGE,
           MSEG_KOSTL TO ITAB_COVP-MSEG_KOSTL,
           MSEG_MENGE TO ITAB_COVP-MSEG_MENGE,
           MSEG_MEINS TO ITAB_COVP-MSEG_MEINS.
    APPEND ITAB_COVP.
    CLEAR ITAB_COVP.
    ENDSELECT.
    ENDSELECT.
    OPEN DATASET P_FILE FOR OUTPUT IN TEXT MODE.
    IF SY-SUBRC NE 0.
       WRITE: 'File cannot be opened. Reason:', MSG_TEXT.
       EXIT.
    ENDIF.
    LOOP AT ITAB_COVP.
    TRANSFER ITAB_COVP TO P_FILE.
    ENDLOOP.
    CLOSE DATASET P_FILE.

    Cecilia - I think your problemn is a nested select:
    *GET LTEST
      SELECT ltext INTO xltext
      FROM csku
      WHERE ktopl = 'COAA' AND spras = 'EN'.
    *GET MAKTX
        IF xmatnr <> ' '.
          SELECT SINGLE * FROM makt WHERE matnr = xmatnr.
          MOVE makt-maktx TO xmaktx.
        ELSE.
          MOVE ' ' TO xmaktx.
        ENDIF.
        MOVE : xkokrs TO itab_covp-kokrs,
                     etc.
              mseg_meins TO itab_covp-mseg_meins.
        APPEND itab_covp.
        CLEAR itab_covp.
      ENDSELECT.
    Do you need to do the inner select for every cost element text?
    Rob

  • Internally required memory is not available in SMQ2

    Hi All,
    In our XI Production server one message in SMQ2 (Inbound) has been stucked.
    Error details "Internally required memory is not available ".
    This IDOC is having a size of 552 MB, when I checked the sap fourms I found that there is one instance profile parameter which is req to process a large message.
    icm/HTTP/max_request_size_KB
    The parameter can also be used in the SAP Web Dispatcher.
    The default is 102 400 (100MB).
    Do we need to set this parameter in our instance profile???
    Currently this parameter is not present in our Production enviornment.
    Pls suggest.
    Regards,
    Prashant

    I will suggest that if icm/HTTP/max_request_size_KB  is not set then set this up with a value higher than the size of the stuck IDOC and give it a try.
    now icm/HTTP/max_request_size_KB is not dynamically switchable so you'll have to add the parameter via RZ10 and restart your system.
    Also you can rad the XI tuning guide,
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70ada5ef-0201-0010-1f8b-c935e444b0ad
    Regards
    Juan

  • I have a file that is something I recorded on my camcorder.  I am trying to open it and it keeps saying that a required codec isn't available.  This is the name of the file. M2U00001.MPG.  What can i do to get it to play.

    I have a file that is something I recorded on my camcorder.  I am trying to open it and it keeps saying that a required codec isn't available.  This is the name of the file. M2U00001.MPG.  What can i do to get it to play.

    The info in this thread should help you - https://discussions.apple.com/thread/3648239?start=0&tstart=0 

Maybe you are looking for