Parent account key name/description in report

Hi Experts!
So here is the code where i am retrieving postings detail (invoice rows, BP, system amount, doc number, distribution rule and project)
Declare @FromDate Datetime
Declare @ToDate Datetime
Set @FromDate = (Select min(T0.[TaxDate]) from OPCH T0 where T0.[TaxDate]>='[%1]')
Set @ToDate = (Select max(T0.[TaxDate]) from OPCH T0 where T0.[TaxDate] <='[%2]')
SELECT T0.[CardCode], T0.[CardName], T0.[NumAtCard], T0.[DocNum], T0.[TaxDate], T1.[ItemCode], T1.[Dscription], T2.[groupmask], T2.[FatherNum], T1.[AcctCode], T2.[AcctName], T1.[OcrCode], T1.[Project], T1.[TotalSumSy], T0.[Comments]
FROM
OPCH T0  INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OACT T2 ON T1.AcctCode = T2.AcctCode
WHERE
T0.[TaxDate] >= @FromDate
AND T0.[TaxDate] <= @ToDate
AND T2.[groupmask] >= 4
My issue is that i want to have for each account the parent account code and the parent account description. (as well as the Group mask name/description)
How can i do that?

Hi Nicolas Constant...
Try This
Declare @FromDate Datetime
Declare @ToDate Datetime
Set @FromDate = (Select min(T0.[TaxDate]) from OPCH T0 where T0.[TaxDate]>='[%1]')
Set @ToDate = (Select max(T0.[TaxDate]) from OPCH T0 where T0.[TaxDate] <='[%2]')
SELECT T0.[CardCode], T0.[CardName], T0.[NumAtCard], T0.[DocNum], T0.[TaxDate], T1.[ItemCode], T1.[Dscription],
T2.[groupmask], T2.[FatherNum],t3.AcctName As FatherActName, t4.AcctName As MaskName, T1.[AcctCode], T2.[AcctName], T1.[OcrCode], T1.[Project], T1.[TotalSumSy], T0.[Comments]
FROM
OPCH T0  INNER JOIN PCH1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OACT T2 ON T1.AcctCode = T2.AcctCode
inner join OACT t3 on t2.FatherNum=t3.AcctCode
inner join OACT t4 on t4.groupmask=t3.GroupMask and t4.Levels='1'
WHERE
T0.[TaxDate] >= @FromDate
AND T0.[TaxDate] <= @ToDate
AND T2.[groupmask] >= 4
Hope helpful
Regards
Kennedy

