Functional Tables

Hi gurus,
   Can anyone tell me the functional tables used in developing a report to get the Customer/Customer group wise sales and quantity.
Thanks
Sandeep.

Hi,
Check this link..
http://www.erpgenie.com/abap/tables.htm
regards,
Omkar.

Similar Messages

  • Partner Function table for vendors in R/3.

    Hi,
    Can any one please let me know what is the
    Partner Function table for vendors in R/3.
    Thanks.

    Hi,
    Check the table WYT3
    Thanks,
    Naren

  • CC4.0 Printing or Exporting Ruleset/Conflicting Functions Table

    Is it possible in CC4.0 to print out the tables under the Rule Architecture such as the Rule Set/Conflict Functions table?    We would like to print out to excel so we can perform a formal review with our business process owners.   Was able to in the last version.

    Hi J,
       This is possible but not directly. You can go to Rule Architect -> Rules -> Conflicting Transactions and search for particular Business process. Once you get the results in Business view, click on Technical view. Over here you can export the data to excel.
    You can download everything from critical transaction/role/profile as there is a download functionality available over there.
    Regards,
    Alpesh

  • Select from local (tmp) Table in Function - Table not found

    Hi,
    I want to create a cursor which selects from a Table which does not exist in database.
    I create this table as local table (how is it called? nested table?).
    Not shown in the code but I want to fill this local table later.
    After filled my cursor is going to use this filled table.
    When try to run I get the error Table or View does not exist at the "FROM TempTab_var T1;" of my cursor.
    This is my simplified code:
    CREATE OR REPLACE FUNCTION PC_RL_MTA_PMT
    RETURN PC_RL_MTA_TYPE_PMT
    IS
    result_out PC_RL_MTA_TYPE_PMT;
      TYPE TempTab_record_type IS RECORD
        (ID int);
      TYPE TempTab_type IS TABLE OF TempTab_record_type
              INDEX BY BINARY_INTEGER;
      TempTab_var TempTab_type;
      CURSOR TempCursor3_var IS
        SELECT    ID AS ID_var
        FROM    TempTab_var T1;
    BEGIN
    RETURN result_out;
    END PC_RL_MTA_PMT;
    Any Ideas whats wrong?
    Thanks very much in advance.

    And a further example from my library of examples, just to help you out...
    SQL> CREATE OR REPLACE TYPE num_descript AS OBJECT(num number, descript varchar2(30))
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE tbl_num_descript AS TABLE OF num_descript
      2  /
    Type created.
    SQL> CREATE OR REPLACE PACKAGE reftest AS
      2    FUNCTION pipedata(p_choice number) RETURN tbl_num_descript PIPELINED;
      3  END;
      4  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY reftest AS
      2    FUNCTION pipedata(p_choice number) RETURN tbl_num_descript PIPELINED IS
      3      v_obj num_descript := num_descript(NULL,NULL);
      4      v_rc  sys_refcursor;
      5    BEGIN
      6      IF p_choice = 1 THEN
      7        OPEN v_rc FOR SELECT empno as num, ename as descript FROM emp;
      8      ELSIF p_choice = 2 THEN
      9        OPEN v_rc FOR SELECT deptno as num, dname as descript FROM dept;
    10      END IF;
    11      LOOP
    12        FETCH v_rc INTO v_obj.num, v_obj.descript;
    13        EXIT WHEN v_rc%NOTFOUND;
    14        PIPE ROW(v_obj);
    15      END LOOP;
    16      CLOSE v_rc;
    17      RETURN;
    18    END;
    19  END;
    20  /
    Package body created.
    SQL> select * from table(reftest.pipedata(1));
           NUM DESCRIPT
          7369 SMITH
          7499 ALLEN
          7521 WARD
          7566 JONES
          7654 MARTIN
          7698 BLAKE
          7782 CLARK
          7788 SCOTT
          7839 KING
          7844 TURNER
          7876 ADAMS
          7900 JAMES
          7902 FORD
          7934 MILLER
    14 rows selected.
    SQL> select * from table(reftest.pipedata(2));
           NUM DESCRIPT
            10 ACCOUNTING
            20 RESEARCH
            30 SALES
            40 OPERATIONS

  • Where is the build table express vi located in the function table?

    I must be blind but I can't locate the build table express vi in lv8 or 8.5.  Someone slap be upside the head and point it out.  Thanks

    It's on the Controls palette. Were you looking on the Functions palette?
    Message Edited by Dennis Knutson on 04-23-2008 08:22 PM
    Attachments:
    Express XY Graph.PNG ‏17 KB

  • GTS How to get commodity code from material master ? function/ table

    Hello,
    I have to write a "simple" program in GTS system.    (In SD   Commodity code is field MARC-STAWN  )
    The customer wants to enter material numbers ( from x  to y )
    and the program should display:
    Material--Material text--Commodity codevalidity from--
    validity to
    4711--Maschine_A--12345678905.08.2006--
    31.12.2008
    124587444--01.01.2009--
    31.12.9999
    4712--Maschine_B--5656568901.12.2007--
    31.12.2009
    (The customer wants to have a look if all Commodity codes in GTS are maintained)
    Can someone give me the name of the tables where it is stored in GTS?
    Or are there any function calls to get material data?
    best regards and many thanks
    Norbert
    Edited by: Norbert Zanders on Jan 1, 2009 5:08 PM

    You have to consider the following tables:
    /SAPSLL/PNTPR --> product number and GUID
    /SAPSLL/PRCTS --> product GUID and GUID of commodity code
    /SAPSLL/CTSNUM or /SAPSLL/CTSNUMC--> commodity code (general or country specific)
    /SAPSLL/CTSNUMT --> commodity code description
    /SAPSLL/PRT --> material description

  • Important Functional Tables

    Could someone help me know the important tables in the following functional modules that are used in BW extraction:
    1) SD
    2) MM

    Go to se84..transaction on R/3 system.. you get to see a selection screen..
    For development class choose F4>then choose Application hierarchy under SAP> choose click on node SD --> you get to see couple of  functional areas under SD like billing,sales, sales support etc...choose the one you are interested in..
    and press execute .
    Hope this helps.
    Regards
    Manga

  • Incomplete/Inaccurate Functional Table of Contents

    I created my new template based on Apple's 'Contemporary' iba template. By doing so, I must have deleted some formating: My E-book has been rejected from iBookstore several times by now, because of the 'table of contents' issue. I may assume, it is because the section headings have no blue border anymore. If I chose the virgin Apple template and start typing in a new section heading text, the whole selection heading text has a blue border - but not in my modified template. How can I turn back to the blue bordered section heading, in order to correct that TOC issue?

    Finally, I had to start from scratch: take the original Apple template and modifiy the two, three points important to my own 'corporate identity', save it as iba template and start copying-pasting contents from the messed-up old document into the new one. I am pritty sure, this will solve not only the TOC isue but also the version number issue and eventually the portrait view TOC issue...
    (b.t.w. These blue frames can easily be deleted and do not re-appear if all the framed characters have been deleted once. Some formating is far far away to normal users.)

  • Partner function table for purchasing

    Hi All,
      do we've a table similar to <b>VBPA</b> in purchasing?

    Hi,
    Please check tabke EKPA.
    Regards,
    Ferry Lianto

  • What is the table for partner functions in Billing document

    Hello Experts,
             As per the business requirement my functional consultant included Fright agent (created as a vendor) in  billing document  partner functions,
    so they want to display the name fright agent on the invoice,
    i have checked all the tables related to Billing document, i was unable to find the fright agent  
    I checked in VBPA table (partner function table) (remaining partner functions are there in vbpa table  but fright agent is not there, Is there any function module is available to pick these information ,Please help me in this.

    Read some documentation like [Partner Functions|http://help.sap.com/saphelp_crm40/helpdata/en/3c/92eceb484a11d5980800a0c9306667/frameset.htm], also be aware of the conversion exit on the field PARVW. (check via SM30 on view V_TPAR_SD)
    Regards,
    Raymond

  • Missing Data in JCO.Table passed as Function Parameter

    I am running a JCO server & in my handleRequest(), I am trying to get the data from the tables paased as function parameters from the SAP system.
    Somehow I am not able to see any data in the tables, though the SAP system has put some data in the tables before sending.
    The no. of rows in the table is 0 always on the JCO side. I tried to dunp the content of the Function & Table with writeHTML() & it shows no data too.
    I am able to pass simple strings & integers, but the tables doesn't work. Can anyone tell me where might be the problem.

    Can you post the code you have used !

  • Missing Data in Table passed as Function Parameter

    I am running a JCO server & in my handleRequest(), I am trying to get the data from the tables paased as function parameters from the SAP system.
    Somehow I am not able to see any data in the tables, though the SAP system has put some data in the tables before sending.
    The no. of rows in the table is 0 always on the JCO side. I tried to dunp the content of the Function & Table with writeHTML() & it shows no data too.
    I am able to pass simple strings & integers, but the tables doesn't work. Can anyone tell me where might be the problem.

    Hi,
       I am bit confused, You are not getting the data in the Function module when you make a call from Java or the data returned by the function module is not reaching the Java side. If you are not getting the data which you pass from java in the function module then I have faced this problem before.
    In that case the problem was when you pass data as table parameters to the function module you have to check the size of table parameter I was using INITIAL to check if there is any data in the table parameter. If this is the same problem may be by checking the size of the table will solve your problem.
    Regards,
    Sesh

  • Does using TABLE FUNCTIONS degrades performance

    Hi,
    I am using a TABLE Function TABLE(TABLEA)
    I am using a SQL Statement where I am joing TABLE FUNCTION :TABLE(TABLEA) and Normal table:TABLEB
    i.e
    SELECT CODE,SUD FROM TABLEB,TABLE(TABLEA)
    WHERE CODE=CODE1 (CODE1 is a Object Type variable).

    user598986 wrote:
    I am using a TABLE Function TABLE(TABLEA)
    I am using a SQL Statement where I am joing TABLE FUNCTION :TABLE(TABLEA) and Normal table:TABLEB
    i.e
    SELECT CODE,SUD FROM TABLEB,TABLE(TABLEA)
    WHERE CODE=CODE1 (CODE1 is a Object Type variable).One particular issue with table functions and joins is that the optimizer doesn't have a clue about the cardinality, i.e. the number of rows returned by the table function and therefore applies defaults which might be way off. If you somehow know roughly how many rows are going to be returned (may be a quite constant number of rows or your process know the number of rows in a collection etc.) then you can help the optimizer by using the (undocumented) "CARDINALITY" hint, e.g.
    SELECT /*+ CARDINALITY (A, 100) */ CODE,SUD FROM TABLEB B,TABLE(TABLEA) A...
    tells the optimizer that the table function is going to return 100 rows. Note the usage of the alias in the hint.
    But bear in mind that this only helps partially, some other basic information like column statistics are still missing and therefore the estimates of the optimizer still might be inaccurate.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Table Maintenance View

    I have created a custom table with fields EKORG, EKGRP,APPROVER(XUBNAME), Release Code (FRGAB), Financial Limit (CURR 15), WAERS, USER_CHANGE, DATE_CHANGE, TIME_CHANGE.
    Also, created a maintanence view for the table.
    If I create an entry in sm30 and save it, my requirement is that the last three fields named User Change, Date Change and Time Change should be populated automatically. Is events will do for this ? If so, please let me know how to find the subroutine to code for!

    Hai Clara
    Go through the following Document & Example for Search Helps
    The Matchcode is replaced by search help from the version 4.6C.
    I will tell u how create the search help.
    Name of a search help
    A search help is an object of the ABAP Dictionary with which input helps
    (F4 helps) can be defined.
    There are the following types of search helps:
    o Elementary search helps implement a search path for determining the
    possible entries.
    o Collective search helps contain several elementary search helps. A
    collective search help therefore provides several alternative search
    paths for possible entries.
    o Append search helps can be used to enhance collective search helps
    delivered by SAP with customer-specific search paths without
    requiring a modification.
    The three components of the input help process described by a search
    help are the outer interface, the online behavior and the method of data
    Go to Tcode SE11. Select the search help radio button.
    Give name as ztest and click create
    There are two types of search help.
    Once is elementary search help
    & collective search help
    Choose one.
    Add the data element.
    MatchCode is replaced by search helps.
    To attach a search help to a field.
    Use this code.
    at selection-screen on value-request for source.
    progname = sy-repid.
    dynnum = sy-dynnr.
    clear value_tab.
    refresh value_tab.
    Filling the Value_tab internal table by itab2 internal table.
    loop at itab_desc.
    write itab_desc-description to value_tab.
    append value_tab.
    endloop.
    prog = sy-repid.
    no = 1000.
    clear tab.
    refresh tab.
    Building the Structure of the Seach Help.
    tab-tabname = 'FMFCTRT'.
    tab-fieldname = 'BESCHR'.
    collect tab.
    Function Used to provide Search Help.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'BESCHR'
    dynpprog = prog
    dynpnr = no
    dynprofield = 'SOURCE'
    window_title = 'Function'
    TABLES
    value_tab = value_tab
    field_tab = tab.
    Regards
    Sreeni

  • [CS4/JS] Pnglib.jsx -- A PNG creator function

    After seeing Marc Autret's marvellous pngswatch script, I spent several hours creating PNGs with Photoshop, copying its hex data into Javascript compatible format, finding the relevant color bytes to change ... and all the while I was thinking, "there was an uncompressed PNG format, wasn't there?"
    That's not because I have a bad memory.
    Sure, Marc created his PNG in some other program, saved it as a compressed file, and 'only' changed the palette part in his script -- which involves delving quite deeply into the actual PNG format --, and that's a feasible way of doing the stuff he intended to: change jsut the color. But if you want to actually create a dropdown or listbox image on the fly -- say, for a line widths dropdown --, you have to be able to create an entire image a-new. And PNGs are notoriously difficult to create, because the image pixels themselves are compressed using the very advanced zlib compression.
    But (as I was thinking) ... zlib also allows a "non-compressed" format!
    With some sleuthing I found a couple of hints to get me started, and found a totally useful utility as well: pngcheck, which can take a PNG to bits and tell you what's wrong with it. So, here you have it: a lightweight PNGLIB Javascript, that can create any PNG right out of nothing!
    Any image, apart from the limitations, that is.
    Its main limitation is that you can only create 8-bit palettized PNGs with it. I see no reason to add umpteen functions to cater for the occasional 1-, 2-, or 4-bit or true color PNG, or to add total support for all the different types of transparency that PNG supports. But, hey, its main use is for icons, and you'll have to do with the limits of "just" 256 colors -- or even less than that, if you reserve one or more colors for transparency. On the plus side again, it's total real pixel alpha-level transparency we're talking about (overall that can make your graphics still better than the average '90s DOS game).
    Using the function is easy; at the bottom of the script is an example, but it boils down to:
    Create a string for the palette's colors. Each color is a triplet, in RGB order.
    Create a string for the transparency indexes. Each single entry determines the transparency of the full palette color at that index; the first entry applies to color index #0, the second to color index #1, and so on. The value [00] indicates zero opacity (fully transparent), the value [FF] full opacity. The transparency index string doesn't need to define all of your colors' transparencies; unlisted values are "normal", non-transparent, and if you only need to make color index #0 transparent, you are done right there and then. By the way, the transparency string may be omitted entirely if you don't need it.
    Create a string for the image itself -- wide x high color indexes. Make sure you fill the entire image, 'cause my function will refuse to work if this string length isn't correct.
    Then call my function: myImg = makePng (wide, high, palette, pixels [, transparency]);
    The returned string can be used immediately as a source for a ScriptUI dialog image, or -- less useful, but might come in handy -- be written to a file.
    Tips: hmm. I dunno. Don't use this function to create super-huge PNGs, I guess. The non-compression format uses a couple of checksums on its own, and they are sure to fail on very large images. But, come on, be realistic: it's not a Photoshop replacement we're talking about, it's for icons!
    And Be Kind to Your Users: it's rather overkill to include all of the data for a static PNG image, such as a logo or something. Just create that once, and include the binary data in your script! This function is designed to create PNGs on the fly, from variable rather than static data.
    Before I forget: here it is. Enjoy!
    /****** PngLib.jsx ******/
    /* A Jongware Product -- based *very* heavily, however, upon Marc Autret's pngswatch
    /* script (http://forums.adobe.com/thread/780105?tstart=0), and with further
    /* help from the pages of David "Code Monk" Jones (http://drj11.wordpress.com/2007/11/20/a-use-for-uncompressed-pngs/)
    /* and Christian Fröschlin (http://www.chrfr.de/software/midp_png.html)
    /* Any errors, of course, must have crept in while I wasn't paying attention.
    /* [Jw] 26-Jan-2010
    var makePng = (function()
         // Table of CRCs of 8-bit messages
         var CRC_256 = [0, 0x77073096, 0xee0e612c, 0x990951ba, 0x76dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0xedb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x9b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x1db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x6b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0xf00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x86d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x3b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x4db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0xd6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0xa00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x26d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x5005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0xcb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0xbdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d];
         // PNG Cyclic Redundancy Code algorithm -- http://www.w3.org/TR/PNG/#D-CRCAppendix
         var crc32s = function(/*uint[]*/buf)
              var c = 0xffffffff, i;
              for( i=0 ; i < buf.length; i++ )
                   c = CRC_256[(c ^ buf.charCodeAt(i)) & 0xff] ^ (c >>> 8);
              return (c ^ 0xffffffff);
         var header = function ()
              return "\x89PNG\x0D\x0A\x1A\x0A";
         var i2s = function (/*int32*/i)
              return String.fromCharCode(i>>>24) + String.fromCharCode(i>>>16) + String.fromCharCode(i>>>8) + String.fromCharCode(i);
         var chunk = function (/*4 Char PNG code*/chunkType, /*data*/data)
              var buf = chunkType + data;
              var crc = crc32s(buf);
              buf = i2s (data.length) + buf + i2s (crc);
              return buf;
         var adler32 = function (/*string*/buf)
              var i, a = 1, b = 0;
              for (i=0; i<buf.length; i++)
                   a += buf.charCodeAt(i); s1 %= 65521;
                   b += a; b %= 65521;
              return (b<<16)+a;
         return function(/*int*/wide, /*int*/high, /*string*/ pal, /*string*/image, /*string*/transpIndex)
              var t, bits;
              if (pal.length % 3)
                   alert ("Bad Palette length -- not a multiple of 3");
                   return null;
              if (image.length != high*wide)
                   alert ("Size error: expected "+(high*wide)+" bytes, got "+image.length);
                   return null;
              bits = '';
              for (t=0; t<high; t++)
                   bits += "\x00"+image.substr(t*wide, wide);
              t = bits.length;
              bits += i2s (adler32(bits));
              var r = header() + chunk ('IHDR', i2s (wide)+i2s(high)+"\x08\x03\x00\x00\x00");
              r += chunk ('PLTE', pal);
              if (transpIndex != null)
                   r += chunk ('tRNS', transpIndex);
              r += chunk ('IDAT', "\x78\x9c\x01"+ String.fromCharCode (t & 0xff)+String.fromCharCode((t>>>8) & 0xff)+String.fromCharCode ((~t) & 0xff)+String.fromCharCode(~(t>>>8) & 0xff)+bits);
              r += chunk ('IEND', '');
              return r;
    /* Sample usage. Remove when #including the above in _your_ script! */
    var pngPal  = "\x00\x00\x00"+"\xff\x00\x00"+"\x00\xff\x00"+"\x00\x00\xff"+"\xff\xff\x00"+"\x40\x40\x40";
    var pngData =     "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"+
                        "\x00\x01\x01\x02\x02\x03\x03\x04\x04\x00"+
                        "\x00\x01\x01\x02\x02\x03\x03\x04\x04\x00"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x01\x01\x02\x02\x03\x03\x04\x04\x05"+
                        "\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05";
    img = makePng (10,11, pngPal, pngData, "\x40");
    var w = new Window("dialog", "Image test");
    w.add ('image', undefined, img);
    var f = new File(Folder.myDocuments+"/test-me2.png");
    if (f.open('w'))
         f.encoding = "BINARY";
         f.write (img);
         f.close();
    } else
         alert ("eh -- couldn't write test file...");
    w.show();

    Here is a more complicated (and useful ) example. (--Its actual usefulness is not as, erm, useful as I hoped, because it seems you don't have access to the built-in stroke styles! If anyone knows a work-around that, let me know ...)
    First, create a few custom Striped and/or Dashed stroke styles; then call this Javascript to see them created "live" in the drop down. Make sure you removed the sample code from the end of "pnglib.jsx", otherwise that dialog with interfere and mess up my nice program.
    #include "pnglib.jsx"
    function createStripeImg (styleIndex)
         var pngPal  = "\x00\x00\x00"+"\xff\xff\xff";
         var pngData = '';
         var x,y, ystart;
         var stripes = [];
         var i;
         for (y=0; y<app.activeDocument.stripedStrokeStyles[styleIndex].stripeArray.length; y++)
              stripes.push (Math.round (11*app.activeDocument.stripedStrokeStyles[styleIndex].stripeArray[y]/100));
         i = 0;
         for (y=0; y<11; y++)
              if (y >= stripes[i])
                   if (y <= stripes[i+1])
                        for (x=0; x<48; x++)
                             pngData += "\x00";
                        continue;
                   i += 2;
              for (x=0; x<48; x++)
                   pngData += "\x01";
         return makePng (48,11, pngPal, pngData, "\xff\x00");
    function createDashImg (styleIndex)
         var pngPal  = "\x00\x00\x00"+"\xff\xff\xff";
         var pngData = '';
         var x,y, xstart;
         var dashes = [];
         var i, len;
         len = 0;
         for (y=0; y<app.activeDocument.dashedStrokeStyles[styleIndex].dashArray.length; y++)
              len += app.activeDocument.dashedStrokeStyles[styleIndex].dashArray[y];
         xstart = 0;
         for (y=0; y<app.activeDocument.dashedStrokeStyles[styleIndex].dashArray.length; y++)
              dashes.push (xstart);
              xstart += Math.round (48*app.activeDocument.dashedStrokeStyles[styleIndex].dashArray[y]/len);
         dashes.push (47);
         i = 0;
         for (y=0; y<11; y++)
              if (y < 3 || y > 8)
                   for (x=0; x<48; x++)
                        pngData += "\x01";
              } else
                   xstart = 0;
                   for (x=0; x<48; x++)
                        if (x >= dashes[xstart])
                             if (x >= dashes[xstart+1])
                                  xstart += 2;
                             pngData += "\x00";
                        } else
                             pngData += "\x01";
         return makePng (48,11, pngPal, pngData, "\xff\x00");
    if (app.activeDocument.stripedStrokeStyles.length+app.activeDocument.dashedStrokeStyles.length < 1)
         alert ("This example needs a few custom stripe or dash stroke styles to play with");
         exit (0);
    var w = new Window("dialog", "Select a stripe type");
    var ddl = w.add("dropdownlist");
    for( i=0; i < app.activeDocument.stripedStrokeStyles.length; i++)
         (ddl.add('item', " "+app.activeDocument.stripedStrokeStyles[i].name)).image = createStripeImg (i);
    for( i=0; i < app.activeDocument.dashedStrokeStyles.length; i++)
         (ddl.add('item', " "+app.activeDocument.dashedStrokeStyles[i].name)).image = createDashImg (i);
    ddl.selection = 0;
    g = w.add ("group");
    g.orientation = 'row';
    g.add ("button", undefined, "OK");
    g.add ("button", undefined, "Cancel");
    w.show();

