Local field in infoset

hi,
I want to check personnel 0008 infotype wagetype amount and scale amount.
ex. personnel p0008-bet01 = 2000 but from t510 p0008 scale data derives amount 1800,
To compare these 2 amount, within an ad-hoc query, I added an edditional field to 8 infotype in infoset.
after that no error appears, when query run frım sq01, if added field selected ad hoc does not run, orherwise ad hoc runs.
how should I write code for additionbal field.
here is the code that I added to code part of local field.
tables:t510.
get pernr.
select single betrg from t510 into sklucrt
where molga = 47 and trfar = p0008-trfar and trfgb = p0008-trfgb
and trfkz = 1 and trfgr = p0008-trfgr and trfst = p0008-trfst and lgart = p0008-lga01
and begda le p0008-begda and endda ge p0008-endda.

Hi Kara,
first the field BET01 of IT0008 is a repeat field. That means all subsequent values from BET02 ... BET40 are processing in the query using the DO ... VARYING statement.
Now to your coding.
You must not use GET PERNR in your code! This is of course automatically added by the query generator and if you add it in your coding the statement will come up twice.
Second your date comaprison is wrong.
You always have to select with
ITx-BEGDA <= ITy-ENDDA  AND
ITx-ENDDA >= ITy-BEGDA
to get the correct set. Make a drawing and you will realize why.
So your coding would look like:
* first clear the return value
clear sklucrt.
* select the value from T510
select single betrg from t510 into sklucrt
where molga = 47 and
trfar = p0008-trfar and
trfgb = p0008-trfgb and
trfkz = 1 and
trfgr = p0008-trfgr and
trfst = p0008-trfst and
lgart = p0008-lga01 and
begda le p0008-ENDDA and
endda ge p0008-BEGDA.
You MUST clear the return value first otherwise you get the old value in case nothing is found.
Tables declaration you also don't need as you make a direkt select into the field SKLUCRT that I assume is your defined additional field in the InfoSet.
But I wonder why you want to do this as the additional fields available calculate the right amount also in case of indirect evaluation.
Regards,
Michael

