Creation of sub-types
Hi Guy's,
Please explain me how to create the Sub-types in ABAP-HR.
Thanks,
Sai.
Hello Sai.
Transaction SWO1 which is nothing but Business Object Builder.
Enter the "Object/Interface Type" and then click on "Subtype".
Hope that's usefull.
Good Luck & Regards.
Harsh Dave
Similar Messages
-
Sequence creation for Super Type and Sub Type (Parent-Child)
Data Model is structured with Super Type-Sub Type Concept.When data is being inserted in the Super Type table, I will be using a sequence Supertype.NEXTVAL as Primary Key.Now the same sequence will be the Primary Key for Sub Type table also. Can I use Supertype.CURRVAL during insertion in Sub Type table?
If Yes, I have lot of records being created in Super Type table within a second. So before data is being inserted in Subtype table there may be chance of a row being inserted in Super Type table and if I use Supertype.CURRVAL it may lead to wrong data.
How can I make sure that Supertype Primary Key is being inserted as Primary key in sub type table?What happens when you try it? Something like:
session1> select t_seq.nextval from dual;
NEXTVAL
40061
session2> select t_seq.nextval from user_objects;
NEXTVAL
40062
40063
40064
<snip>
40270
40271
40272
211 rows selected.
session1> select t_seq.currval from dual;
CURRVAL
40061john -
Business Rules on super-sub types
We are currently in the process of modeling business rules. We have some super-subtype entities in our datamodel. We also have business rules on the super-type as wella as the sub-types.
What name for these BR's should we use, more specific which entity short-name: the entity-short-name of the type (super or sub) the rule applies to OR the entity-short-name of the (technical) to be implemented table?
How will Headstart deal with these names when transforming the BR's to technical BR's and how will the CAPI-creation utility deal with this?
GeertThe business rules transformer should correctly handle the super/sub type rules. It assumes that your super/sub
type entities are mapped to a single table with a discriminator column. You can name the rules using the correct
super/sub entity name and the transformer will determine the table each is mapped to (all the same table). The
transformer will add a condition to the Trigger When clause for subtype rules so that they are only triggered on rows
where the subtype is of the correct type.
Regards,
Lauri -
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. -
Reg: Creation of Table Types
Hi All,
I have a small question regaridng the creation of Table type.
Let us suppose I am creating Table type for a custom table zsample which is having 5 fields. I am generally creating a structure similar to custom table and using that structure as line type for the table type. Let us suppose if there are any changes in the custom table like change in the order of fields or if new fields are added the table type will give dump.
My question is If I use the custom table itself as a line type, will there be any effect in the performance or some thing or I can go ahead and use it..
Thanks,
RaveeWhat dump are you expecting ???
It is idea behind the creation with reference to get structures and tables which always look like
the tables they refer to.
I can not see a possibilty for a dump as long as you create only an internal table.
A dump could appear, if the internal table is later used to update another db-table. But there it should be clear that the structure of an internal should be created with reference to the tables which they change.
Siegfried -
hi all.
sorry i just want some information in creation of data type which i svery ease to solve.
and it is i had seen one data type which was creatd by my colleague and its haveing occurance 1..unbounded for some and 1..10 for remaining elements and the other thing is in details she has given MAXLENGHT.
i just want to know y she has given these things under data type.
waiting for any great answer.
bye.
regards.
seeta ram.Hi,
All data types are described by XML Schema. All required information about XML Schemas you will get from:
<a href="http://W3C XML Schema">http://www.w3.org/XML/Schema</a>
You can create data types either directly in IR using data type editor or import from external definitions.
Occurence, maxlength are properties of tags, attributes etc. and are defined by XML Schema.
Regards,
Jakub -
Hi Please guide me about creation of document types for PR/PO.
If i want to create document type for the capital item as say ZCAP.
What are the item categories I should select. Also how does the item category affects the document type and further creation of PO/PR?
What is the significance of linkage PR.?
Also for creating the new document type we use the NB document type , why? Why do we create new one, cant we use the NB instead of creating new one?
If any body can explain with example that would be great.
Warm Regards,
Bhasker VB.<b>Hi Please guide me about creation of document types for PR/PO.</b>
U can create new non standred document type for PR and Po
<b>If i want to create document type for the capital item as say ZCAP.
What are the item categories I should select. Also how does the item category affects the document type and further creation of PO/PR?</b>
U can create Doc type ZCAP bu coping std Doc type NB or u can creat as your own
Item categories help system to ask for a relevent data as if u give item category L which is for subcontracting then it will ask for supplied components
If u say U the it will change venter in to suppling plant and also change relevent things for stock transfer
<b>Also for creating the new document type we use the NB document type , why? Why do we create new one, cant we use the NB instead of creating new one?</b>
We can use NB document type for creating new one but ist not compalsory u can directely create your own. We copy so that, all the releating item catagories can be copied.
we create new one if u want different number range for asset proc and others.
or if u want to have subcontracting po diffrent form others. etc.
but there is no relation between Account assig cat and document type.
hope things r clear
reward accordingly -
How to Add Values in INVOICE SUB-TYPE field at the Invoice Header Forms
Hello,
Does any body knows how could I add/modify values in the INVOICE SUB-TYPE field at the Invoice Header Forms?. This values are related to the Globalization, in this case for the Chilean Localizations.
Thanks,
Alejandro R.It gives any error or just does nothing?
Have you tried making another simple form with just one block and one or two items?
You can do this type of testing in these conditions.
Which version of forms are you using? -
Handling pop up of sub type HR_MAINTAIN_MASTERDATA function module
Hi All,
I am using HR_MAINTAIN_MASTERDATA for creating employee it's working fine but i am not able to handle pop up for sub type.
For example sub type for Address it gives me pop up with values 1 Permamant address 2 Office address etc.
Anybody know how to handle such pop up in function module. How to provide values to sub type.
Thanks in advance.Hi,
<li>Instead of using HR_MAINTAIN_MASTERDATA function module, you can use HR_INFOTYPE_OPERATION, because HR_MAINTAIN_MASTERDATA is used inside HR_INFOTYPE_OPERATION.
<li>Check the sample program .
REPORT ztest_notepad .
DATA:p0006 TYPE STANDARD TABLE OF p0006 WITH HEADER LINE.
DATA:return LIKE bapireturn1.
p0006-pernr = '00001234'.
p0006-subty = '2'.
p0006-endda = '99991231'.
p0006-begda = sy-datum.
p0006-anssa = '2'.
p0006-name2 = 'xyz'.
p0006-stras = 'Street 64'.
p0006-ort01 = 'US'.
p0006-pstlz = '560634'.
APPEND p0006.
CLEAR p0006.
LOOP AT p0006.
CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
EXPORTING
number = p0006-pernr.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '0006'
number = p0006-pernr
subtype = p0006-subty
validityend = p0006-endda
validitybegin = p0006-begda
record = p0006
operation = 'INS'
tclas = 'A'
IMPORTING
return = return.
IF return IS INITIAL.
WRITE 'Successfully records created'.
ENDIF.
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
EXPORTING
number = p0006-pernr.
ENDLOOP.
Thanks
Venkat.O -
Handling pop up of sub type HR_MAINTAIN_MASTERDATA
Hi All,
I am using HR_MAINTAIN_MASTERDATA for creating employee it's working fine but i am not able to handle pop up for sub type.
For example sub type for Address it gives me pop up with values 1 Permamant address 2 Office address.
Anybody know how to handle such pop up in function module. How to provide values to sub type.
Thanks in advance.HI R P,
The field SUBTY is there as an export parameter for function module you mentioned.
Please pass the value for that field when you call the FM in your program.
Hope this helps
Ajay -
How to create the sub type field in hr abap infotype
hi ,
how to create the sub type field in hr abap infotype.
regards,
venkat.Try like this also
creating of infotype please follow these steps ...
Step 1: Create Infotypes
i. Goto Transaction PM01 To create Infotypes:
ii. Enter the Infotype Number and say create all.
iii. The following message would display:
i. PSnnnn Does not exist. How do you want to proceed?
iv. Click
v. A maintain Structure screen appears.
Fill in the short text description and the PS structure of the Infotype.
Since the fields Personnel No, Employee Begin Date, End Date, Sequential Number,Date of Last Change, Name of user who changed the object are available in the PAKEY and PSHD1 structure, define the PSnnnn structure with only the fields you required.
vi. Once the PS Structure is created, save and activate the structure.
vii. In the initial screen of PM01, now click on .
Create a new entry for the infotype.
Fill in the values as mentioned below and save.
Infotype Characteristics:
Infotype Name of the infotype_ Short Text: __Short Description________
*General Attributes :
Time constraint = 1
Check Subtype Obligatory
Display and Selection:
Select w/ start = 3 Valid record for entered data
Select w/ end = 5 Records with valid dates within the period entered
Select w/o date = 6 Read all records
Screen header = 02 Header ID
Create w/o end = 1 Default value is 31.12.9999
Technical Data:
Single screen = 2000
List screen = 3000; List Entry Checked.
viii. In the initial screen of PM01, now click on .
Choose the infotype entry in the list.
Fill in the values as mentioned below and save.
Technical Attributes:
In tab section,
The following attribute values are given:
Applicant DB Tab = PAnnnn Infotype Name
Subtype field = SUBTY
Subtype table = T591A
Subty.text tab. = T591S
Time cnstr.tab. = T591A
Prim. /Sec. = I Infotype
Period/key date = I Interval
and .
ix. Infotype Screen Modification:
Edit Screen 2000 from PM01 for the Infotype.
ABAP Editor for the Infotype Program MPnnnn00 will be displayed.
Click . Flow Logic will be displayed. There string coding of your own logic.
Regards
Pavan -
How to define a Sub Type in IT0717
Hi Experts,
Currently working on Benefit point account.
could some one tell me how to define a Sub Type for IT717.
how do i configure.
Appreciate your response.
Regards
RajHi,
I have created the subtype in the table you specified.
But unable to see the created subtypes for IT552 in PA30.
Appreciate your further inputs.
Regards
Rajesh.N.S -
Add a foriegn key constraint to to a sub type on an object table
Hi,
I'm trying to set up a new table of an object type in our DB at work and on it I want to create a foreign key constraint on one of the attributes of one of the sub types
The table is called documents and is a table of document_ot
Definition:
create or replace
TYPE document_ot AS OBJECT (
-- ATTRIBUTES
created_date DATE,
created_by VARCHAR2( 32 ),
doc_id NUMBER,
-- CONSTRUCTORS
) NOT INSTANTIABLE NOT FINAL;
This type is extended by the type funding_certificates_ot
create or replace
TYPE funding_certificate_ot UNDER document_ot (
-- ATTRIBUTES
fc_prefix VARCHAR2( 2 ),
fc_sequence NUMBER,
fc_suffix VARCHAR2( 1 ),
fc_pr_id NUMBER,
-- CONSTRUCTORS
-- METHODS
) NOT FINAL;
I want to add a constraint to the to documents table that says that the funding_certificate_ot column fc_pr_id references pr_id in the table payruns.
I've managed to create an index on the fc_pr_id column using:
CREATE INDEX fc_pr_idx
ON documents d (treat (value(d) as funding_certificate_ot).fc_pr_id);
The code I thought I'd use for the foreign key constraint would be:
ALTER TABLE documents d
ADD CONSTRAINT doc_pr_fk FOREIGN KEY
treat (value(d) as funding_certificate_ot).fc_pr_id
REFERENCES payruns
(pr_id)
ENABLE;
But that doesn't work - would someone be able to give me the correct syntax please?
Many thanksHi,
I'm trying to set up a new table of an object type in our DB at work and on it I want to create a foreign key constraint on one of the attributes of one of the sub types
The table is called documents and is a table of document_ot
Definition:
create or replace
TYPE document_ot AS OBJECT (
-- ATTRIBUTES
created_date DATE,
created_by VARCHAR2( 32 ),
doc_id NUMBER,
-- CONSTRUCTORS
) NOT INSTANTIABLE NOT FINAL;
This type is extended by the type funding_certificates_ot
create or replace
TYPE funding_certificate_ot UNDER document_ot (
-- ATTRIBUTES
fc_prefix VARCHAR2( 2 ),
fc_sequence NUMBER,
fc_suffix VARCHAR2( 1 ),
fc_pr_id NUMBER,
-- CONSTRUCTORS
-- METHODS
) NOT FINAL;
I want to add a constraint to the to documents table that says that the funding_certificate_ot column fc_pr_id references pr_id in the table payruns.
I've managed to create an index on the fc_pr_id column using:
CREATE INDEX fc_pr_idx
ON documents d (treat (value(d) as funding_certificate_ot).fc_pr_id);
The code I thought I'd use for the foreign key constraint would be:
ALTER TABLE documents d
ADD CONSTRAINT doc_pr_fk FOREIGN KEY
treat (value(d) as funding_certificate_ot).fc_pr_id
REFERENCES payruns
(pr_id)
ENABLE;
But that doesn't work - would someone be able to give me the correct syntax please?
Many thanks -
Hi Experts,
Iam new to HR Abap programming environment. My requirement is : In 15 infotype, there is a LTA sub type ( leave travel allowance ). whenever user enters that LTA amount, it must be validated with Exemption Amount ( which exists in Infotype 582 in subtype LTA ). also, LTA amount should not exceed more than exemption amount.
Please give me some suggestions of how to approach in this regard.
Your suggestions are appreciated.
thanking you in advance
regards
Murali Krishna THi ,
We can achieve this by using Dynamic actions. When you save the data , this dynamic action will be triggered. In that you can configured a form .In that form you can write a code to validate LTA amount.
Dynamic actions can be configured in the table T588Z.GO to maintenance view of T588Z and in that maintain entry for Info type 0015 and give a form name and Program name in which that form is written. Then write a program and write a form in that. Program type can be subroutine pool. In that form you write a code for your requirement. You can find more document on dynamic actions in SDN.
Hope this information will help you.
Thanks and Regards,
Narendra.Somarouthu
Maybe you are looking for
-
How do I remove space after paragraph?
Does Robohelp have the "Remove Space after paragraph" button for reducing the space between lines, like the one in Word?
-
Mount volume script doesn't work after upgrading to Yoesmite
I just upgrade my Mac OS to Yosemite and the boot up mount script doesn't work again. try mount volume "afp://admin:[email protected]/Multimedia/Music" mount volume "afp://admin:[email protected]/workspace" end try Should I modify the mount script an
-
I bought a Mini G4 2 years ago through my educational institution (employer). Didn't get AppleCare because it added 50 pct to the price of the machine, and my old silver Powerbook was tough as nails so I thought "Apple makes good hardware" -- silly m
-
Huge RAM consumption on LR 2.7
Hi I'm using Lightroom 2.7 with Windows Vista Ultimate 64 bit. When I open Lightroom, the RAM usage ramps up immediately, so that within minutes I'm using 7.6gb of my available RAM, without having done anything else. System monitor tells me LR is onl
-
Wlst script to change values for Logging.
Hi, i am trying to write a wlst script to change attributes for the following.( i am new to wlst scripting) For all servers in a domain, Logging --> General --> Check Limit number of retained files --> Files to retain to different number. --> Log fil