BTItemPriceAgreements - entity creation as relation to BTOrderItemAll

Hi,
I have to create items in Sales contracts through BOL logic. In the Component, I created event for this purpose. I am able to create items  by creating entities BTOrderITemAll. For the item, I need to create price agreements. When I am trying to create BTItemPriceAgreements -  system is throwing message - not allowing creation as related entity. Appreciate any inputs on how to create BTItemPriceAgreements and link to Item.
With regards,
Ravi

Hi,
       I did a similar thing, in the approach that i followed i had to do the code for saving in the BTIL class (CL_CRM_METHODS_BTIL), SAVE_ORDERS method, by creating implicit enhancement at the end, there i called my Z-Function module to save in update task, so that whole transaction gets saved at a go or nothing is saved.
Though just display a Z-table on UI as entirely different story, but this wiki link can give some pointers.
[ZTable in Asign Block|http://wiki.sdn.sap.com/wiki/display/CRM/Howtodisplayaz-tableinanassignmentblock]
Let me know if it helped.
Thanks,
Rohit
Edited by: Rohit Khetarpal on Nov 26, 2009 4:21 PM

Similar Messages

  • Dynamic domain-based entity creation and relation to base entity

    Hi everyone -
    My first post here...  I have a base entity (PROJECT) with an attribute called RecordType (a domain-based attribute).  Depending on the value of RecordType, the business wants to use that result set as input for another reference entity, and then
    relate them together in a possible {one|many}-to-many relationship.  For example:
    If RecordType = Strategy, then there is a need to create a separate entity called STRATEGY with the results of that filter.  The PROJECT entity and STRATEGY now need to be related together in a PROJECT_STRATEGY relationship table.
    There seem to be a couple of options, but none are elegant, and some simply don't work:
    Option #1 (doesn't work): I create the relationship table (PROJECT_STRATEGY) with a domain-based attribute of the PROJECT entity and a second domain-based attribute of the PROJECT entity (but called Strategy), and then try to create a business
    rule that limits the selection of the second domain-based attribute by RecordType.  MDS tells me I can't use a domain-based attribute in the business rule.
    Option #2: I create a SQL Server view called STRATEGY (which is a query based on the PROJECT entity - "where RecordType = 'Strategy') and use that as the reference set.  However, there is now no way to utilize that result set inside MDS. 
    In other words, I cannot use it as a domain-based attribute in the PROJECT_STRATEGY relationship table.  This means that an external system/UI would need to enable the relationship selection and write back into the PROJECT_STRATEGY relationship table
    inside MDS.
    Option #3: I create a STRATEGY entity that is auto-updated (via SQL Server job) every 10 minutes or so from the PROJECT entity (can't figure out how to load a reference entity based on a result set from an existing entity).  This allows me to create
    two domain-based attributes in the PROJECT_STRATEGY table (as described in Option #1), but is also what I call a non-standard customization, so I have been reticent to go this route.
    So, my questions/comments are:
    Is there any way to make Option #1 work (using business rules)?
    Option #2: Our development team doesn't want to create a separate system/UI to relate the list of PROJECTs to the list of STRATEGYs and then write them back into the PROJECT_STRATEGY relationship table.  This also limits the ability to maintain the
    PROJECT_STRATEGY table inside MDS since the STRATEGY domain-based attribute would become a free-form attribute at that point.  Is there any way to register a view as a reference entity?
    Should I explore Option #3?  Non-standard, non-native functionality introduced into MDS (any system, really) is something I wanted to avoid, but only from a purity and possible upgrade standpoint.  Should I get over this?
    I have looked at derived and explicit hierarchies for the PROJECT entity, but they do not seem to apply in the scenario above.
    Has anyone tried to create {one|many}-to-many relationships between a base entity and a subset of that base entity without resorting to non-standard customizations within MDS?  Is this as bizarre as it sounds?
    Any help would be greatly appreciated.
    Thanks.

    Hi,
    I f you are going with rtti approach.... for dynamic creation....you can assign the checktable field in field cat
    ls_fcat-ref_table  = space.
        ls_fcat-ref_table  = 'ZST_DISTRIBUTED_EFFORT'.
        ls_fcat-ref_field  = 'WORK_EFFORT'.
        ls_fcat-rollname   = 'DPR_TV_EFFORT'.
        ls_fcat-domname    = 'DPR_WORK'.
        ls_fcat-reptext    = ls_fcat-fieldname.
        ls_fcat-scrtext_l  = ls_fcat-fieldname.
        ls_fcat-scrtext_m  = ls_fcat-fieldname.
        ls_fcat-scrtext_s  = ls_fcat-fieldname.
        ls_fcat-emphasize  = me->gc_flag_enable.
        ls_fcat-col_pos    = lv_counter.
    ls_fcat-checktable = ' '.
        APPEND ls_fcat TO lt_fcat.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog           = lt_fcat
        IMPORTING
          ep_table                  = et_dynamic_table
        EXCEPTIONS
          generate_subpool_dir_full = 1
          OTHERS                    = 2.
      IF sy-subrc NE 0.
        es_message-id         = sy-msgid.
        es_message-type       = sy-msgty.
        es_message-number     = sy-msgno.
        es_message-message_v1 = sy-msgv1.
        es_message-message_v2 = sy-msgv2.
        es_message-message_v3 = sy-msgv3.
        es_message-message_v4 = sy-msgv4.
    Thanks,
    Shailaja Ainala.

  • Why are tables disappearing when Engineering Logical Entity Hierarchies to Relational

    Tables disappearing when Engineering Entity Hierarchies Logical to Relational
    We are using 4.0.3.  We have a model with imported from Designer with a number of Entity Hierarchies. 
    The model has a three of entity hierarchies (ORD, PLAN and STEP) each with a number of subtypes.  Single tables are built for each of the entity hierarchies and are called (ORD, PLAN and STEP).
    If I make a change within an entity hierarchy in the subtype (ORD_METRIC) and forward engineer the only ORD entity hierarchy as single table, the table ORD gets update but the tables STEP and PLAN disappears from the Relational table list.    They only remain if I select all three entity hierarchies when engineering to relational.
    Have I a missed selecting an option?

    Hi,
    in current implementation for entity hierarchies (only) - "engineering to" flag is used also as implementation flag for entity, i.e. if entity is not set to be engineered there will be no implementation as table for that entity in relational model. Attributes of such entity will be implemented in another entity engineered to relational model. If no one entity from hierarchy is engineered (no implementation) then existing corresponding table(s) will be removed.
    We'll change it in the future to be less confusing.
    Philip

  • View and Entity creation source code

    I would like to know which jars \ classes in JDeveloper are responsible for writing the XML that defines a view or an entity (The XML created by the "Create a new view" wizard). Thanks.

    The designtime class responsible for Entity creation is oracle.jbo.dt.objects.JboEntity and the class for View Objects is oracle.jbo.dt.objects.JboView. There is no documentation available for how the designtime apis work, so you are kind of on your own to do much with it.
    Ray

  • EXTERNAL PARAMETER ENTITY  CREATION

    Hi All
    I am creation the XML file using SAP XML DOM Library objects.
    Our requirement is to create the EXTERNAL PARAMETER ENTITY Declaration using DOCTYPE tag.
    For Example
    <!DOCTYPE descriptSol [
    <!ENTITY % references SYSTEM "P_899200_SD01_01.ref">;
    %references
    ]>
    We are using following method to create it:
    DATA:
    lo_doc_type                 TYPE REF TO if_ixml_document_type,
    lo_entity_dec               TYPE REF TO if_ixml_entity_decl,
              CALL METHOD go_document->create_document_type
                EXPORTING
                  name =  'descriptSol'
                RECEIVING
                  rval = lo_doc_type.
              CALL METHOD go_document->set_document_type
                EXPORTING
                  document_type = lo_doc_type.
              CALL METHOD lo_doc_type->create_ext_entity_decl
                EXPORTING
                  is_parameter_entity = 'X'
                  name                            = 'references'
                  notation                       = ''
                  public_id                      = ''
                  system_id                   = 'P_899200_SD01_01.ref'
                RECEIVING
                  rval                               = lo_entity_dec
              CALL METHOD lo_doc_type->append_child
                EXPORTING
                  new_child = lo_entity_dec
                RECEIVING
                  rval      = lw_rval.
    The Above code is working and creating following tag in the XML document:
    <!DOCTYPE descriptSol [
    <!ENTITY % references SYSTEM "P_899200_SD01_01.ref">;
    ]>;
    So hereu201D%referencesu201D at end of the declaration is missing.
    This type of entity is called as "EXTERNAL (PARSED) PARAMETER ENTITY Declaration".
    Give your suggestions that whether we are using right method to created External entity reference or not.
    Thanks in advance
    Sukhjinder Singh

    I have the same experience. After I correct the error in my dtd file, the message dissapears. Good luck.

  • Inspection lot creation logic related movement type

    Dear QM Guru,
    I'm newly for QM module
    I would like to know how config of movement type and lot origin under below config relate to inspection lot creation.
    Quality Management>Quality Inspection>Inspection for Goods Movements-->Movement Type/Update Control/Inspection Lot Origin
    i try to delete all record of customized movement type 949 that i think it copy from movement type 501 in this customizing then try to GR with this movement type, so system still generate inspection as normal.
    then i re-insert the movement back into this customizing again then i wonder that system automatic fill in lot origin for me and this field also gray that not changeable
    how system know the appropriate lot origin for this customized movement type?
    Please anyone explain to me.
    Thank in advance
    Konnapa

    Hi,
    Inspection lot origins are assigned to movement types in standart. The assignment is hardcoded and cannot be changed. In this customization step you can only see the origin assigned. When you copy movement types from standart the assigned inspection origin also gets copied, and you also cannot chenge this assignment.
    What you can do is to activate inspection for each movement type, or to customize selection of the inspection type within the inspection origin assigned.
    Regards.

  • Entity include with relative path in XML using JAXB

    Moving this from the Java Technologies for Web Services forum to this one.
    With the jwsdp jars I'm trying to use JAXB to load in several specified XML files. This works fine. The XML files are read in from a relative link "/templates/mainXML.xml" and the xml string read in and passed to the unmarshaller as a StreamSource:
    BufferedReader reader = new BufferedReader(new InputStreamReader(getClass().getResource(xmlPath_).openStream()));
    while ( (line = reader.readLine()) != null) {
    buff.append(line.trim()+"\n");
    String xml = buff.toString();
    u.unmarshall(new StreamSource(new StringReader(xml)))
    But my XML files are becoming rather large with some repitition across the files so I'd like to use the entity incude in the header of the XML to abstract some of the XML into addMe.xml e.g:
    <!DOCTYPE StrategyTemplate [
    <!ENTITY IncludeTimeComponent SYSTEM "file:///templates/addMe.xml">]>
    with &IncludeTimeComponent;
    But it gives this error:
    Caused by: java.io.FileNotFoundException: \templates\addMe.xml (The system cannot find the path specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
    at java.net.URL.openStream(URL.java:1007)
    at weblogic.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:836)
    at weblogic.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:767)
    at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(XMLDocumentFragmentScannerImpl.java:1095)
    at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1513)
    at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
    at weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
    at weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
    at weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
    at weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
    at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
    at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:152)
    at com.lb.cmte.oms.interpreter.jaxb.impl.runtime.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:140)
    ... 11 more
    It works fine if I put the file in the working directory or supply the full path e.g.
    <!DOCTYPE StrategyTemplate [
    <!ENTITY IncludeTimeComponent SYSTEM "file:///C:/dev/templates/addMe.xml">]>
    with &IncludeTimeComponent;
    I've tried using jwsdp2.0 jars rather than 1.4 I was using previously, but with the same result.
    But I don't want to do that, because I don't know where that might be. I'd like to be able to supply the xml file's path as it would be shown within a JAR as I do currently for the mainXML.xml files. Thanks in advance for any help!

    Oh, I see why. When XML talks about a "relative path" that means relative to the URL the XML was loaded from. But when the parser doesn't have such a URL -- for example in cases like yours where you are parsing from a String -- then it falls back to assuming the XML was loaded from the current working directory.
    This is almost never a good assumption, but what else can it do?
    Looking at your code, I don't understand why you are parsing from a String anyway. All of that code that reads from an input stream, ignoring the line endings and putting back new line endings, seems pointless to me. You should just marshal directly from getClass().getResource(xmlPath_) as far as I can see. Then your relative paths would work just fine.

  • Cf9 - flex - orm updating entity with a relation

    Hello,
    I'm trying to update a cf9 orm entity with a one-to-many relation defined as follow:
    Articles
    property name="ArticleID" column="ArticleID" type="numeric" ormtype="int" fieldtype="id" default="0" generator="identity" unsavedvalue="0";
    property name="ModelName" column="ModelName" type="string" ormtype="string" ;
    property name="Description" column="Descrption" type="string" ormtype="string" ;
    property name="ArticleImages" type="array" fieldtype="one-to-many" cfc="Images" fkcolumn="ArticleID" fetch="join" remotingfetch="true" cascade="all-delete-orphan";                       
    Images
    property name="ArticleImageID" column="ArticleImageID" type="numeric" ormtype="int" fieldtype="id" generator="identity" default="0" unsavedvalue="0";
    property name="ArticleID" column="ArticleID" type="numeric" ormtype="int"; 
    property name="FilePath" column="FilePath" type="string" ormtype="string";
    Everything works fine if I update (entitysave) Articles by a coldFusion page.
    If I try by a Flex app using remoteObject all records are written with right values but I receive a fault event with a message which say the ArticleID of the table Images can't contain a Null value.
    In fact in the database the ArticleID field is right updated but I don't know why I receive always the same error.
    The remote object mapping seems to be right established.
    I'm testing with a SQL2008R2 database and all the tables have an IDENTITY primary key field.
    Does anybody have experienced this situation ?
    How can I solve this problem ?
    Thanks,
    Daive

    Did you have tried "entitymerge" instead of "entitysave" ?

  • Business components: detail entity creation

    Hi,
    Using JDeveloper 10.1.3.1.0.
    I've got a master-detail relationship between two entities. To do CRUD operations, I always go through the view objects based on these entities. My problem is when I create a new instance of the detail, it seems the association at the entity level is not maintained before commit.
    For example, let's say I have the entities EntityMaster and EntityDetail and the view objects ViewMaster and ViewDetail. There's an association at the entity level and a view link at the view level. This is a one-to-many relationship (one master - many details).
    I do the following in an application module method:
    ViewObject detailView = getViewDetail(); //returns the detail view object.
    Row newRow = detailView.createRow(); //create a new view row backed by an entity row
    // initialize the new row
    detailView.insertRow(newRow); //insert the row in the view.
    // a bit further
    EntityMasterImpl master = ...; //obtain somehow a reference on the master.
    RowIterator detailEntityIterator = master.getDetailEntity(); //get the detail entity iterator
    int count = detailEntityIterator.getRowCount(); //count has not been incremented by one.
    Since I have a validation on the master entity that checks if there's at least one detail entity when setting a particular attribute, I really need the association to be maintained at the entity level.
    I've worked around the problem by inserting the new detail entity row in the detailEntityIterator like this:
    newRow.getDetailEntity().getMasterEntity().getDetailEntity().insertRow(newRow);
    It does not seem to me like an elegant solution and I really feel the association should be maintained at the entity level automatically.
    Is this a bug or is there any other (more elegant) workaround?
    Thank you,
    Olivier

    Hi Steve,
    This is not a composition association. Actually, this is an association from a table to an intersection (many-to-many) table. The code in my service is based on the SRDemo, see SRServiceImpl#updateSkillsForCurrentStaff(List) and is called on a save button from a shuttle page.
    The current master is the master I want it to belong to. The link to the master gets correctly saved in the database (just as in the SRDemo). We can also navigate from the master view row to the find the detail view row using the generated RowIterator. However, this does not work from the master entity row to the detail entity row. The problem is really at the entity level.
    Thanx
    Olivier

  • TopLink Entity Creation Factory

    Is there a way I can customize the creation of the entities specified in persistence.xml? Instead of TopLink creating them, I'd like to create them myself using and then pass it on to TopLink? I'm looking for something like an ObjectFactory that I can implement and have TopLink use it. Is this possible?

    I'm looking
    for something like an ObjectFactory that I can
    implement and have TopLink use it. Is this possible?In both Oracle TopLink and TopLink Essentials you can configure a descriptor's instantiation policy to use an Object Factory.
    In Oracle TopLink you'd define an afterLoad method to customize the descriptor and in Essentials you'd define a customizer. Either way, the code to set the factory is the same. There are a number of variants of the useFactoryInstantiationPolicy method so use the one that best suits your needs. Here's one usage:
    descriptor.getInstantiationPolicy().useFactoryInstantiationPolicy(MyFactory.class, "create");In this example, when TopLink needs to create an instance of the class of this descriptor, it'll call the static "create" method on MyFactory.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Issue with Creation of new entity and adding it to collection

    Hi Experts,
    LR_ENTITY_ACCT(Account details) is the parent node and that is populated using the query builder.
    From there, I am trying to get realtion of notes section 'BuilNotesRel'). If it is not present, I am creating a new entity of that relation through parent node, setting attributes and saving it. I have written the following code. While debugging, I can see the new entity created under parent LR_ENTITY_ACCT and set property is also working. But afer execution, if I check in genil_bol_browser transaction, there is no new entity created under BuilNotesRel. Please help.
    data:  LR_ENTITY_ACCT          TYPE REF TO CL_CRM_BOL_ENTITY,
               LR_COL_NOTES            TYPE REF TO IF_BOL_BO_COL,
                  LR_ENTITY_NOTES         TYPE REF TO CL_CRM_BOL_ENTITY.
            IF LR_ENTITY_ACCT IS BOUND.
              LR_COL_NOTES ?= LR_ENTITY_ACCT->GET_RELATED_ENTITIES( IV_RELATION_NAME = 'BuilNotesRel' ).
    IF  LR_COL_NOTES->SIZE( ) = 0.
        LR_ENTITY_ACCT->create_related_entity( iv_relation_name = 'BuilNotesRel').
        LR_CORE_3 = CL_CRM_BOL_CORE=>GET_INSTANCE( ).
                LR_CORE_3->MODIFY( ).
            LR_COL_NOTES ?= LR_ENTITY_ACCT->GET_RELATED_ENTITIES( IV_RELATION_NAME = 'BuilNotesRel' ).
              LR_ENTITY_NOTES ?= LR_COL_NOTES->GET_FIRST( ).
                  LR_ENTITY_NOTES->SET_PROPERTY( IV_ATTR_NAME = 'TEXT_ID'
                                               IV_VALUE     =  'ZCOM').
                LR_ENTITY_NOTES->SET_PROPERTY( IV_ATTR_NAME = 'TDLINE'
                                               IV_VALUE     =  LS_ACCOUNT_DETAILS-NOTES ).
    LR_CORE_3 = CL_CRM_BOL_CORE=>GET_INSTANCE( ).
                LR_CORE_3->MODIFY( ).
    endif.
    endif.
    Thanks,
    Ramya

    Hi Sumit,
    I have used a structure for notes which is of TYPE crmt_bupa_il_notes.
    ls_notes                TYPE crmt_bupa_il_notes.
    Then I create the entity, get properties, set the properties and do a core modify.
    LR_ENTITY_NOTES = LR_ENTITY_ACCT->create_related_entity( 'BuilNotesRel' ).
         LR_ENTITY_NOTES->get_properties( IMPORTING es_attributes = ls_notes ).
        ls_notes-task = 'M'.
        ls_notes-text_id = 'ZCOM'.
        ls_notes-langu = 'EN'.
        ls_notes-languiso = 'EN'.
        ls_notes-tdformat = '*'.
        ls_notes-tdline = LS_ACCOUNT_DETAILS-NOTES.
          LR_ENTITY_NOTES->set_properties( EXPORTING is_attributes = ls_notes ).
          LR_CORE_3 = CL_CRM_BOL_CORE=>GET_INSTANCE( ).
                LR_CORE_3->MODIFY( ).
    Thanks,
    Ramya

  • Structural authorization - creation of employee number

    Hello Experts,
    We are facing an issue with strutural authorization in creation of employee number,
    I have tested without assigning stuctural authorization and it process the hiring action and generates the employee number
    (Hiring action is carried through the adobe form which inturn calls the ABAP Function module),
    for the same user if i assign Strctural profile with Function module RH_GET_MANAGER_ASSIGNMENT ( User is assigned to an employee who is Chief ) the hiring action which has to happen through adobe form is not happening and when we check in the program it is throwing an error as Failed strutural authorizations.
    I checked whether the employee which has to generate lies within the organization unit of the manager ( who is chief) and it does lies with in the same org unit.
    can you please help me in analysing why the employee is not getting gereating though the user is having proper HR authorizations and Strutural authorization assigned.

    Hi.
    After 2½ days of frustration I finally nailed this.
    Function group RHAC, that handles the authority checks, initially buffers a table called VIEW containing all objects available for the user. As stated earlier in this conversation, SAP handles creation of relations in HRP1001 (links PA and OM). At this point the new employee number is appended to buffered table VIEW in function group RHAC.
    When execution the PA40 activity through CALL TRANSACTION, the creation of the relations are not handled - and the same goes for updating the buffered table VIEW. The table can be updated using the function module RH_VIEW_ENTRY_INSERT from the same fundtion group:
    This example might be useful
      data: ls_view_entry type hrview,
            ls_related_object type hrobject.
      ls_view_entry-plvar = '01'.
      ls_view_entry-otype = 'P'.
      ls_view_entry-objid = lv_pernr.
      ls_view_entry-begda = '18000101'.
      ls_view_entry-endda = '99991231'.
      ls_view_entry-maint = 'X'.
      ls_related_object-plvar = '01'.
      ls_related_object-otype = 'S'.
      ls_related_object-objid = lv_ny_objid.
      call function 'RH_VIEW_ENTRY_INSERT'
        exporting
          view_entry     = ls_view_entry
          related_object = ls_related_object.
    Best regards
    Poul Steen Hansen
    Senior Technical Consultant
    EDB Consulting Group A/S, Denmark

  • User-exit/BADI needed for SD related FI documents

    Hi ,
    does anyone know of a function-exit/BADI that is executed in FI document creation (SD related) at a point in the logic after EXIT_SAPLV60B_008?  I need to be able to manipulate internal table XACCIT after the standard FI item aggregation has occured but this exit is excuted prior to the aggregation.
    Many thanks,
    Annie

    thanks Brad - I decided to stick with the one I had and use alternative logic within it - seems to be working ok.
    thanks again, annie

  • Creation of BP with default role

    Hi ,
       I have a requiement where in I want a Business Partner to be created with a default role ,i.e CRM006. I can do this in GUI with the help of authorizations.
    But the same does not work in PCUI.
    My requirement is whenever a user creates a Business Partner, Role CRM006 automatically gets assigned to it.
    please sugest something.
    Help will be apreciated.
    Regards
    Sourabh Verma

    Hi PREMKUMAR LNS,
    you can easily implement BADI: BADI_CRM_BP_UIU_DEFAULTS
    IF_UIU_BP_DEFAULTS~GET_DEFAULT_VALUES
    and write something like this:
    assign cr_me->('TYPED_CONTEXT') to <typed_context>.
      if sy-subrc = 0.
        lr_typed_context ?= <typed_context>.
        if lr_typed_context is bound.
          assign lr_typed_context->('HEADER') to <context_node>.
          if sy-subrc = 0.
            try.
                lr_node            ?= <context_node>.
              catch cx_sy_move_cast_error.  "EC_NOHANDLER
            endtry.
            if lr_node is bound.
              lr_coll_wrapper ?= lr_node->collection_wrapper.
              if lr_coll_wrapper is bound.
                try.
                    lr_current ?= lr_coll_wrapper->get_current( ).
                    check lr_current is bound.
    controllo la tipologia di account
                    zbp_category = lr_current->get_property_as_string( 'BP_CATEGORY' ).
                   zbp_group    = lr_current->get_property_as_string( 'BP_GROUP' ).
                    if zbp_category = '1'.
                    elseif zbp_category = '2'.
                  Set default role at creation to "Relation"
                       break domino.
                        zobp_category = lr_current->get_property_as_string( 'BP_ROLE' ).
                        if  zobp_category is initial.
    Here you are setting the default role   
                      lr_current->set_property( iv_attr_name = 'BP_ROLE'
                                       iv_value = 'BUP002' ).
                        endif.
                    else.
                    endif.
                  catch cx_sy_move_cast_error.
                endtry.
              endif.
            endif.
          endif.
        endif.
      endif.

  • Structural authorization - creation of employee number in webdynpro or abap

    Hello Experts,
    We are facing some problems with the combination of structural authorizations and the creation of a new employee.
    When we use PA40 to create a new employee this does not give any problem.
    In the webdynpro we first execute a call transaction PA40 to apply infotype 0000 and 0001. This works well.
    Except that the call transaction does not set the connection between PA and OM. (so we did program this ourselves)
    In PO13 and the table HRP1001 the same relations are made as when we use PA40 in the sap gui.
    After this we do call transactions PA30 for the next infotypes.
    When we check the SU53 it gives a message: problems with structural authorizations object P (with the employeenumber) starting at 01.01.1800, enddate is empty.
    The employee is manager and connected with his userid in infotype 0105.
    We use in the structural profile the function module  RH_GET_MANAGER_ASSIGNMENT
    We checked with transaction HRHAUTH.
    User has been adjusted to the tables T77UA etc.
    We do not use workflow in this webdynpro
    We used the trace function when this was executed, but it did not give more information about missing structural authorizations.
    This issue was before on SDN (Structural authorization - creation of employee number) but unfortunally there was no solution there for the issue!
    Hope one of you can help me to find the solution!
    With kind regards,
    Rita Mensink

    Hi.
    After 2½ days of frustration I finally nailed this.
    Function group RHAC, that handles the authority checks, initially buffers a table called VIEW containing all objects available for the user. As stated earlier in this conversation, SAP handles creation of relations in HRP1001 (links PA and OM). At this point the new employee number is appended to buffered table VIEW in function group RHAC.
    When execution the PA40 activity through CALL TRANSACTION, the creation of the relations are not handled - and the same goes for updating the buffered table VIEW. The table can be updated using the function module RH_VIEW_ENTRY_INSERT from the same fundtion group:
    This example might be useful
      data: ls_view_entry type hrview,
            ls_related_object type hrobject.
      ls_view_entry-plvar = '01'.
      ls_view_entry-otype = 'P'.
      ls_view_entry-objid = lv_pernr.
      ls_view_entry-begda = '18000101'.
      ls_view_entry-endda = '99991231'.
      ls_view_entry-maint = 'X'.
      ls_related_object-plvar = '01'.
      ls_related_object-otype = 'S'.
      ls_related_object-objid = lv_ny_objid.
      call function 'RH_VIEW_ENTRY_INSERT'
        exporting
          view_entry     = ls_view_entry
          related_object = ls_related_object.
    Best regards
    Poul Steen Hansen
    Senior Technical Consultant
    EDB Consulting Group A/S, Denmark

Maybe you are looking for

  • Restoring new MacBook to intro video for Christmas present after install

    Ok, king of the stupid questions: How do I restore the new MacBook to pristine, turn it on and get the full effect first time intro video? I just got a new CoreDuo 13" black laptop for my fiance for Christmas. I installed Office and a couple of other

  • Canceling A/P Invoice

    Dear All,            Kindly give me the procedure to cancel the A/P invoice. Thanks R.Vijai

  • Security Flaw discovered in Droid 2 and Droid X

    Read about it on UnWiredView.com http://www.unwiredview.com/2010/10/15/verizon-motorola-droid-2-and-droid-x-security-flaw-discovered/

  • Summit demo application- Where is it?

    All, I want to install summit demo application of forms, I need schema and fmb for forms 10g R2. I have searched through various links but i dont know where is this located right now. All previous posts on this points to locations http://www.oracle.c

  • HR Triggers Field Mapping screen hangs

    Hi, We are on Access Control 5.3 and I am trying to configure HR Triggers. When I click on HR Triger -> Field Mapping on the configuration tab it just hangs. Anybody have an idea why? Regards, Mo