Creation of Object Dependency (OD)
Hi Gurus,
Currently we have customized a program to create/update object dependencies. However we have a problem that sometimes the object dependency is deleted and not updated back. As we cannot simulate this all the time (especially during debugging) and we don't know why is it having this issue, we are looking at options to enhance the following codes.
We are using 2 function modules CAMA_CLASS_CHAR_DEL_DEP (to delete) and CAMA_CLASS_CHAR_MAINTAIN_DEP (to create)
CALL FUNCTION 'CAMA_CLASS_CHAR_DEL_DEP'
EXPORTING
CLASS = <FS_DEP_CHR_A>-CLASS
CLASS_TYPE = '300'
CHARACTERISTIC = <FS_DEP_CHR_A>-CHARACT
DELETE_LOCAL_DEP = 'X'
IMPORTING
RETURN = WA_RETURN2
TABLES
DEP_ASSIGN_DEL = IT_DEP_ASSIGN_DEL.
READ TABLE IT_RETURN INTO WA_RETURN WITH
KEY TYPE = 'E'.
IF SY-SUBRC NE 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
CALL FUNCTION 'CAMA_CLASS_CHAR_MAINTAIN_DEP'
EXPORTING
CLASS = <FS_DEP_CHR_A>-CLASS
CLASS_TYPE = '300'
CHARACT = <FS_DEP_CHR_A>-CHARACT
DEPENDENCY_DATA = WA_SEL_DEPDAT
KEY_DATE = SY-DATUM
TABLES
DESCRIPTION = IT_SEL_DEPDESCR
SOURCE = IT_SEL_SOURCE
DOCUMENTATION = IT_SEL_DOC
EXCEPTIONS
ERROR = 1
WARNING = 2
OTHERS = 3.
IF SY-SUBRC EQ 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Points will be rewarded for useful answers. Many thanks in advance.
Rgds
Mainly due locking issues. Added some logic to wait.
Similar Messages
-
PDS Creation with Object Dependency
Hello Gurus,
I´ve written a function to run BAPI_PDSSRVAPS_SAVEMULTI in order to create PDS with object dependency (Super BOM). The PDS created by my function looks good in CURTO_SIMU, but it is not respecting the characteristic dependency during PPDS Heuristic. If I take a PDS generated in ECC with the exact same attributes, the heuristics explodes the components correctly. When I run the getlist bapi, it shows both ECC created and function created with all tables (pds_header, pds_component,) filled with the same content. Though, one PDS works and the other doesnt. I am clueless.
thank you a lot.
Cheers
RafaelMainly due locking issues. Added some logic to wait.
-
Error during cration of object dependency
Dear Experts,
During creation of Object dependency by T code-CU01 the system gives an error
E28151 Table ZPPSFCTWEFT does not exist
E28024 Syntax error in simple action/procedure
The table ZPPSFCTWEFT is checked by se16, but it shows the table.
The class characteristic configurable profile is maintained
Kindly suggest me some concerned solution for this.
regardsDear Jayant,
Try with rebuilding index with the particular table.
Regards
Nizam -
How can I trace creation of objects?
I am wondering how I can trace creation of objects with new. For example:
interface CreationListener {
void objectCreated(Object o);
class CreationNotifier {
static void registerCreationListener(Class cls, CreationListener listener) {
// registers `listener' to be notified after creating any object of class `cls'
class Test {
public static void main(String[] args) {
CreationNotifier.registerCreationListener(Integer.class, new CreationListener() {
public void objectCreated(Object o) {
System.out.println("Created Integer " + ((Integer)o).intValue());
new Integer(2); // Now I would expect to see `Created Integer 2' on my console...
}In other ways I want to get informed about every object of the specified class that gets created
throughout the application.
Does anyone have an idea about it? I was trying to find something appropriate in SecurityManager
but I failed :(
Please help!I think you did not understand exactly what I meant. Your solution is only good for classes written by
me and I wanted to catch all object constructions in any class, e.g. one that I have only in a binary form.
Maybe Hashtable is
not the right data structure but I got to go back to
work :-) Let me know if you come up with a better
implementation.
-- Niladri.I created a WeakHashSet class on top of WeakHashMap which uses one static object as a value and really cares only about the keys. In the registrating class I have a HashMap with keys of type Class and values of WeakHashSet. The register method is simple:
public void register(Object o) {
if (o == null) return;
if (!map.containsKey(o.getClass())) // this is the first object of this class being registered
map.put(o.getClass(), new WeakHashSet());
((WeakHashSet)map.get(o.getClass())).add(o); // WeakHashSet implements Set interface
}This design ensures (because of using WeakHashMap) that I only have live objects in my structure after running GC (in fact, I call System.gc() in methods to find the live objects of a specific class).
As you can see, my only problem is to have the object registration automate for classes that I have not written (and do not have sources).
And using the profiler is not portable (as I guess) - in examples for JProbe they used DLL's and UNIX shared objects. And that requires unusual switches when starting JVM. I would like to have an all-Java language solution as the code fragments which I have described come from a library which I am writing now and I should not make the users of it depend on switches or dynamic libraries...
Anyway, thanks for your good will. :-) -
Error in creation of Object Type from XML passed
Hi,
I am facing a problem creating a appropriate a object type for a XML.
Below are the details:
XML Passed
<mer_offer_action_data>
<form_id>
134039588
</form_id>
<action_cd>
OA
</action_cd>
<offer_decline_reason_cd>
</offer_decline_reason_cd>
<start_dt>
</start_dt>
<candidate>
<ds_prs_id>
109315
</ds_prs_id>
<ds_prs_id>
110534
</ds_prs_id>
<ds_prs_id>
110059
</ds_prs_id>
</candidate>
</mer_offer_action_data>
Types Declaration
+CREATE OR REPLACE type MER_OFF_CANDIDATE
AS
OBJECT
DS_PRS_ID NUMBER
CREATE OR REPLACE TYPE MER_OFF_CANDIDATE_t
AS
TABLE OF MER_OFF_CANDIDATE;
CREATE OR REPLACE type MER_OFFER_ACT_DATA
AS
OBJECT
FORM_ID NUMBER,
ACTION_CD VARCHAR2(6),
OFFER_DECLINE_REASON_CD VARCHAR2(6),
START_DT VARCHAR2(11),
CANDIDATE MER_OFF_CANDIDATE_t
CREATE OR REPLACE TYPE MER_OFFER_ACT_DATA_t
AS
TABLE OF MER_OFFER_ACT_DATA;
CREATE OR REPLACE type MER_OFFER_ACTION_DATA
AS
OBJECT
MER_OFF_ACT_DATA MER_OFFER_ACT_DATA_t
/+
My Declaration
+merOffActDataXML xmltype;
merOffActData MER_OFFER_ACTION_DATA := MER_OFFER_ACTION_DATA(MER_OFFER_ACT_DATA_t());+
Inside Pl/SQL block
+-- Converts XML data into user defined type for further processing of data
xmltype.toobject(merOffActDataXML,merOffActData);+
when I run the Pl/Sql block it gives me error
ORA-19031: XML element or attribute FORM_ID does not match any in type ORADBA.MER_OFFER_ACTION_DATA
which means the object type mapping is wrong
I would like to know whether the object type I had created is correct or not.
Thanks for your help
BedaBedabrata Patel wrote:
Below are the details:The details except for a description of the problem
I am facing a problem creating a appropriate a object type for a XML.And which error you are getting
Error in creation of Object Type http://download.oracle.com/docs/cd/E11882_01/server.112/e10880/toc.htm
And which version of Oracle you are getting the unknown error creating the unknown problem. -
Error in creation of Object Type
Hi,
I am facing a problem creating a appropriate a object type for a XML.
Below are the details:
XML Passed
<mer_offer_action_data>
<form_id>
134039588
</form_id>
<action_cd>
OA
</action_cd>
<offer_decline_reason_cd>
</offer_decline_reason_cd>
<start_dt>
</start_dt>
<candidate>
<ds_prs_id>
109315
</ds_prs_id>
<ds_prs_id>
110534
</ds_prs_id>
<ds_prs_id>
110059
</ds_prs_id>
</candidate>
</mer_offer_action_data>
Types Declaration
+CREATE OR REPLACE type MER_OFF_CANDIDATE
AS
OBJECT
DS_PRS_ID NUMBER
CREATE OR REPLACE TYPE MER_OFF_CANDIDATE_t
AS
TABLE OF MER_OFF_CANDIDATE;
CREATE OR REPLACE type MER_OFFER_ACT_DATA
AS
OBJECT
FORM_ID NUMBER,
ACTION_CD VARCHAR2(6),
OFFER_DECLINE_REASON_CD VARCHAR2(6),
START_DT VARCHAR2(11),
CANDIDATE MER_OFF_CANDIDATE_t
CREATE OR REPLACE TYPE MER_OFFER_ACT_DATA_t
AS
TABLE OF MER_OFFER_ACT_DATA;
CREATE OR REPLACE type MER_OFFER_ACTION_DATA
AS
OBJECT
MER_OFF_ACT_DATA MER_OFFER_ACT_DATA_t
/+
My Declaration
+merOffActDataXML xmltype;
merOffActData MER_OFFER_ACTION_DATA := MER_OFFER_ACTION_DATA(MER_OFFER_ACT_DATA_t());+
Inside Pl/SQL block
+-- Converts XML data into user defined type for further processing of data
xmltype.toobject(merOffActDataXML,merOffActData);+
Thanks for your help
Beda
Edited by: Bedabrata Patel on Jul 12, 2010 5:51 AMBedabrata Patel wrote:
Below are the details:The details except for a description of the problem
I am facing a problem creating a appropriate a object type for a XML.And which error you are getting
Error in creation of Object Type http://download.oracle.com/docs/cd/E11882_01/server.112/e10880/toc.htm
And which version of Oracle you are getting the unknown error creating the unknown problem. -
Error in Creation of Object ID 00000000 is not allowed
Hi all,
When I am Hiring an employee using PA40, I am getting an error as "Creation of Object ID 00000000 is not allowed", when I save it.
In the NUMKR Feature, the return value has been assigned to the Personnel Sub Area.
Pls. can anybody explain, how can I solve this problem.
This is urgent requirement of client.
Thanks,
HR User.Hi Hr user
Now listen carefully.
1. If you have defined your feature NUMKR according to PSA then while running hiring action does PSA comes or it just gives you the Position, PA, EG and ESG fileds only.
2. If the first condition is true then you will get the error, now the question is why
Answer, you have defined the feature through PSA and once you try to save the IT0000 there is no PSA mentioned there thats why the system gives you the error.
If this explnanation is understood by you than reply , i will tell you how you can bring the PSA field also in hiring action at IT0000.
Do reply
Regards,
Bhupesh Wankar -
Object dependency for batch characteristic
I have 1 class with multiple characteristics and 1 of the characteristics should be entered (mandatory) in case of a certain split valuation type (which is covered in the batch info). This should be done via object dependencies within the charateristic. Anyone knows how to do this?
Dear Sairam
As explaind to you in the earlier thread for product or proportion unit. you need not maintain object dependency for the characterestics. You have to maintain product unit which will appera as alternatvie UOM. While making GR the Alternate or product UOM will be seen as per the plan value(conversion factor) maintained in material master. You can change both Basic UOM and Alter UOM as per the actual caonversion recieved. This conversion factors will be saved in the batch classification.
Regards
MSR -
How to get the Purchase order Qty in the object dependency
Hi,
We are using variant pricing in the purchase order. I have condition type say u201CZVBPu201D for Pallet cost. I defined Pallet cost as 5 USD per each (pallet). I have to calculate Number of pallets = Purchase order Qty/ 5. The number of pallets should be rounded to nearest integer.
My question is how to get the Purchase order Qty in the object dependency?
Is there any reference table and field can be used to get Purchase order Qty just like we use MMCOM-VKOND for variant pricing.
Appreciate your help
Thanks,
SriniHi,
1. I do not have system now so I can not conclusively tell about table field .
2. Since I did it long back so I also do not exactly remember it, there are more than one place where PO qty appears for example Item overview and Item details - one of the PO qty when used in the characteristic do pull the PO qty which can be used for variant pricing (so request to please update the forum with the correct table and field once you find it - in the meantime if I get opportunity to get to system I will also try and find out ). -
Variant configuration-- syntax error in creation of object dependencies
In variant configuration when i try to create object dependency (tcode=cu01), after entering the dependency and also description when i enter the syntax in the source code it is giving error: error in syntax check for simple condition
I have entered syntax as : engine_cap in ('1000','1400','2000'), pls guide me with the solution to create object dependencyDear, Shakeer
Please follow along with my very own config guide of variant config.
1) Create a configurable Material Using KMAT u2013Material Type. Item Category 0002 and Item Category Group 0002. Go to classification tab-here you maintain the class type 300 and assign the class, we will create this shortly. (So after creating class come back into MM02 and input the class that you create in step 2.)
2) Create a class in T-Code CL01. Use class type 300 for Variants. In this we assign the characteristics we will create shortly.
3) Create characteristics in T-Code CT04. Create your characteristic like for example, Z_Type, Z_Model, and Z_Color.
4) We must create a characteristic for the pricing. Example, Z_CarPrice inside this characteristic we must maintain. Table Name SDCOM, Field Name VKOND in the additional data tab. Also, go to restrictions tab and enter the class type 300 Variants. Now in order to make this pricing work for you, you must maintain (enter) all the values from the characteristics. For example, Red, Blue, Black, Honda, Toyota, GLI, XLI, and 2.0D.
5) Now going back to the characteristics in CT04 change mode. Make sure Basic Data has *Multiple Selections circled. * Character Format has 26 and a check in case sensitive. Make sure in restrictions tab class type 300 Variants is present. Go back to Values and highlight the first one. Example, Red then go to Extras->Object Dependencies->Assignments You must maintain this code $self.Z_CarPrice=u2019Redu2019 in basic data make sure itu2019s released & procedure is filled in. Go back to dependency editor and paste the same code there after 000010 $self.Z_CarPrice=u2019Redu2019 and do this for each and every value. Very Important * Maintain configuration profile in T-Code CU41 for the material -> Priority 01, Variant Configuration, Class 300, status, Released 1, then click save. Note: If 2 conditions are inactive use class group A instead of B in SPRO for Condition type VA00.
6) Go to T-Code VK11 and enter VA00 condition type. Enter all the values maintained in the characteristics for example, Red, Blue, Black, Toyota, Etc and enter the price then click on save. Now it should work fine in VA01. Make sure you have assigned the VA00 condition type in the pricing procedure.
Good Luck,
Muhammad Ali Lozada -
Display an error message in Portal during creation of Object Link
Hi,
I have a requirement where I need to throw an error message in Portal during creation of Object Link.
The requirement is whenever the user clicks on Item and try to create a Object Link for Material-Plant combination, if the Mat-Plant combination exist, than I have to throw/display an error message.
I tried for some enhancements in BAPI_BUS2172 but it does not work out.
Please help.
Thanks in advance.
ArbindHi,
If you include the UI, it will display at the top of the screen..
Please see below how to create a message in the message editor.
http://help.sap.com/saphelp_nw04/helpdata/en/72/1d6526263ff24995016a152705eab2/frameset.htm
and this is how you access the error message in the application ti display it to the end user
http://help.sap.com/saphelp_nw04/helpdata/en/72/1d6526263ff24995016a152705eab2/frameset.htm
Regards,
Ganesh N -
Routings: mass change of object dependency
Hi Friends,
Do you know if there is way to apply a mass change on object dependency in Routings?
My scenario is: add one new obj dependency at one operation on several (hundreds) routings.
Thanks a lot for any help or suggestion.
Bye,
Flavio CiotolaDear,
BDC is good option you can record the BDC for CA02 through SHDB.
Or else in mass you can do this wth CEWB - Engineering Workbench first define the Working Area in OP77 lets say Working Area SAP_OPERATION select focus on operation also select the required field like Object dependency.
and then go ahead with CEWB.
Hope it will help you.
Regards,
R.Brahmankar -
Mass Upload of object dependency for characteristics value
Hi ,
I need to upload the object dependency for characteristics values through transaction CT04. My input data consists of characteristcs name , characteristics value and the object dependency (KNNAM) . Need to populate the KNNAM field alone .
Have tried with the FM 'CTMV_CHARACT_CHANGE_KNOWL_VAL' which suits my requirement but teh dependencies are not getting uploaded . Am I missing anything ? Since I do not have class details i.e class num and class type I am not able to use the BAPI like 'BAPI_CLASS_CHARVALUE_LOCAL_DEP ' . Please suggest any othe r suitable method .
Thanks in advance.
SanjeevHi,
Please check the below link..
BAPI for Characteristic Dependency
Thanks. -
Deletion of Object Dependency in BOM
Hi All,
I am trying to delete the Object dependency from a BOM using the Function Module "CUKD_API_ALLOCATIONS_MAINTAIN". After executing it, the Object is getting deleted but the Bulb like symbol for Obj(Object Dependency) in Transaction CEWB is not disabling. Please help me in this.
Thanks
VinaySolved
-
Update of object dependency allocation in Routings
Dear Friends,
I am having the following problem: in several Routings of different configurable materials I need to change the object dependency allocation for one operation. In detail, let's say that operation 0100 has 3 object dependencies allocated:
Operation 0100
Object dependencies:
OBJ_DEP_01
OBJ_DEP_02
OBJ_DEP_03
what I need is to change the second one of them, from OBJ_DEP_02 to OBJ_DEP_99
I can successfully read the object dependencies allocation with the function 'CUKD_API_ALLOCATIONS_READ', for each routing.
What I am missing is a way to change that allocation. I found the function 'CUKD_API_ALLOCATIONS_MAINTAIN', but I am not able to make it working.
Do you have any help or suggestion?
Thank you very much indeed for any hints on this subject.
Bye,
FlavioOps, it was my fault in calling the function 'CUKD_API_ALLOCATIONS_MAINTAIN', that works perfectly now.
Thread can be closed.
Thanks and bye,
Flavio
Maybe you are looking for
-
Issues with Personal Hotspot on iPhone 5
I have an iPhone 5 with the latest iOS update 7.0.4. When I enable the personal hotspot on the iPhone it does not show up in available connections on my PC. I have searched around the web and have seen many postings about this issue and have tried ma
-
I've been using flash since v.1 and I don't know why I haven't found this so annoying until now, maybe it's because now I'm a teacher and I see the flaw for what it is through my students. Why is it that you can't change the size of the swatches in t
-
JMS Adapter eg :Queue2Topic not working in SOA Suite
Hi, I have installed a SOA suite(prev) with basic mode installation and deployed the tutorial 123 .Queue2Topic. deployed successfully. i am putting the message to the jms/demoqueue with following code successfully.(because no excpetion). env.put(Cont
-
Function Module to return WSDL URL
Hi, Is there an ABAP Function Module that returns the URL of the WSDL when passed the name of a BAPI/ RFC? Thanks, Tristan
-
Transfer consignment plant to plant 2 steps
Dear Experts, I have the scenario where i need to transfer the consignment stocks from one plant to another in 2 steps. because the plants are far away and every plant have his own storekeeper with his own authorization. i dont want to use 301 becaus