Get period name on query to use it in report

i want get period name on query to use it in report
the query
get period name on query to use it in report
SELECT itm.item_number item_no,
itm.description item_desc1,
mtl.organization_code,
cpt.cost_cmpntcls_code,
cpt.cost_cmpntcls_desc,
adj.cost_analysis_code,
adj.adjust_qty,
adj.adjust_qty_uom,
adj.adjust_cost,
adj.reason_code,
rsn.reason_desc,
adj.organization_id,
adj.period_id,
adj.cost_type_id
FROM cm_adjs_dtl adj,
mtl_item_flexfields itm,
cm_cmpt_mst cpt,
cm_reas_cds rsn,
mtl_parameters mtl
WHERE adj.inventory_item_id = itm.inventory_item_id
AND adj.organization_id = itm.organization_id
AND adj.cost_cmpntcls_id = cpt.cost_cmpntcls_id
AND adj.reason_code = rsn.reason_code
AND adj.organization_id = mtl.organization_id
/* AND adj.period_id = :period_id
AND adj.cost_type_id = :p_cost_type_id */
AND adj.delete_mark = 0
AND adj.reason_code = 'ADJ'
and adj.cost_analysis_code = 'EXP'

See Link between mtl_material_transactions,org_acct_periods, gl_period_statues
Hope this answers your question,
Sandeep Gandhi