Similar Messages

  • ABAP Query: creation of local field (Subtraction between 2 dates)

    Hi,
    I want to create a local field which will calculate the number of days between 2 dates (for example, document date - posting date).
    What I did:
    1) Created the user group in SQ03
    2) Created the infoset in SQ02
    3) I'm stucked at the creation of the Query in SQ01. I'm at the «Create Query: Select field screen». I clicked on Edit --> Local Field --> Create. I selected the «calculation field» attribute. I clicked on the «Complex calculation button», but I don't know how to write my formulate DOCUMENT DATE - POSTING DATE.
    Thanks a lot for your help.
    Julien

    Try these FM's to calculate difference between two dates..
    DAYS_BETWEEN_TWO_DATES
    LEAP_DAYS_BETWEEN_TWO_DATES
    HR_SEN_CALE_DAYS_DATE
    ISB_DAYS_BETWEEN_TWO_DATES
    FIMA_DAYS_BETWEEN_TWO_DATES
    FIMA_DAYS_BETWEEN_TWO_DATES_2
    FIMA_LEAP_DAYS_BETWEEN_2_DATES
    SD_DATETIME_DIFFERENCE

  • SQ01 local field division problem.

    i have a report in sq 01 and i want to divide  two fields
    so i pick local field and try to do it..but result not correctly but addition and substraction working fine.
    any one tell me how perform division in sq01 local field

    I realize this post is very old, but the solution may help somebody else down the road.
    Within the infoset, the setting for "Fixed Point Arithmetic" must be turned on (checked).
    This is turned off by default when converting an SQVI into a Query within SQ00 or SQ01.
    To turn on "Fixed Point Arithmetic".  Go into infoset change mode in SQ02.  Click Goto in the menu path and then Global Properties.  Click on the setting for "Fixed Point Arithmetic" at the very bottom of the pop-up box.  Regenerate the infoset.

  • Custom Field in Infoset Query missing in Infoset

    Hi Everyone,
    I'm in a puzzle and I hope someone can help me. Basically I need to maintain an existing infoset Query - While looking through the query and it's related Infoset I noticed there is a custom field appearing in the query (SQ01) but this field is nowhere to be seen in the Infoset (SQ02) - I'm just wondering how can this be ?
    The same custom field exists in another Infoset - is it therefore possible to build a query using an infoset while pulling in fields from another ?
    I would appreciate any thoughts on this matter as I'm in a very confused way over this.
    Thanks in advance
    Kind Regards
    Damien
    Edited by: Damien Kesle on Jul 22, 2009 3:48 PM

    Hi Damien Kesle ,
    There are ways by which you can create fields ( they are called Local fields ) in the Query too.
    Please see , whether the custom field you are asking is present in the Query.
    Even then , just to confirm that your said field does not exist in the infoset, follow the steps.
    Go to SQ02, put the name of your Infoset and click on tab "Description ".
    Then do a Ctrl + F (Find/Search) for the field. If its not there, then you can confirm that the field comes from Query and not Infoset.
    Approach for any further queries.
    Regards,
    Subin John

  • Additional field for Infoset in BI 7.0

    Hi
    I have created an Infoset with a cube and a masterdata object. Now my requirement is to have an additional field which i can not extend to cube or masterdata.
    Is it possible by any chance to add an additionla field to Infoset and write an abap code ?

    Any suggestions ?

  • Creation of local field in ABAP Query

    Hi
    Please let me know how to create a local field in ABAP query. I am finding the option inactive in SQ01.
    Regards
    Priyadarshini

    hi priya,
         *__Adding u201CLocal Fieldu201D (user defined field) in SAP Query_ :
    There is also facility to add the user defined fields in SAP query output. Also we can provide calculation formula for calculating values for this user defined field.
    Calculation formula consists of standard fields from standard SAP tables. So the values fetched for particular standard SAP fields from standard SAP tables get calculated as per the calculation formula defined for the user defined field and displays the value accordingly.
    To do this first go to change mode for Query which automatically takes you to screen shown below and click on icon   , as below :
    Then further screen will appears. So select the Field group and again click on the same icon button   .
    Then switch on the Short names for the fields and give the short names to fields which we need to use in Calculation formula.
    Give the short names and then created u201CLocal Fieldu201D, as shown in below screen shot. Also Short names are given to fields, which can be used further for calculation.
    Defining Local Field u201CREM_QTYu201D along with its field type and Calculation formula.
      In this case we have 
      defined field type for new  
      field as similar to
      ORD_QTY and
      Calculation formula is  
      defined.
    Also its possible to have Conditional logic for Local field by putting Condition in u201CConditionu201D line.
    Now activate this newly added Local field for coming it in output screen. To do the same again go to u201CBasic Listu201D and activate the Local Field as shown below :
    i think this will help u
    regards,
    sindhu.

  • How to use dates/times in the definition of local fields?

    Hello!
    I have few tough questions for which I haven't found an answer. I hope someone is capable to help me.
    1. Is there a transaction to search tables if we know the field?
    2. I'd like to define a local field and need to use dates in the calculation function. So basically I need to calculate the lean-time from the date of the purchase order (field BSTDK) to the date of the final delivery (field PLIFTS) and the result should be displayed in weeks. How can I do this? Or can I?
    3. Can I use the local fields further in my calculations?
    Thank you in advance!
    Maria Kangasniemi

    Hi,
    1. Is there a transaction to search tables if we know the field?
    Tcode:    SE84
    2. I'd like to define a local field and need to use dates in the calculation function. So basically I need to calculate the lean-time from the date of the purchase order (field BSTDK) to the date of the final delivery (field PLIFTS) and the result should be displayed in weeks. How can I do this? Or can I?
    Doing some calculation you can define it.
    3. Can I use the local fields further in my calculations?
    What is local Fields?

  • Selection field in Infoset Query

    Hi All,
    I have an Infoset which is based on Logical database PNP &  it has few additional fields. Now the requirement is to add one of the additional field to the selection screen of "Infoset Query". But in the Infoset query the 'Selection' checkbox for all the additional fields is graded out, & only the 'Output' Checkbox is enabled for all the Additional fields.
    I added a new additional field in Infoset and even that is not available for selection in the Infoset query.
    Kindly let me know if you have any info regarding this....
    Please note that i have this problem in 'Infoset Query' only.
    Thanks in advance.
    Regards,
    Karthick.

    Navin,
    Try with this link,everything in detail is explained about Infoset queries..
    http://shafiq.us/sap/index.php?view=article&id=54%3Aadhoc-query&option=com_content&Itemid=61
    hope..this will help you!
    Cheers,
    KK

  • ABAP Query - Local field creation error

    Hi,
    In SQ01, I created a query. when i try to create local field EDIT>LOCAL FIELD>CREATE. Its throwing error 'Reference field does not exist' Message no. AQ273.Can anyone please tell me how to create local field then?
    useful answers will be rewarded.
    Thanks
    Shameem.

    Hi,
    When creating a local field in a query, you need to define the type of data it will hold. There is a radio button to select a "reference field" or you can specify the type of data directly. I believe you got this error message because you selected reference field but specified no other field in the query to use as reference.
    RaulV

  • Additional text field in Infoset deleted but not reflected in field selection in Query

    Hi,
    I have deleted an additional text field in infoset. It was used in one query.
    Even in the query it is deleted, but when in field selection screen i am not able to delete.
    If i try to execute the query, I get dump (syntax error) saying in field type(additional field) doesnot exist.
    Can anyone pleassseee help me in this.

    Hi San,
    I am trying to understand. How could you separately delete an additional text field associated with a main field?
    Jogeswara Rao K

  • BW - additional field in infoset

    Hi all ,
    I used data source with infoset and I added additional field into infoset . But additional fields did not come to the data source selection screen ( Field list screen ).  Is there a way to do this ?
    Can anyone help me ?
    Thnks a lot ..

    Thnks for answers ,
    I have just do that but there is no hided field . I haven't see the additional field  there already.
    I think it 'll more clear if  I tell about what am I doing step by step ;
    First , I created infoset in SQ01 with joinig tables LIKP -  LIPS .Then I added some additional field ; I collect different value from another table . Then I create field group called " ADD" in infoset and assigned additional fields that I created to "ADD " . Finally generate and saved infoset .
    Second , in RSO2 I create data source and joined with infoset . Then comes to selection filed screen .  Here was my problem ; there were no field that I added to infoset ,additional fields didn't appear
    Can I  explain it ?
    Thnks for help ..

  • How to display/create Local field in SAP query

    HI All,
    I'm new to abap query. I have to include a local field in the existing query. I know through SQ01->Edit->Local field we can display the Local fields, but the options under Local Fields menu option are disable even in change mode of Query.
    So, later through SDN found that, I have to Switch On the short names menu option. Even the sub-options in Short Names are disabled.
    Can any body please let me know how can we display the local fields to the change the formula and how can we create the new local fields in the existing qeury.
    Hope I'm able to explain my issue clearly.
    Thanks in advance.

    You can create the local fields in the "Select Field" screen. (Third screen after "Title, Format" and "Select Field Group") This option is disabled on the other screens.<br />
    <br />
    <i>Reference : <a class="jive-link-external" href="http://help.sap.com/saphelp_NW70EHP1/helpdata/en/d2/cb4186455611d189710000e8322d00/frameset.htm" target="_newWindow">Defining Local Fields</a> in <a class="jive-link-external" href="http://help.sap.com/saphelp_NW70EHP1/helpdata/en/d2/cb3efb455611d189710000e8322d00/frameset.htm" target="_newWindow">SAP Query</a>.</i><br />
    <br />
    Regards,<br />
    Raymond

  • Include command in SapScript to fill in a local field

    Dear all,
    Normally when we are using the INCLUDE SAPscript command, the system is printing the information retrieved.
    My question is, if someone of you know, whether is possible to put the information retrieved into a local field, defined as DEFINE &wa_localfield& := include &tdname& object vbbk ...
    Many thanks in advance !
    Rgds., Anton

    No, that is not possible using the INCLUDE statement.
    Welcome to SDN!
    Regards,
    Rich Heilman

  • How can i add addtional user defiend fields in infoset

    Hi,
    Can any one tell me how can i add addtional user defiend fields in infoset and make it availible in output screen.
    Also please tell me to create parameters through abap quary sq02 , as by default it creates select-option.
    With Thanks n Regards,
    Ranu

    Hi,
    As I said before it is not that straight forward.If you will decompile tcViewProfileAction .class using any java decompiler you will find out that data in setAccountProfile method is not getting set through formmetadata.xml . If you are well verse with struts then only you can achieve what you are trying to do.You need to extend tcViewProfileAction class and also tcViewProfileForm class and then you need to modify tjspViewProfileTiles.jsp .It will not be easy job.Usually in implementation we do not change action class until its absolutely required as oracle also do not recommend that so now its between you and your client to make a call if they want to go for such customization.I won't recommend you do that.
    Regards
    Nitesh

  • Can'n find option local aggregation in InfoSet

    Hello!
    I use BI 7.0.
    My problem is that I cant find option "local aggregation" in editing mode of InfoSet.
    This option is described here http://help.sap.com/saphelp_nw70/helpdata/en/43/de444c23a46194e10000000a1553f7/content.htm
    but in glolbal properties of InfoSet I have only 3 options:
    1) join is time-dependent;
    2) most recent reporting for InfoObjects;
    3) left outer: add filter value to on-condition.
    Best Regards,
    Antoshkin Vitaly.

    Does anybody know what happen? SAP program always set this field invisible in InfoSet 's global properties.
    Best Regards,
    Antoshkin Vitaly.