Maybe you are looking for

  • Win 8.1, iMac Retina 3TB Fusion, Yosemite, Boot Camp fail!

    I've got a new iMac Retina with the 3TB Fusion drive on which I wanted to install Win 8.1 using Boot Camp. I have VMWare Fusion installed and running, but figured Boot Camp might be better for my needs. I read the Boot Camp Assistant instructions and

  • SQL error 3113 occurred when executing EXEC SQL.

    Hi, We are facing one typical problem, One background is failing regularly with below dump. as we now got all notes giving information, if database  restarted taking backup, these type of failures occur, but our database is only down for backup once

  • K7N2 Delta-ILSR - USB to Serial Adapter Doesn't Work!

    Is anyone aware of an error such as the follows with the K7N2 Delta-ILSR? I am trying the use a USB to Serial Adapter, namely the a Prolific PL-2303. However, my PC does not seem to like it, nor does it what to cooperate with it at all. On one occasi

  • Integrating XI 3.0 with PI 7.1 directly

    Hi    We have a need to directly integrate XI 3.0 ( SP23 ) with another Pi 7.1 ( SP7 ). Can we use XI adapter type to do this communication - has anybody out there done this and not faced issue using XI adapters to do this  owing to this version diff

  • How To guide...for Flat File upload for User-Defined variables

    Has anyone got link to the guide that describes how to do a flat file upload for populating User-Defined Variables ? Any assistance will be appreciated. Uche