Linking two fields in a dictionary view to the same field
My DBA asked me if I knew how to do this without resorting to ABAP code, and I said I'd ask you guys over here.
A customer wants a view on several tables. Vendor name from LFA1 is one of the
columns in the view.
He has two other columns in the view which can hold two different vendor numbers at the same time.
He wants the view to automatically bring in the names from LFA1 from both of them.
My DBA knows how to do this directly in DB2, of course, but can it be done in native SAP dictionary ???
Reason he's asking is because he suspects the customer wants to use the view directly in SQLQuery, where there's no chance for an ABAP code intercept.
Or is there? Are there ABAP exits in dictionary views? Or in SQLQueries?
Hi
We can straight away write a select statement to a database view similar to a TABLE in ABAP
see the sample views VIAUFKS and VIAUF_AFVC
and see the select statement below for this view
CLEAR: i_ord.
REFRESH: i_ord.
SELECT aufnr " PM Order No
equnr " Equipment Number
tplnr " Functional Location
auart " Order Type
aedat " Order Date
swerk " Maintenance Plant
werks " Plant
ktext " Order Text
kokrs " Controlling Area
objnr " Object Id
kostl " Cost Center
INTO TABLE i_ord
FROM viaufks
WHERE aufnr IN s_aufnr AND
equnr IN s_equnr AND
tplnr IN s_tplnr AND
swerk IN s_swerk AND
aedat IN s_date AND
auart IN s_auart.
Reward points for useful Answers
Regards
Anji
Similar Messages
-
Hi,
In the WAD, If I try to attach one view of a query to a chart and another view of the same query to a table, both of the them display the results of the first view. What is the reason?
Thanks.Hi,
This should not happen, check you might not be assigning correct views to different web elements. Create two data provider by assigning different view and assign them to web element.
Regards,
Kams -
Do I need to recreate the View when the underlying field changes?
Re: Do I need to recreate the View when the underlying field changes?
I did an ALTER TABLE1 to change FIELD1 from varchar(5) to varchar(7). TABLE1.FIELD1 is in VIEW1. When I do a SELECT * FROM VIEW1 it shows 7 characters. But when I look at VIEW1 in object explorer (after refreshing), FIELD1 is varchar(5). Do I care?
Should I recreate the VIEW1?If you have refreshed using sp_refreshview stored procedure then you are good, if not then here you go...
The metadata for the view is not automatically updated when the tables are modified.
The fix is to either drop and re-create or alter the view or to use the sp_refreshview stored procedure.
Example :
EXEC sp_RefreshView View_Tablename
GO
http://msdn.microsoft.com/en-us/library/ms187821.aspx
Raju Rasagounder Sr MSSQL DBA -
More than one business component (views) in the same JSP page
Hi, I am trying to have more than one business component (views) in the same JSP page as Input Form.
For example:
There are two BC4J:
Person:
Code.
Name.
Address:
Person_code
Street.
City.
There is a master detail relationship between them and there is a link between both views in the application module.
I want to create a JSP page with an Input form for both views. When the user decides to create a Person, I need to insert in both tables.
Insert code and name into Person table.
Insert Person_code, Street and City into Address table.
It is possible to do in Forms but I am not sure if I can be able to do this in JDeveloper 10G.
ThanksSorry I lost the tabs
Person has two attributes Code and Name.
Address has three attributes Person_coden Street, City. -
Two while loops working in parallel at the same time
Hello, how can I run a .vi with two while loops working in parallel at the same time? . I want that when I run a vi both can be activated o desactivate, but I can't get it. What can I do?
Thanks a lot.
LuzHere are some links for state machines.
http://zone.ni.com/devzone/conceptd.nsf/webmain/c74cec177a289dbd86256c4e00600196
http://zone.ni.com/devzone/conceptd.nsf/webmain/8C4EECACF084F8E986256802007B9186
http://sine.ni.com/nips/cds/view/p/lang/en/nid/13747
http://sine.ni.com/apps/utf8/niepd_web_display.display_epd4?p_guid=B45EACE3DE6756A4E034080020E74861
http://sine.ni.com/apps/utf8/niepd_web_display.display_epd4?p_guid=B45EACE3E1E956A4E034080020E74861 -
How to maintain several views of the same data and update a tree
I have an object UiUser, which is displayed in my application in several different views. There are three different views which all have the User object i.e. search results, user tree and user table. Each of the views has the same menu items, so the user can be deleted from any of the views.
What I am trying to work out is how should I ensure the item is updated in all of the views?
I can fire a property change event with the UiUser and update two of the views i.e. search results and user table, but how do I update the tree?
I thought of overiding the equals/hashcode methods of the UserTreeNode to compare uiUser.getId () and I could then search the tree and find the tree node of the required UiUser. But I have reservations about this whole approach as it just seems wrong.
Any ideas of how to keep N views in sync, I really don't want all of the views to have tree nodes as this equally seems wrong. This should be a simple problem to solve and I'm sure lots of people have done it, I'm just not sure which is the best approach to take.
ThanksHi Jan,
This is so because each installer has a GUID that is used to check whether the application needs to be upgraded or not. (It's a Microsoft function).
What you can do is create a new installer with a different GUID (copy the installer in the projects), and check witha text editor whether this GUID has changed.
But any specific reason you need two seperate installs? You can run the application twice with a specific INI token:
allowmultipleinstances=True
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be! -
Merging two records in a single record for the same matnr,werks and bwart.
Hi I have a requirement to merge two records into one single record using the quantity field from MSEG table.
I am selecting two records from the table MSEG. Now for these two records i have to add the quantity values into one variable.
Then there should be only one record for the same matnr,werks,bwart.
Any suggestion would be appreciated.
Regards,
Amithi,
You can COLLECT statement only if all non key fields are numeric.
This statement Adds all such fields and give us a single record.
Regards
Sumit Agarwal -
Using !format on multiple occurrences of the same field
I'm trying to use the @if function to apply formatting to two occurrences of a field, but am not having any luck so far. The specific example is that I have two check boxes on the template, and would like to have only one of them checked at a time, using the same field in my data file for both check boxes. The field that I'm using in my data file is:
^field ACCOUNT_TYPE
And the only two possible values for that field are CHECKING and SAVINGS. On the first ACCOUNT_TYPE checkbox, I have entered the following !format:
@(If("@_$_."=="CHECKING","X"," "))
And on the second ACCOUNT_TYPE check box it is
@(If("@_$_."=="SAVINGS","X"," "))
The @if statement works fine when I apply it to only one of the check boxes, but when I apply it to both, nothing populates into the field. A simple solution would be to change the data, but doing so is not an option in this case for me. Any help or alternate solutions is appreciated. Thanks!Hi
I treid different combination keeping the same field name for two radio buttons but it didnt work. You can work out with an alternate solution , keep different name for two radio buttons say : JF07 & JF08
And under JF07 for !Format event : @(If("@JF03."=="SAVING","S",""))
And under JF08 for !Format event : @(If("@JF03."=="CHECKING","C",""))
where JF03 is the field name which may have one of two value : i.e either SAVING or CHECKING
So your form consits of 2 radio buttons ( JF07,JF08) and one field label JF03. In your dat file you have to refer to first radio button that appears first on the form i.e left to right or top to bottom.(So whatever radio button is appearign first in the sequence on the form from left to right use that radio button in dat file.Here its JF07)
^symbolset 108
^page 1
^field JF03
CHECKING
^field JF07
==========
^symbolset 108
^page 1
^field JF03
SAVING
^field JF07
Hope this layman's altenate solution will give you a bit of relief.
thanks
jaY -
Different fonts in the same field
Is it possible to format a single field with two different fonts. I have concatenated two database columns to get this field. But I want different fonts for the two columns. I could achieve this by using a format trigger and placing some html tags. But this solution only works if the output is in HTML style sheets. It does not work if I want the output to be in PDF. Does anybody know how to achieve it in PDF? Is it possible at all (from what I have seen it isn't). I will be grateful for any help in this direction.
Thanks
JanakiHi!
Try this:
Let say you have scott/tiger and emp-table and want to concatenate and print ename and job in the same field but with different fonts.
1. In the Database model you have the columns seperate as usual.
2. Create a boileplate text field and put &ENAME &JOB in this field.
3. Select &ENAME and set the right font to it, set another font for &JOB.
4. Run and test. This should work... -
Getting the name of the previous event of a field in another event of the same field?
How to get the previous event that has occured on the same field?
For example when we click a text box click event occurs then the enter event occurs.so want to know how to write a code in enter event of the text box to check that the click event has occured before the current event in java script.?
Please give an idea.
Regards,
Sugan.Any changes (like adding new fields, deleting existing field, change field properties of existing fields) applied to the database table has to adjust to changes to their definition in the ABAP Dictionary. So everytime when you make any new change on a database table, table conversion is required to refresh the exisiting entries in the ABAP dictionary so as to synchronize Database & Data Dictionary.
Thanks,
Rakhi
Edited by: Rakhi Nair on Oct 4, 2011 7:21 PM -
Two forms that update differrent tables on the same page?
I tried to add two forms that update different tables on to one page.
Problem is when I do that the forms gives me an error saying the field does not exist. It's like it is trying to update one table with the other tables fields.
As an example Say I have one forms that is for people table and another one that is the Jobs table.
When I go to update the people table, it sends the data for the jobs fields too I get an error like the field job description does not exist.
I have two different forms for these and everything.
I would hope it is possible to have two forms that update different tables on the same page.I was trying the exact same thing, but i managed to work round it by setting the steps to hide one region, so the user would enter the form see one region submit the region then direct back to the same page with the different region visible and the original hidden.
I don't know if this would be acceptable for you... -
Pull more than one field into the same field in a report.
I am attempting to put together a report in Visual Studio 2008. It seemed a simple report at first, but as I am creating the SQL, I am having a little trouble conceptualizing how to get it to work exactly as needed. Here is the issue...
In this case, the report should show two rows for each department. One is the count of who within an audience (that will be set up as a parameter) completed a certain course (the course may also be a parameter). The next row should be
a count, within that same department, of all users within the audience. Both counts should be within the same field on the report, but on different rows.
My thought was to create two CTE's. One would contain the counts, by department, of everybody in the audience. The other would contain the counts, by department, of those within the audience who completed the given course.
The problem is, though, I need to then have these two counts by department on two separate lines, and they should be within the same field. Basically, the idea is they are the numerator and denominator. There would also be a field before the count that would
need to identify which one it is. For the sake of the example, call it "Measure_ID" and it would say "CourseCert" for the count of who completed the course and "CourseAvail" for the count of those who are part of the audience.
Let me know if that makes sense, or if I can provide any further clarification to help you better understand what I am trying to achieve. Does anybody have thoughts on how to do this?Unfortunately, the counts need to be in separate rows. If they could be in the same row, it would have probably been a lot easier. I think I could have just done a couple "Case When" type formulas within the list of things under "Select."
As it is, I need the two counts to show up under the same heading in separate rows. Unfortunately, the table structure of this database is very complicated. I think it would likely just further confuse things if I tried to share all of that detail here.
That is why I was trying to be generic.
Unless there is another easier way I am missing, I was thinking the easiest way to achieve what I needed was to use two CTE's. One would list all users by department who belong to a specific audience (the audiences are what we use to then assign them
to certain courses, so the audience would be the people who are required to complete a certain course). The other would list all user by department who are in that audience and have completed a particular course. I think I am fine to complete that part.
It is just getting them to then display as in my example that I am not sure how to do.
The desired result, as you see in my example, has two lines per department, the first being a count of those who completed the course ("Certified"). The second line being a count of those who are required to complete it ("Available").
Does that help? I was basically hoping somebody had an example they could use, just with fake table names so I could adapt it to my data. If it helps, though, let's pretend the two CTE's are like this:
Table Name: Certified
Table's purpose: This table would list all people who had completed the course.
Fields:
CourseName
CourseCode
AudienceName
AudienceCode
CompletionResult
EmpCode
DepartmentCode
Table Name: Available
Table's purpose: This table would list all people who are assigned to the audience.
Fields:
AudienceName
AudienceCode
EmpCode
DepartmentCode
The desired result would then count the EmpCodes, by department, from each table in that Measure_Amount field so it could display as I showed above. Does that make sense? I apologize if that does not help to clarify. I was trying to be as simple
as possible so you could just use it as a generic example. -
Combobox and UseLOV with the same field
Hi,
i want use a Combobox which Select a Field name and after make a UseLov with this field name.
I can make the combobox with field name Column and i can separatly make a USELov with a field name, but i can't make it together.
Have tried two things create a new Bean with one method which call theses two methods and i have tried call the two methods directly in the JSP on the same field.
In each case the first method's call is ignored.
Thanks
Philippe
nullPhilippe,
To do this you'd have to implement your own control.
Thanks
Blaise -
iTunes randomly stops playing purchases that have previously viewed on the same hardware. It has an error message about HD. How can this issue be resolved? What information is available besides the "learn more" option that does not deal with the problem?
Many people have the same problem. However, there is little or nothing readily available to users. This problem has existed for two or more years. Does anyone have anything to offer about this disturbing problem?Thanks for the suggestion kcell. I've tried both versions
9.0.115 and 9.0.124 and both fail with the policy permission error.
I also tried with and without your crossdomain.xml file but
with the same result. It looks like this file is intended for URL
policy, instead of socket policy. Recently Adobe separated the two.
When I run with the files installed on my dev PC, it does
work, which makes sense because the flash player isn't loaded from
an unknown domain.
I did get one step closer. If a crossdomain.xml in the server
root exists and the socketpolicy file is loaded from the app folder
then the first two warnings disappear. The logs now show:
OK: Root-level SWF loaded:
https://192.168.2.5/trunk/myapp.swf
OK: Policy file accepted: https://192.168.2.5/crossdomain.xml
OK: Policy file accepted:
https://192.168.2.5/trunk/socketpolicy.xml
Warning: Timeout on xmlsocket://192.168.2.5:843 (at 3
seconds) while waiting for socket policy file. This should not
cause any problems, but see
http://www.adobe.com/go/strict_policy_files
for an explanation.
Warning: [strict] Ignoring policy file with incorrect syntax:
xmlsocket://192.168.2.5:993
Error: Request for resource at xmlsocket://192.168.2.5:993 by
requestor from https://192.168.2.5/trunk/myapp.swf is denied due to
lack of policy file permissions.
Which basically says, everything is okay, but you stay out
anyway.
PS: I found the XML schema files here:
http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_02.html
and the socket policy schema:
http://www.adobe.com/xml/schemas/PolicyFileSocket.xsd.
UPDATE: When serving up the policy file on port 843 using the
example perl script then the socket connection seems to be accepted
and the connect succeeds. After that flex hangs trying to logon to
the IMAP server. -
Pulling more than one field into the same field within a report.
I posted this in the T-SQL forum, but it was suggested it may be better to post it here. This is somewhat complicated, so I hope I am explaining this well. I will post here what I posted there. I will also include two replies I gave in offering further information
in case that may help to further clarify my question. See below:
I am attempting to put together a report in Visual Studio 2008. It seemed a simple report at first, but as I am creating the SQL, I am having a little trouble conceptualizing how to get it to work exactly as needed. Here is the issue...
In this case, the report should show two rows for each department. One is the count of who within an audience (that will be set up as a parameter) completed a certain course (the course may also be a parameter). The next row should be a count, within that
same department, of all users within the audience. Both counts should be within the same field on the report, but on different rows.
My thought was to create two CTE's. One would contain the counts, by department, of everybody in the audience. The other would contain the counts, by department, of those within the audience who completed the given course.
The problem is, though, I need to then have these two counts by department on two separate lines, and they should be within the same field. Basically, the idea is they are the numerator and denominator. There would also be a field before the count that would
need to identify which one it is. For the sake of the example, call it "Measure_ID" and it would say "CourseCert" for the count of who completed the course and "CourseAvail" for the count of those who are part of the audience.
Let me know if that makes sense, or if I can provide any further clarification to help you better understand what I am trying to achieve. Does anybody have thoughts on how to do this?Unfortunately, the counts need to be in separate rows. If they could be in the same row, it would have probably been a lot easier. I think I could have just done a couple "Case When" type formulas within the list of things under "Select."
As it is, I need the two counts to show up under the same heading in separate rows. Unfortunately, the table structure of this database is very complicated. I think it would likely just further confuse things if I tried to share all of that detail here.
That is why I was trying to be generic.
Unless there is another easier way I am missing, I was thinking the easiest way to achieve what I needed was to use two CTE's. One would list all users by department who belong to a specific audience (the audiences are what we use to then assign them to
certain courses, so the audience would be the people who are required to complete a certain course). The other would list all user by department who are in that audience and have completed a particular course. I think I am fine to complete that part. It is
just getting them to then display as in my example that I am not sure how to do.
The desired result, as you see in my example, has two lines per department, the first being a count of those who completed the course ("Certified"). The second line being a count of those who are required to complete it ("Available").
Does that help? I was basically hoping somebody had an example they could use, just with fake table names so I could adapt it to my data. If it helps, though, let's pretend the two CTE's are like this:
Table Name: Certified
Table's purpose: This table would list all people who had completed the course.
Fields:
CourseName
CourseCode
AudienceName
AudienceCode
CompletionResult
EmpCode
DepartmentCode
Table Name: Available
Table's purpose: This table would list all people who are assigned to the audience.
Fields:
AudienceName
AudienceCode
EmpCode
DepartmentCode
The desired result would then count the EmpCodes, by department, from each table in that Measure_Amount field so it could display as I showed above. Does that make sense? I apologize if that does not help to clarify. I was trying to be as simple as possible
so you could just use it as a generic example.
Maybe you are looking for
-
Can't see pdf after uninstalling adobe reader
After uninstalling pdf reader from adobe, I lost possiblitiy to opend pdf documents in safari. Usually, before installing adobe reader pdf documents opened nicely in Safari, with link to download or print a document. Now, all what opens is a gray pag
-
Is there way to get read receipts in mail and do you get non deliverable notifications??
is there way to get read receipts in mail and do you get non deliverable notifications??
-
BlazeDS serializing Enum as Object instead of String
Hi, we're having a problem with the serialization of our Java enums to Actionscript strings. The documentation says that by default, BlazeDS serializes an enum to an actionscript string. We only get [object Object] however and if I create a fake enum
-
Random error #2032 from flex air application
Sometimes in my air application I am getting one error #2032 - but on re-sending this query it works fine. I suspect this is some timing issue. What could be possible use cases where it can fail like this.
-
Queries with ":" failing in TimesTen 11.2.1 ..NodeId :NodeId
After upgrading to TimesTen 11.2.1, we've notice that some of our current sql statements are failing. These same instructions executes from the applications on TT6.0. This is once of the selects that is failing. select NodeId , Idx from Santera.eswi