Additional field in adhoc query
Hi all, I need to be able to report on the IT105 subtype 0001 system ID for employees who are withdrawn from the company, however, when someone leaves their IT105 record is delimited so adhoc query will not output anything. Has anyone coded an additional field that will look at the latest record regardless of the date?
If you have, please can you share the code with me!?
Many thanks!
Hi Tanya ,
Please find the code below. It is designed for additional structure z105_last which is bassed on P0105 type.
data l_it_p0105 type standard table of p0105.
clear: l_it_p0105, z105_last.
call function 'HR_READ_SUBTYPE'
exporting
tclas = 'A'
pernr = peras-pernr
infty = '0105'
subty = '0001'
begda = '18000101'
endda = pn-endda
tables
infty_tab = l_it_p0105
exceptions
others = 1.
if sy-subrc = 0.
describe table l_it_p0105.
read table l_it_p0105 into z105_last index sy-tfill.
endif.
Regards,
Sergey
Similar Messages
-
Additional fields in SAP Query
Hi ,
We have a requirement in HR reporting wherein we are providing the late attendance records of the employees. That is the person is scheduled to come at a respective time but he comes in late and this record is created in attendence infotype . Now we need to see the variance in his planned and actual arrival . Majorly all the fields are availabe in the Infosets but the one with the variance is not there . So do we need to create a custom report for the same or it can be handled in the SAP query adding one field for calculation. If it can be handled , how can that be possible .
Thanks & RegardsPlease check this link:
Re: query report
I guess, it can help for your case too...
Even this:
Re: sap query infoset and fieldgroup
Re: Additional field in SAP Query
Kind Regards
Eswar -
Populating Additional Field in InfoSet Query
Hello,
My team and I are working on generating a relatively simple report from the VBAK (Sales Header), VBAP (Sales Items) and VEDA (Date data) tables. We would prefer to be able to build an InfoSet (SQ02) and Query (SQ01) instead of writing a custom report.
The problem is the VEDA table contains data that may link to the VBAK and sometimes the VBAP table. The usage is that the header has begin and end dates for a contract, which is denoted by a blank value in POSNR field in the VEDA table. If a particular line on a contract has different dates than the header, there will be an additional record in the VEDA table where the POSNR value matches the POSNR value from the VBAP (Item) record.
The link to the VBAP table is straight forward being keyed off of the VBELN (doc number) and the POSNR (item number) fields in both tables. However, there's isn't a POSNR field in the VBAK (header) table and the VEDA table shows this as a blank value in the POSNR field.
The simplest thing I can think of doing is link the VEDA table to the VBAP and let it retrieve all the exact matches on Sales Doc & Item Number but add two "Additional Fields" to the Query that would represent the Sales Header begin and end dates.
I know how to add an additional field but how would you "re-query" the VEDA table and under which option under the Code tab.
ThanksHi Alex
Please see if below example helps you to understand:
Supposing, we are displaying material description within our query.
1. So we define the join with MARA & MAKT while creating infoset in transaction SQ02.
2. We create feild groups to identify the fiels we use for selection and display.
3. Here after selecting language key from MAKT, by default this will take SY-LANGU always for the case.
4. To make it applicable for different languages we can code in INITIALIZATION Event.
5. To do so we can do it by two options: Use menupath: Goto->Code->Initialization
i) First option using variable: <b>MAKT-SPRAS = SY-LANGU.</b>.
ii) Second option using Parameter-Id: <b>SET PARAMETER ID 'SPR' FIELD SY-LANGU</b>.
6. Save & Generate.
Now when we execute the query, we are defaulting the language as System Language.
Hope the above info helps you for better understanding.
Kind Regards
Eswar -
Multiple Value in additional fields using SAP Query
HI All,
I have a question related additional field in SAP Query. I tried to create report about PR and PO using SAP Query. Since one PR can be converted to multiple PO, I decided to create additional field
po_1
to display the value of PO that related to the PR. But I meet problem when I want to show several PO number in additional field
po_1
, I couldn't look the way to solve this problem. Can anybody help me? Just for info, I assign value to additional field
po_1
in record processing part.
Thanks....HI,
IN SQ02, IF table is already in JOIN, just click on the PLUS sign to expand the strcture.
All the field showing Plus sign in the strcture are selected in your query and with MINUS sing are no selected.
So you have to just click on the MINUS sign for the field you want to use through table field.
Generate the query and execute thriugh SQ01.
If you want to add some other field which is not a part of JOIN,
then click on EXTRAS Button shown in the MENU option.
Click on Create button and system will ask abt the additional field.
Regds,
Anil -
Text of additional fields on SAP query show blank
Hi All,
I'm encountered a problem when text of additional fields on SAP query is not working and it's show blank after HRSP is implemented.
SAP_ABA : Rel. 701 Lvl. 3
SAP_BASIS: Rel. 701 Lvl. 3
SAP_HR: Rel. 604 Lvl. 8
Below are the config that we have done before HRSP in table: TEXC_FLD_C and it's work perfectly.
Table Name: P0000_AF
Field Name: ZZAPPRATING
Function Module: ZHRGYYFMPA_PDRATING_TEXT
Exception Priority: 1
Object Type Name: CL_HR_TEXT_IDENTIFIER
During debugging, we found that program (Form: %_GET_PERAS) is retrieve text of additional fields based on structure P0000_AF. At this point, text of fields are successfully take place and filled. However, program try to retrieve the text based on structure P0000 again right after that. Due to additional fields are added on P0000_AF not P0000 and no ZZAPPRATING field found in P0000, hence program has cleared the text which filled in previously. This give the result, text is blank.
Please advise, how should I get this resolved.
Thank you very much.
Best Regards,Please check this link:
Re: query report
I guess, it can help for your case too...
Even this:
Re: sap query infoset and fieldgroup
Re: Additional field in SAP Query
Kind Regards
Eswar -
Problem with a Currency field in Adhoc Query - HR
Hi,
I have an Adhoc query that uses Custom infotype fields (Z infotype and z fields).
The currncy field also has a reference field in the infotype (of type waers).
Wehen we try to get the ouput of the Adhoc Query it gives following error:
The report cannot be generated because the internal description is invalid or incomplete, or because the selection screen is too large.
Regenerate the assigned InfoSet, and read the log. If the InfoSet is OK, make sure that at least one field is given as output.
If you used the 'Refresh' icon to start the query, use the 'Output' menu option to execute the query. This gives you a full screen display of the data.
If an output was generated, the query cannot work with actual data in the construction view. In this case, always use the 'Output' function to execute the query.
I have already tried a number of solutions:
1> Regenerate the infoset...
2> make the field as an additional field and write my own code for it (the error comes before the code as i kept a breakpoint but it stopped before that)
if i add other fields of this infoset instead of this field, then those appear in the output.
Any solutions ??
thanks in advance,
AnujHi,
Is the problem not clear or no one has an answer?
Please reply with some suggestions..
Regards,
Anuj. -
This problem is about sap query. I have created an additional field in an infoset. The initial header text of this additional field is english. Then I created a query which use the additional field as an output field. If I use this query in other language, however the additional field header remains english. How can I maintain addtional field header to support mutil-language?
Thanks in advance!
--Alex MiaoHi Alex
Please see if below example helps you to understand:
Supposing, we are displaying material description within our query.
1. So we define the join with MARA & MAKT while creating infoset in transaction SQ02.
2. We create feild groups to identify the fiels we use for selection and display.
3. Here after selecting language key from MAKT, by default this will take SY-LANGU always for the case.
4. To make it applicable for different languages we can code in INITIALIZATION Event.
5. To do so we can do it by two options: Use menupath: Goto->Code->Initialization
i) First option using variable: <b>MAKT-SPRAS = SY-LANGU.</b>.
ii) Second option using Parameter-Id: <b>SET PARAMETER ID 'SPR' FIELD SY-LANGU</b>.
6. Save & Generate.
Now when we execute the query, we are defaulting the language as System Language.
Hope the above info helps you for better understanding.
Kind Regards
Eswar -
Adding additional fields in Sql Query (SQ01)
Hi..
please tell me all the steps to use additional fields option in sap query (transaction code: SQ01)? can i use mandt field as additional field?
Thanks and Regards
Sri.Hi,
You can add it in infoset using extra button.
Here you can add the filed and the respective code for this field and add this in SQ01 in oytput list.
Thanks
Ajay -
Additional fields in infoset query can not be used as datasource fields
I create one infoset query with additional fields (using ABAP code) in R/3. When I create datasource RSO2 using this infoset query, system only show all fields without additional fields that I enhanced in infoset query. Does that mean we can not get additional fields information in generic datasource creation that we enhanced in infoset query?
dear Awa,
you are enhanced some fields in r/3.right that fields are shown in
rsa6 select your data source click on display your datasource then select
extract structure its shows how many fields are haveing particular
datasource .or otherwise goto rso2 select your data source display
double click on your extractstructure its show how many fields haveing
the particular datasource. check the Rsa6 what ever fields you newly added that field default hide mode
you remove the hide tickmark. -
Bringing in Additional Fields into SAP Query
Hi,
I'm new to SAP Query. I had to modify an existing report to bring in an additional field from one of the tables of the query. When i look at the tables in query, i don't even see the field i would like to add under the table. I guess it needs to be first bring into query and later i can add. Can someone help me how to do this?
Thanks in Advance.HI,
IN SQ02, IF table is already in JOIN, just click on the PLUS sign to expand the strcture.
All the field showing Plus sign in the strcture are selected in your query and with MINUS sing are no selected.
So you have to just click on the MINUS sign for the field you want to use through table field.
Generate the query and execute thriugh SQ01.
If you want to add some other field which is not a part of JOIN,
then click on EXTRAS Button shown in the MENU option.
Click on Create button and system will ask abt the additional field.
Regds,
Anil -
Creating an additional field for a query
Hi All,
making an infoset for a query, I've created an additional field. Its value must be equal to BSET-BUKRS + BSET-BELNR.
I've set my additional field format like C.
Could anyone advice me about the coding for the additional field to get it equal to BSET-BUKRS + BSET-BELNR?
ThanksHi,
CONCATENATE BSET-BUKRS BSET-BELNR INTO #name of your field#.
Regards,
Eli -
Adding additional fields to Existing query
Hi all,
There is an existing query in our system and now the requirement is to add and insert few fields to the existing fields of output of that query.
Please let me know step by step procedure to achieve this.
Thanks in advance-It depends upon the type of Query you have. Is it a Quick View, an ABAP Query, or are you trying to make changes to an ABAP Report?
-
Inserting addition field in ABAP query (SQ01) while generating reports.
Please let me know the procedure of adding field and applying mathematical formula in the query.
Hi,
have a look at the help <a href="http://help.sap.com/saphelp_erp2005/helpdata/EN/d2/cb4138455611d189710000e8322d00/frameset.htm">Creating and Changing Queries</a>. I doubt that you can add real formulas besides the predefined statistics.
Regards,
Christian -
Creating search help for a field in AdHoc Query
Hi
We have created an infoset based on LDB PCH.
(The infoset contains object type O only).
For the object-id field the users want search help when choosing this field for selection.
Using "start via selection screen" does not give a good solution.
Can anyone explain how I can create search help for fields in an infoset?
Regards
KirstenHi
We have created an infoset based on LDB PCH.
(The infoset contains object type O only).
For the object-id field the users want search help when choosing this field for selection.
Using "start via selection screen" does not give a good solution.
Can anyone explain how I can create search help for fields in an infoset?
Regards
Kirsten -
Adhoc query - length of service fields
Hi all,
I have question regarding the length of service fields in adhoc query (Actions infotype data fields PNP database).
When I select these fields I get different results according to reporting period; if i select a keydate then the service is calculated according to this date, but if I select a reporting period, then the service is calculated according to the start date of the reporting period.
Is this expected behaviour? Please let me know how this can be coded to reference the end date of the reporting period.
many thanksHi,
Please check OSS notes 333517 and 357093. Both notes, though from 2000, contain detailed functionality and recommendation around u201Clength of serviceu201D.
Hope this helps.
Donnie
Maybe you are looking for
-
Functioning of control file when re-created
Hi friends, we can recover database without data loss when there is a situation to re-create control file(for suppose control file is lost and no multiplexed copies are available) using NORESETLOGS option in controlfile script. when we re-create cont
-
Error when trying to buy music
Just tonight, when I tried to buy some songs (two different ones), I got the following error "Could not purchase SONG NAME. The requested resource was not found." After awhile of hitting the buy button, both songs eventually purchased, but I had to k
-
Dear legends, can anyone clarify me that the status of the listener is up or not or running with concerned db or not? C:\Documents and Settings\SKS>lsnrctl status LSNRCTL for 32-bit Windows: Version 11.1.0.7.0 - Production on 18-MAY-2012 17:12:32 Cop
-
Updating iTunes with iTunes 10.5
I'm trying to download iTunes 10.5 and it asks me to download it and I click on it and then it doesn't download....it actually doesn't do anything at all. What do I need to do to update my iTunes??
-
1602R & new firewall not resolving ARP table
We're trying to install a new Wathguard Firebox Edge and when we replace our old Firebox SOHO, and login to the 1602R, "show arp" has question marks on the MAC address next to the IP of the Edge firewall. We've tried rebooting the router and running