Similar Messages

  • Query to get the name of the tables used in a View?

    Hi,
    Could you please help me in getting the name of the tables used in a perticular view?
    Please help me out...
    thnx in advance.
    Thnx,
    Bits
    Edited by: Bits on Sep 14, 2009 2:15 PM

    There is no data dictionary table that stores this directly.
    - You could get the DDL used to create the view and parse that SQL. Depending on how complex the view might be, this could be relatively easy or highly complex.
    - You could get a recursive list of the objects that the view depends on (from ALL_/USER_/DBA_DEPENDENCIES) and trace those dependencies back to all the tables that the view depends on. If your view calls functions, however, this may or may not be what you're looking for. If you are selecting from just one table in the FROM clause but you are calling a function that references a dozen tables, do you want one row? Or thirteen? What about tables referenced in a correlated subquery in the WHERE clause?
    Justin

  • Invalid column name in query string - using Format function

    In my post just before this one the problem was solved for writing a query string using a date range. The rest of the query string includes the same date field (Call_Date) but formatted as 'MMM-YY'. I get an invalid column name error when I add this field to the query string. Here is the rest of the query string:
    strSql = "SELECT Format(CALL_DATE,'mmm-yy'), " _
    & "HOME_REGION FROM CCC2.CASE_EPRP " _
    & "WHERE (HOME_REGION = 'NCR') AND " _
    "(CALL_DATE >= to_date( '1/1/2002', 'MM/DD/YYYY' )" _
    & "AND CALL_DATE <= to_date( '2/28/2003', 'MM/DD/YYYY' ))"
    In the Access Query tool I can include this field
    Format(CALL_DATE,'mmm-yy')
    and the query runs fine (I just need to make it dynamic using ADO). But in my ADO query string above, I get the invalid column name error. Is there a way I can include
    Format(CALL_DATE,'mmm-yy')
    in my ADO query string? I appologize for not being more familiar with Oracle Sql. Any help greatly appreciated.
    Thanks again,
    Rich

    Thank you very much for your reply. I think I'm getting closer to the solution. Just I got an error message
    "date format not recognized"
    when I add "to_char( call_date, 'mmm-yy' )" to the query string. I tried using all uppercase, but that did not make a difference. Do I need to use to_date inside the to_char maybe?
    to_char(to_date(call_date, 'mmm/yy'), 'mmm-yy')
    Thanks again for your help.
    Rich

  • Filters not getting passed in MDX query while using SAP BW with OBIEE

    Hello,
    I've been working on OBIEE with SAP BW as back-end. I've created some reports & those are working fine when there is less amount of data. But when I try to run a report with 3 dimensions & 1 fact it throws an error saying "No more storage space available for extending an internal table". When I checked MDX query, I found that the filters that I had applied to request & also selected from prompts are not getting passed in that query. So, I tried running a simple request using a simple filter in Answers. Although this request returns results but I can't see filter conditions in query. MDX query always show crossjoin but I can't see filter conditions anywhere.
    Is it the normal OBIEE behaviour OR am I doing something wrong in there? Can you please help me out with this?
    Thanks,
    Rocky

    Hello Sainath,
    We tried those things. But it is still giving same error.
    State: HY00. Code: 10058. [NQODBC][SQL_STATE:HY000][nQSError: 10058] A general error has occurred. XML/A error returned from the server: Fault code: "XMLAnalysisError.0X80000005". Fault string: "The XML for Analysis provider encountered an error: MDX result contains too many cells (more than 1 million)". (HY000)
    The problem here, I think, is the filter parameters are not getting passed in the MDX query. Any idea why would that happen? Is there any setting to do so?
    Thanks in advance for help.
    Regards,
    Rocky

  • How to get the name of the currently used display variant

    Dear all,
    I found the user-exit EXIT_SAPLGRAP_001 for programming download authorization.
    With us no standard user is allowd to download data from R/3. With the user-exit it would be possible to allow certain downloads. one problem i solved already.
    For programming the second authorization i need the name of the currently used display variant in RKPEP000. Where can i get the name. I tried user-exits for RKPEP000, but i didn't find the name. I didn't find it in SYST either.
    Thanks and reargs
    Monika

    First you need to enter those names. Right-click the songs (Windows) or go to File>Get Info (All Platforms), then go to the second tab from the left to insert the information.

  • Get comp name and apply expression using it.

    Hey Guys,
    So basically, I've created a Vignette script using cc spotlight.  The only problem is, in order to link some expression between comps, I had to rename the main comp the vignette is being applied to.
    Is there a way to get the name of a comp (the current item) and place it inside of an expression?
    Here is a link to my script. It should make more sense when you check it out.
    http://rapidshare.com/files/456403457/VB_Vignette3.jsx
    Thanks for your help.
    -Tyler

    Yeah, that's the problem......
    I need to get the name of the "active item" (a comp in this case) and use that name inside of an expression.
    Any thoughts?
    Thanks!
    (Dan you're awesome!, love three d corner pin;)

  • How can i get rulefiles name in  appllication with using custom java code.

    Hi.
    I want to get rulefiles names from analytic service with using java api.
    How can i get rulefiles name. Which api can i use for this issue?

    Hi,
    Use IEssCube.getOlapFileObjects() api to retrieve rule files.
    Insert this code snipid in your code, it will list all the rule files.
    IEssCube cube = olapSvr.getApplication("Sample").getCube("Basic");
    IEssIterator itr = cube.getOlapFileObjects(IEssOlapFileObject.TYPE_RULES);
    IEssBaseObject[] rfs = itr.getAll();
    System.out.println("Rule file count: "+rfs.length);
    for (int i = 0; i < rfs.length; i++) {
         System.out.println("RuleFile"+i+": "+((EssOlapFileObject)rfs).getName());
    you can also list data files and other file objects by changing IEssOlapFileObject.TYPE in getOlapFileObjects()
    Regards
    Rajeev Singh

  • How can I get the name at webdb login to pass to reports?

    Where can I get the name of the user who has connected to webdb
    site to pass to some reports?
    the sql code:
    select * from table
    where name=user;
    isn't working !
    that returns WEBDB_SITE_PUBLIC
    It is something with DAD? I must change something?
    Thanks very much!

    Ok. Bravo
    Please mark this as 'Answered' - it will help others on the forum -

  • Getting the name of the column using MDM API

    Hi I want to know the Column name from fieldId, can any one help me on this. I am using the following code to get the data but i nedd column name to which the data is refering
    ArrayList mdmData=new ArrayList();
    RecordResultSet rs=(RecordResultSet)obj;
    FieldId field[];
    for(int i=0;i<rs.getRecords().length;i++)
           field=rs.getRecords()<i>.getFields();
                for(int j=0;j<field.length;j++)
                    mdmData.add(rs.getRecords()<i>.getFieldValue(field[j]));
    Regards,
    Sandeep

    Hi Sandeep,
    When you fetched the FieldID from FieldProperties object. There is one more method to this class named FieldProp.getName(). This returns you the Name of the Field. You can store that too if you need it later.
    Thanks
    Namrata

  • Get datafile name in database column using ctl file - SQLLDR

    I have a shell script(ksh) and calling control file using SQLLDR. I want to pass the datafile name in database table column. Can anyone give an example of this. Appreciate your response.
    --TV2703                                                                                                                                                                                                                                                                                                                                                                                                           

    Create the control file dynamically before you start SQL*Loader
    Something like
    echo LOAD DATA > load.ctl
    echo INTO TABLE dept >> load.ctl...
    Another option is to use external tables

  • Getting Proxy name and proxy port using Hostname and port

    Hi Colleagues,
    I my Application i am consuming webserice and i am setting proxy host and proxy port using the below code :
    httpItf  = HTTPControlFactory.getInterface(port);
    httpItf.setHTTPProxy("proxy", 8080);
    But this "Proxy" is getting changed if the application is deployed to another network. (like some other landscape)
    So Could it be possible to get the proxy dynamically depending on the Hostname and port.
    such that it should automatically pick up the "ProxyHost" and "Proxy port".........depending upon the system it runs .
    Please help me out here
    Thanks & Regards
    Swetha
    Edited by: Swetha Nellore on Sep 17, 2009 7:52 AM

    Hi Colleagues,
    i have solved this by maintaining a proxy settings properties file.....where proxy settings can be changed using system administrator
    Thanks & Regards
    Swetha

  • Getting country Name using from a Telephone tower

    Hi,
    We are currently doing a project on iphone where we are in need of country name. We can get this using Mapkit and using google reverse geocoding. But the map kit is not available in 2.0 and googles core reverse geocoding is not consistant. Is there a way to get details of cellID from the nearby telephone tower. This is definately possible using other platforms such as symbian and android not quite sure on iphone.
    Any other suggestion are also welcome.
    Thanks

    I think you should be working more closely with your TCS colleague (as Marcelo pointed out above):  Getting Table names from Query
    Per the other thread you'll see that when using Query mode the portions of the select statement are kept separately and could be retrieved for simple queries.  Columns, Tables, FilterExpr, SortExpr, and others would be available to you in the query object (http://help.sap.com/saphelp_mii121/helpdata/en/45/cca31a93696f74e10000000a1553f6/content.htm)
    If you are using a FixedQuery you could consider using
    [Param.1]
    for the FROM clause and then you could simply request document.APPLETNAME.getQueryObject().getParam(1) to retrieve it at runtime, otherwise you will have to parse the Query property string yourself.
    Try using
    SELECT * FROM [Param.1]
    and defaulting the value Employees in the Parameters tab of the Template, then you can easily retrieve this in javascript with the syntax above.

  • Fetch territory name from API by using Transaction Qualifiers value

    Hi All,
    I want to get territory name from API by using Transaction Qualifiers value. But I am unable to find any suitable API.
    Is there any standard API available?
    Its urgent issue. Please any one help me.
    Thanks in advance
    Subhas Samanta

    There is no such API available. But, I can give you a query based on the qualifier. The query changes from qualifier to qualifier.
    Thanks,

  • How to obtain Role name in OIM 11g using API's

    Hello,
    I have a scenario in which I create Role/Group in OIM 11g & it gets provisioned in AD [=works fine] & other part is when i delete role in OIM 11g then it should
    get deleted from AD.I have written postprocess event handler to achieve this.
    In role creation part i get all parameters using "orchestration.getParameters();" , but when i delete role then "orchestration.getParameters();" is empty,so i am
    not able to get role name.
    Is there a way to get role name while deleting roles using API ?
    Thanks,
    Rahul Shah

    Hi Raghav,
    Following is my code :
    tcRODetails = orgOpInterface.getObjects(organizationKey);
    for(int i = 0;i < tcRODetails.getRowCount();i++){
    tcRODetails.goToRow(i);
    // resourceName=AD Group
    if(resourceName.equalsIgnoreCase(tcRODetails.getStringValue("Objects.Name"))&&
    tcRODetails.getStringValue("Objects.Object Status.Status").equalsIgnoreCase("Provisioned")||
    tcRODetails.getStringValue("Objects.Object Status.Status").equalsIgnoreCase("Enabled")) {
    System.out.println("<<<FOUND>>>");
    processKey = tcRODetails.getLongValue("Process Instance.Key");
    provisionObjectKey = tcRODetails.getLongValue("Objects.Key");
    tcProcessSet = oimFormUtility.getProcessFormData(processKey);
    for(int j=0;j<tcProcessSet.getRowCount();j++){
    tcProcessSet.goToRow(j);
    if(grpName.equalsIgnoreCase(tcProcessSet.getStringValue("UD_ADGRP_NAME"))){
    System.out.println("MATCH FOUND!!!!!");
    orgOpInterface.removeObjectAllowed(organizationKey,provisionObjectKey);
    break;
    & i get following error :
    <Mar 22, 2012 1:54:43 PM IST> <Error> <XELLERATE.APIS> <BEA-000000> <Class/Method: tcOrganizationOperationsBean/removeObjectAllowed encounter some problems: Object with key=7 is not already set as an allowed object for Organization with key=1>
    Thanks
    Rahul Shah

  • Getting Display Names & Integration tags from Mapping Service

    Hello All,
    We are trying to get display names and integration tags using OnDemand mapping service. Though we get them for most of the fields in all the OnDemand objects, we noticed that for some of the fields we are not getting this information. Any idea on how to handle this?
    Regards,
    Venky
    CRMIT

    I have not seen anything definative on what the difference between the Generic and Custom WSDL's are.
    I believe the Custom WSDL is a sub-set of the most commonly asked for fields while the Generic WSDL is everything under the sun.
    Do you have a speciific example of what you are looking for?

Maybe you are looking for

  • IMessage getting "Not Delivered" error, Message Send Failure

    I upgraded to ios5 on my 3GS last night, seemed to have no problems, no errors.  When I try sending a text another iphone users, it defaults to sending an iMessage, but then says "Not Delivered" in red, with a red exclamation point next to it.  My da

  • Problem with executing java on command prompt

    Hi my program uses java mySQL connector to connect to a local host. The program works fine when i run through netbeans. But when i run through command prompt it gives in this error message java.lang.ClassNotFoundException:com.mysql.jdbc.Driver Can an

  • Problem in classical report.

    Dear all, I am facing a problem with alignment in one classical report. Requirement is debit ,credit amount's sum will at end of every g/l as new line. Text will be closing balance - then amount. My amount & text is coming ,but not properly. All docu

  • Will Apple ever update beyond version 5.1.7?

    Hello, longtime Safari for Windows user first time poster. By now we're all probably wondering if/when Apple will release a version of Safari for Windows newer than 5.1.7. Are there any plans to do so? *kicks engineers in the butt There, that should

  • Transfer time machine data (snow leopard) to new mb air (lion)

    MB Pro died. How do I transfer external Time Machine backup (Snow Leopard) to new MB Air (Lion)?