Badi-Virtual keyfigure value not populating in query

HI all,
I am trying to populate a constant value into the virtual keyfigure when the query is executed but the value is not getting populated.
I followed the steps how to do this by looking into the step by step process for keyfigure article which i found in SDN.
When i execute my BADi in se19 i am able to get the value but not in the query.
Is there a special way to create keyfigures or is it the same way as we create a normal keyfigure.
Can someone tell me how to get the values in query.
Thanks in advance.
Regards,
Harish

Hi,
why dont you debug the badi while executing the report from RSRT t-code. This will give you some idea.
To debug, put a break point in 'define' as well as 'compute' function of your Badi-implementation, then go to RSRT t-code, enter your query name and then click generate. It will stop at the break-point. Here you can see what is the problem
Regards
akshay

Similar Messages

  • Virtual Characteristic value not populating in the query output

    Hi Experts,
    I am new to BAPI and I am using this to populate the values of virtual characteristics.
    I wrote the below code to populate if an order status got some status value then i need to populate the flag y if not n.
    I got the order value in the reprot. I need to go to order master data and should get the status and then i have to do the comparision and populate the flag zww_teco in the report.
    The below is the compute method of my implementation class.
    FIELD-SYMBOLS :
    <fs_0cs_order> TYPE ANY,
    <fs_zww_teco> TYPE ANY,
    <fs_status>  TYPE ANY.
    if p_cha_0cs_order > 0.
      ASSIGN COMPONENT p_cha_0cs_order OF STRUCTURE C_S_DATA to <fs_0cs_order>.
    endif.
    if p_cha_zww_teco > 0.
      ASSIGN COMPONENT p_cha_zww_teco OF STRUCTURE C_S_DATA to <fs_zww_teco>.
    endif.
    Select single /BIC/ZSYSTATUS
        from /BI0/PCS_ORDER into <fs_status>
       where CS_ORDER = <fs_cs_order>.
    if <fs_status> CP 'TECO'.
      <fs_zww_teco> = 'Y'.
    else.
        <fs_zww_teco> = 'N'.
    endif.
    But I am not sure why the values are not populated. But when i debug , i could see the values for
    P_cha_0cs_order = 35
    p_cha_zww_teco = 54
    But i could get the values of <fs_0cs_order>, <fs_zww_teco> after assign component statement.
    And it is firing me a dump in select statement. Also when I click c_s_data i am getting S____274, S____505 fields like that in the structure but i could see p_cha_0cs_order
    Can you please guide where i am missing ...
    Thanks
    Vamsi
    Edited by: vamsi talluri on Nov 9, 2011 6:14 PM

    Hi Sushant,
      RSRT --> Enter Query Name
    Click on Technical Information --> If " Virtual Char./Key Figures " = Y
    In my case , even then i clciked generate report,
    even after that P_CHA_0CS_ORDER = 35
    and after assign component P_CHA_0CS_ORDER of structure c_s_data to <FS_0CS_ORDER>.
    the <FS_0CS_ORDER> is nothing , here i should get the value of cs_order value of that record but it is coming empty which i am not able to rectify. How should i change or i need to put any other setting to get the value populated into my <FS_0CS_ORDER>.
    Can you please guide me .
    Thanks
    Vamsi

  • Virtual Char/KF not populated in the query ????

    Hi,
    Can anybody suggest why Virtual char/KF are not populated in Query. I just want to populate the value from existing cube characterstics/KF value.
    Code as follows:
    Cube : ZDEBC01
    Virtual Char: ZVIRTUAL1
    Virtual KF :  ZVIRTUALK
    *&  Include           ZXRSRU02
    DATA: L_S_CHANM TYPE RRKE_S_CHANM.
    CASE I_S_RKB1D-INFOCUBE.
      WHEN 'ZDEBC01'.
        L_S_CHANM-CHANM = '0SOLD_TO'.
        L_S_CHANM-MODE  = rrke_c_mode-READ.
        APPEND L_S_CHANM TO E_T_CHANM.
        L_S_CHANM-CHANM = 'ZVIRTUAL1'.
        L_S_CHANM-MODE  = rrke_c_mode-NO_SELECTION.
        APPEND L_S_CHANM TO E_T_CHANM.
        APPEND '0INVCD_QTY' TO E_T_KYFNM.
        APPEND 'ZVIRTUALK' TO E_T_KYFNM.
    ENDCASE.
    *&  Include           ZXRSRTOP
    DATA: G_POS_ZDEBC01_ZVIRTUAL1 TYPE /BIC/OIZVIRTUAL1.
    DATA: G_POS_ZDEBC01_ZVIRTUALK  TYPE I.
    DATA: G_POS_ZDEBC01_0SOLD_TO  TYPE /BI0/OISOLD_TO.
    DATA: G_POS_ZDEBC01_0INVCD_QTY TYPE I.
    *&  Include           ZXRSRZZZ
    FORM USER_ZDEBC01 USING    I_S_RKB1D TYPE RSR_S_RKB1D
                               CHANGING C_S_DATA  TYPE ANY.
      FIELD-SYMBOLS <L_ZVIRTUAL1>.
      FIELD-SYMBOLS <L_ZVIRTUALK>.
      FIELD-SYMBOLS <L_0SOLD_TO>.
      FIELD-SYMBOLS <L_0INVCD_QTY>.
      ASSIGN COMPONENT G_POS_ZDEBC01_0SOLD_TO
          OF STRUCTURE C_S_DATA TO <L_0SOLD_TO>.
      ASSIGN COMPONENT G_POS_ZDEBC01_0INVCD_QTY
          OF STRUCTURE C_S_DATA TO <L_0INVCD_QTY>.
      ASSIGN COMPONENT G_POS_ZDEBC01_ZVIRTUAL1
          OF STRUCTURE C_S_DATA TO <L_ZVIRTUAL1>.
      ASSIGN COMPONENT G_POS_ZDEBC01_ZVIRTUALK
          OF STRUCTURE C_S_DATA TO <L_ZVIRTUALK>.
      <L_ZVIRTUAL1> = <L_0SOLD_TO>+0(3).
      <L_ZVIRTUALK> = <L_0INVCD_QTY> + 1000 .
    ENDFORM.                    "USER_ZDEBC01
    Thanks,
    Debasish
    null

    Hi,
    in your code all variables:
    DATA: G_POS_ZDEBC01_ZVIRTUAL1 TYPE /BIC/OIZVIRTUAL1.
    DATA: G_POS_ZDEBC01_ZVIRTUALK TYPE I.
    DATA: G_POS_ZDEBC01_0SOLD_TO TYPE /BI0/OISOLD_TO.
    DATA: G_POS_ZDEBC01_0INVCD_QTY TYPE I.
    must be of type i.
    regards
    Siggi

  • Batch characteristic value not populated!

    Hello guys,
    please would appreciate advice to following:
    I created two reference chars z_goods_receipt (MCH1-LWEDT) and z_created_on (MCH1-ERSDA). Chars assigned to material batch class. During GR in Classification Dates (chars values) are visible, but after GR is saved, in batch chars values are not populated.
    Consequently, I can not use these chars in sorting criterium for delivery batch determination - batches are not sorted acocrding to dates.
    Batches on material level. In Customizing (Classify batches within goods mvt), for mvt 101 setting is 4 (Classification always in foreground (all batches)) - but bug remains even if i try with other options. Check with developer shows not much help from EXIT_SAPMM07M_004 or EXIT_SAPMM07M_004 or EXIT_SAPLV01Z_012.
    Any idea how to populate these chars in batch?
    Alternatively, what else I could use in order to enable FIFO batch determination for batches in delivery?
    Thanks for prompt replies!
    Br, Jan

    Hello,
    SAP reply -standard behaviour. After save in MSC2n values read from MCH1, after that in MSC3N value read from AUSP.
    Issue solved using non reference charactereristic and adding code into ZXMBCU04.
    Br, Jan

  • Value not populating in the print out (sales order) for the 1st time

    Hi friends,
    While saving a sales order, the order confirmation going to the user is not populating the LDC field. LDC is Last date of change. This field can be found in the Additonal data 2 tab of the material in the sales order. When I enter a date in this field and save, the print preview of the output has this value, but the print out does not carry this value.
    Another weird thing about this issue is that, the second time i trigger the output, the print out has the value.
    Please give me some clue on where to check and how to go about fixing this problem.
    Regards,
    Shanu.

    Dear Shanu,
    This issue may be related bug in the output program so take help of ABAPer to fix the issue.
    I hope this will help you,
    Regards,
    Murali.

  • Values not populated in S_ALR_87012806 for a specific cost element

    Hi all,
    Postings made to specific cost element are not populated in report S_ALR_ 87012806. Can anyone throw some light on this?
    Thanks
    Shravan

    Hi Krishna
    I dont think "Cost Accounting > LIne Item" would work for Master Data
    You can use exit COOPA_01 (SMOD) > Include ZXAUFU08 (Part of EXIT_SAPLKOAU_002)... I have used this for similar purposes in the past
    Regards
    Ajay M
    Edited by: Ajay Maheshwari on Nov 12, 2010 12:45 PM

  • Value not populated for new field - in RSA7 for PI interface in BW

    Hello Experts -
    We have 3.5 bw and PI 7.x. we have a PI interface in bw working in production and now we enhanced the interface with a new added field. I mapped the new field in transfer rule/ modified update rules/ods and regenerated the soap datasource in bw. The user has uploaded the file in FTP with this new field added. PI picked the file processed and the value for new field got populated and pushed the data to BW. In RSA7, i dont see the data filled in for this new added field.
    Not sure, if i missed any steps, in BW, so that I can populate the value for this field.
    Thanks for any inputs/comments.

    Hi ,
    Replicate the Data source in BI and activate it using RS_DATASOURCE_ACTIVATE_ALL program.
    Regards,
    Ramnaresh.P.
    Edited by: ramnaresh porana on Apr 26, 2011 9:43 PM

  • All master data values not shown in query selections

    Hi
    I have created a query on a BasisCube containing the InfoObject 0FUNC_AREA. I loaded data to 0FUNC_AREA and the cube.
    I then created a query on the cube, in which I want to filter on 0FUNC_AREA. However, when I get the list of available values for 0FUNC_AREA not all the values in the master data is shown. It only shows 25 values out of 105.
    As a default, the data shown is only the cube data, so I removed the tick in the checkbox: Show only InfoCube data. Still the same.
    Then I went to the InfoObject and set the 'Query Def. Filter Value Selection' and 'Query Execution Filter Val. Selectn' equal to 'Values in Master Data'. Still the same.
    Then I deleted the contents of the InfoCube. It still shows the original 25 values.
    The really strange thing is, that when I go into the selection screen for 0FUNC_AREA in the BEx and limit the shown values to one of the values available in the master data but not shown in the list, it shows the text of the functional area in the limit summary window. But still when executing the limitation, it cannot find the value!!!
    The problem is the same in LISTCUBE
    I hope some of you can help we with this.
    Thanks
    /Karsten

    Hi Hari
    1) Reactivated the master data, said it was already active.
    2) Could see a difference between the data contained in cube and the remaining data. Otherwise not.
    I deleted cube and master data and reloaded, the problem still persists. I am beginning to suspect a bug in BW.
    I have to determine whether I am going to live with it (as it isn't critical, just a nuisance) or create an OSS on it.
    Thanks for all the input guys.
    /Karsten

  • LIST OF VALUES not Populating in BPS WEB INTERFACE ( LAYOUTS )

    Hi BI Guru's
    I have created a WEB interface for BPS in BI ( version 7.0) .  But when i execute this in internet explorer, I do not get the LIST OF VALUES for Material. 
    When I click on "input help" the system open a new window for "Value selection".  When I specify the material code, it gives me blank LIST OF VALUES.
    But it is working for other fields like Customer, UOM in the same layout.
    Please suggest some solution.
    Thanks,
    Nilesh Labde

    hi,
    Thanks for the reply.
    Master data is avaliable for the Material Code.  The problem is in Internet Explorer and not in SAP GUI .
    If i run Planning folder for the same layou in SAP GUI it is working fine.

  • Values not populated in AET STATE RECORD

         Hi all,
    I have a state record with the fields
    PROCESS_INSTANCE
    RUN_CNTL_ID
    OPRID
    COUNTER
    ACCOUNTING_DT
    FZAM_COUNTER
    FROM_DT1
    TO_DT1
    SOURCE
    I am fetching values into the above state record from z tables  in my app engine.
    Step :step 02  Action :SQL
    %SelectInit(ACCOUNTING_DT,COUNTER)
    SELECT ACCOUNTING_DT
    , COUNT(*)
      FROM PS_FZAM_VND_GL_STG
    WHERE GL_DISTRIB_STATUS = 'N'
      GROUP BY ACCOUNTING_DT
    Step :step 03  Action :SQL
    %SelectInit(FROM_DT1,TO_DT1)
    SELECT FROM_DT1
    , TO_DT1
      FROM PS_FZGL_RUN_DT_HDR
    WHERE SOURCE = 'AM'
    But i find  FZAM_VEND_AET.COUNTER ,  FZAM_VEND_AET.TO_DT1, FZAM_VEND_AET.FROM_DT1 all empty eventhough  PS_FZAM_VND_GL_STG & PS_FZGL_RUN_DT_HDR  has values in them.
    additional infor :AET record is FZAM_VEND_AET which is a sql table and process_instance is the only key.
    Kindly share ur views

    The log entry you are showing here does not come from your Requester ABCS, rather from the AIA Error Handling code itself not being
    able to find the mentioned property EH.DEFAULT.FYI.ROLE in the AIAConfigurationProperties.xml.
    I guess you want to verify if your version of AIAConfigurationProperties.xml in MDS (not on the file system) has this property set or not. Per default, it should be.
    From what you posted here, there is no evidence that the EH code in your generated ABCS does not work properly.
    Gerhard

  • Values not populating in list box in dialog programing.

    hi,
    i am facing a problem i.e. i am having a listbox on screen , in pbo i am filling that listbox with some values in an internal table.
    But i am not able to populate the values i.e. while i am debugging the pai ......the list box is containing nothing.
    So needed some help in this issue.
    regards,
    somesh

    Hi,
    Try to read these links. It will give you some pointers regarding on your problem.
    <link-farm removed>
    Revert if you have still any concern.
    Thanks,
    iostreamax
    Edited by: Suhas Saha on Feb 21, 2012 8:50 AM

  • Purchasing Groups values not populated in PR default settings - ME51N ??

    Hi,
    We have SAP R/3 MM ECC 6.0.
    I want to set Purchasing Group as one of the default parameters in ME51N (Purchasing Requisition) screen.
    The problem is I have selected 'Purchasing Group' as a default parameter in 'Default Values'/ 'Personal Settings' but,
    the Drop-down help does not show up any values for Purchasing Group to be selected as default.
    However, I can set-up 'Account assignment' & 'Item Category' as defaults and, I can choose their default values.
    Therefore, in result, I do not have any Purchasing Group set as default for my PRs.
    Is there a configuration setting required to populate the drop-down box of Default Settings (for purchasing group)
    with Purchasing Group values? Please advise.
    Could this be a bug?
    Thanks,
    Ruchika

    Hi Karthik,
    I have already done these steps.
    The problem is - Purch. Group field is there in Default settings but, it doesn't show me any values to select from and
    set a Default value.
    None of the purchasing groups available in system are appearing here.  The selection list is Blank.
    Is there anything I need to do to bring the P.Group values in the drop-down selection list of Personal settings?
    Thanks,
    Ruchika

  • Adobe Form Enumerated Dropdowns values not populated

    Hi All,
    have a scenario where, I have to fill in a dropdown dynamically when I click a button. I get the values from a function module. I have done this using Isimpletypemodifiablestep. It worked.I have the form too. But when I try to re-implement the same for a new requirement, its working only if I give the values during initialisation .
    Why is this inconsistent?
    Can we modify Simple types only during initialization? I have tried to add the values to the drop-down in controller and map the attribute to view. Even that didn't work.
    I'm
    Am using Adobe Live cycle designer 7.1 and NWDS 7.1
    SAP 2004s SP15
    Thanks,
    Vasu

    Hi,
           Try with this code...
         int iCommodityCode = wdContext.nodeIt_Commodity_Output().size();
         String commText = null;
         String commCode = null;
         IWDAttributeInfo CommodityAttinfo = wdContext.nodeCommodityNode().getNodeInfo().getAttribute("CommodityCode");
         if (CommodityAttinfo != null) {
              IModifiableSimpleValueSet commValSet = CommodityAttinfo.getModifiableSimpleType().getSVServices().getModifiableSimpleValueSet();
              commValSet.clear();
              commValSet.put(" ", "Please select one");
              for (int i = 0; i < iCommodityCode; i++) {
                   commCode = String.valueOf(wdContext.nodeIt_Commodity_Output().getIt_Commodity_OutputElementAt(i).getCommodity());
                   commText = String.valueOf(wdContext.nodeIt_Commodity_Output().getIt_Commodity_OutputElementAt(i).getComm_Text());
                                  commValSet.put(commCode, commText);
              wdContext.currentCommodityNodeElement().setCommodityCode(" ");
    You have to execute the RFC in doInit of the View and use this code in the click event of your button.
    If it still doesn't work it must be the problem with webdynpro lifecycle methods.... The context is available only after certain lifecycle methods are called.. i.e. wdDoPostProcessing() method of Component Controller.  Check if you are trying to access the context before the Component Controller is not initiated completely.
    Let me know if you need any further help....
    Regards
    Ramesh.

  • Value not populating in report of MB5T ALV report

    I had written a logic in implicit of this standard report and  iam trying to populate the value in the ALV fieldcatalog.
    Iam unable see the value on output screen though the value gets calculated correctly in debug mode.
    Any suggestions

    Hi  venkata 
    use COMMIT WORK.....maybe it's too fast and it is unable to store the value...
    and try to set a break.point before the call of ALV..and check if the table is correctly calculated.
    regards
    Marco
    Edited by: Menegazzo Marco on May 24, 2010 4:09 PM

  • Virtual Key Figures its not populated when execute query

    Hi All
    I did a BADI for populate a Virtual Key Figure, I follow the instructions of link
    Link:[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60e34f63-f44c-2c10-488e-c89b04e0ca7c?quicklink=index&overridelayout=true]
    In addition I add the code section of data declarated on example of: CL_EXM_IM_RSR_OLAP_BADI section define: IF_EX_RSR_OLAP_BADI~DEFINE, only information that said:
      DATA: l_s_chanm   TYPE rrke_s_chanm,
            l_kyfnm     TYPE rsd_kyfnm.
      FIELD-SYMBOLS:
            <l_s_chanm> TYPE rrke_s_chanm.
    I test the query on RSRT and the virtual Key Figure is "0.00" this look like if the virtual key figure is not populated.
    I did other things like:
    Set a Break Point on COMPUTE section of my BADI, I saw that the value is assigned, but I don't know how I can continue reviewing the pass of this value to result of query.
    I generate again the query on RSRT.
    My code is:
    IF_EX_RSR_OLAP_BADI~DEFINE
    method IF_EX_RSR_OLAP_BADI~DEFINE.
      data: L_S_CHANM   type RRKE_S_CHANM,
            L_KYFNM     type RSD_KYFNM.
      field-symbols:
            <L_S_CHANM> type RRKE_S_CHANM.
      case I_S_RKB1D-INFOCUBE.
        when 'ZGTO_OB2'.
          append 'ZVIRTKF' to C_T_KYFNM.
      endcase.
    endmethod. 
    IF_EX_RSR_OLAP_BADI~COMPUTE
    method IF_EX_RSR_OLAP_BADI~COMPUTE.
      field-symbols <FS_ZVIRTKF> type any.
      P_KYF_ZVIRTKF = 16.
      assign component P_KYF_ZVIRTKF of structure C_S_DATA
      to <FS_ZVIRTKF>.
      <FS_ZVIRTKF> = 10 .
    endmethod.
    I will appreciate your recommendations, Thanks in advanced.
    Al

    Thank you very much Sanganya
    I saw this:
    I put a break point on P_KYF_ZVIRTKF = 16., then I saw that P_KYF_ZVIRTKF obtain value 16.
    Then on sentence: assign component P_KYF_ZVIRTKF of structure C_S_DATA
    to <FS_ZVIRTKF> , when the system pass this line, I review the sy-subrc and is equal 4, as I understood the ASSIGN sentence did not be complete, the value shoul be 0.
    Then when the system try to run the sentence: <FS_ZVIRTKF> = 10  the system send an Execution error that say:  GETWA_NOT_ASSIGNED...
      Error analysis
        You attempted to access an unassigned field symbol
        (data segment 32780).
        This error may occur if
        - You address a typed field symbol before it has been set with
          ASSIGN
        - You address a field symbol that pointed to the line of an
          internal table that was deleted
        - You address a field symbol that was previously reset using
          UNASSIGN or that pointed to a local field that no
          longer exists
        - You address a global function interface, although the
          respective function module is not active - that is, is
          not in the list of active calls. The list of active calls
          can be taken from this short dump.
    Exactly the line selected with error is:
    >>>>    <fs_zvirtkf> = '10.0'.
    I will appreciate your help
    Thank you
    Al

Maybe you are looking for