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

Similar Messages

  • 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

  • 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

  • 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.

  • 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

  • Wrong overall result population in the query output

    Hi All,
    I have few issues with my query..
    we have a query which gives  report about the brand name, brand element, brand group, netsales, cumulative sales and royality percentage.
    1. the over all result for the Royality percentage is not getting calulated properly... i have compared the result setting of the other fields which get proper overall result.  i dint find any difference even then i face this issue
    2. The royality percentage is a% of netsales.. but here is issue is when i drill down thro Brand element i am getting proper amount i.e. a% of current sales but when i remove drill down am getting wrong value... and this happens only for one brand not for others...i dont understand why is this happening..
    3. let us consider we have 4 brands.  for 2 brands my royality percentage is getting calculted properly but for 2 brands it is showing wrong value.
    can anyone help me out in this issue...
    i dint get even a single clue regarding this... need your expert help

    Hi ,
    in our report we have calculated roayality fee based up on current net sales.
    current sales comes directly from the infoprovider..
    the royality fee is 6% of current net sales for each brand element.
    Now the issues are
    1. we have four brands... for two brands we are getting correct Royality fee.. i.e. exact 6% of its respective current net sales.
    but for two brands we are not getting the 6% value..
    2. There is one more field named Brand Element.  when i drill down the Brand element, for one brand (out of two which gets wrong royalty fee) alone my royalty fee is getting differed.
    ex. with drill down royalty fee is 82.5 (which is 6% of its current net sales)
          after removing the drill down royalty fee is 63.5 (Which is not related)
    it is not happening for other brands.. why is it behaving so.
    3.  What ever the royalty fee is the overall result of the royalty fee is not getting calculated properly..
    I.e.  for four brands if i calculate the total of royalty fee it comes around 380
    but now it is displayed as 272 (no idea what total it is)
    thanks for the help in advance

  • How to fulfill the virtual characteristic value into report

    Hi Experts,
          I am working on one reporting requirement that needs to add reference date (virtual characteristic) field to report.
          I have added reference date field to query and able to display the field in report.But I am not able to display reference date field runtime data in to report output.
        Could someone please help me on this how to display this virtual characteristic values into report.where the runtime variable values are stored.How to fill the data etc.
    Thanks in advance.
    Best Regards,
    Hari.
    Edited by: k hari on Jan 29, 2008 6:22 AM
    Edited by: k hari on Jan 29, 2008 6:24 AM

    You can achieve this using Customer Exit or BADI. Check the folllowing link.
    http://help.sap.com/saphelp_nw70/helpdata/en/ac/ef1f43daac9a448f0150a02e3a7aba/content.htm
    If you are using BADI
    You can create Virtual CHAR in BADI using transaction SE19
    In this transaction you can create a new or display the existing BADI.
    There you can see two tabs
    The Attribute Tab we need to give the name of the Multiprovider on which the query with the virtual char is getting executed.
    The Inerface Tab has three following sections. Need to write the ABAP code for all the three.
    Define : Defind all the characteristics and virtual char that will be used for populating virtual char
    Initialize : Initialize them
    Compute : Here you will have to write the logic for populating the virtual char.
    Once the logic is written then you can use this char in your query .
    Hope this helps.

  • Possibele entries are not populating for the fields on the selection screen

    Hi,
    Possible entries are not populating for the fields on the selection screen for the query.But its working fine in Development and Quality Systems.
    Can any body help me out
    Regards,
    Amit.

    Hi,
    In the Selection screen,go to Settings->Value Restrictions tab->Read Mode Settings->Custom radio button and select the options Values in Master Data or Only Values in InfoProv or Only Posted values for navigation.
    After this setting,check whether you are getting the data or not.
    Rgds,
    Murali

  • Message type is not populating in the Inbound idoc control record

    Hi,
    I have created an Inbound Idoc function module and have done the necessary Idoc settings. But, while testing in WE19, I observed that control record is not getting populated with message type and it is dumping.
    The settings which I have done in WEDI as follows:
    1. Created Idoc segments with necessary fields and released
    2. Created Idoc type for the segment type
    3. Created message type
    4. Assigned message type to basic type
    5. In the inbound processing settings,
       filled the ALE attributes with the Idoc function module name and input value '0'
    6. Assigned FM to basic type and message type
    7. Created process code and assigned the process code to message type
    Please let me know, the reason for the message type not populating in the control record. Useful answers will be surely rewarded.
    Best Regards,
    Mallika

    Hi,     
    Maintain partner profile (Transaction code WE20) for the message type you defined in WE81 and put your process code in partner profile and check your logical system settings also in transaction SALE.
    Thanks
    Rahul

  • Decimals not seen in the query...

    Hi Guys,
    I have a problem with the query..
    I have loaded a KF with 2 decimal places in the cube.
    But when I run a query created on the cube, the digits after the decimal place are not seen in the query.
    For e.g.  the value of the KF in the cube is 9.85...but in the query, it is seen as 9
    please let me know where do i need to make the changes.
    FYI..the unit of the KF is %. Has this got anything to do with the problem ?
    thanks in advance,
    Punkuj...

    Hi Aby,
    Sorry, i just missed to mention this imp point :
    I had done the operation that you have suggested :
    I am getting the following output :
    In the Cube : 9.85
    in the query ( after the decimal selection) : 9.00
    I hope that clears my problem..
    Thanks..
    Punkuj

  • Days supply is not populating in the planning book

    Hi Experts,
    When I select multiple products in the planning book, the value is papulating as total but if I drilled down to individual product then days supply(Key figure) values are not populating in the planning book.
    Please let me know if any idea.
    Regards,
    Hrishi

    From what you mention it looks like you do not use the standard SNP Planning Book. Was the macro inactive so that you had to regenerate?
    When you move a macro from workbench to level change it should not require to be regerated.
    Please check if following macros are active (green) under level change in sequence
    Determine Workdays
    Layout Attributes
    Drill (Level)
    Else compare the macros and sequence in the standard SNP Planning Book with the Planning Book you are using.
    The Day's Supply (All: Day's Supply) and Determine workdays macros are essential for populating the day's supply keyfigure.
    Thanks,
    Somnath

  • Billing tab of BP are not populated in the sales order automatically

    Hi
    Business Partners Billing Tab details like customer pricing procedure, currency, price group, Customer group etc are not populated in the Sales order automatically?
    I have checked the pricing procedure determination also.
    Thanks

    Thanks problem is solved.

  • Assessable value not maintained for the material X

    Dear all,
    i have maintained material chapter ID,Plant and materialchapter id  combination ,assessable value , cenvat determination, and vendor excise details in the transaction J1ID .
    Even after maintaining all these conditions , i am not able to save the po,while saving the po i got a error message that assessable value not maintained for the material X..
    Points will be rewarded for useful suggestions.
    Thanks in Advance.
    velu+91-9789991357

    Hi,
    Search using approriate keywords in SDN, u get most of the details, i have now done the same searched and have pasted below .
    Try ME2N.
    Click on the "dynamic selections" icon and add the release indicator as an additional selection. Enter the release indicators that you class as "awaiting approval" and you will then have your list.
    The ME2* series of transactions are not that much use prior to 4.7, the layout is poor. But if you have 4.7 or later you can get the screen to use the ALV format and this transforms the ME2* (i.e. ME2L, ME2M, ME2N etc.) transactions into VERY useful reports.

  • Value not available in the context node

    Hi,
    I have created one custom component through BSP_WD_CMPWB  with only one view called u2018partneru2019 with sample button.
    In this view partner ,then  created one  model context node with reference to  u2018 BuilHeaderSearchu2019 search component with only one attribute  u201CPartner IDu201D.
    When I test the component , WebUI  screen shows partner id input box, and sample button. After  entering partner id value in the input box, then I am pressing sample button. But entered value not  available in the context node.  Please help me, how can i get this value?
    Kathir.

    Hi,
    Check the set_method of that attribute and compare with standard.
    Regards,
    Shobhit

  • My query prompts does not appear in the Query prompt order list!

    Dear colleagues,
    All of my query prompts does not appear in the Query prompt order list in properties of the query. It seems random which of them that appears there and not.
    This makes it impossible for me to control or change the order of prompts, instead they order themselves alphabetically.
    Is this some kind of bug? Is there a fix for this problem?
    Regards
    Silje

    Hi Stratos,
    We use Edge.
    Correction- we use Enterprise, changed a few months ago!
    By the way, we heard about a bug that probarly causes the problem.
    If the query has ever had a prompt containing 'Between', all prompts created afterwards will not appear in the prompt order list! Even if the between-prompt is deleted.. We still havent heard about a fix for this, please contact me if you hear anyting. It is not an option to create all the queries from scratch again!
    Silje
    Edited by: Silje Mari Sunde on Oct 22, 2009 9:24 AM

