Help populating table with applescript

Hi
I'm posting here in the hope that someone can give me a helping hand with an applescript. I myself know very little about applescript. I can create something very basic but thats about it.
I have the following table
Name
Value
Amount
Donald Duck
4
5000
Goofy
10a
7000
George
5
4000
Steve
4
6000
Hank
18
9000
Sue-Ellen
5
9050
John
18
11000
Hector
18
5500
I would like to create an applescript that runs through this table and populates another table, we can call it "Results", that would look something like this
Value 4
Donald Duck
5000
Steve
6000
Value 5
George
4000
Sue-Ellen
9050
A further complication is that this newly populated should only be populated if the following condition exists. The total sum of the newly created table (i.e the value column) should only be populated with posts from the original table as long as the sum of the newly created posts do not exceed the sum of a cell in a third table (we can call this the "sumtable").
To make it clearer. If the sum of the "sumtable" is 24 050 then the newly created table will only create the posts I have made above. These posts must be made using the following values and in the order the values appear. The complete list of values is 3a, 4, 4a, 5, 6, 7, 10, 10a, 12, 13, 18 . So the script would start looking for values in that order and whenever it reaches a total sum that is equal to the sum in "sumtable" it will use those values, and only those, and populate the new table creating the necessary rows needed.
It's possible that this is way to complicated to do. I have tried to make a formula in a table to do this but the problem is I ca never know how many rows are needed in advance.
Hoping for some help or tips, but understanding if this is asking too much considering the amoutn of effort needed.
Thanks

consiglieri_swe wrote:
i.e Goofy only gets part of his debt.
The partial payment complicates the logic a little. Below is a script that can handle that. The usage is the same. Paste it into AppleScript Editor. Run. Paste results into A2 of the Results table and the table expands automatically to the number of rows needed. The Sum formula is in a Footer Row.
The revised script, which now reads the available amount from a cell in a table (easily changed to another table as needed), is below.
SG
--accounts for partial payment of "last" creditor
--reads available amount from a cell in a table
property thePriorities : {"3a", "4", "4a", "5", "6", "7", "10", "10a", "12", "13", "18"}
tell application "Numbers" to tell the front document to tell sheet "Sheet 1"
          tell table "Maximum"
                    set maxAmount to the value of cell "A2"
          end tell
          tell table "Table 1"
                    set {pasteStr, stillAvailable, allDone} to {"", maxAmount, false}
                    repeat with i from 1 to count of thePriorities --cycle through 3a, 4, 4a, etc
                              set priorityBeingTallied to (item i of thePriorities)
                              repeat with j from 2 to count of its rows
                                        tell row j
                                               --get the values in a row
                                                  set thisName to value of its first cell
                                                  set thisPriority to my stripDecimal(value of its second cell)
                                                  set thisAmount to value of its third cell
                                                  if thisPriority is equal to priorityBeingTallied then --if it's in this priority
                                                            if stillAvailable > 0 then --include the row unless no more money
                                                                      set thisAllocation to my lesserOf(thisAmount, stillAvailable)
                                                                      set pasteStr to pasteStr & thisPriority & tab & thisName & tab ¬
                                                                                & thisAllocation & return
                                                                      set stillAvailable to stillAvailable - thisAllocation
                                                            end if
                                                  end if
                                        end tell
                              end repeat --rows
                    end repeat --priorities
          end tell --table
end tell --app
set the clipboard to pasteStr
display notification "Click once in a cell and paste." with title "Numbers"
pasteStr
--handler needed because when asked for a cell value Numbers 3 adds .0
to stripDecimal(val)
          set val to val as string
          set {oTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "."}
          set s to item 1 of val's text items
          set AppleScript's text item delimiters to oTID
          return s
end stripDecimal
to lesserOf(x, y) --used to calculate partial payment to "last" creditor
          if x < y then return x
          return y
end lesserOf
--end of script

