Fetching Article Based on LOB,Department,Class,Subclass
Hi all,
i need to fetch the article depends on the user selection like LOB,Department,class,subclass.can any one give some idea how we can select the article depends on the above criteria.
regards
shibu
Hello,
You can explode the article hierarchy using the funtion CLHI_STRUCTURE_CLASSES to get Merch categories attached to a Department or a Class. Then from MARA table you will articles from Merch categories.
Hope this helps.
Thanks,
Venu
Similar Messages
-
Article (Material) Class, subclass, sub department in SAP IS retail?
Hi All,
In SAP how to find the Article (Material) Class, subclass, sub department in SAP IS retail?
The sub-class is MARA-MAKTL, but I am not able to search article class & sub department in some tables?
Regards..Hi Sune
The thread you are refering to is quite old, there is a solution available now for doing retail master data governance on SAP MDG. This is offered as a consulting solution now.
The data model itself is modelled after the IS Retail data model for Article master and would leverage on the data governance capabilites offered by the MDG framework.
It is not exactly a supplier portal for data exchange but there have been architecture discussions on using a 'lean' version of the data model as a vendor facing portal and seperating this from internal facing MDG for enriching the ERP specific parts of the article master data , before governing and commiting to the ERP system.
If you are interested in talking more about it would be happy to do so.
Regards
Dilip -
How can I create an IList Employee list based on my Employee class?
I'm trying to create an IList<Employee> list based on my Employee class (below). But this is erroring out. Is my employee class missing anything? How could I make this work?
private void EmployeeList()
IList<Employee> arL = new IList<Employee>(); //<<<<----errors out here
arL.Add(new Employee {Name="Mary",Gender="Female", Age=35});
arL.Add(new Employee { Name = "Bob", Gender = "Male", Age = 40 });
arL.Add(new Employee { Name = "Tom", Gender = "Male", Age = 50 });
var qm = from Employee employee in arL
where employee.Age < 50
select employee;
foreach (var m in arL)
Console.WriteLine(m.ToString());
class Employee
private string name;
private string gender;
private int age;
public string Name
get { return name; }
set { name = value; }
public string Gender
get { return gender; }
set { gender = value; }
public int Age
get {return age;}
set {age = value;}
Rich PIList is an interface, not a class. This means that it can't be instantiated (can't be "newed").
List is a class, so it can be instantiated. It implements the IList interface, which means that it must provide the functionality specified in that interface.
That's what an interface is - a definition of functionality that a class must provide. An interface is often described as a contract that a class must fulfill.
So in the code in your last post, you are saying that arL is an instance of some class that implements the IList interface, and you are then setting it to an instance of the class List. The List class implements the IList interface, so this assignment is
legit. It would also be legit to use any other class that implements IList, such as an array.
Any class that implements IList can have as much extra functionality as whoever wrote it likes, as long as it implements at least the functionality of the interface.
Sometimes you will come across a method in a library over which you have no control and which returns IList rather than list. In such a case you will be forced to do something like...
IList list = SomeMethodOrOther();
So you will have no idea what class list is an instance of, but you will know that it has the functionality of IList. This is about the only circumstance where I would recommend defining a variable as IList rather than List (but it probably won't be long
before there are some replies to this post that disagree). -
How to find the avg salary of first 3 employees based on each department?
how to find the avg salary of first 3 employees based on each department?
Hi,
Do you mean something like this?
with a as
select
deptno
,sal
,row_number() over ( partition by deptno order by sal desc) rn
from
emp
select
deptno
,round(avg(sal)) avg_sal_of_top_3
from
a
where
rn <= 3
group by
deptno
order by
deptno
DEPTNO AVG_SAL_OF_TOP_3
10 2917
20 2992
30 1983
If not please give more details.
Regards,
Peter -
How to fetch data based on this selection screen
Hi Friends:
I've a selection screen which contains these 3 fields:
company code (t001-bukrs)
material division (mara-spart)
posting date (bkpf-budat)
based on the above fields, I've to fetch the following:
ekpo-bukrs
mara-spart
mseg-werks
mseg-lgort
bseg-hkont
bseg-kostl
bseg-hkont
skat-txt50
mseg-mblnr
mseg-zeile
bseg-belnr
bkpf-bktxt
mseg-insmk
bkpf-monat
bkpf-budat
mseg-bwart
mbew-matnr
makt-maktx
mseg-menge
mseg-meins
mbew-stprs
mseg-dmbtr
bseg-pswsl
ausp-atwrt
mara-matkl
mara-mtart
mbew-bklas
mbew-bwtar
mkpf-vgart
mcha-charg
mseg-ebeln
aufk-aufnr
mseg-ummat
vbak-vbeln
likp-vbeln
bkpf-usnam
Please help me with the logic . I want to ask that in which order I should start fetching data.How to relate it from selection screen. Which table I should fetch first based on the selection screen.how to relate mseg/bseg/mara/mbew/vbak/bkpf etc.
Please help.
Thanks for your time.Hi,
I dont think you need EKPO to fetch your bukrs. It is available in BKPF too.
Use inner join to join MKPF, BKPF, MAKT, fetch all the related entreis.
Use Inner join on MBEW, MCHA for all entries from above query.
use inner join on AUSP for all entries from above query.
Use may use separate queries or inner joins for LIKP and VBAK with for all entries.
Use separate for all entries for BSEG and MSEG. Do not use any JOIN on BSEG as it is a pooled table.
As per the need you may change the queries..
Regards,
Subramanian -
Calculating Standard working hours based on location/department
Hi Experts,
In Fusion HCM 8.0
Is there any way to calculate the Standard working hours based on location/department and FLSA code?
For new hires, can this be populated based on above criteria?
Please let me know how to proceed on this.
Thanks in advance.
Thanks&Regards
Prasanna KesavanThis might be better answered on the Human Capital Management (HCM) (MOSC) forum.
Jani Rautiainen
Fusion Applications Developer Relations
https://blogs.oracle.com/fadevrel/ -
Hi,
I have created a User Access report for CRM on-premise using SQl query in the following format. One row corresponds to one user in organization. Currently, I am using Microsoft Dynamics CRM Online trial version and have two users in my organization.
I want to the same report for CRM Online environment. Only Fetch-Xml based custom reports are supported by CRM online environment hence this SQL query cannot be used.
I have already written fetch-xml query to retrieve user access records ("audit" entity records) in "last-x-months" (where x = 1,2,3,4,5,6) as below.
I am able to retrieve the records with "last-x-months" condition at a time, for example, the last-2-months in my fetch-xml query only.
For, example, when I retrieve the records in the last-2-months, it also includes the records in the last month. I want to count the records in the 2nd month only that is the difference between these two. The difference will be my 2nd column.
Similarly, I want the other columns.
For the case in the above example, I have created the two separate datasets to get the record-count for the last month and last-2-months. But, I am not able to use the two datasets in the same table in my report and hence not able to calculate the difference.
Is there any way to solve this problem?Hi,
I have modified my Fetch-XML query to retrieve all the required User Access records and removed aggregation and counting and grouping from the query as well. Did grouping and counting in SSRS. Now the report works fine as shown in the above picture. -
Securing Web Services based on simple Java Classes
Hi @all!
We`ve got the following problem.
There`s a .NET client calling our Web services deployed on Bea Weblogic 8.1 (without
SP).
The Web Services are generated by the ANT task servicegen. They are based on simple
Java classes containing the service methods as public members.
Is there a possibility to secure these methods without using the console menu
item "Define Security Policy" ?
We can`t use this menu because it has got a javascript bug with methods returning
an array.
Thanks in advance for help.
MichaelHi Michael,
Could you use transport level security, SSL [1]?
I'm not sure what limitation you are experiencing with the console? Is
there a traceback? Have you contacted customer support on this issue?
Thanks,
Bruce
[1]
http://edocs.bea.com/wls/docs81/webserv/security.html#1053203
Michael Albrecht wrote:
>
Hi @all!
We`ve got the following problem.
There`s a .NET client calling our Web services deployed on Bea Weblogic 8.1 (without
SP).
The Web Services are generated by the ANT task servicegen. They are based on simple
Java classes containing the service methods as public members.
Is there a possibility to secure these methods without using the console menu
item "Define Security Policy" ?
We can`t use this menu because it has got a javascript bug with methods returning
an array.
Thanks in advance for help.
Michael -
Job and salary for that job based on the department!!!
Please, can somebody help me with this. I'm facing some challenges getting the required result with my queries.
Here's what am trying to do:
A query to display the job, the salary for that job based on the department number, and the total salary for that job, for departments 20, 50, 80, 90, assuming the schema in use is the hr schema. The job should be distinct, no duplicates.
Thank you for your anticipated answers.
I really appreciate your replies in advance.
T.O846641 wrote:
Please, can somebody help me with this. I'm facing some challenges getting the required result with my queries.
Here's what am trying to do:
A query to display the job, the salary for that job based on the department number, and the total salary for that job,What do you mean by "the salary for that job"? It sounds like you want something besides the total salary (which is what the SUM function provides). What is that other something? The avgerage salary (that would be the AVG function)? The smallest salaary (MIN)? The biggest salary (MAX)? The number of rows that have a salary (COUNT)? If you can explain what you want, someone will help you get it.
for departments 20, 50, 80, 90, assuming the schema in use is the hr schema. The job should be distinct, no duplicates.GROUP BY automatically gets distinct results for each of the GROUP BY expresssions, so there's no need to say SELECT DISTINCT . The previous solution could be better written as:
SELECT job_id
, SUM (salary) AS total_salry
, department_id
FROM hr.employees
WHERE department_id IN (20, 50, 80, 90)
GROUP BY department_id
, job_id
ORDER BY department_id
, job_id
;The output that this produces from the Oracle-supplied hr.employees table is:
JOB_ID TOTAL_SALRY DEPARTMENT_ID
MK_MAN 13000 20
MK_REP 6000 20
SH_CLERK 64300 50
ST_CLERK 55700 50
ST_MAN 36400 50
SA_MAN 61000 80
SA_REP 243500 80
AD_PRES 24000 90
AD_VP 34000 90I hope that's what you wanted.
If not, post the results you do want from this same table. Explain how you get those results.
Always say which version of Oracle you're using. It might not matter in this case, but why take a chance? -
How to insert values using pushputtons in text item & fetch data based on
Dear friends,
I want to insert values in the Text item using pushbutton e.g to insert 05CST884 into text item using pushbuttons '0' '5' 'C' 'S' 'T' '8' '8' '4' (alpha numeric buttons) in the layout editor and then fetch data based on the number entered with that of one in the table in the another text item2 in the layout editor.
Suggestions regarding how to develop and use effective triggers are welcome.At the block level (for the control block where all your push buttons are, let's call it block1) create a WHEN-BUTTON-PRESSED trigger. Your [A-Z] and [0-9] buttons should be on a dedicated non-database datablock to reduce problems. As stated previously, this trigger should just contain the code:
:block2.text_item := :block2.text_item||get_item_property(:system.trigger_item, label);
Also on the pushbutton block, create a backspacve button with its own dedicated WHEN-BUTTON-PRESSED trigger containing:
if length(:block2.text_item) > 0 then :block2.text_item := substr(:block2.text_item, 1, length(:block2.text_item)); end if;
This will hopefully erase the last character entered.
block2 should be based on the database table (see Property Palette --> Database) you wish to query and text_item should be based on the database item which contains the code you entered. All the other database items you wish to displayshould also be added to block2.
Add another FIND push button to block1 with the code:
go_block('block2');
execute_query;
Without writing the whole thing for you, I'd suggest you get a decent Forms tutorial book to guide you through the basics (Oracle Forms Developers Handbook). -
How to find article based support for ipad or technical notes
how to find article based support for ipad or technical notes
The problem comes from VBUK/VBUP which are the control tables for most of SD tables (from VBAK/P to LIKP/PS and VBRK/P) and manage uniqueness of id in the module (and stores statuses). Even item tables don't refer to their header but both refer to the same VBUK record.
e.g.
LIPS : VBELN/POSNR -> VBUK/VBUP -> but you will only find LIKP/PS itself and no record in VBAK/VBAP
LIPS : VBELV/POSNV -> VBUK/VBUP -> you should find VBAK/VBAP
The table VBFA "Sales Document Flow" manages the relations from/to between two different SD documents which exist in VBUL/P and in only one other table depending on type of document. (Also note that the exact relationship may sometimes be modified to some extent by Customizing SD.)
As Katan wrote, look for views defined in ddic, look also at logical databases (SE36) like VLV.
You can also find valuable information in OSS notes/documents like 185530 - Performance: Customer developments in SD.
Regards,
Raymond -
Blazeds + Spring security: fetch data based on current user
Hi,
I'm currently learning flex by trying to build an application with
flex, blazeds and Spring. My application lets users log on using
spring security (which I will probably combine with
AcegiLogonCommand). I would like my assemblers to return different
data based on which user is currently logged on (for instance to show
that specific user's to-do list). To do this, I added a userId
property to my spring security principals (by subclassing
org.springframework.security.userdetails.User)
and added user_id columns to user-specific data in the database. Now
I would like to know how I can get the currently logged on user in my
assembler so I can use its userId to fetch the user's data.
Is the assembler the right place to decide which data to send to my
flex application? If so, can anyone tell me how to determine which
user is currently logged on in my assembler? If not, what would be the
recommended way of dealing with user-specific data in my database in
combination with blazeds?
The only examples I have been able to find on the Internet so far only
use different roles to determine what a user is or is not allowed to
do, I have yet to find any examples where users store and retrieve
user-specific data.
Kind regards,
JeroenHi,
There is a field “Target Audience” in list whenever “Target Audience” is enable in “List Settings”, it accepts the name of a SharePoint group.
For your requirement, you will need to get the name of the group which the current user belongs to. Then perform a query in a specific list to get all the items that
contains the specific value in “Target Audience” field.
Here is a code snippet about how to set Target Audience for an item, there are code lines about
how to get the value of a “Target Audience” field:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/a3ac41d8-42e9-4ec7-999f-036c4b06d3e2/programatically-set-target-audience-in-list-item
A method about checking whether the current user is a member of the specified group:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.iscurrentusermemberofgroup.aspx
Best regards,
Patrick
Patrick Liang
TechNet Community Support -
Accessing Enclosing Class Members From Inner Class Subclass
I have the following scenario that I cannot get to work. Notice the comments in B.doWork() for the problem code. In B.doWork(), how do I access m_strA?
* A.java
* Created on July 5, 2002, 2:20 PM
package Projects.InnerTrouble.Files;
public class A {
public abstract class InnerA {
public abstract void doWork ();
public String m_strA;
/** Creates new A */
public A ()
new InnerA() {
public void doWork ()
System.out.println("A$InnerA$1's doWork() called!");
m_strA = "Annonymous subclass of InnerA's doWork did this";
}.doWork();
* @param args the command line arguments
public static void main (String args[])
A oTemp = new A();
System.out.println(oTemp.m_strA);
B.getB(oTemp).doWork();
System.out.println(oTemp.m_strA);
class B extends A.InnerA {
public B (A a)
a.super();
public void doWork ()
System.out.println("B's doWork() called!");
// How do I access m_strA within B's doWork() method? The following is what I would expect to be the answer, but it does not compile
// A.this.m_strA = "B's doWork did this";
private static A.InnerA sm_oInnerA;
public static A.InnerA getB (A a)
if (sm_oInnerA == null)
sm_oInnerA = new B(a);
return (sm_oInnerA);The whole point is that B is not an inner class of A
so it does not have access to A's member variables.
Eventhough B extends an inner class of A, that does
not make B an inner class of A. That is in the JLS,
but not so elegantly as I have put it, hehe.
If B were an innerclass of InnerA, then it would
qualify to access A's member variables.OK, I think that you are finally getting through to my thick skull on this one. Let me restate and get your check-off on my understanding of the situation.
The only classes with access to A's this reference are A and inner classes of A that are found within the definition of A. So, despite the fact that A and B are in the same package (and B should have access to A's non-private members because B and A are in the same package), and despite the fact that we would normally state that B "is a" InnerA (which is an inner class of A and would have access to a reference to the A.this reference), B is not allowed access to A.this (because B "is not really a" InnerA in the same way that the anonymous implementation of InnerA "is a" InnerA). However, nothing would prevent me from giving B access to a reference of the enclosing A as long as it was done via a method of InnerA, and as long as the implementation of that method is contained in A's implementation.
Does this "access" rule realy make sense? Are you aware of the justification for this rule? Or is the justification stated in the JLS? I would think that the compiler ought to be able to figure this kind of thing out and allow it. It seems to me the fact that I defined B in the way that I did, and the fact that B "is a" InnerA, implies that I desired a fairly tight relationship to A. In fact, I desired the exact relationship that exists for the anonymous implementation of InnerA.
The following is a modified version of my original example that runs as I originally wanted it to, but works around the access rules discussed on this forum thread:
* A.java
* Created on July 5, 2002, 2:20 PM
package Projects.InnerTrouble.Files;
public class A {
public abstract class InnerA {
public abstract void doWork ();
/** added to allow implementors of InnerA that are not enclosed in A's class definition to have access to the enclosing class */
public A myEnclosingInstance ()
return (A.this);
public String m_strA;
/** Creates new A */
public A ()
new InnerA() {
public void doWork ()
System.out.println("A$InnerA$1's doWork() called!");
m_strA = "Annonymous subclass of InnerA's doWork did this";
}.doWork();
* @param args the command line arguments
public static void main (String args[])
A oTemp = new A();
System.out.println(oTemp.m_strA);
B.getB(oTemp).doWork();
System.out.println(oTemp.m_strA);
class B extends A.InnerA {
public B (A a)
a.super();
public void doWork ()
System.out.println("B's doWork() called!");
// The following is what I would expect to be the answer, but it does not compile
// A.this.m_strA = "B's doWork did this";
// added myEnclosingInstance() to get functionality desired above
myEnclosingInstance().m_strA = "B's doWork did this";
private static A.InnerA sm_oInnerA;
public static A.InnerA getB (A a)
if (sm_oInnerA == null)
sm_oInnerA = new B(a);
return (sm_oInnerA);
} -
Segment Shrinking script erroring out due to Function based indexes, lobs,.
DB version:10gR2
Following is a script i made for freeing up(SHRINK ing and resetting HWM) the space in Tables and its indexes. Due to the existence of LOB Segments and Tables with Function based indexes, this script was erroring out. So i was wondering if there is a way to find out the segments which are eligible/not eligible for Shrinking so that i could make necessary changes to the below script.
create or replace procedure freeup_space
is
type v_segment_type is table of varchar2(30) index by binary_integer;
v_segment v_segment_type;
begin
select segment_name bulk collect into v_segment
from user_segments
where segment_type in ('TABLE')
and segment_name not like 'BIN%';
for i in v_segment.first..v_segment.last loop
execute immediate 'alter table ' || v_segment(i) ||' enable row movement';
dbms_output.put_line('Table '||v_segment(i)||'''s row movement enabled');
execute immediate 'alter table ' || v_segment(i) ||' shrink space cascade';
execute immediate 'alter table ' || v_segment(i) ||' deallocate unused';
end loop;
end;
/You can use USER_LOBS views to look for LOB columns in the segments and ALL_INDEXES.INDEX_TYPE tells if the index is function based index or not.
Message was edited by:
Pierre Forstmann -
Sql query to fetch data based on date conditons
Hi All,
We have to schedule a script that runs at 1:00 AM from Monday to Friday.
The script will run a sql query ,that will fetch the data from sql database 2008 based on the below conditions.
Case 1: If date = current Date then retrieve the data of the previous Date.
Case 2: If date = Monday then retrieve the entries of Friday ,Saturday and Sunday.
Please help us on how we can achieve this.
ThanksHi,
Are you asking about Patrick's
solution?
If so I highly recommend NOT to use this solution. PLease read LMU92's
and
Visakh16's responses.
Why not to use it?
1. This solution is not deterministic!
A deterministic algorithm is an algorithm which, given a particular input, will always produce the same output. This solution give different values for different setting! It is depending for example on "SET LANGUAGE" value
As mentioned above if you try to use any other languge then English then this query will not work since you will never get the value "Sunday"
2. Moreover! Even if you are using "SET LANGUAGE 'English'" then this
solution depend on "SET DATEFIRST" and only take into consideration that the value can be 1 or 7, using any other value you will get that @weekendDateMod is null!
What can you use?
let's test some value first to get the solution yourself. We know that we don't care about "SET LANGUAGE" since I will not use any language dependency but we need to examine "SET DATEFIRST". Try to change the value from 1 to 7 and check
the value of this query
SET DATEFIRST 1 -- Change this value from 1 to 7!
DECLARE @Sunday DATE = '2014-08-03' -- This is Sunday
DECLARE @Munday DATE = '2014-08-04' -- This is Munday
SELECT DATEPART(DW,@Sunday),DATEPART(DW,@Munday), @@DATEFIRST
Can you see the behavior ?
The results are hidden here (select the text and you will see them)
DATEFIRST___Sunday_______Monday
1___________7___________1
2___________6___________7
3___________5___________6
4___________4___________5
5___________3___________4
6___________2___________3
7___________1___________2
assuming you did the exercise above yourself, then you can now think now what is the filter that you need...
You can use a filter on those two parameters together using "where DATEPART... and @@DATEFIRST...) or using one combine check. Can you think how?
Notice that this value is always 2 on Monday! Regarding our setting
(DATEPART(DW,@CurrentDate) + @@DATEFIRST) % 7
Please Don't Go Down Before YOu Understand!
Now we can go to the solution
* I really hope that you read all and did the small exercise yourself! You can not become a developer by copy answers, and this is the reason that from the start I only gave you tha way and not the final query!
DECLARE @CurrentDate DATE = '2007-08-20' -- This is only for testing since you should use the function GETDATE() instead
DECLARE @MinDateToFilter DATE
SET @MinDateToFilter = CASE
WHEN ((DATEPART(DW,@CurrentDate) + @@DATEFIRST) % 7) = 2 THEN DATEADD(DAY,-4,@CurrentDate)
ELSE DATEADD(DAY,-1,@CurrentDate)
END
SELECT *
FROM sales.salesOrderHeader
WHERE orderDate > @MinDateToFilter
I hope this was useful :-)
[Personal Site] [Blog] [Facebook]
Maybe you are looking for
-
Xml text in a dreamweaver doc?
hi is there a way of linking an xml document to a html doc. so the user only has to update the xml doc to update the text within the web page? any tutorials anywhere? cheers guys
-
Image.source in ItemRenderer works in Windows but not Mac
I have a Flex (AIR) application that is giving me problems on the Mac. In one of the Datagrids, I am using an ItemRenderer with an image control. Some code in the "set data(value:Object)" function assigns a file path as the source of the image contro
-
Communication between User & Kernel
Hi all, I want to communicate between I/O kit user client & I/O kit driver (kext). which is the best IPC mechanism available for this? Thanks & Regards, Sheetal.
-
Error when open RSPLAN (Modeler or Wizard)
When I run RSPLAN (modeler or wizard), I've got the following error: URL http://gowsap21.pratika.br:8000/sap/public/myssocntl call was terminated because the corresponding service is not available. Note: The termination occured system DB2 with error
-
How to read an IDoc with an ABAP program?
Hi experts! I am new to SAP and I need to read an IDoc with an ABAP program... how to do it? Maybe it is possible to read an IDoc into inner table...? Hellpful answers and advices will be rawarded. Regards, Mindaugas.