GL Code Combination from GL_SUBR_LED table using ACCT_ID and ACCTNG_UNIT_ID

Hi Gurus,
Is there anyway that I can get the GL Code Combination ID from GL_SUBR_LED for OPM Transaction by using the ACCT_ID and ACCTNG_UNIT_ID. It is very urgent.
Please help me on this.
Thanks,
Genoo

Yes, one parameter per segment. As I explained earlier, I'm currently doing it just fine using 3 separate queries, but it seems highly inefficient.
Here is what I'm doing [but wanting to create a view]:
Parameter 1: Company segment1
Parameter 2: GL Account segment2
Perameter 3: Dept (cost center) segment3
So I was thinking the view should look something like [each are columns]:
co_value | co_descr | gl_acct_value | gl_acct_descr | dep_value | dep_descr
I did something like this yesterday---but that's definitely not what I want.
(SELECT     fvt.flex_value_meaning, ffv.flex_value
     FROM     apps.fnd_flex_values_tl fvt, apps.fnd_flex_values ffv
WHERE          ffv.flex_value_id = fvt.flex_value_id
               AND ffv.flex_value_set_id = y
               AND ffv.enabled_flag = 'Y')
UNION ALL
(SELECT     fvt.description, ffv.flex_value
     FROM     apps.fnd_flex_values_tl fvt, apps.fnd_flex_values ffv
WHERE          ffv.flex_value_id = fvt.flex_value_id
               AND ffv.flex_value_set_id = x
               AND ffv.enabled_flag = 'Y')
Edited by: Akatsuki on Aug 31, 2010 1:46 PM
Edited by: Akatsuki on Aug 31, 2010 2:00 PM