Similar Messages

  • Account Code & Name in XL Reporter

    Dear,
    I want to fetch the Account Code & Account Name in XL Reporter.
    So please help me for this issue.
    i use  =ixDimGet("FIG", "BatchNum_0") formula
    but it's give me the 0 as Account Code.

    Dear Shwu,
    Thanks for reply.
    But i want the display Account & name wise whole Purchase report.
    For example,
    if Purchase Invoice No  : 5 & Item No : 10 (Acct Code : 101),11(Acct Code : 102)
    Purchase Invoice No : 6 & Item No : 10(Acct Code : 101),12 (Acct Code : 103)
    so now report will be diplay as below format.
    Acct Code  Purchase DocNo Item No
    101
                           5                          10   
                           6                          10

  • Bex Query calc key figures in Crystal report not showing technical names.

    Hi,
    I have created calculated key figures in a BEx query for which the data comes from a SAP BW cube. I have assigned each of the calculated key figures a proper technical name which I expect to see when I bring it to crystal report. When I bring that query in Crystal as a data source the calculated key figures show a wier network id names instead of the technical names. I am having a problem in using those wierd technical name in my report and my formula's as I am not able to identify what is what.
    Please urgent help requested.
    Thanks
    Mahendra

    I dont have an account on such website. I will explain u the problem in detail.
    When I create a calculate key figure in SAP BEx query designer I assigned a technical name to it, a meaningful one. In my case one such example is Actual_revenue is the name that i have assigned and the description is Actual revenue. When I create a crystal report from it and in that report if i create a formula.
    I get this {ZIC_COPA_Z_SALES.[Measures]-[25V1KYL4VE92X0T4OMHVYM90V]}
    If u see it its a wier 25 digit name.
    Instead of this I want to see
    {ZIC_COPA_Z_SALES.[Measures]-[ACTUAL_REVENUE]} which is what I have given in the query. I am using the SAP BW MDX driver to connect to Bex query.

  • Accounts Descriptions in Report Painter

    If I have a set with a range of accounts and no description, for example:
    SET [345,899]
    I link this set to be output in a report using report painter...
    How do I do to see the accounts descriptions about this range in ReportPainter.
    I mean:
    Something like this......
    345 description 345
    346 description 346
    347 description 347
    368 description 368
    390 description 390
    etc etc

    Hi
    To create a Transaction Code for a Report Painter/report writer report
    Tcode for Report Painter
    To create a TCode, follow the steps below.
    1) Go to Transaction code SE93, Enter TCode Name and Press Create.
    2) Give short Description and select Parameter Transaction, Press Enter
    3) Select Transation Radio Button and write START_REPORT in the next text
    box Also Check the box Skip Initial Screen.
    4) On the bottom of Screen (default Values), Enter Parameters
    i) Name = D_SREPOVARI-REPORTTYPE. Value = RW
    ii) Name = D_SREPOVARI-REPORT Value = Your Report Group Name (Say 1SIP)
    5) Save and Execute.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Web reporting - variable selection should be display as key and description

    hi experts,
    Can anybody tell me the solution for my issue. My isssue is , in the web reporting, i have variable company code, i am selecting the company code thru search help. the values for company code is displaying with key. 
    the new requirement should be displayed with key and description.
    I have checked in the bex, the properties  of company code has maintained as key. when i run the report when cas selet as key and descritption. bex is not a probelm.
    only the problew with webreports,  can anybody give some inptus on my issue.
    Any help is appreciated. waiting for your response.
    thanks
    surendra sheety

    For future reference, this question was finally answered correctly recently in the following thread: 
    F4 help - Search values - I need key and text
    Hope this helps someone who is as confused about this as I have been the past few days!
    Bob

  • Report painter, lead column doesn't display the key, only description is di

    Hi Gurus,
    I am facing a problem as the report painter report only shows the description for the objnr (charasterstic) and not the key and description thoughin the format key and description is set. Kindly suggest me the how to overcome this problem.
    Example of the problem-
    The problem is that the report displays the descriptions (like u201CRéseauAiru201D on the first line) and not the code (E100/002831/EP-AIR) that we wish in the lead clolumn.
    Regards,
    Sachin

    Hi
    Once you execute the report and the output is displayed....
    Go to Settings > Char Display > Choose "Key and Description"
    Then Choose menu Report > Save Definition
    BR,Ajay M

  • Parent -Account Name

    Mike...
    My Case Statement to create the formula that is no Parent Exists use Account Name else use Parent Name is not working...yours did in seconds (when you did it so speedy I was wow)...is the field not null? This is the statement I am using...it returns in the Pivot as "Unspecified" (that is also what it exists in the Pivot for just parent field normal if you aggregate by that as a row)
    CASE WHEN Account."Parent Account" IS NULL THEN Account."Account Name" ELSE Account."Parent Account" END
    Thanks Debbie

    The Parent Account field is populated with 'Unspecified' in the data warehouse when no parent account is identified. The formula is:
    CASE WHEN Account."Parent Account" = 'Unspecified' THEN Account."Account Name" ELSE Account."Parent Account" END
    Mike L

  • Parent account on historical pipeline analysis

    Hi,
    I've a little problem with Oracle CRM on Demand Answers: When I use the subject area "historical pipeline" analysis I do not have acces to the parent account. There is an account area in which I have tons of fields but not the parent account.
    So is there any possibility to get this field in the report. Unfortunately I cannot pass by another subject area.
    My solution:
    I create a report on another subjectarea which lists all parents and children. And then do a case statement to get all lines in which the parent account is empty. I suppose them to be the right parents.
    My report on the historical pipeline I'll filter on the criteria of this first report.
    So I have only the parent accounts.
    Unfortunately I do not have the indirect grandchilden included with this solution. And it's pretty static. But I'd like to have a prompt with which I can filter the report or not on the parent account.
    Any solutions ? :)
    Cheers,
    Myriam

    Hi
    Would it be possible to pass value of Account Name column to Parent Account column during Drilldown Navigation.
    so that in target report only child accounts get filtered.

  • Gl acct name needed in reports

    Hi ALL,
    i am unable to see the GL Acct name in the reports.
    In Reports i need to display G/L A/c number and its name in seperate coloumn.
    G/L acct number s are  starts from 1, 2 , 3 , 4.
    i hav uploaded masterdata only for g/l acct attr's for 3, 4.
    Do i need to upload master data for all the g/l accts ?
    Cant we upload master data only for specific GL Accts..
    thanks

    Hi Voodi,
    <i>
    go to the properties of gl account in the query designer and selct key and text. that way u should display both the account ans text of it.</i>
    yes, i had already done this, in reports g/l acct name coloumn showing empty.
    yes, i did full upload . i am uploading g/l acct's and its names thru flat files.
    i have uploaded GL acct master data attr's succesfully. when i see the master data , g/l acct names are not showing to me .
    can u tell me where i m missing
    thanks,

  • GL Account Key displays Chart of accounts concatenated with GL Account

    Hi,
    When we pull the GL Account Key object into a WEBI report, the Chart of Account value is concatenating with the GL Account number like ABDA/253616. In Bex Query, choosing the Chart of accounts and GL Account in the Analyser gives only the number value of the GL Account 253616.
    How do we resolve this issue.
    Thanks,
    Anu

    Hi,
    We had a similar problem, and we fixed it by using a variable.
    Create a variable (e.g. GL Account) with the following formula:
    =tonumber(replace([L01_GL_ACC_Key];"ABDA/";""))
    where,
    [L01_GL_ACC_Key] = Original Account key with the Chart of Accounts
    "ABDA/" The piece of the account that you want removed
    The formula will convert your account number to a number by replacing the "ABDA/" with a blank (the "" in the formula)
    Note: There is no space between the two quotation marks
    You can now use the variable in your report instead of the original account key.
    Regards,
    Sias

  • Display GL Account Short Text in FBL3N report line

    Dear all,
    I have one issue here. I would like to display the GL Account Short Text while executing report FBL3N.By default system will display each GL account and it's short text at the header before the list of all entries for the specific GL account. But user would like to have it at every line item (in the table line) in the report. This is because they need it during excel extraction.
    May i know how do i go about this?
    Many thanks.

    Hello,
    Please check the following.
    You cannot assign vendor or customer number to sales/purchase GL account with standard settings.
    You must do some development for it.
    You can add additional field to FBL*N reports with using BTE exit.
    First of all, if you don't use BTE before, you must create a product on FIBF.
    Call FIBF transaction -> Settings -> Products -> ...of a customer
    Create a new line,
    Product: ZFI
    Text: BTE Products for FI Exit
    Product active: tick checks from activation.
    Then you must call SE11 for structure RFPOS.
    You must use append structure function for this structure and you can define ZFI_RFPOS append structure
    Define 4 fields.
    Component: KUNNR - Component type: KUNNR
    Component: NAMED - Component type: NAME1
    Component: LIFNR - Component type: LINFR
    Component: NAMEK - Component type: NAME1
    Then save and active your RFPOS structure.
    After that, you must do same step for structure RFPOSX.
    Then go to SE37 and copy from SAMPLE_INTERFACE_00001650 to ZFI_INTERFACE_00001650 FM.
    After copy action, you must uncomment this line on ZFI_INTERFACE_00001650 FM's source code. It's very important;
    E_POSTAB = I_POSTAB.
    Then you should add some ABAP code for getting customer & vendor details.
    I give you some examples, you can use it. (Next message on this thread, please check)
    Then save and active FM.
    Call FIBF transaction again.
    FIBF -> Settings -> Process Modules -> ...of a customer
    Define a new line.
    Process: 00001650
    Function Module: ZFI_INTERFACE_00001650
    Product: ZFI
    and this customizing.
    Then you go to SE38 transaction.
    start report RFPOSXEXTEND. After starting, a pop-up appears, you must click YES.
    After those operations, you can see customer/vendor code and their names on FBL3N.
    ABAP source example,
    TABLES : bseg, kna1, lfa1.
    IF sy-tcode = 'FBL3N'.
      CLEAR: bseg.
      SELECT SINGLE *
      FROM bseg
      WHERE bukrs = i_postab-bukrs
           AND belnr = i_postab-belnr
           AND gjahr = i_postab-gjahr
           AND koart = 'K'.
      IF sy-subrc EQ 0.
        e_postab-lifnr = bseg-lifnr.
        CLEAR: lfa1.
        SELECT SINGLE *
        FROM lfa1
        WHERE lifnr = bseg-lifnr.
        IF sy-subrc EQ 0.
          e_postab-namek = lfa1-name1.
        ENDIF.
      ENDIF.
      CLEAR : bseg.
      SELECT SINGLE *
      FROM bseg
      WHERE bukrs = i_postab-bukrs
           AND belnr = i_postab-belnr
           AND gjahr = i_postab-gjahr
           AND koart = 'D'.
      IF sy-subrc EQ 0.
        e_postab-kunnr = bseg-kunnr.
        CLEAR: kna1.
        SELECT SINGLE *
        FROM kna1
        WHERE kunnr = bseg-kunnr.
        IF sy-subrc EQ 0.
          e_postab-named = kna1-name1.
        ENDIF.
      ENDIF.
    ENDIF.
    Rgds
    Murali. N

  • Need how to get the parent acount details in Trial balance report

    Hi All,
    I have a requirement in which i need to print the details of the parent account details as the report wont print the parent a/c details by default.
    Can any one please let me know how can i achieve this?
    Thax in advance.
    Seshu

    Generally the trial balance summary report does not fetch the parent account details.
    In my customized report , i need to get the detials of the current accounts as well as the details (initial balance,debit,credit ) for a particular period of the parent account as well.

  • How to add report name to MSS reports in NWBC

    I am using the standard report Launchpad in HRMSS_REPORTING_LAUNCHPAD in role SAP_MANAGER_MSS_SR_NWBC_3 role to allow managers run certain reports.
    When I open Reports launch pad, all the reports appear with the description of the report such as Personal Data, Org data etc.
    However when I run the report, the technical name of the report appears at the top.
    An example of this would be running report Personal data, when run the header is reading 0HCM_PA_T01_Q0008.
    How can I replace the tech name of the report to read the description instead
    i.e. Personal data to appear at the top instead of 0HCM_PA_T01_Q0008.
    thanks
    clive

    Hello Clive,
    I think you should contact your development team. Probably some field is visible in Application Configuration and that is why it shows up. I think the best will be that you seek help from your Development team.
    Cheers
    Hem

  • A condition to avoid displaying a product with the same Product Name in a report

    hello,
     Is there a condition to avoid displaying contents of two similar product names in a subreport?
     here is the scenario:
    Need to display Parent information in a separate List - Good
    child Product information in Sub-report,
    I'm passing both ProductID and ParentName parameters into Sub-Report to display the contents of the sub-report. If there are no similar Parent name, the sub-report works fine. But if there are similar ParentName, my sub-report
    starts listing all Products from the parent name.
      example
        Parent Product 1 ->  
                        Sulphate
                        Product_ID -> xx345
                        child Product1 ->  SulPhur (details...)  in a SubReport
      Parent Product 2 ->
                       Sulphate
                          Product_ID -> xx3342
                          Child Product1 -> Sulphuric Acid (details...) in  a SubReport

    Hi xitum,
    Per my understanding that both the subreport and the main report contains the field "ProductID" and "ProductName", and some of the ProductID will map the same ProductName which will display some duplicate subreport in the list like below,
    right?
    I have used some sample data as below and you can see when the different ProductID have the same values of "ProductName" and "Amount" and some other field value, it will display all the duplicate information
    in the subreport when add the main report in a list:
    ProductID   ProductName  Amount:
        1               ZXITest         220
        2               ZXITest         220
        3               ZXITest2       100
        4               ZXITest3       200
    If this is the case, please reference to the similar case in below thread which include details steps about how to do the deduplicate:
    how to avoid duplicate displaying a chart in a list
    If I have some misunderstanding, please try to provide some snapshot of the unexpect result you have got and more details information about the expect result you want.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Crm plugin issue when updating parent account field in account.

    Hi ,
    In my CRM Application ( CRM 2011) we have accounts and contacts. when account parent account is updated their contacts owner id will be updated in crm db server and external server using notification service which is called by pulgin.
    so in one of my account has 6000+ contacts ,when updating accounts parent account id  from crm , screen disabled and after 4 to 6 mins sql error message screen displayed.
    below is the eventviewer log ,
    The Web Service plug-in failed in OrganizationId: 457b2390-e086-485f-9b05-
    094f6410abef;
     SdkMessageProcessingStepId: 63cdbb1b-ea3e-db11-86a7-000a3a5473e8; EntityName: account; Stage: 30;
     MessageName: Update; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel,
     Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35;
     ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin;
    Exception: Unhandled Exception: System.Threading.ThreadAbortException: Thread was being aborted.
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr,
    Binder binder, Object[] parameters, CultureInfo culture)
       at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
       at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
       at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
       at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    If i debug the account update code plugin it seems to be working fine (means updated parent account id  and contacts ). if i remove debugger and hit on save from crm , throws error.
    this is high priority issues , im struggling from past 3 days could get any solution.
    if any one helps really appreciated.

    First.
    If you use plugin for send information to any external system you create small intergation.
    For integration use must create async plugin. On your trace ( account; Stage: 30;) you use sync plugin.
    Second
    For increment CRM timeout add reg key OLEDBTimeout.
    about this key you can read from microsoft
    support
    good luck

Maybe you are looking for