Similar Messages

  • I need help making tables with all my data. What to do with all my Data?

    Hello All,
    Here is the scenario. I have about 10 columns of data. It has Name of Item. Price sold, Shipping Cost, Address and others.
    I want to group all the same items into a separate table with its own totals. There is 100 different items, So i need to split is several tables. Any idea on how to do this? Can It be done in Numbers?

    A variation to Jerry's suggestion:
    You are inquiring about creating 100 tables that produce summaries, 1 for each item. Jerry suggests a single table showing only a summary of your 100 items. This has potential. If you want to see the individual lines displayed above each summary, you may be able to use your original table. This process, however, involves a little work. But it's not unreasonable and may satisfy your needs.
    In your original table create a new line for each item. These lines are basically blank except for the item name and whatever columns you want to summarize. Enter the item names on these lines but follow them with the word " Total". When you sort on the Item column these lines will appear as the last of each item. Then place the SUMIF function in the proper column to obtain your summary.
    pw

  • Please Help: af:table with inputText column (jdev 10.1.3 ea)

    On page I have selectOneRadio & af:table with inputText.
    In valueChangeListener I am updating the table model to assign default values to table’s inputText column. If I disable the inputText then values are updated correctly, but inputText is enabled then old values of inputText on screen are written back to my session bean.
    How I can stop FACES no to assign old inputText values back to session after valueChangeListener processing is done. Also how do I refresh table from valueChangeListener of selectOneRadio.
    Thanks, Yogesh
    <af:selectOneRadio required="true" value="I" label="How case is awarded?" layout="horizontal" autoSubmit="true" binding="#{AwardTableBean.awardType}" valueChangeListener="#{AwardTableBean.awardTypeValueChanged}" immediate="true" id="awardType">
    <f:selectItem itemLabel="As Incurred" itemValue="I"/>
    <f:selectItem itemLabel="Equally" itemValue="E"/>
    <f:selectItem itemLabel="Other" itemValue="O"/>
    </af:selectOneRadio>
    <af:table value="#{AwardTableBean.smAward}" var="a" rows="7" banding="row" bandingInterval="1"
    width="800" binding="#{AwardTableBean.awardTable}">
    <f:facet name="actions">
    <af:commandButton text="Refresh" action=""/>
    </f:facet>
    <af:column sortable="true" formatType="number" width="50px">
    <f:facet name="header">
    <h:outputText value="Party#"/>
    </f:facet>
    <h:outputText value="#{a.partyNo}"/>
    </af:column>
    <af:column sortable="false" formatType="text" width="250px">
    <f:facet name="header">
    <h:outputText value="Party Name"/>
    </f:facet>
    <h:outputText value="#{a.partyName}"/>
    </af:column>
    <af:column sortable="false" formatType="number" width="100px">
    <f:facet name="header">
    <h:outputText value="Filing Fee %"/>
    </f:facet>
    <af:inputText value="#{a.ffPercent}" columns="12" inlineStyle="text-align:right;"
    binding="#{AwardTableBean.ffPercent}"></af:inputText>
    </af:column>
    ......

    Hi Awiner,
    Thank you for the prompt reply. Now table is displayed as expected.
    Best regards,
    Yogesh

  • Help creating tables with multi line cells (variable height cells)

    Hi -
    I am trying to create a table where the row height of various rows might not
    be one unit (i.e. there would be wrap around text) but I DO NOT want every cell
    to be the same height. i.e. I only want rows with wrap around to be taller.
    What I have done already is
    - Create a new text renderer and set it as default table renderer.
    - played around with the table.serRowHeight method.
    what I noticed is this. If i call
    table.setRowHeight (32);
    All the rows will be a height of 32 which is expected.
    However, if I do something like:
    table.setRowHeight (0,16);
    table.setRowHeight (1,32);
    All the rows render as height 16.
    I am trying to do this on the fly so to speak. I am setting the table model
    fully and then listening to the tableModelChanged event and then want to
    adjust the rows accordingly.
    I have below listed the code snippit and what i WANT to do and what only seems
    to work:
    public void tableChanged(TableModelEvent e) {
    int rows = table.getRowCount();
    //// Using the api i would expect this to make each row taller
    for (int i = 0; i < rows; ++i) {
    table.setRowHeight(i,16+16*i);
    //// However this one alone makes then all the same height.
    //// I do not want this but want the snippit of code above to work
    //// if possible
    table.setRowHeight(32);
    Thanks in advance....
    matt

    Hi bbrita
    Sorry for the confusion. But basically yes the code below in my system does NOT
    work. In my model i have
    public class ApplicationTableModel extends AbstractTableModel {
    //// other stuff here
    public void setApplicationData(SimpleApplication[] appData) {
    //// set the new data here
    this.fireTableDataChanged();
    and then it does call :
    tableChanged(TableModelEvent e)
    and in there i DO change the heights of the cells but they still all render the same height.
    The basic code snippits I am useing are:
    //// in my table model
    public class ApplicationTableModel extends AbstractTableModel {
    //// other stuff here
    public void setApplicationData(SimpleApplication[] appData) {
    //// set the new data here
    this.fireTableDataChanged();
    //// in the panel i create the table
    public class ApplicationDataTablePanel extends JPanel
    implements ListSelectionListener, TableModelListener {
    //// other stuff here...
    public ApplicationDataTablePanel() {
    appModel = new ApplicationTableModel();
    table = new JTable(appModel);
    table.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    table.getSelectionModel().addListSelectionListener(this);
    table.getModel().addTableModelListener(this);
    // not used at the moment
    // table.setDefaultRenderer(Object.class, new MultiLineCellRenderer());
    this.add(new JScrollPane(table));
    public void tableChanged(TableModelEvent e) {
    System.err.println("GET Row count="+table.getRowCount());
    for (int i=0; i<table.getRowCount(); i++) table.setRowHeight(i,i*3+10);
    /// not used
    // table.invalidate();
    for (int i=0; i<table.getRowCount(); i++)
    System.err.println("HEIGHT="+table.getRowHeight(i));
    This does dump to the screen the following (i have triggered something in the
    system to update the model):
    GET Row count=5
    HEIGHT=10
    HEIGHT=13
    HEIGHT=16
    HEIGHT=19
    HEIGHT=22
    Which is what I expect BUT the cells do not change in height (they are all the
    standard size). This is what is baffling me because it seems to be the thing
    you suggested below but does not work. Which seems like exactly what
    should work.
    I was wondering if there was somewhere else in the event flow that I should be
    making these modifications or if I needed to for force any refresh or anything on
    the graph cells. ???
    Thanks so much for the help and any more you might have.
    matt

  • Populating table with combination of values

    Hi,
    I have table A with columns col1, col2, col3.
    I have 4 distinct values for col1 (d1, d2, d3, d4).
    I have 2 distinct values for col2 (e1, e2).
    I have 3 distinct values for col2 (r1, r2, r3).
    I need to write a SQL to populate table A with combination of of all the values, so I would have 24 records (4 * 2 * 3). How can I do that?
    Thanks.

    with a as ( select 'd1' col1 from dual union all
    select 'd2' from dual union all
    select 'd3' from dual union all
    select 'd4' from dual )
    , b as ( select 'e1' col2 from dual union all
    select 'e2' from dual )
    , c as ( select 'r1' col2 from dual union all
    select 'r2' from dual union all
    select 'r3' from dual
    select * from
    a, b, c
    CO CO CO
    d1 e1 r1
    d2 e1 r1
    d3 e1 r1
    d4 e1 r1
    d1 e1 r2
    d2 e1 r2
    d3 e1 r2
    d4 e1 r2
    d1 e1 r3
    d2 e1 r3
    d3 e1 r3
    d4 e1 r3
    d1 e2 r1
    d2 e2 r1
    d3 e2 r1
    d4 e2 r1
    d1 e2 r2
    d2 e2 r2
    d3 e2 r2
    d4 e2 r2
    d1 e2 r3
    d2 e2 r3
    d3 e2 r3
    d4 e2 r3
    24 rows selected.SS

  • Populating table with data from another table with fewer columns

    Hi,
    I have 2 tables:
    Table 1:
    Column 1
    Column 2
    Column 3
    Table 2:
    Column 1
    Column 2
    I want to populate Table 1 with all the data from Table 2, and populate Column 3 of Table 1 with numbers from a sequence. Is there a SQL stmt to do this? If not, what is the best way to do it in PL/SQL?
    Thank you
    Shailan

    CREATE SEQUENCE t1_seq
    START WITH 1
    INCREMENT BY 1
    CACHE 100;
    INSERT INTO t1( col1, col2, col3 )
      SELECT col1, col2, t2_seq.nextval
        FROM t2Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Populating table with values in custom controller

    Hi
    There are multiple rows of records in custom controller and i want to populate these values in a table which is in another view.How to do this.
    thanks and regards
    suresh

    Hi,
    If you are writing the code in the custom Controller then you can do the following
    IPublic<CustomerController>.I<Node>Element ele=wdContext.create<Node>Element();
    ele.setXXX();
    ele.setYYY():
    wdContext.node<NodeName>().addElement(ele);
    Regards, Anilkumar

  • In CAT2 - The search help populating the input field with wrong data

    Hi Guys,
    I have created a ZCITY table for which has below 2 field
    ZZCITY (Code ) (5 Char) u2013 Key field
    ZZNAME (City Name ) (40 Character)
    I have added a custom field ZZCITY & ZZNAME in CI_CATSDB. Funtional guy has configured to make ZZNAME as  VISIBLE  and ZZCITY is HIDDEN on CAT2 screen in Data Entry area.
    I created search help on table ZCITY with export parameters as  ZZCITY and ZZNAME.
    In SE11, I have mapped the export parameters with CI_CATSDB
    Now in tcode CAT2, when I press F4 on City Name field, the list is displayed with City code and City names. And when I select any city code, the ZZNAME is populated by City code instead of City name.
    I want that City Name should be populated in ZZNAME and City Code should be populated in hidden field ZZCITY.
    Please tell me how I can fix this problem.
    Thanks in advance.
    mini

    Hi,
    Search helps have a one to one relationship with a screen field.  To achive what you are trying to, I would have ZZCITY and ZZNAME side by side, and i would have a drop down only only ZZCITY.  The key of the table will be ZZCITY. So when you chose the record, The city will populate in ZZCITY and you can make use of user exit EXIT_SAPLCATS_002 to populate the name automatically in the ZZNAME field.
    thanks.
    JB

  • Populating a temp table with multiple records.

    I want to populate a temp table with a a set of recs. This table will be used for
    crossing/joining with my other tables to pull out data.
    ie:
    Main table (loc)contains these fields -> county,permit,utme,utmn
    Temp table ( tmpid) contains these fields -> countytemp, permittemp
    So I will be doing a statement like this once my temp table is populated.
    Select l.county,l.permit,l.utme,l.utmn from loc l,tmpid t where l.county=t.countytemp and l.permit=t.permittemp;
    So this temp table will basically be a list of ids that can range from a few recs to several hundred.
    I want to know is there is way I can poplulate/repopulate it easily using sqlPlus/other by reading in a Ascii file
    from client PCs. (besides SQL loader).

    HI
    let me explain my requirement first,
    i need to populate my block with the results from the following sql
    SELECT * from contactdet where
    (Month=12 and TrType='MTM' and FinYr='04-05' and Userid='SA009' and Clcode='SB001')
    UNION
    SELECT * from contactdetSUM where (Clcode='SB001' AND CSCODE='AB001')
    Pease note. the where clauses i have put are different in each table and my requirement is
    the constants values i have put in where clause should be variable (ie. i should be able to put variables like :clcode or so)
    I tried us using Query data source type as 'FROM clause query' but it does not allow me to put variables in where clause.
    Is there any way out i can do this ? Please help me
    Regards
    Uday

  • Help with Applescript: very basic functions

    Hi guys, my first post. I'd very much like to switch from Excel to Numbers but not until I find an Applescript replacement for my stuff.
    I wrote basic Excel Applescript just fine but I'm tearing my hair out just to perform simple scripts in Numbers!!!
    Basically I need to do:
    PART 1: Import External Data
    - I think I got this covered, using a GUI copy script via the "System Events" application
    - but since you guys are the experts: how do I make this process 'invisible'? i.e. each time the script runs, a Safari window appears. I don't want that to happen.
    tell application "Safari"
    activate
    open location "http://www.whatever.htm"
    end tell
    tell application "System Events"
    tell process "Safari"
    keystroke "a" using command down
    keystroke "c" using command down
    end tell
    end tell
    PART 2: Paste It Into Numbers
    - How hard can it be, right? Apparently I have the mental IQ of Gump I need Numbers to:
    - clear data from an existing pre-defined/named table
    - paste the data (from clipboard) onto this table (paste starting on cell A1), using the "Paste and Match Style" function
    - hide certain columns <-- I realize if Numbers paste onto a table with hidden columns, it treats them as non-existent i.e. won't paste the same. Therefore I suppose before the paste script I'd need an unhide script
    ... and that's it!!
    Help please I really hate Excel but can't move on till I figure this out... it's crucial to my livelihood.
    Thank you all in advance!

    There is no paste function in the Numbers AppleScript's dictionary.
    We may mimic it as I did during one year and a half with Numbers '08.
    Go to my iDisk:
    <http://idisk.me.com/koenigyvan-Public?view=web>
    open the folder "For_iWork:iWork '08:for_Numbers:"
    and download one of the items whose name starts with "paste".
    This use of GUI scripting is interesting because it creates automatically rows/columns when required.
    One draw back is the resulting font.
    Yvan KOENIG (from FRANCE samedi 17 janvier 2009 21:12:52)

  • Help on export sybase iq tables with data and import in another database ?

    Help on export Sybase iq 16 tables with data and import into another database ?

    Hi Nilesh,
    If you have table/index create commands (DDLs), you can create them in Developper and import data using one of methods below
    Extract/ Load table
    Insert location method : require IQ servers to be entered in interfaces file
    Backup/Restore : copy entire database content
    If you have not the DDLs, you can generate them using IQ cockpit or SCC.
    http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01773.1604/doc/html/san1288042631955.html
    http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc01840.1604/doc/html/san1281564927196.html
    Regards,
    Tayeb.

  • Move Table Column with AppleScript in Microsoft Word

    Microsoft Word has a flaw (in my opinion) with tables in that it aligns the left and right text with the margins rather than aligning the table columns with the margins. This results in sloppy tables, because the left and right borderlines lie outside the margins.
    I would like to fix the word tables by
    calculating the left cell padding and right cell padding in points and setting them to variables {left_pad,right_pad} respectively
    move left column by left_pad to the right
    move right column by right_pad to the left
    The script I was working on does not work, but I will post it to show my thought process as I hone in on my solution.
    tell application "Microsoft Word"
        --595 points is width of A4 paper
        -- Set page margin in points to variables
        set {l_margin, r_margin, t_margin, b_margin} to {(get left margin of page setup of active document), get (right margin of page setup of active document), get (top margin of page setup of active document), get (bottom margin of page setup of active document)}
        get {l_margin, r_margin, t_margin, b_margin}
        -- Set specific Paragraph margins
        -- NOTE: If you select a table thinking you wish to drag just the left margin to the right, or the right margin to the left, this code does not accomplish this because each cell has its own paragraph formatting. This code will set the margin for every single cell, because each cell has its own margins! (separate from padding).
        set para_sel to paragraph format of selection
        set paragraph format left indent of para_sel to (centimeters to points centimeters 0.5)
        -- Aligning left and right columns of table with the margins
        -- NOTE: There is a command to set left row indent, but not right row indent (very stupid of Microsoft)
    end tell

    I have worked up something that seems to work (although I cannot promise it is the best way). Hope it helps anyone else who has this need.
    tell application "Microsoft Word"
    activate
    set findRange to find object of selection
    clear formatting findRange -- clear any previous formatting used in a find operation
    set forward of findRange to true -- find forward
    set style of findRange to "List Bullet" -- the style to look for
    tell findRange
    set gotIt to execute find find text "" -- do the search w/o matching any text
    end tell
    if gotIt is true then -- if a match was found
    copy object selection -- copy it to the clipboard
    set mySelection to (the clipboard) -- then put clipboard into a variable
    set myOffset to ¬
    (get selection information selection information type ¬
    (horizontal position relative to page)) -- now put selection info into a variable
    display dialog mySelection & return & (myOffset as text) -- then display it
    end if
    end tell

  • Help with Applescript - filenames

    Hi!
    I hope there is someone who can help me. I have very little experience with Applescript, and have spent a couple of days scouring these forums amongst others without any luck...
    I have a folder (titled XLS) with about 1000 excel files in it. They are numbered basen on some parametric calculations (1111.xls, 1112.xls, 1113.xls, etc). I have constructed an Automator rutine which, one at a time, can open each excel file, copy some cells and then paste the data into an empty xml-file in TextWrangler. The empty xml-file is also in the XLS folder.
    What I am looking for is an applescript which can rename the open xml-file with the same filename as the xls-file. So, when 1111.xls is open, the xml-file gets renamed 1111-xml; when 1112.xls is open, the xml-file gets renamed 1112-xml, etc. Each new xlm-file is to be saved into a folder XLM, whivh is also in the XLS folder.
    Thanks in advance....
    Rob

    Se below; there are two folders on the desktop; "xls" (with xls-files in) and "xml", as well as the empty Template.xml file. Here it is!:
      --3 XLS to XML
              tell application "Finder"
                        set fileList to every file of entire contents of ("YourHD:Users:You:Desktop:xls" as alias)
              end tell
              repeat with i from 1 to number of items in fileList
                        set currentFile to (item i of fileList)
                        tell application "Microsoft Excel"
                                  set screen updating to false
      open currentFile
      activate currentFile
      activate object worksheet 1
                                  copy range range ("YourRange")
                        end tell
                        tell application "Finder"
                                  copy file "YourHD:Users:You:Desktop:Template.xml" to folder "YourHD:Users:You:Desktop:xml"
                        end tell
                        tell application "Microsoft Excel"
                                  set docName to name of window 1
                        end tell
                        tell application "Finder"
                                  set docName2 to text 1 thru ((offset of "." in docName) - 1) of docName
                                  set theFile to "YourHD:Users:You:Desktop:xml:Template.xml" as alias
                                  set the name of theFile to docName2 & ".xml"
      open file theFile
                        end tell
                        tell application "TextWrangler"
      activate
      paste
      close text document 1 saving yes
                        end tell
                        tell application "Microsoft Excel"
      activate
      close active workbook saving no
                        end tell
              end repeat
              tell application "Microsoft Excel"
                        set screen updating to true
      quit
              end tell
              tell application "TextWrangler"
      quit
              end tell

  • Help to read a table with data source and convert time stamp

    Hi Gurus,
      I have a req and need to write a ABAP prog. As soon as i excute ABAP program it should ask me enter a data source name, then my ABAP prog has excute teh code, in ABAP code i have to read a table with this data source as key, sort time stamp from table and should display the data source and time stamp as output.
    As follows:
    Enter Data Source Name: 
    Then user enters : 2lis_11_vahdr
    Then out put should be "Data source  :"  10-15-2008.
    The time stamp format in table is 20,050,126,031,520 (YYYYMMDDhhmmss). I have to display as 05-26-2005. Any help would be apprciated.
    Thanks,
    Ram

    Hi Jayanthi Babu Peruri,
    I tried to extract YEAR, MONTH, DAY separately and using
    EDIT MASK written it.
    Definitely there will be some STANDARD CONVERSION ROUTINE will be there. But no idea about it.
    DATA : V_TS      TYPE TIMESTAMP,
           V_TS_T    TYPE CHAR16,
           V_YYYY    TYPE CHAR04,
           V_MM      TYPE CHAR02,
           V_DD      TYPE CHAR02.
    START-OF-SELECTION.
      GET TIME STAMP FIELD V_TS.
      V_TS_T = V_TS.
      CONDENSE V_TS_T.
      V_YYYY = V_TS_T.
      V_MM   = V_TS_T+4(2).
      V_DD   = V_TS_T+6(2).
      V_TS_T(2) = V_MM.
      V_TS_T+2(2) = V_DD.
      V_TS_T+4(4) = V_YYYY.
      SKIP 10.
      WRITE : /10 V_TS," USING EDIT MASK '____-__-________'.
              /10 V_YYYY,
              /10 V_MM,
              /10 V_DD,
              /10 V_TS_T USING EDIT MASK '__-__-__________'.
    If you want DATE alone, just declare the length of V_TS_T as 10.
    Regards,
    R.Nagarajan.
    We can -

  • To upload a data into SAP Table with the help of RFC function in BODS

    Hi,
    Please provide me step-by-step solution to upload data into any SAP table with the help of RFC function in Data Services.
    I have created RFC function that upload data into SAP table. RFC Function contains one table that has same structure as my database table.
    In the data services how can i filled the table of RFC function, i am using this function in query transform of data services but it gives me error.
    I am also follow link http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsDataServicesTipsand+Tricks
    but it did not help me.
    Thanks,
    Abhishek

    Hi Abhishek,
    Did you import the function module in the SAP datastore first? When you open the SAP datastore, the function should be listed in the 'functions' section. If not, import it. Make sure your function is remote executable.
    Once the function is there, you can use it in a transformation. In 'Schema Out' right-click on 'Query' (top level) and choose 'New Function Call'. You can then select a datastore and a function in the datastore. The wizard will show you which output parameters are available. I believe you have to add at least one and can select as many as you like.
    After confirming your selection the function and the output parameters appear in Schema Out. You can then right-click on the function and choose 'Modify function call'. A popup will appear where you can specify the input parameters.
    I hope this helps.
    Jan.

Maybe you are looking for