Maybe you are looking for

  • How can an email be sent from my iPhone go out as a gmail address if my default is cox and the gmail is not set up on my phone?

    I only have one email account on my phone.  It is a cox account and the default email account is of course cox.  I've had some emails go out as a gmail account so when someone replies it goes to the gmail address instead of the cox address.  These do

  • How to use LIKE keyword in a select statement

    Hi: I want to use the following sql statement, String str = "xyz"; String query="Select * from tab where col like '"+str+"' '%' "; Kindly suggest TIA

  • Handling unit proposal

    Hi All, Can anyone help me to create handling unit proposal either manually or through packing instruction in handling unit management. I tried to create a HU proposal in HU02, but system throws err message "Material not found against the material to

  • Intel Mini - HDTV with DVI or HDMI Problems

    Hello With my Samsung LE32 and the Intel Mini I get overscan in HDTV resolutions like 1280x720, so I used DisplayConfigX to go from 1280x720 (overscan) to 1240x680 128 Front Porch 19 80 Sync 5 240 Back Porch 38 1688 Total 750 As you can see in the fo

  • Navigation

    When setting up Menu navigation and I select Options > all pages i get the menu ok. If I have sub/child menus below the "about us" menu with 2 or more they all appear in a horizontal row beneath the main menu. what do I need to do to make them as a d