Programmatically create a relationship between two positions in HR

Hi,
I have a requirement to create relationships in HRP1001 between two given positions with a start and end date.
I need to write an upload program to do this but want to avoid Batch Input if possible.
Are there any relevant function modules that can do what transaction PP01 does?
Many Thanks
David

Hi,
Try using this code
LOOP AT T_MAINTAIN INTO WA_MAINTAIN.
    WA_MAINTAIN-FCODE = 'INSE'.
    WA_MAINTAIN-PLVAR = '01'.
    WA_MAINTAIN-ISTAT = '1'.
*Relate account to project
    IF WA_MAINTAIN-OTYPE = 'O' AND WA_MAINTAIN-SCLAS = 'O'.
      WA_MAINTAIN-RSIGN = 'B'.
      WA_MAINTAIN-RELAT = '002'.
*Relate position to project
    ELSEIF WA_MAINTAIN-OTYPE = 'O' AND WA_MAINTAIN-SCLAS = 'S'.
      WA_MAINTAIN-RSIGN = 'B'.
      WA_MAINTAIN-RELAT = '003'.
*Relate job to position
    ELSEIF WA_MAINTAIN-OTYPE = 'S' AND WA_MAINTAIN-SCLAS = 'C'.
      WA_MAINTAIN-RSIGN = 'B'.
      WA_MAINTAIN-RELAT = '007'.
*Relate employee to position
    ELSEIF WA_MAINTAIN-OTYPE = 'S' AND WA_MAINTAIN-SCLAS = 'P'.
      WA_MAINTAIN-RSIGN = 'A'.
      WA_MAINTAIN-RELAT = '008'.
    ENDIF.
*Relate position to position
    ELSEIF WA_MAINTAIN-OTYPE = 'S' AND WA_MAINTAIN-SCLAS = 'S'.
      WA_MAINTAIN-RSIGN = 'A'.
      WA_MAINTAIN-RELAT = '002'.
    ENDIF.
    WA_MAINTAIN-ENDDA = '99991231'.
*FM to create relationship
    CALL FUNCTION 'RH_RELATION_MAINTAIN'
      EXPORTING
        ACT_FCODE           = WA_MAINTAIN-FCODE
        ACT_PLVAR           = WA_MAINTAIN-PLVAR
        ACT_OTYPE           = WA_MAINTAIN-OTYPE
        ACT_OBJID           = WA_MAINTAIN-OBJID
        ACT_ISTAT           = WA_MAINTAIN-ISTAT
        ACT_RSIGN           = WA_MAINTAIN-RSIGN
        ACT_RELAT           = WA_MAINTAIN-RELAT
        ACT_SCLAS           = WA_MAINTAIN-SCLAS
        ACT_SOBID           = WA_MAINTAIN-SOBID
        ACT_BEGDA           = WA_MAINTAIN-BEGDA
        ACT_ENDDA           = WA_MAINTAIN-ENDDA
        ACT_PROZT           = WA_MAINTAIN-PROZT
      EXCEPTIONS
        MAINTAINANCE_FAILED = 1
        OTHERS              = 2.
    IF SY-SUBRC <> 0.
     WRITE : WA_INPUT-OBJID.
     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
ENDLOOP.