Maybe you are looking for

  • How to open new window webi report using open doc?

    Hi All, i have created URL using open doc in Bi 4.0 .please find the below my code. http://fcvws975/BOE/OpenDocument/opendoc/openDocument.jsp?iDocID=AeX5DoctKBhGv1AiV2oibxU&sIDType=CUID&sType=BI workspace&sRefresh=Y" title="" target="_blank" nav="doc

  • 403 Error running ADF application in JCS

    I am getting a 403 error while running a ADF application in JCS. I defined a security role and mapped it to a custom role. web.xml and weblogic.xml are pasted below <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"          xsi:schemaLoc

  • MacBook Pro 2011 - iSight HD camera not HD in Photo Booth

    Dear reader, I have the new MacBook Pro (2011 model), the 15" 2,2ghz with an OCZ Vertex 3 SSD and 8GB of ram. When I want to make photos in Photo Booth it says it's using the "Facetime HD Camera (Built-in)" but it does not make HD pictures. The pictu

  • How many users/programs can access a cFP or cRIO channel set

    I have used cFP and regular FP for years, but just found a method to gather data from the units without FTP or accessing the flash drives.  My question is this, using a FP read VI, or cRIO read VI, how many users can read that data before the cFP or

  • Why dont someone answer me/all in 1 3210 hp printer

    says wrong cartridge,and it worked like 4 days ago ,i shut pc down ,i went to go on and use printer and i cannot do anything with it,its telling me the following ink cartridge is not intended for use in this printer,and i have not changed any  ink ca