Create classification view with inbound MATMAS_BAPI iDoc
Hi there,
We receive material master data from our customers and create them in our SAP system using a MATMAS_BAPI mssage type.
Now we should also create the classification view of the materials with a certain classification type and value.
The MATMAS_BAPI message type does not have segments to create the classification view.
Doe anybody know what the standard procedure is to achieve this?
Thank you very much in advance.
Kind regards,
Tim
classification is transported with CLFMAS IDOC.
Classification is in general independend master data, that has its own area in the SAP menu and IMG.
It is just an embedded functionality in manual material master maintenance.
For data transfers it is an extra step and not included in MATMAS IDOC and BAPI.
Similar Messages
-
Help for creating classification view in mm01
hi guys can anybody help on creating classification views in mm01 using bdc recording i need a step by step procedure . since when i tryed in mm01 there are filds like class name i dont know where all these data's to find one more thing is i was asked to create classification view using bdc recording ...please help me with some programs if u have
Hi,
You need to use the BAPI 'BAPI_OBJCL_CREATE' to create characteristics for a material.
The characteristics are need to be passed in the table ALLOCVALUESCHAR.
If you do not know the values for a particular characteristics then you canmake use of FM
BAPI_CLASS_GET_CHARACTERISTICS and BAPI_CHARACT_GETDETAIL to get the values.
Regards,
Ankur Parab -
How can i create a view with jdevlopper 10132
hi,
i want to know how to create a view with JDeveloper 10132.
thanksSorry, but I had to jump in here.
7rouz - you've certainly violated the 10 commandments for posting here...
Do you want to:
1). Create a database view directly in the database
2). Model a database view using the database modeller
3). Create an ADF BC View Object
4). Create some type of visual object (web page, Swing panel)
5). something else.
Your question is too ambiguous to yield an answer, unless by luck.
Regards,
John -
How to create a view with parameter?
who can tell me hwo to create a view with
parameters just like a cursor?Hi,
This is not possible in Oracle. What u can do is create the view without the where clasue and supply the where clause at runtime.
Hope this helps...
Regards,
Ganesh R -
Need help in creating a view with Encryption for hiding the code used by the multiple users
Hi,
Can anyone help me out in creating view with encryption data to hide the stored procedure logic with other users.
I have create a stored procedure with encryted view but while running this manually temporary views are getting created, therefore the problem is if there are 500 entries then 500 temp views will get created.
Any solution to aviod creating temporary views, please refer my code below
USE [etl_validation]
GO
/****** Object: StoredProcedure [dbo].[Pr_DBAccess_mod] Script Date: 05/23/2014 12:53:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Pr_DBAccess_mod](@ETL_CONFIG_ID INT)
AS
BEGIN
DECLARE @openquery NVARCHAR(MAX),
@DATABASENAME NVARCHAR(100),
@HIERNAME NVARCHAR(100),
@TABLENAME NVARCHAR(100),
@SERVERTYPE NVARCHAR(100),
@SERVERNAME NVARCHAR(100),
@USERNAME NVARCHAR(100),
@PASSWORD NVARCHAR(100),
@ETL_CONFIG_IDN NVARCHAR(100);
SET @ETL_CONFIG_IDN=CAST(@ETL_CONFIG_ID AS NVARCHAR);
SET @TABLENAME='Department';
SET @SERVERTYPE='SQL';
SET @SERVERNAME ='192.168.31.176';
SET @DATABASENAME='AdventureWorks2008R2';
SET @HIERNAME = 'HumanResources';
IF @SERVERTYPE='SQL'
BEGIN
/*SET @openquery= 'SELECT * INTO ##TestTable
FROM OPENROWSET(''SQLNCLI'',''server=192.168.31.176;Trusted_Connection=yes;'','''+@query+''')'
SET @openquery= 'CREATE VIEW '+@TABLENAME+@ETL_CONFIG_IDN+
' WITH ENCRYPTION AS SELECT * FROM OPENROWSET(''SQLNCLI'',''SERVER='+@SERVERNAME+';TRUSTED_CONNECTION=YES;'',''SELECT * FROM '+@DATABASENAME+'.'+@HIERNAME+'.'+@TABLENAME+''')'
SELECT @openquery
END
EXECUTE sp_executesql @openquery
ENDHi aa_rif,
According to your description and code message, you execute the sp_executesql statement in your stored procedure, it indeed create many views with a tablename and ETL_CONFIG_ID named. If you need not to use these temporary views, you can delete them when
it contains the tablename in one view name.
In addition, if you want to create view with encryption in SQL Server, you can use directly the ENCRYPTION option to encrypt the T-SQL of a view in create view commands, for more information, see:
http://learnsqlserver.in/4/Create-View-With-Encryption.aspx. if not, you can descript more detail about requriements, so that more forum members can involve into the thread and help you
out.
Regards,
Sofiya Li
Sofiya Li
TechNet Community Support -
Creating Materialized View with the Distinct key word
Hi
I need help to create Materialized View with the Distinct key word.
my query is
select distinct col1, col2 from t1;
is there any alternate of DISTINCT because I can not refresh the MV as fast on demand if I am using it and Fast on Demand is a must for me.hi
check out this link
http://download-west.oracle.com/docs/cd/B12037_01/server.101/b10736/basicmv.htm#i1007299
http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/intro.htm#sthref183
hope this helps
CHeers -
How to create a view with a column of counts of the occurence of values
If my table is:
ID
1
2
3
3
5
5
5
I want to create a view with the following result:
ID COUNT
1 1
2 1
3 2
5 3
How would I accomplish this?Sorry, my mistake. I was thinking about counting distinct events.
I created a table with your example values:
You should do a projection with a calculated column = 1:
And then add this calculated column as an aggregated measure on the aggregation node:
Result:
Cheers,
Fernando -
How to create a view with parameters; read the documentation but nothing!
Hello!
I'm new to the Oracle world but together with my coworkers we need to very quickly study Oracle to figure out whether we'll add Oracle to our list of supported databases or not.
Question: How do I create a view with parameters?
I've read the documentation but I could not find this! I found the sql syntax to create a view but no parameters whatsoever...
I have found on the web some very complicated way of doing this, but doesn't Oracle support Views with parameters?
The goal here is to return a recordset, don't forget, so,please don't speak about stored procedures unless you are going to tell me how to get a recordset out of a stored procedure! ;)
Thanks for all your help and attention!
Jorge C.You can set up a parameterized view via context as follows:
1. Set up a procedure to set your context values:
create or replace procedure p_set_context (p_context IN VARCHAR2,p_param_name IN VARCHAR2,p_value IN VARCHAR2)
as
BEGIN
sys.dbms_session.set_context(p_context,p_param_name,p_value);
END;
2. Create your context using the procedure you just created
create or replace context my_ctx using p_set_context
3. This is the test table I'll use
create table my_table(col1 number)
and populate it:
begin
for v_index in 1..10
loop
insert into my_table values(v_index);
end loop;
end;
and the view that will be parameterised
create or replace view v_my_table as select col1 from my_table where col1 between sys_context('my_ctx','start_range') and sys_context('my_ctx','end_range')
4. Now set the parameters using the procedure above.
begin
p_set_context('my_ctx','start_range','1');
p_set_context('my_ctx','end_range','5');
end;
5. Selecting from my_table will give you 1 to 10 (no surprise there :-) )
selectng from v_my_table will give you 1 to 5
You can use the context to set formats etc using the same principle. A common gotcha to watch for is trying to set the context directly using DBMS_SESSION.SET_CONTEXT instead of creating a procedure. This belongs to SYS and SYS won't have the privileges to set your context so you get an insufficient privileges result leading to much headscratching and unnecessary grants (at least that's my understanding of it).
Sorry Jorge, as you're new to Oracle I should also have pointed out for completeness sake, that you can change the parameters at any time through recalling the p_set_context, for example, following on from above, after your "select * from v_my_table" and seeing 1 to 5, you could then do
begin
p_set_context('my_ctx','start_range','3');
end;
and when you requery 'Select * from v_my_table' you will now see rows 3 to 5.
Bit of a simplistic example, but you can see how easy it is. :-)
Message was edited by:
ian512 -
Create a View with Aggregation Function (COUNT)
I've been looking up and down for a way to create a view with a few basic fields and some other fields containing aggregation function.
For instance:
To display a view that contain all the Contract Agreement and the corresponding count of the PO releases.
Agreement Nbr, Total PO releases
I need this view so that I can create a search help with this view.
I found something about the "CREATE VIEW" statement, but I don't have any idea how to use it.
Any helps toward this matter is very much appreciated, thanks.Hello Aldern
I guess you have read about the SQL statement "CREATE VIEW". When we create a view in the dictionary this SQL statement is finally called to create the view on the DB. Thus, since we do not have any aggregation options in views you cannot achieve what you want using views.
The solution for your problem is to create a <b>search help</b> having a <b>search help exit</b>. Within the exit you can do your aggregation functions and add these values to the displayed search help data.
Regards
Uwe -
it's posible create a view with parameters?
i want to create a view and pass it parameters, in the same way when i create a procedure or function.
i never have seen it, but i would like to know if that's posible
thanksYou cannot create a view with parameters. The only way is to use a stored proc to dynamically create the sql statement. The substitution variable approach does not work. SQL*Plus will prompt for the value of the variable at compile time (i.e. when you create the view) and use the value you provide in the view's query.
SQL> create or replace view jws_test_v as
2 select * from jws_test where flag = '&flg'
3 /
Enter value for flg: AA
old 2: select * from jws_test where flag = '&flg'
new 2: select * from jws_test where flag = 'AA'
View created.
SQL> select * from jws_test_v
2 /
no rows selected
SQL> select text from user_views where view_name = 'JWS_TEST_V'
2 /
TEXT
select "LEV1","LEV2","LEV3","LEV4","LEV5","LEV6","FC","FLAG","ONAFT","ONAPT","CU
PEFT","CUPEPT" from jws_test where flag = 'AA'This makes sense, since substitution vartiables are a sqlplus construct, not a sql or Oracle construct. A view constructed in this way would not be callable from anywhere other than sqlplus. -
Creating a view with a primary key
I want to create a view with a defined primary key. I understand
the view is created within a select statement, but do not
understand how you would define a particular field as a primary
key in the view. Also if your select statement attempts to build
the view and has duplicate keys in the select result set, what
would happen when the duplicate key is found? Would it just not
include the duplicate key in the view?
Thanks in advance for your help.
-PatI have a rather difficult problem with duplicate invoice numbers
contained in unique records. In other words I have many records
that appear as follows:
3593, 0004009090, CUSTOMER, TAX, 20000117,014011976-01
4411, 0004009090, CUSTOMER, TAX, 20000718,014011976-01
The last field is invoice number '014011976-01' In my case I am
building a flat file using UTL_FILE for loading into SAP
Business Warehouse. In SAP I need to have Invoice number as a
key in which case I can't have duplicate invoice numbers. All
the SQL I have tried to date returns a large amount of records
similar to the above records. I am selecting these records from
4 different schemas which represent 4 different companies. I
realize the data is the problem and that the vendor of the
product I am working with should not allow records with
duplicate invoice numbers, but I have to get the data loaded as
that is what they want and are paying for. So back to my View. I
was hoping to create a view and be able to work in the view to
remove duplicate records prior to writing them to a file. Any
suggestions are welcomed.
Thanks
-Pat -
Creating Classification view for material through Standard Function
hi,
I have created the material code through BAPI_MATERIAL_SAVEDATA. For quality inspection i have used BAPI_MATINSPCTRL_SAVEREPLICA. i have to create classification view for that material code. Can anyone suggest me which standard function helps me to create the classification view.
Thanks in advance.
Senjeyhi,
i have tried that function module. I have mentioned the code below.
i_object = '000000151860630000'.
i_alloc_num-CHARACT = 'THICKNESS'.
i_alloc_num-VALUE_FROM = '5.70'.
append i_alloc_num.
i_alloc_char-charact = 'SHAPES'.
i_alloc_char-VALUE_CHAR = 'PLATE'.
append i_alloc_char.
clear i_alloc_char.
i_alloc_char-charact = 'CATEGORY'.
i_alloc_char-VALUE_CHAR = 'CS'.
append i_alloc_char.
clear i_alloc_char.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
OBJECTKEYNEW = i_object
OBJECTTABLENEW = 'MARA'
CLASSNUMNEW = 'RAWMATERIAL'
CLASSTYPENEW = '001'
STATUS = '1'
STANDARDCLASS =
CHANGENUMBER =
KEYDATE = SY-DATUM
NO_DEFAULT_VALUES = ' '
IMPORTING
CLASSIF_STATUS =
TABLES
ALLOCVALUESNUM = i_alloc_num
ALLOCVALUESCHAR = i_alloc_char
RETURN = i_ret.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
But i am getting the error 'Assignment exists and is valid '.
Please help.
Regards,
Sengathir.J -
How to create classification view for material?
HI All,
How to create classification view for material? is there any function module?
pls let me know.
Bandicheck the standard include "LCLBPAU14" this is using the following F.M
call function 'BAPI_OBJCL_CREATE'
exporting
objectkeynew = l_object
objecttablenew = l_objecttable
classnumnew = classnum_new
classtypenew = l_classtype
status = status
standardclass = standardclass
changenumber = changenumber
keydate = keydate
no_default_values = no_default_values
importing
classif_status = classif_status
tables
allocvaluesnum = allocvaluesnum
allocvalueschar = allocvalueschar
allocvaluescurr = allocvaluescurr
return = return. -
How to create table view with reference table
Hi experts,
How to create table view with reference table in SE11, plz gve me stp by stp procedure.
pints grnded for hlp.Hi
Go to Tcode se11 choose view and enter the name and create a popup opens up choose database view option
enter the description
On the left hand side choose the table name.
Click on view fields tab and choose your table fields.Here you can choose which fields you want in your view.
Save and then activate.
Hope this helps.
Regards,
Harish -
Creating classification view for the material
hi friends,
i need to create a material with various views (as in MM03) based on the material type.
i am using BAPI_MATERIAL_SAVEDATA for it.
i am able to create almost all the views except the the classification view for the material.
can anyone help me with code (i need to write) to create a classification view for the material?
thanks in advance.Hi Karthik,
Select klart from AUSP into table t_ausp where OBJEK = wa_final-matnr.
LOOP AT t_ausp.
w_classtype = t_ausp-klart.
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
classtext = 'X'
classtype = w_classtype
language = sy-langu
object = w_object
objecttable = 'MARA'
* no_value_descript = w_no_value_descript
change_service_clf = 'X'
inherited_char = ' '
change_number = ' '
TABLES
t_class = t_class
t_objectdata = t_objectdata
i_sel_characteristic = i_sel_characteristic
t_no_auth_charact = t_no_auth_charact
EXCEPTIONS
no_classification = 1
no_classtypes = 2
invalid_class_type = 3
OTHERS = 4.
IF sy-subrc <> 0.
ENDIF.
LOOP AT t_class WHERE class IN s_class.
CLEAR : t_allocvaluesnum,t_allocvalueschar,t_allocvaluescurr,
t_lreturn.
REFRESH : t_allocvaluesnum,t_allocvalueschar,t_allocvaluescurr,
t_lreturn.
w_classnum = t_class-class.
* Getting the reference tables and values----------------
CALL FUNCTION 'BAPI_OBJCL_GETDETAIL'
EXPORTING
objectkey = w_objectkey "Old reference Material
objecttable = 'MARA'
classnum = w_classnum
classtype = w_classtype
* unvaluated_chars = 'X'
TABLES
allocvaluesnum = t_allocvaluesnum
allocvalueschar = t_allocvalueschar
allocvaluescurr = t_allocvaluescurr
return = t_lreturn.
* Create with reference-----------------------
w_objectkeynew = wa_inputfile-to_matnr.
CALL FUNCTION 'BAPI_OBJCL_CREATE'
EXPORTING
objectkeynew = w_objectkeynew "New Material
objecttablenew = 'MARA'
classnumnew = w_classnum
classtypenew = w_classtype
TABLES
allocvaluesnum = t_allocvaluesnum
allocvalueschar = t_allocvalueschar
allocvaluescurr = t_allocvaluescurr
return = t_lreturn.
ENDLOOP.
ENDLOOP.
Prabhudas
Maybe you are looking for
-
ITunes movies with no storage left on Macbook air
Where can I put my Itunes movies if i have no storage on my mac? Itunes movies are taking up to much space, so can I move them somewhere? Or if i delete them, and get a Mac Desktop, will they be able to be redownloaded? I need the space for other thi
-
Install j2ee engine in BW 3.5.
Hello, Can i install J2EE Engine in BW 3.5 server to install XI 3.0 SR1? thanks.
-
JDI: which SDA /DC contains the KM-Jars?
Hi, I trying to use KM-functionality from a webdynpro, similar to this guide: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial on using knowledge management functions in web dynpro - 26.htm Th
-
Applying a gradient to the RoboHelp background
Hello I would like to apply a graident to the background of my RH9 pages. Is this possible? and if so, what would be the best way? Thanks so much in advance for any advice
-
Hi I need to connect a page to a specific part of the page containing a long text. I want to use an equivalent of HTML named anchors., How do you do this in Flex. Thanks.