Similar Messages

  • Create AlE Relationship between two company code F210 to FN21 (UHP To UPI)

    Hi,
    I want to know how to create ALE realtion ship between two company code ( F210 to FN21(Server name UHP to UPI )  and how to process it?
    Please reply ASAP.
    Regards,
    Achin

    Hi Sathish,
    Thanks for reply!..
    But My question I want to Add ALE relationship between two company code F210 to FN21 (UHP(Production server) To UPI(Third Party System)).
    Regards!
    Achin

  • Creating a relationship between two tables  through configuration manager

    I've just created two tables in the underlying db, each with a primary key and established a primary key - foreign key relationship. I've also created a relationship through stellent and it shows up under the 'Relations' Tab.
    However, when I go to Information Fields > Field Info > Click on my Field > 'Edit' > Enable Option List and Configure > Use the view of one of the tables and click on Dependant Field , I don't see any Relationships defined. What could I have done wrong here?
    Thanks.

    ok...solved...followed metalink note 445363.1 for clarification on the right approach to creating Dependant Choice Lists (DCL).

  • Create a relationship between two existing tables

    When I create a new table the wizard exposes the ability to add a foreign key column. However when editing an existing table the only option I seem to have is to create a lookup table, which is a new table that is autogenerated. I find it hard to believe that it's impossible to create and manage relationships in APEX...but I've unable to find the access point if there is one.

    Hello,
    I'm not sure what version of APEX you are using as you don't say, but in my 2.2.0.00.32 installation, when I select a table using the Object Browser, select Constraints from the choices running along the top of the page, then click the Create button/link, the Foreign Key option is available in the Constraint Type drop-down list.
    Hope that helps a bit,
    Mark

  • How to create relationship between two records using MDM Java APIs

    Hi,
    I am trying to create relationship between two records using Java Apis. Please guide me in doing this.
    Regards,
    Niraj

    Hi Niraj,
    There is ModifyRelationshipsCommand:
    http://help.sap.com/javadocs/MDM/SP06/com/sap/mdm/data/commands/ModifyRelationshipsCommand.html
    Retrieve Relationship command:
    http://help.sap.com/javadocs/MDM/current/com/sap/mdm/schema/commands/GetRelationshipListCommand.html
    Also, please refer similar thread, MDM Java API and relationships.
    Hope it helps..
    Regards,
    Mandeep Saini

  • Create view link between two view objects (from programmatic data source)

    Hi Experts,
    Can we create a link between two view objects (they are created from programmatic datasource ; not from either entity or sql query). If yes how to create the link; ( i mean the like attributes?)
    I would also like to drag and drop that in my page so that i can see as top master form and the below child table. Assume in my program i will be only have one master object and many child objects.
    Any hits or idea pls.
    -t

    Easiest way to do this is to add additional transient attributes to your master view object, and then include those additional transient attributes in the list of source attributes for your view link. This way, you can get BC4J to automatically refer to their values with no additional code on your part.

  • How to create relationShip between two resources??

    Hi,
    Is there any manual process on workbench to create relationShip between two resources like repositoryClient.createRelationship() API does.
    Regards
    Sunil

    Hi Niraj,
    There is ModifyRelationshipsCommand:
    http://help.sap.com/javadocs/MDM/SP06/com/sap/mdm/data/commands/ModifyRelationshipsCommand.html
    Retrieve Relationship command:
    http://help.sap.com/javadocs/MDM/current/com/sap/mdm/schema/commands/GetRelationshipListCommand.html
    Also, please refer similar thread, MDM Java API and relationships.
    Hope it helps..
    Regards,
    Mandeep Saini

  • Additional data on relationship between two objects

    Hi
    We have a requirement to capture additional data on a relationship between two objects.  The data to be captured are custom fields that are unique to the relationship between the objects and not specific to either of the objects.
    We created a new object type and related it to the position (S)and the job (C) object.  In the customising (Personnel Management/Personnel Development/Basic Settings/Maintain Relationships there is an option to set up Additional Data.  There are however several restrictions (e.g. the substructure has to be in T77AD).  When you set up an existing substructure (e.g. PAD22) and screen (e.g. 3000), it works really well, however we have not been able to get this to read our own substructure and screen (since there is no customer include on HRP1001 and the 'Additional data' button seems to go to MP100100 to find the screen).
    My question is two fold:
    a) Is this an allowed customisation (e.g. can we create our own substructure, screen and Query string)? And if so, how does the data get into T77AD (since SAP recommends that data should not be added to this table)? and
    b) Is there any documentation on this (thus far I have only received info on how to enhance infotypes which I don't think is relevant???)?
    If this can not be maintained is there any other suggestions on how to deal with this scenario?
    Any assistance will be appreciated.
    Regards
    Liezl

    Hi everyone
    Thanks for everyone who tried to assist us with this.  I am happy to report that our in-house guru's have found the answer.  So, for anyone who is interested:
    In programme MP100100 you have a screen 6000 which is a customer enhancements screen.  We set up two in-house function modules for the PBO and PAI with its own screen and added an append structure to PAD31 to add the fields required.  In the configuration, we then specified PAD31 as the substructure with screen 6000 and then also specified our own PBO and PAI function modules.  The parameters required for screen 6000 is set up within our own customer screens.
    Hope this will be helpful to someone - it certainly seemed to open up some doors for us!
    Regards
    Liezl

  • Creating a relationship between one table and the PK in another

    Sorry the subject of this message is a bit vague. I'm not sure how to describe this problem in one sentence.
    So here's the issue: I've just created a new block on my form based on table2. Table2 contains t1_id which is the FK link to Table1.
    What I want is when one of the fields in Table2's block is changed and inserted, the t1_id is inserted in the applicable row. Essentially, I need :table2.t1_id to have the 'Copy From Item' property set at :table1.id
    I cannot seem to see where in designer this option is. I asked a friend and he said what I need to do is 'create a relationship between the two values in designer'. Huh? In the Table Definitions the FK is set for the two, so I'm not sure how to do this.
    Another problem, which I'm believing will be solved when this is, is that when the form loads, this new block, table2, is not automatically populated with the applicable values from the table.
    Thanks for any help. It's greatly appreciated!

    Do you mean that you want to create a Master-Detail Form using Designer?
    If yes, you need to define the entity usage from the Function Hierarchy Diagrammer, then attribute usage definition. Generate the module using Application Design Transformer. You need to define the Context so that master table's PK will be carried over to the detail table.

  • How to create the relationship between ESSBASE 11 and DM in OBIEE11

    Hi Experts,
    I have one requirement that there is one property table named 'Store Master' in DW,and it contains a lot of attribute, such as Open Date, Close Date, IS 24 Hour etc.
    But another data source is essbase and based on this source, I create all reports.
    In ESSBASE, it has one dimension and hierarchy Location, and it has four level, Country(L1),Region (L2),Province(L3),Store(L4)
    So I want to know how to create the relationship between Location (ESSBASE) and Store Master (DM).
    I try to create one relationship in physical layer between Gen4,Location and Store, then drag the open date and close date into Location Dimension in BMM,then Presentation Layer.
    When I drag column 'Open Date' ,'Gen4,Location ' and 'Sales' into reports, it will generate the following error message:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 14020] None of the fact tables are compatible with the query request Dim Region.Store Open Date. (HY000)
    However, when I remove the column 'Open Date'. it will be ok.
    So what I missing the steps? Please help me. Thanks.

    >
    '2. Now, pull the 'Store' column from relational DB onto the Gen5, Location column from Essbase. This action now creates, two logical sources for your 'Store' column.'
    If the length from different data source is not same,such as 1001(DM),L_1001(ESSBASE), can I drag the 'Store' column from relational DB onto the Gen5, Location column from Essbase?
    I think it does not work.Right?Hi,
    I am not sure if you are talking about the length(as in varchar(128)) of the member value being different in different sources, or the member itself is different in both the sources.
    I am still assuming, that you are referring to the members not same in both the sources.If it is, the whole concept of federation is based on conforming dimensions. So, it needs that the same dimension information is present in both the sources and then only, you know we can analyze the numbers based on this dimension. So, either the dimension being different in both sources, or the members not present in both the dimensions might lead to incorrect numbers.
    So I select Store Attributes in relation DB and Location in ESSBASE in physical layer, then create the physical join, such as right("Hour Sales"."H_Sales".""."H_Sales"."Gen6,Location",4) = "Authorization".""."EDW"."T_EDW_MDM_STORE"."US_CODE", then drag the OPEN_DATE and CLOSE_DATE in relation DB to Location in ESSBASE in BMM,finially drag them into presentation layer.We create physical layer relationships, to send over the same relation to the underlying database during querying. So, creating a physical relationship between essbase cube and relation database would not help here.
    When you set up this federation, BI Server sends individual queries to each source and maps the conforming dimension members internally.
    Hope I was clear, and this helps.
    Thank you,
    Dhar

  • How to create the relationship between ESSBASE 11 and DM  in OBIEE 11G?

    Hi Experts,
    I have one requirement that there is one property table named 'Store Master' in DW,and it contains a lot of attribute, such as Open Date, Close Date, IS 24 Hour etc.
    But another data source is essbase and based on this source, I create all reports.
    In ESSBASE, it has one dimension and hierarchy Location, and it has four level, Country(L1),Region (L2),Province(L3),Store(L4)
    So I want to know how to create the relationship between Location (ESSBASE) and Store Master (DM).
    I try to create one relationship in physical layer between Gen4,Location and Store, then drag the open date and close date into Location Dimension in BMM,then Presentation Layer.
    When I drag column 'Open Date' ,'Gen4,Location ' and 'Sales' into reports, it will generate the following error message:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 14020] None of the fact tables are compatible with the query request Dim Region.Store Open Date. (HY000)
    However, when I remove the column 'Open Date'. it will be ok
    So what I missing the steps? Please help me. Thanks.

    >
    '2. Now, pull the 'Store' column from relational DB onto the Gen5, Location column from Essbase. This action now creates, two logical sources for your 'Store' column.'
    If the length from different data source is not same,such as 1001(DM),L_1001(ESSBASE), can I drag the 'Store' column from relational DB onto the Gen5, Location column from Essbase?
    I think it does not work.Right?Hi,
    I am not sure if you are talking about the length(as in varchar(128)) of the member value being different in different sources, or the member itself is different in both the sources.
    I am still assuming, that you are referring to the members not same in both the sources.If it is, the whole concept of federation is based on conforming dimensions. So, it needs that the same dimension information is present in both the sources and then only, you know we can analyze the numbers based on this dimension. So, either the dimension being different in both sources, or the members not present in both the dimensions might lead to incorrect numbers.
    So I select Store Attributes in relation DB and Location in ESSBASE in physical layer, then create the physical join, such as right("Hour Sales"."H_Sales".""."H_Sales"."Gen6,Location",4) = "Authorization".""."EDW"."T_EDW_MDM_STORE"."US_CODE", then drag the OPEN_DATE and CLOSE_DATE in relation DB to Location in ESSBASE in BMM,finially drag them into presentation layer.We create physical layer relationships, to send over the same relation to the underlying database during querying. So, creating a physical relationship between essbase cube and relation database would not help here.
    When you set up this federation, BI Server sends individual queries to each source and maps the conforming dimension members internally.
    Hope I was clear, and this helps.
    Thank you,
    Dhar

  • XOR arc among  various relationships between two entities

    I have a scenarious where subtype is implemented as XOR arc among 1:1 relationships between two entities.Not familiar how to make the arc of exclusive or ..in SQL Modeler.
    Grateful for any direction.
    Kind Regards
    Ivan,

    Hi Ivan,
    here are steps for logical model (they are similar for relational model):
    1) select two (or more) relationships and entity they are connected to
    2) Click on "New Arc" icon to create arc
    Philip

  • How to create a View between two Ztables?

    Hi experts,
    I have two ztables TableA and TableB both has one common field.
    Now Which type of view (Database,Maintanance,Projection or Help) I should create? If so what are the steps I should follow.
    What I suppose to do in Table/Join Condition tab ,View Flds ,Selection Conditions and Maint stsus tab.
    Reply with the detailed steps.
    Thanks in Advance,
    Dharani

    Hi,
    selection of view is depends on the type of requirement you have.
    1. To create the view go to Se11
    2. select the type of the view you required.
    3.Enter the name of the two z table in the tables and click on the relation button  so that it will automatically create the relationship between 2 table.
    4. add the addition condition if required in the join condition.
    5. In view field select the number of the field required to display in the view from both the table.
    6. specify the selection criteria in the to select the values.
    7. In maintenance tab select the appropriate option as per you requirement.
    8. save and activate the view.

  • Relationship between two facts

    I have 2 fact tables (Encounter and Visit) which have an optional 1 to many relationship.  For a query the users are trying to run, they are using DepartmentDim, which is related to both facts, and AppointmentStatusDim, which is related ONLY to VisitFact.
     They want to see a count of encounters by department and appointment status.  The problem is when they pull in the count from the Encounter measure group, it is showing the same count for all of the values in each row.  
    How do I need to create the relationship between the two fact tables so that I can use dimensions that are related to only one fact table but pull in a measure from the other fact?
    Any help is appreciated.
    Thanks,
    Andy

    Sounds like you need a bridge table to complete the M2M relationship...
    FactVisit
      DepartmentKey
      AppointmentStatusKey
      EncounterGroupKey
    FactEncounter
      DepartmentKey
      EncounterGroupKey
    BridgeVisitEncounter
      EncounterGroupKey
    DimAppointmentStatus <-- FactVisit --> BridgeVisitEncounter <-- FactEncounter 
    This will allow you to slice measures in the FactEncounter measure group by attributes in the DimAppointmentStatus dimension...
    BI Developer and lover of data (Blog |
    Twitter)

  • How to get relationship between two  views in the  reports

    How to get relationship between two  views in the  reports, I am doing a deletion program , it is fully relates to views , how to get relationship between them in the reports

    Hi,
    Please explain your question in detail...what do you want to read ?
    If you want to know about the navigation links between the views then you can use APIs  like
    wdComponentAPI.getComponentInfo().findInWindows("windowName").getViewUsageByID("Name").getNavigationLinks();
    Iterate through the navigationLinkInfo from above collection and can read the other properties .
    I haven't tried the above , but it should work !!!
    Regards,Anilkumar