Similar Messages

  • How to pick max value from a column of a table using cursor and iteration

    Hello Everybody
    I have a table loan_detail
    and a column in it loan_amount
    now i want to pick values from this table using cursor and then by using iteration i want to pick max value from it using that cursor
    here is my table
    LOAN_AMOUNT
    100
    200
    300
    400
    500
    5600
    700i was able to do it using simple loop concepts but when i was trying to do this by using cursor i was not able to do it .
    Regards
    Peeyush

    SQL> SELECT MAX(sal) Highest_Sal,MIN(sal) Lowest_Sal FROM emp;
    HIGHEST_SAL LOWEST_SAL
           5000        800
    SQL> set serverout on
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := counter;
    10      counter := counter + 1;
    11    END LOOP;
    12    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    13    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    14  END;
    15  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Even smaller
    SQL> DECLARE
      2    TYPE tmp_tbl IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
      3    sal_tbl tmp_tbl;
      4    CURSOR emp_sal IS
      5      SELECT sal FROM emp;
      6    counter INTEGER := 1;
      7  BEGIN
      8    FOR i IN emp_sal LOOP
      9      sal_tbl(i.sal) := 1;
    10    END LOOP;
    11    DBMS_OUTPUT.put_line('Lowest SAL:' || sal_tbl.FIRST);
    12    DBMS_OUTPUT.put_line('Highest SAL:' || sal_tbl.LAST);
    13  END;
    14  /
    Lowest SAL:800
    Highest SAL:5000
    PL/SQL procedure successfully completed.
    SQL> Edited by: Saubhik on Jan 5, 2011 4:41 PM

  • How to create an Undefined Code Combination from API? (Urgent)

    Hi All,
    I used the following API to create the code combinations in a Inventory custom form.
    SELECT CHART_OF_ACCOUNTS_ID INTO :PARAMETER.CHART_OF_ACCOUNTS_ID
    FROM ORG_ORGANIZATION_DEFINITIONS
    WHERE ORGANIZATION_ID = :PARAMETER.ORG_ID;
    FND_KEY_FLEX.DEFINE(
    BLOCK => 'XX_MRN_TRX_HEADERS',
    FIELD => 'TO_ACCOUNT',
    CODE => 'GL#',
    APPL_SHORT_NAME =>'SQLGL',
    NUM => ':PARAMETER.CHART_OF_ACCOUNTS_ID',
    ID => 'TO_ACCOUNT_ID',
    VRULE => '\\nSUMMARY_FLAG\\nI\\nAPPL=SQLGL;NAME=GL_NO_PARENT_SEGMENT_ALLOWED\\nN\\0GL_GLOBAL\\nDETAIL_POSTING_ALLOWED\\nE\\nAPPL=INV;NAME=INV_VRULE_POSTING
    nN',
    REQUIRED => 'N',
    DINSERT => 'Y',
    VALIDATE => 'FULL',
    USEDBFLDS => 'N');
    This creates the correct ccid if the combination is already available in GL (gl_code_combinations_kfv), But when its a new combination it returns '-1'.
    How can I create an Undefined Code Combination from API in custom forms?
    If any one one can help me on this it'll be a great help.
    Thanks

    Solved by Using FND_FLEX_EXT.GET_COMBINATION_ID.
    Thanks

  • Code to update a table using sqlldr

    Hi all,
    can anybody give the code to update a table using sqlldr with an example
    thank you

    You want add the new line and modified the existing line (based on empno) from file e:\scripts\sql\emp2_ext.dat into table emp2 :
    7782,CLARK,MANAGER,7839,09/06/81,80000,,10
    8000,ORACLE,DATABASE,,11/02/07,99999,,20Then :
    SQL> conn system/mypwd
    Connected.
    SQL>
    SQL> create directory my_dir as 'e:\scripts\sql';
    Directory created.
    SQL>
    SQL> grant read,write on directory my_dir to scott;
    Grant succeeded.
    SQL>
    SQL> conn scott/mypwd
    Connected.
    SQL> create table emp2_ext
      2  (EMPNO    NUMBER(4),
      3   ENAME    VARCHAR2(10),
      4   JOB      VARCHAR2(9),
      5   MGR      NUMBER(4),
      6   HIREDATE DATE,
      7   SAL      NUMBER(7,2),
      8   COMM     NUMBER(7,2),
      9   DEPTNO   NUMBER(2)
    10  )     
    11  ORGANIZATION EXTERNAL
    12  ( TYPE ORACLE_LOADER
    13    DEFAULT DIRECTORY my_dir
    14    ACCESS PARAMETERS
    15    ( records delimited by newline
    16      badfile my_dir:'emp2_ext.bad'
    17      logfile my_dir:'emp2_ext.log'
    18      fields terminated by ','
    19      missing field values are null
    20      ( empno, ename, job, mgr, hiredate char date_format date mask "dd/mm/yy",
    21        sal, comm, deptno
    22      )
    23    ) LOCATION ('emp2_ext.dat')
    24  ) ;
    Table created.
    SQL>
    SQL> select * from emp2_ext;
         EMPNO ENAME      JOB              MGR HIREDATE        SAL       COMM     DEPTNO
          7782 CLARK      MANAGER         7839 09/06/81      80000                    10
          8000 ORACLE     DATABASE             11/02/07      99999                    20
    SQL> select * from emp2;
         EMPNO ENAME      JOB              MGR HIREDATE        SAL       COMM     DEPTNO
          7782 CLARK      MANAGER         7839 09/06/81      24500                    10
          7839 KING       PRESIDENT            17/11/81      50000                    10
          7934 MILLER     CLERK           7782 23/01/82      13000                    10
    SQL> merge into emp2 a
      2  using (select * from emp2_ext) b
      3  on    (a.empno=b.empno)
      4  when matched then update set a.ename=b.ename,
      5                               a.job=b.job,
      6                               a.mgr=b.mgr,
      7                               a.hiredate=b.hiredate,
      8                               a.sal=b.sal,
      9                               a.comm=b.comm,
    10                               a.deptno=b.deptno
    11  when not matched then insert (a.empno, a.ename, a.job, a.mgr, a.hiredate, a.sal, a.comm, a.deptno)
    12                        values (b.empno, b.ename, b.job, b.mgr, b.hiredate, b.sal, b.comm, b.deptno);
    2 rows merged.
    SQL>
    SQL> select * from emp2;
         EMPNO ENAME      JOB              MGR HIREDATE        SAL       COMM     DEPTNO
          7782 CLARK      MANAGER         7839 09/06/81      80000                    10 --modified line
          7839 KING       PRESIDENT            17/11/81      50000                    10
          7934 MILLER     CLERK           7782 23/01/82      13000                    10
          8000 ORACLE     DATABASE             11/02/07      99999                    20 --added line
    SQL> HTH,
    Nicolas.
    Well, Hans has already give good explanation with docs links...
    Message was edited by:
    N. Gasparotto

  • How to select data from a table using a date field in the where condition?

    How to select data from a table using a date field in the where condition?
    For eg:
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
                                                      and bdatu = '31129999'.
    thanks.

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • Best practice for deleting multiple rows from a table , using creator

    Hi
    Thank you for reading my post.
    what is best practive for deleting multiple rows from a table using rowSet ?
    for example how i can execute something like
    delete from table1 where field1= ? and field2 =?
    Thank you

    Hi,
    Please go through the AppModel application which is available at: http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/sampleapps.html
    The OnePage Table Based example shows exactly how to use deleting multiple rows from a datatable...
    Hope this helps.
    Thanks,
    RK.

  • Retreiving data from 2 tables using a sender JDBC Channel

    Hi all,
    We got anew requirement where we have to select data from 2 tables and update fields in 2 tables at the sametime.
    I have a few queries regarding this.
    Can we retrieve data from 2 tables using select query in sender JDBC channel?
    If yes, how we can achieve this?
    Can we use inner/outer joins in the select query?
    Can we update field of 2 tables using the Update query in Sender JDBC channel?
    Your help is greatly rewarded.
    With Regards
    Sudha.

    Hi,
    Even i have the same requirement where data has to be read from 2 tables and later update the falg once done .
    SELECT query :
    SELECT t1.KUNNR,t1.SETT_KEY,t1.QUART_START,t1.QUART_END,t2.PAY_METH,t2.MAT_NDC,t2.AMOUNT   FROM TSAP_REBATE_MEDI t1  INNER JOIN  TSAP_REBATE_LINE t2  ON  t1.KUNNR=t2.KUNNR AND t1.SETT_KEY=t2.SETT_KEY  WHERE  t1.PROCESSING_STATUS = 'N' AND t2.PROCESSING_STATUS = 'N'
    This is working fine.
    Can somebody help me with update query with this. where flag PROCESSING_STATUS has to be updated with 'P'.
    I tried a lot but couldnt get the answer
    Br,
    Manoj

  • FETCHING VALUES IN MULTI RECORD BLOCK FROM ANOTHER TABLE USING SELECT STATEMENT.

    Hi,
    I have one multi record block in which i want to fetch values
    (more then one record) from another table using select statement
    IN KEY NEXT ITEM.I am getting following error.
    ORA-01422: exact fetch returns more than requested number of rows
    Thanks in advance.

    In your case I see no reason to use non-database block and to try to populate it from a trigger with a query, instead of using the default forms functionality where you can associate the block and the fields with table, create where clause using bind variables and simply use execute_query() build-in to populate the block. The power of the forms is to use their build-in functionality to interact with the database.
    Also, you can base your block on a query, not on a table and you dynamically change this query using set_block_property() build-in. You can use any dynamic queries (based on different data sources) and you simply need to control the column's data type, the number of the columns and their aliases. Something like creating inline views as a block data source.
    However, you can replace the explicit cursor with implicit one like
    go_block('non_db_block_name');
    first_record();
    FOR v_tab IN (SELECT *
    FROM tab
    WHERE col_name = :variable)
    LOOP
    :non_db_block_name.field1 := v_tab.col1;
    :non_db_block_name.field2 := v_tab.col2;
    next_record();
    END LOOP;

  • Read data from ODS table using value mapping

    hi all;
    can anyone help on how to read data from ODS table using value mapping

    Mudit,
    Take a look at this blog,
    <a href="/people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler">DB Lookup in Mapping</a>
    Regards,
    Bhavesh

  • [svn:osmf:] 13966: 1. Integrate code changes from Matthew to remove timeBias and add support for subclip

    Revision: 13966
    Revision: 13966
    Author:   [email protected]
    Date:     2010-02-03 15:04:44 -0800 (Wed, 03 Feb 2010)
    Log Message:
    1. Integrate code changes from Matthew to remove timeBias and add support for subclip
    2. A minor bug fix with the index handler
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/HTTPNetStream.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/HTTPStreamingState.as
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/f4f/HTTPStreamingF4FIndexHandler.as

    Maybe you try posting in one of the Enterprise & Remote Computing forums:
    http://forum.java.sun.com/category.jspa?categoryID=14
    And please use the forum CODE tags for formatted readable display of your code on the board.
    http://forum.java.sun.com/post!reply.jspa?messageID=9989322#

  • Is Adobe Connect part of Adobe Creative Cloud? Are there any best practices ideas from people who use Connect and Creative Cloud?

    Is Adobe Connect part of Adobe Creative Cloud? Are there any best practices ideas from people who use Connect and Creative Cloud?
    I have an Adobe Connect account and I'm are also in the early stages of developing a webinar. I am looking for any tips and advice from anyone who uses both of these services.

    As the £27, was an introductory offer. Upon the completion of one year, the price will change to the normal creative cloud cost which is at £46.88. However if you have the previous versions of the creative suites like CS 3, 4, 5, 5.5 or the CS 6. You can avail the offer at £27.34 per month incl. VAT. However this Requires annual commitment; billed monthly.

  • HT4993 Hi I got 32 gb iphone 5 sprint line from America but using Turkey and send sms problem

    Hi
    I got 32 gb iphone 5 sprint line from America but using Turkey and send sms problem

    Did you request that Sprint unlock the phone?
    If so, did they?  Did you follow the process to complete the unlock by restoring as new?
    Did you get the message indicating the iPhone is unlocked?

  • Getting Result from multiple table using code table.

    I am having hard time getting data from different table not directly connected.
    

    The data model is not proper. Why should you store the game details in separate tables?
    IMO its just matter of putting them in same table with additional field gamename to indicate the game. That would have been much easier to query and retrieve results
    Anyways in the current way what you can do is this
    SELECT p.ID,p.Name,c.CategoryName AS [WinnerIn]
    FROM GameParticipants p
    INNER JOIN (SELECT ParticipantID, Value AS ParticipantName,'CGW Table' AS TableName
    FROM CGWTable
    UNION ALL
    SELECT ParticipantID, Value AS ParticipantName,'FW Table' AS TableName
    FROM FWTable
    SELECT ParticipantID, Value AS ParticipantName,'WC Winner' AS TableName
    FROM WCWinner
    ... all other winner tables
    )v
    ON v.ParticipantID = p.ID
    AND v.ParticipantName = p.Name
    INNER JOIN Category c
    ON c.TableName = v.TableName
    If you want you can also add a filter like
    WHERE p.Name = @Name
    to filter for particular player like Henry in your example
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Find matching records from two tables, useing three key fields, then replace two fields in table1 from table2

    I have two tables - table1 and table2 - that have the exact same schema. There are three fields that can be used to compare the data of the two tables, field1, field2, and field3. When there are matching rows in the two tables (table1.field1/2/3 = table2.field1/2/3)
    I want to replace table1.field4 with table2.field4 and replace table1.field5 with table2.field5.
    I have worked with the query but have come up with goobly goop. I would appreciate any help. Thanks.

    If your field1, field2, and field3 combinations in these tables are unique, you
    can do a join on them.
    Select t1.field4, t2.field4 , t1.field5, t2.field5
    from table1 t1 inner join table2 t2 on t1.field1 =t2.field1 and t1.field2=t2.field2 AND t1.field3=t2.field3
    --You can update your table1 with following code:
    Merge table1 t1
    using table2 t2 on
    on t1.field1 =t2.field1 and t1.field2=t2.field2 AND t3.field3=t2.field3
    When matched then
    Update Set
    t1.field4= t2.field4
    ,t1.field5 = t2.field5 ;

  • How to get string value from database table using Visual Studio 2005?

    Hi,
    Im developing plugin in illustrator cs3 using visual studio 2005. I need to get the values eneterd in database. Im able to get the integer values. But while getting string values it is returning empty value.
    Im using the below code to get the values from database table
    bool Table::Get(char* FieldName,int& FieldValue)
        try
            _variant_t  vtValue;
            vtValue = m_Rec->Fields->GetItem(FieldName)->GetValue();
            FieldValue=vtValue.intVal;
        CATCHERRGET
        sprintf(m_ErrStr,"Success");
        return 1;
    Im using the below code to get the values.
    AIErr getProjects()
        char buf[5000];
        int i;   
        std::string  catName;
        ::CoInitialize(NULL);
        Database db;
        Table tbl;
        errno_t err;
        err = fopen(&file,"c:\\DBResult.txt","w");
        fprintf(file, "Before Connection Established\n");
        //MessageBox(NULL,CnnStr,"Connection String",0);
        if(!db.Open(g->username,g->password,CnnStr))
            db.GetErrorErrStr(ErrStr);
            fprintf(file,"Error: %s\n",ErrStr);
        fprintf(file, "After Connection Established\n");
    if(!db.Execute("select ProjectID,ProjectName from projectsample",tbl))
            db.GetErrorErrStr(ErrStr);
            fprintf(file,"Error: %s\n",ErrStr);
        int ProjectID;
        int UserID;
        int ProjectTitle;
        char ProjectName[ProjectNameSize];
        if(!tbl.ISEOF())
            tbl.MoveFirst();
        ProjectArrCnt=0;
        for(i=0;i<128;i++)
            buf[i]='\0';
            int j=0;
        while(!tbl.ISEOF())
            if(tbl.Get("ProjectID",ProjectID))
                fprintf(file,"Project ID: %d ",ProjectID);
                ProjectInfo[ProjectArrCnt].ProjectID = ProjectID;
                sprintf(buf,"%d",ProjectID);
                //MessageBox(NULL, buf,"f ID", 0);
                j++;
            else
                tbl.GetErrorErrStr(ErrStr);
                fprintf(file,"Error: %s\n",ErrStr);
                break;
            //if(tbl.Get("ProjectTitle",ProjectName))
            if(tbl.Get("ProjectName",ProjectName))
                MessageBox(NULL,"Inside","",0);
                fprintf(file,"ProjectTitle: %s\n",ProjectName);
                //catName=CategoryName;
                ProjectInfo[ProjectArrCnt].ProjectName=ProjectName;
                //sprintf(buf,"%s",ProjectName);
                MessageBox(NULL,(LPCSTR)ProjectName,"",0);
            else
                tbl.GetErrorErrStr(ErrStr);
                fprintf(file,"Error: %s\n",ErrStr);
                break;
            ProjectArrCnt++;
            //MessageBox(NULL, "While", "WIN API Test",0);
            tbl.MoveNext();
        //MessageBox(NULL, ProjectInfo[i].ProjectName.c_str(),"f Name", 0);
        ::CoUninitialize();
        //sprintf(buf,"%s",file);
        //MessageBox(NULL,buf,"File",0);
        fprintf(file, "Connection closed\n");
        fclose(file);
        for(i=0;i<ProjectArrCnt;i++)
            sprintf(buf,"%i",ProjectInfo[i].ProjectID);
            //MessageBox(NULL,buf,"Proj ID",0);
            //MessageBox(NULL,ProjectInfo[i].ProjectName.c_str(),"Project Name",0);
        return 0;
    In the above code im geeting project D which is an integer value. But not able to get the project name.
    Please some one guide me.

    As I said in the other thread, this really isn't the place to ask questions about a database API unrelated to the Illustrator SDK. You're far more like to find people familliar with your problem on a forum that is dedicated to answering those kinds of questions instead.

Maybe you are looking for

  • Error while registering CCMC Agent

    Dear Guru's, We're facing some issue while registering the CCMS Agent in the satellite system. We are in phase of installing & registering the CCMS Agent with CEN, while registering in the satellite system (Dual stack system) with this command, sapcc

  • Problem with constructor

    Hi guys when i created this constructor, it keep throwing back this error whcih i don't understand. public interface MyNumber { // data defination      private int wholenumber = 0;      private float fraction = 0; // constructor public MyNumber(int w

  • Unable to Access Data Form with Users Provisioned as 'Planner'

    Hello, I am currently experiencing an issue that I can't seem to resolve. I was hoping someone else might have some insight and/or have come across this issue. I created two data forms. Users have been assigned permissions to the dimensions included

  • I need to have OS 10.6.5 to read SDXC cards, but will my FCP 6.0.6 still run?

    Please help someone with minimal tech knowledge:  Apparently I need to have OS 10.6.5 to read SDXC cards (from my Panasonic GH-2) , but will my Final Cut Studio 6.0.6 still run on the upgraded OS? I paid £1000 for it it only 4 years agao and it would

  • ITrip tuning help?

    Found my old iPod and want to set up my old iTrip and can't figure it out. Help?