SAP QUERY double display
Hi,
I have created a SAP Query with 3 tables AUFK, COEP and PA0001.
The selection contains the orderno. from AUFK (=base table), company code, year and period from COEP.
The display contains orderno. personnelno., name, quantity hours and costs, document no etc.
In the display I get the records 3 times. Where is the mistake? Or can I hide the double records? If yes, how?
Thanks a lot.
Best regards
Vela
Hi,
Welcome to SCN!!!.
Actually, you are not getting double records. One of the key fields of the table might be different. Just try to select all the key fields of all the tables into output display and see the difference.
Thanks,
Vinod.
Similar Messages
-
SAP Query: How to filter records from SAP Query output before display
Hi Friends,
Can I delete records from an SAP query basic list before it is displayed?
For example I want to delte all the orders whose system status is "RELEASED" before the basic list of that SAP query is displayed.
I have gone through SAP help and found out that we can write some code in <b>END code</b> section which will execute before the basic list of the query is displayed. But I could not figure out how the code this...following is an excerpt form SAP help.
<b>"The END-OF-SELECTION code consists of two parts (Before list output and After list output). The first part is processed before the list is output and the second part afterwards."</b>
Can anybody help me?
Regards,
Bharat.
Message was edited by:
Bharat Reddy VTry this simple procedure. <b>Hope</b> this should work for you.
You do the slection of the status in the List-Processing. say your final field of status flag is GF_STATUS.
Immediatly after that use this within the List-Processing.
CHECK GF_STATUS EQ '<RELEASED STATUS>'
How it works:
SELECT <> "<-------Query processing(system code).
*< Your code put in the List processing
CHECK GF_STATUS EQ '<RELEASED STATUS>' "< --only released records passed.
*>
ENDSELECT "<-----Query endselect(system code).
Please let me know the result.
Regards,
A.Singh
Message was edited by:
Amarjit Singh -
SAP query , want a new calculation
Hi,
I have a SAP query which displays the material quantity , shipping instructions etc.
what i want is not a new field or column, but just display at the end of the shipping instructions column 2 lines showing the ratios of 2 values.
How do i do this? I know to add additional columns but how am i to add just 2 rows with custom calculations?Hi,
In SQ02, you hae the option to add your own code lines. You will find this icon in the toolbar after teh 'Extras' button.
You can write the code in any event that you wish. Check the node where you are writing this code.
Regards,
Subramanian -
ABAP Coding Help for Subtotal type output - SAP Query
I've created a SAP Query to display a stock overview by storage type using the table LQUA.
The output that I get is:
Material
Description
Plant
WHN
SLOC
Storage Type
Batch
GR Date
Available stock
2057
STRAWBERRIES
BP01
100
0088
200
0001081766
17.06.2014
225
2057
STRAWBERRIES
BP01
100
0088
200
0001081766
17.06.2014
720
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
1,000
I can get a subtotal for each Material, batch and GR date combination by using the ALV grid functionality.
This method adds too much clutter to my query and can't be easily manipulated in Excel afterwards for what I want. I want to condense the results down and just keep a cumulated available stock, e.g:
Material
Description
Plant
WHN
SLOC
Storage Type
Batch
GR Date
Available stock
2057
STRAWBERRIES
BP01
100
0088
200
0001081766
17.06.2014
945
2061
VOSTIZZA CURRANTS
BP01
100
0088
200
0001081272
17.06.2014
4,000
How can this be done?Hi,
Please try to use STATISTICS in your SAP Query. you can sort and add your value based on condiiton then it will be show you collect value in SQ01.
Please see the below documents for STATISTICS
https://help.sap.com/saphelp_erp2004/helpdata/en/d2/cb4263455611d189710000e8322d00/content.htm
Regards,
Prasenjit Mishra -
SAP Query - Count(*)
Hi,
i have a table with records
abc
abc
def
fgt
def
abc
fgt
abc
def
jkh
i want the SAP query to display as
abc - 4
def - 3
jkh - 1
fgt - 2
when i wrote a query ( select count(*) ) in infoset and added an additional field count, it is giving me the right count but it is repeated as many times as the record, like below
abc 4
abc 4
abc 4
abc 4
def 3
def 3
def 3
jkh 1
fgt 2
fgt 2
Can you please tell me how to avoid this multiple lines?
Regards,
SharadhaHi,
I think LTAP is a field group and not an internal table...
You can create your own internal table in the DATA section...and add the entries during the RECORD_PROCESSING event..
Ex..
****DATA Section
TYPES: BEGIN OF type_data,
value TYPE char10,
END OF type_data.
DATA: MY_ITAB TYPE STANDARD TABLE OF type_data,
MY_WA TYPE type_data.
****In RECORD_PROCESSING section.
READ TABLE MY_ITAB TRANSPORTING NO FIELDS
WITH KEY value = LTAP-value.
IF sy-subrc = 0.
CHECK 1 = 0. " Don't proceed with the record as it is already added.
ELSE. " REcord not added.
MY_WA-value = LTAP-value.
APPEND MY_WA TO MY_ITAB.
ENDIF.
Hope this is clear.
Thanks
Naren -
How can I define Double Click Processing in SAP Query ?
The first question is : How Can I define drill-down for SAP Query report ?
The second one : How can I program Double Click in SAP Query report for Different columns like ALV Grid processing ?you can attach a repot or at tcode etc in an SAP query using report assignment in SQ01 but as far as i remember you cannot attach multiple reports.
regards,
khusro habib -
Display only the last record per material in SAP query
Hi,
I have created a SAP Query using the quickviewer that is a join between 2 tables (MSEG and MKPF) that consist of material document information and date of posting.
The results are fine however I would like only the last record per material to be displayed.
Can anyone tell what do I need to add so for only the last record per material be displayed in the output.
Thanks,
MarkHi Mark,
May be if you use Control Level processing .........I think you will be able to get the result you want. Try displaying as Below,
LOOP AT XXXXX.
AT FIRST material.
ENDAT.
AT LAST material.
*...Display what ever you want here. It will display at end of every material.
ENDAT.
ENDLOOP.
Before using sort the table with key material in ascending.
Hope what I had to say is helpful to you.
Cheers,
Raga Suman. -
SAP Query: Display Selection Fields in the header page of Basic list
Hello,
I have to display the selection fields in the header page of the basic list and statistics
in a SAP Query.
I know the usage of short names for fields in the header page, but this doesn't work
for the selection fields.
How can I display the selection fields in header pages?
Kind regards
ThomasTry using:
DATA: wa_lstab TYPE line
READ LINE sy-index line value INTO wa_lstab
Thanks,
SKJ -
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 -
Adding some new fields for display in SAP Query
I need to add some fields for display in SAP query 01 of infoset /SAPQUERY/AM01. So I have changed the infoset by checking the additional fields which is already in LDB. Then I created the query by copying the 01 of infoset /SAPQUERY/AM01 to Zusergroup with reference to the same infoset. In the newly created query, I am just checking the newly added field in Basic list. If I generate the program for this query, I get a error.
Pls let me know how should I rectify this.
Regards,
JeyananthHi,
Before generating the query, adjust the query from the menu of SQ01
Thanks
Shiva -
SAP Query Display data from 2 internal tables
Hi ABAP Gurus,
I am developing a SAP Query.
I have created an infoset with the custom infotype 9050 and added the table ZPA9050 into the Infoset.
How do I input values to the ZPA9050 fields? A checkbox for making a Selection field is not available in the Query (SQ01)
For every pa9050 entry there exist multiple records of ZPA9050. I need to display the pa9050 fields in the 1st row and the corresponding zpa9050 fields in the subsequent rows.
Kindly advise how to accomplish this task.
A quick reply is highly appreciated.
Useful answers will be rewarded.
Thanks
SriramHi Deepika,
Your reqirement is to print data from the two internal tables ..and if u r not using interactive alv then u need to merge data into single internal table... if anycase u dont want to merge in the table itab as u told u can use another final internal table in which u can merge data from the two previous interal tables then u pass this final internal table to ur FM.
Thanks & Regards
Ashu Singh -
Adding the ABAP code to SAP Query to support Query's ALV Double click.
Hi, Expert.
I need to add some ABAP Code into SAP Query (or Infoset) to support the double click event on ALV cell of result of query.
Is it possible & How to do ?
Thank you very much.
Best Regard
Nattapash C.Hi, Gautham.
I've put BREAK-POINT in all code section e.g. INITIALIZATION, END-OF-SELECTION..
I found there are some section for add code that will be executed when query is processing before output data to ALV.
What I need to know is Where I can input the code after ALV output. For support the Double Click Event on Query's ALV cell.
Best Regard,
Nattapash C. -
How to display long text in SAP Query ALV layout? It only show 129 char now
I have a SAP Query which show a remark field(Max length more than 500 char), but it only show max length 129 char now. In fact, the lenght of remark field text is more than 300, and i had debug the source code, the field text value do is correct, its length do is 376.
Do anybody can help me solve the issue, let the query ALV layout can show the long text field value?
thanks very much in addvance.Hi,
ALV can show only a restrict value length around 128 characters, many experts said that we can not extend. many suggestions is split text into some column.
Regards, -
BI SAP Query Connector Heatmap Error - Empty display in Visual composer
Hi,
I am trying to create an Heatmap iview in SAP Visual Composer using BI SAP Query Connector.
While using the Heatmap template, we are able to see the data but finally when we deploy and run the iview we see empty screen.
Any inputs is highly appreciated.
Regards,
SreeramHi,
thanks for your time and help. Its a relevant blog but unfortunately doesnot solve my problem.
I am using BI SAP Query Connector system instead of BI JDBC. While creating the Heatmap I am able to select the fields and see the output in table format, but finally the chart is not appearing. its blank.
IGS is configured correctly, able to reach backend to select tables, select fields. After deployment and when the ivew is run I dont even see any heatmap, but a blank container.
Please suggest if you have any clues regarding this.
Regards,
Sreeram -
Hi there!
I have a sap query iview in the portal that should display a query in CRM (build with SQ01). The query in the backend is fine, but I get this error message in the portal.
"Error in Source. Message not available"
I have double-checked that the connection parameters of the sap query iview are OK, also I have run a DQE connection test on the system that was(see below) also OK.
Any thoughts on this?
Thanks in advance
-fab
p.s. I reward points generously
Test Connection through the DQE
Test Details:
The test consists of the following steps:
1. Checks the existence of a backend admin user ID/password in the system properties.
2. Checks the existence of a default alias for the system.
3. Checks the DQE connection.
Results
1. Backend admin user ID and password exist in the system properties.
2. Default alias of the system exists.
3. DQE connection successful. If you continue to experience problems, verify the DQE admin user ID and password properties for this system object.Thanks for the help Michael. Here is the xml file, I have also sent it to your email address.
Cheers,
faB
- <GenericCreator author="XML Creator" version="XML Automatic Creation" mode="clean,execute" report.level="success" createMode="1" default.locale="en" ignore="false">
<Property name="parent1" value="pcd:portal_content/XXX/XXXXXX/IVIEWS" />
- <Context name="qtf" objectClass="com.sapportals.portal.iview" create_as="0" template="par:/applications/com.sap.pct.srv.portaldataviewer/components/SAPQueryTemplate" parent="$">
- <Attributes>
- <Attribute name="com.sap.portal.private.iview.PropertiesUrl" type="string">
<AttributeValue value="pcd:com.sap.portal.system/applications/com.sap.pct.srv.portaldataviewer/components/SAPQueryTemplate" />
</Attribute>
- <Attribute name="PDVParameterQUERY_WORKSPACE" type="string">
<AttributeValue value="G" />
</Attribute>
- <Attribute name="PDVParameterQUERY_VARIANT" type="string">
<AttributeValue value="TEST" />
- <Attribute name="personalization" type="string">
<AttributeValue value="NO_DIALOG" />
</Attribute>
</Attribute>
- <Attribute name="PDVParameterQUERY_NAME" type="string">
<AttributeValue value="ZQ_ECCSPO_01" />
</Attribute>
- <Attribute name="PDVParameterQUERY_USERGROUP" type="string">
<AttributeValue value="ECCSPO" />
</Attribute>
- <Attribute name="PDVParameterQUERY_CREATE_SELTAB_FM" type="string">
<AttributeValue value="" />
- <Attribute name="personalization" type="string">
<AttributeValue value="NO_DIALOG" />
</Attribute>
</Attribute>
- <Attribute name="com.sap.portal.iview.MainObject" type="string">
<AttributeValue value="" />
</Attribute>
- <Attribute name="SystemIdentifier" type="string">
<AttributeValue value="SAP_CRM" />
</Attribute>
</Attributes>
</Context>
</GenericCreator>
Maybe you are looking for
-
How to receive parameters from a form and insert values in db using servlet
Hi friends, My first question here. I'm trying to create a Servlet that takes input from a form and process it and insert it in database.tablename. My MAIN ISSUE IS WITH THE NUMBER OF COLUMNS THAT WOULD BE DYNAMIC AND THUS CANT RECEIVE THE PARAMETERS
-
I accidentally dragged the Lion download from the dock onto my desktop and it disappeared in a puff. This seems to have halted the download as it is now 8 hours since purchase and has stuck at 1.75gigs. Could anyone advise please?
-
Switching to mac, questions on best place to host reference masters
I am getting ready to switch from PC to Mac and have a question I am hoping I could get some advice on (I have a lot of questions actually, but will start with this one). I have a large library of photos and videos and plan on getting an imac for my
-
I filmed a presentation where most of the content was slides scanned from old books and catalogs. To improve viewability I took the presenter's powerpoints, wrote them to .pdf and then individually scaled them in Photoshop. I then went into to each s
-
Send to Back Puts Image Behind MASTER Elements
I have a full screen image on a master slide. When I Send to Back an image on a slide using that master, it sends it behind the full screen image, effectively making it disappear. It doesn't make any sense why master elements are "live" and part of t