Maybe you are looking for

  • Web pages not fully loading in Safari OS X..?

    I just recently bought my first MacBook. It is running OS X 10.8.4 and I've found that it sometimes does not load some webpages or just will partially load them. I've had it for about a week and its happened on 2 different occasions already. If the w

  • Video out works fine on my 3GS phone but not on my iphone 4. What could be the issue?

    I have a 3GS phone and Apple component video cable that I have connected to HDMI capable TV. Everything works fine on 3GS. I try to do the same with my iphone 4 (hoping for better HD picture), and nothing happens. I am using iOS 4.2. on the 3GS and 4

  • Oracle 11.1.0.7...is it compatible with Windows XP?

    Hi All, I have Oracle 11.1.0.6 installed on my machine and i want to use a few features of Oracle 11.1.0.7 version ..I am not sure if at all it is compatible with WIndows XP and if so then how do i go about upgrading the version..? Can somebody pleas

  • IMAP/SMTP outg-mail not delevered but same settings in 10.5 Mail no problem

    Hello, Ik have a rather strange problem: I have a exchange 2003 server and i have set my iPhone to use IMAP and SMTP (with authentication). When i use the settings on my iPhone the outgoing mails don't arrive (only when i send emails to @gmail.com ad

  • Working with external data

    Hi, does anybody knows if there's a way to include external data within the extension without modifying the code? Basically I need to deploy my extension using different settings (depending on user credentails). It would be nice if were possible to i