Dynamic Programming - Attribute Mapping

Hi
Im working on Web Dynpro for ABAP Application where Im using dynamic programming.
I've created node and attributes dynamically (using ADD_NEW_CHILD_NODE & ADD_ATTRIBUTE methods resp.) & bound the dynamically created Textedit UI elements to those attributes. The application is running fine upto this.
Now I want to get the text entered in textedit field from the context. For this I'm using GET_ATTRIBUTE method. Here Im getting dump with error message 'Could not find attribute V_TEST.1.CN_INPUT.1.ATTR11 '. When I debug the GET_ATTRIBUTE method, I found out that the internal table DYNAMIC_ATTRIBUTES is initial. The internal table ATTRIBUTES->* is getting populated in the metod ADD_ATTRIBUTE.
Pls suggest the solution or any alternative method for this.

Hi ,
this is happening because the attributes are added dynamically . to get the attribute value at runtime u have to follow the below procedure .
DATA : LR_ROOT_INFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO ,
          LR_NODE_INFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO,
           LR_STRUCTDESCR TYPE REF TO CL_ABAP_STRUCTDESCR ,
           LS_COMPONENT TYPE CL_ABAP_STRUCTDESCR=>COMPONENT,
           LT_COMPONENTS TYPE CL_ABAP_STRUCTDESCR=>COMPONENT_TABLE,
           LR_TYPE TYPE  REF TO CL_ABAP_DATADESCR .
LR_TYPE ?= cl_abap_TYPEdescr=>describe_by_name( p_name  = 'MATNR' ).
    LS_COMPONENT-NAME = 'MATNR'.
    LS_COMPONENT-TYPE = LR_TYPE .
   APPEND LS_COMPONENT TO LT_COMPONENTS.
LR_TYPE ?= cl_abap_TYPEdescr=>describe_by_name( p_name  = 'MAKTX' ).
    LS_COMPONENT-NAME = 'MAKTX'.
    LS_COMPONENT-TYPE = LR_TYPE .
   APPEND LS_COMPONENT TO LT_COMPONENTS.
CALL METHOD cl_abap_structdescr=>create
      EXPORTING
        p_components = LT_COMPONENTS
           receiving
       p_result     = LR_STRUCTDESCR
CATCH cx_sy_struct_creation .
    *ENDTRY.
  LR_ROOT_INFO = WD_CONTEXT->GET_NODE_INFO( ).
        CALL METHOD lr_root_info->add_new_child_node
  498    EXPORTING
  499  *    supply_method                =
  500  *    supply_object                =
  501  *    dispose_method               =
  502  *    dispose_object               =
  503  *    static_element_type          =
  504      name                         = 'DATA'                                  " NODE NAME
  505  *    is_mandatory                 = ABAP_FALSE
  506  *    is_mandatory_selection       = ABAP_FALSE
  507  *    is_multiple                  = ABAP_TRUE
  508  *    is_multiple_selection        = ABAP_TRUE
  509  *    is_singleton                 = ABAP_FALSE
  510      is_initialize_lead_selection = ABAP_false
  511      static_element_rtti          = LR_STRUCTDESCR   
  512  *    is_static                    = ABAP_TRUE                       " ADD ATTRIBUTE AS STATIC
  513  *    attributes                   =
  514    receiving
  515      child_node_info              = LR_NODE_INFO .
Regards
Yash

Similar Messages

  • Download a special kind of internal table (dynamic programming)

    Hi guys,
    with dynamic programming, i've created a complex internal table of this type :
    KNA1                          |
    KNB1                          |                         
    GS_CUSTOMERADDRESS            |               
    GS_CUSTOMERGENERALDETAIL      |
    The declaration of the internal table is :
    TYPES: BEGIN OF gty_record,
            table TYPE tabname,
            dataref  TYPE REF TO data,
           END OF gty_record.
    This means that each line, has a different line-type. In the first field of the table, i have the name of the structure. In the second, the data-part (in debug double click on leads to structure contents - field by field).
    The structure KNA1 contains C and packed (P) fields also so when i pass the internal table to FM GUI_DOWNLOAD, i have this short-dump : UC_OBJECTS_NOT_CONVERTIBLE.
    Is there a way to solve this problem quickly?
    The goals is download all data of a customer into a local file. Data is distribuited on different structures, readed by standard bapi 'BAPI_CUSTOMER_GETDETAIL2'. This file will be read in another program, of another system.
    Any hints/suggestion will be appreciated.
    Thanks a lot.
    Andrea

    Hi Sandra,
    thx for you suggestions.
    About your answer :
    " Or use a DO. ASSIGN COMPONENT sy-index OF STRUCTURE ... to loop at each field, and do whatever you want with them (using WRITE ... TO ... for example, to convert numbers into text)."
    I cannot use this approach to the problem, because i should keep in mind the dimension of single fields and the blanks should be concatenated also, but RESPECTING BLANK switch of concatenate instruction doesen't exists in 4.7 abap.
    Sure, i can use a workaround, but i'll have a lot of programming.
    "you could use XML for instance. It's rather standard! By using CALL TRANSFORMATION ID SOURCE dataObject RESULT XML string."
    This could be the solution. I've already read some posts about it before write mine. I should test it: i don't know if in 4.7 release works. So i could transform the internal table to xml and save to text file.
    But then, how i can read xml string and mapping again in this special kind of table ?
    Is CALL TRANSFORMATION ID SOURCE XML String RESULT Dataobject instruction sufficient to perform this task?
    Thanks a lot
    Andrea
    BR
    Sandra

  • Dynamic Programming

    Hi All
    Can anyone send me some good documents in the below topics, it is urgent
    1) Dynamic Programming
    2) ABAP Objects
    A Good documents will get rewarded.
    Thanks Prasad

    Parameter mapping
    normal ABAP is process oriented, where is OOP-ABAP is a new methodology in ABAP which uses object oriented programming.
    we have C++, java, C#, etc as OOP languages.
    ABAP has also implemented the OOP technology.
    it uses classes, methods and interfaces instead of functiongroups and function modules.
    As part of SAP’s long-standing commitment to object technology, Release 4.0
    of R/3 will contain object-oriented enhancements to the ABAP programming
    language. SAP’s object strategy is based on SAP Business Objects and now
    covers modeling, programming, interfacing, and workflow. By using principles
    like encapsulation, inheritance, and polymorphism, the object-oriented
    extensions of ABAP will support real object-oriented development. This will
    result in improvements in the areas of reusability, maintenance, and quality of
    code. SAP offers an evolutionary approach toward objects which leverages
    SAP’s own and its customers’ investments in existing business processes,
    functionality and data.
    follow this link ABAP OBJECTS with good examples.......
    http://help.sap.com/saphelp_nw2004s/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    these are the links
    Check this for basic concepts of OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/abap%20objects/abap%20code%20sample%20to%20learn%20basic%20concept%20of%20object-oriented%20programming.doc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20display%20data%20in%20alv%20grid%20using%20object%20oriented%20programming.doc
    Tabstrip
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20for%20tab%20strip%20in%20alv.pdf
    Editable ALV
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/alv%20grid/abap%20code%20sample%20to%20edit%20alv%20grid.doc
    Tree
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree/alvtree_usrint.htm
    General Tutorial for OOPS
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/an%20easy%20reference%20for%20alv%20grid%20control.pdf
    http://www.sapdevelopment.co.uk/reporting/alvhome.htm
    http://www.sap-img.com/abap/what-is-alv-programming.htm
    http://www.sap-img.com/abap-function.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapdevelopment.co.uk/reporting/alv/alvtree%5Calvtree_basic.htm
    http://esnips.com/doc/ad20dca9-6182-4903-8d8f-96a66dc8590c/ALV.pdf
    http://www.sap-img.com/abap-function.htm
    Classical ALV:
    http://www.geocities.com/mpioud/Abap_programs.html
    OOPS ALV:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a415907
    Also Chk this standard Programs.
    ABAP_OBJECTS_ENJOY_0 Template for Solutions of ABAP Object Enjoy Course
    ABAP_OBJECTS_ENJOY_1 Model Solution 1: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_2 Model Solution 2: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_3 Model Solution 3: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_4 Model Solution 4: ABAP Objects Enjoy Course
    ABAP_OBJECTS_ENJOY_5 Model Solution 5: ABAP Objects Enjoy Course
    DEMO_ABAP_OBJECTS Complete Demonstration for ABAP Objects
    DEMO_ABAP_OBJECTS_CONTROLS GUI Controls on Screen
    DEMO_ABAP_OBJECTS_EVENTS Demonstration of Events in ABAP Objects
    DEMO_ABAP_OBJECTS_GENERAL ABAP Objects Demonstration
    DEMO_ABAP_OBJECTS_INTERFACES Demonstration of Interfaces in ABAP Objects
    DEMO_ABAP_OBJECTS_METHODS Demonstration of Methods in ABAP Objects
    DEMO_ABAP_OBJECTS_SPLIT_SCREEN Splitter Control on Screen
    Reward points if found helpful

  • AP_EXPENSE_REPORT_HEADERS_ALL attribute mapping to AP_INVOICES_ALL

    Hi,
    We need to have some values in AP_INVOICES_ALL in some DFF ( For example Attribute10 ) for invoices we import via expense express. When we update attribute10 of ap_expense_report_headers_all after import i dont see it in the ap_invoices_all table.
    What is the mapping of the ap_invoices_all attributes to the ap_expense_report_headers_all attributes.
    Please help.
    thanks
    Ramakrishna

    Hi,
    The Attribute Mapping must be exactly matching between AP & Iexp.
    For example, if you are having a DFF in iExpense called DFF1 (Attribute12-Expense Headers), then you need to create a Attribute in AP Invoice Headers with the same Attribute Number 12.
    If you are creating in Expenses Report Lines, the create in AP Invoice Lines category. Pls remember that Attribute No. must be same. If it is done, then data will move exactly from iExpense to AP when Expense Report Export program is run.
    The DFF Names need not be same.
    Regards,
    guru

  • DYNAMIC PROGRAMMING IN WEBDYNPRO ABAP.

    Hi Experts
    How to create input field dynamical and when i click on the input field drop down ui  should display,If i click n time the input field that many drop down should be displayed this should be done using dynamic programming.
    Waiting for Reply.
    Thanks & Regards.
    kittu

    Hi,
    Please search before posting.. discussed many times.
    To create Input field dynamically, follow like this...
    DATA LR_CONTAINER TYPE REF TO CL_WD_UIELEMENT_CONTAINER.
    DATA LR_INPUT TYPE REF TO CL_WD_INPUT_FIELD.
    DATA LR_LABEL TYPE REF TO CL_WD_LABEL.
    DATA LR_TABLE TYPE REF TO CL_WD_TABLE.
    DATA LR_BUTTON TYPE REF TO CL_WD_BUTTON.
    DATA LR_GRID_DATA TYPE REF TO CL_WD_GRID_DATA.
    DATA LR_FLOW_DATA TYPE REF TO CL_WD_FLOW_DATA.
    DATA LR_MATRIX TYPE REF TO CL_WD_MATRIX_HEAD_DATA.
    LR_CONTAINER ?= VIEW->GET_ELEMENT( 'ROOTUIELEMENTCONTAINER' ).
    CALL METHOD CL_WD_INPUT_FIELD=>NEW_INPUT_FIELD
    EXPORTING
    BIND_VALUE = ATTRIBUTE
    ID = ATTRIBUTE
    RECEIVING
    CONTROL = LR_INPUT.
    lr_matrix = cl_wd_matrix_head_data=>new_matrix_head_data( lr_input ).
    lr_input->set_layout_data( lr_matrix ).
    LR_CONTAINER->ADD_CHILD( LR_INPUT ).
    ENDIF.
    Cheers,
    Kris.

  • Help needed regarding Dynamic Programming

    Hi,
    While doing dynamic programming , we bind the context variable with two types of
    values .
    1 . ddic
    2 . extern
    My doubt is in which case we should use ddic and where to use extern .
    Can anybody help me out regarding this.
    Thanks a lot.

    Hi Ki,
    Predefined, Web Dynpro UI-specific, and user-defined Dictionary types all have the
    prefix ddic:.
    wdContext.getNodeInfo()
    .addAttribute(
    "Visibility",
    "ddic:com.sap.ide.webdynpro.uielementdefinitions.Visbility")
    •Logical Dictionary types from Adaptive RFC models have the prefix extern:.
    Check this links
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9214b1e5-0601-0010-fdb0-ec32d43b06e0
    /people/dipankar.saha3/blog/2007/05/31/how-to-create-dynamic-approval-process-using-conditional-loop-block-in-guided-procedure
    Regards,
    Mithu

  • XSU attribute mapping error

    I've encountered an attribute mapping problem when using the Java OracleXMLQuery class in XSU (Oracle XML Developer's Kit for PL/SQL on Windows NT - 9i 9.2.0.1.0). As an example, take a look at the following object type containing one field whose name is prefaced with "@". This should cause XSU to map the field as an attribute rather than an element:
    create or replace type testtype_t as object
    "@test_attribute" varchar2(20),
    test_element varchar2(30)
    Here's the query passed to OracleXMLQuery:
    select testtype_t('abc', 'def') "TEST1", testtype_t('ghi', 'jkl') "TEST2" from dual
    Here's the output of the getXMLString method:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <TEST1 test_attribute="abc">
    <TEST_ELEMENT>def</TEST_ELEMENT>
    </TEST1>
    <TEST2>
    <test_attribute>ghi</test_attribute>
    <TEST_ELEMENT>jkl</TEST_ELEMENT>
    </TEST2>
    </ROW>
    </ROWSET>
    Notice that the output is correct for the "TEST1" element - it contains a "test_attribute" attribute. The "TEST2" element, however, does not contain a "test_attribute" attribute. Instead, the field was output as a child element of "TEST2" called "test_attribute". To get around this, I had to create another object type as follows:
    create or replace type testtype2_t as object
    "@test_attribute" varchar2(20),
    test_element varchar2(30)
    It's format is identical to the "testtype_t" object type described above. Here's the new query passed to OracleXMLQuery:
    select testtype_t('abc', 'def') "TEST1", testtype2_t('ghi', 'jkl') "TEST2" from dual
    Here's the resulting output of the getXMLString method:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <TEST1 test_attribute="abc">
    <TEST_ELEMENT>def</TEST_ELEMENT>
    </TEST1>
    <TEST2 test_attribute="ghi">
    <TEST_ELEMENT>jkl</TEST_ELEMENT>
    </TEST2>
    </ROW>
    </ROWSET>
    Now, the "TEST2" element contains an attribute as it should.
    It seems that the only time attributes are mapped correctly for a particular object type is when it is first encountered in the query. The mapping fails for each subsequent occurrence. Creating additional object type definitions is a solution, but this can result in the creation of many redundant object type definitions. Is there another solution available? Thanks . . .

    Hi,
    Please tell me when you are getting this error and please explain a bit more what exactly you want to do..
    Thanks
    --Anil                                                                                                                                                                                                                                                                       

  • Attribute mapping not working with complex searches

    Hi all,
    We are using "attribute mapping" for some attributes and that works fine as far as we don't make a complex search. We are doing the attribute mapping at the Directory proxy 6.3 so we map businessSector to businessUnit. Everything work fine if we just put businessSector in the search, but if we add something else to the search filter, it will not work.
    So, if we use filter businessSector=XXXXXXX, it will work and make all the mapping, but if we use something like "(&(pocketSizeOffice=Yes)(businessSector=XXXXXXX))", it will not work.
    We have look at the logs and we see the mapping happening in the first case, but not in the second one.
    Have somebody seem this before or is facing this problem?
    Thanks,
    Federico

    Hi Federico,
    I was not able to reproduce the problem with DPS 6.3 in my labs... so the conditions to reproduce it may be more tricky than described. Anyway, this is not a known problem.
    Feel free to contact Sun support to have a fix delivered to you.
    Thanks
    -Sylvain

  • Dynamic webdynpro context mapping in GP

    Hi Experts,
    I have created a webdynpro coponent which contains a Dynamic node as a Gp context Output parameter.
    This Dynamic node is mapped to another WD callable object's GP context input parameter.
    Will i be able to transfer data using this dynamic node between these two WD callble objects?
    Regards,
    Ashish Shah

    Hi Shanto,
    This is how i plan to use these dynamic nodes
    i have total 4 WD callable objects
    1) A - Data capture Component
    2) B- Request Component
    3) C- Approver determination Component
    4) D- Approver Action component
    Requester enters data in component A in a static node N1, passing data to dynamic node DN1
    Data input node in component B will be a dynamic node DN2 which will be mapped to node DN1
    Component C will have a Dynamic node DN3 getting data from DN2
    Component D will have a Dynamic node DN4 mapped to node DN3 , from DN4 data will be mapped to static node  N2 and will be utilized further.
    Not sure whether my plan will be able to utilize these dynamic node to its fullest or not.
    May be you can help me analyze it better.
    Regards,
    Ashish

  • Submitting a dynamic program with layout name

    Hi,
    I searched many blogs and the SDN forum but couldn't find a solution.
    I need to know the layout fields of an ALV report for a later usage. Let me explain it with code:
    I used below code to extract data of a dynamic program.
    cl_salv_bs_runtime_info=>set(
      EXPORTING display  = abap_false
        metadata = abap_true
        data     = abap_true ).
      Submit (program)  USING SELECTION-SET variant EXPORTING LIST TO MEMORY
                AND RETURN.
      TRY.
          cl_salv_bs_runtime_info=>get_data_ref(
      IMPORTING r_data = lf_ref ).
          ASSIGN lf_ref->* TO <lt_data>.
        CATCH cx_salv_bs_sc_runtime_info.
          MESSAGE `Unable to retrieve ALV data` TYPE 'E'.
      ENDTRY.
      cl_salv_bs_runtime_info=>clear_all( ).
      CREATE DATA lf_ref1 LIKE LINE OF <lt_data>.
      ASSIGN lf_ref1->* TO <lt_line>.
    What I need is to submit program with a (known) layout. If it is not possible, how can i modify the ALV report to fit a layout's display properties. (If I can manage to get -dynamic program- layout's visible fields, it will work too.)
    Thank you.

    Hi ,
    Check this LINK  you can take help from this
    create dynamic varient and pass  to Submit program .
    [how to create a variant dynamically and get it?;
    OR  :
    you can use function module to get layout names and  reprot 
    ranges: lr_report for ltdx-report,
              lr_handle for ltdx-handle,
              lr_log_group for ltdx-log_group,
              lr_username  for ltdx-username,
              lr_variant   for ltdx-variant,
              lr_type      for ltdx-type.
    call function 'LT_VARIANTS_READ_FROM_LTDX'
        exporting
          i_tool          = r_tool
          i_text          = r_text
        tables
          et_variants     = rt_variants
          it_ra_report    = lr_report
          it_ra_handle    = lr_handle
          it_ra_log_group = lr_log_group
          it_ra_username  = lr_username
          it_ra_variant   = lr_variant
          it_ra_type      = lr_type
        exceptions
          not_found       = 1
          others          = 2.
    regards
    Deepak.
    Edited by: Deepak Dhamat on Jan 23, 2012 8:18 AM

  • UME attribute mapping for lastpasswordchange to AD

    We are on EP 7.0 and are using Microsoft Active Directory 2003 as our user repository.
    I am using a writeable datasource configuration file to update passwords in AD from portal (SSL configured)
    For users who had password reset done through the portal, portal has the information for "Date of Last Password Change".
    However, for users who do password resets with other mechanisms (outside of SAP portal), portal does not have this information.
    I am trying to map the UME logical attribute "lastpasswordchange" to the corresponding physical attribute on Active Directory - which I believe is "pwdLastSet".
    My XML configuration looks like the following
    <dataSource id="CORP_LDAP"
             <responsibleFor>
                  <principal type="account">
                       <nameSpace name="com.sap.security.core.usermanagement">
                            <attribute name="j_user"/>
                            <attribute name="logonalias"/>
                            <attribute name="j_password"/>
                            <attribute name="userid"/>
                            <attribute name="lastpasswordchange"/>
                       </nameSpace>
                       <nameSpace name="com.sap.security.core.authentication">
                            <attribute name="principal"/>
                            <attribute name="realm"/>
                            <attribute name="domain"/>
                       </nameSpace>
                  </principal>   
                  <principal type="user">
                  </principal>
                  <principal type="group">
                  </principal>
             </responsibleFor>
             <attributeMapping>
                  <principal type="account">
                       <nameSpace name="com.sap.security.core.usermanagement">
                            <attribute name="j_user">
                                 <physicalAttribute name="samaccountname"/>
                            </attribute>
                            <attribute name="logonalias">
                                 <physicalAttribute name="samaccountname"/>
                            </attribute>
                            <attribute name="j_password">
                                 <physicalAttribute name="unicodepwd"/>
                            </attribute>
                            <attribute name="userid">
                                 <physicalAttribute name="*null*"/>
                            </attribute>
                            <attribute name="lastpasswordchange">
                                 <physicalAttribute name="pwdLastSet"/>
                            </attribute>
                       </nameSpace>                  
                    </principal>
                  <principal type="user">
                       <nameSpace name="com.sap.security.core.usermanagement">
                            <attribute name="firstname">
                                 <physicalAttribute name="givenname"/>
                            </attribute>
                  </principal>
             </attributeMapping>
             <privateSection>              
             </privateSection>
        </dataSource>
    However the above configuration doesn't work. I am not able to read the attribute "pwdLastSet" from AD using attribute mapping.
    Can some one please suggest what I am missing ?
    Thank You,

    You may google "pwdLastSet convert" a try to find out some scripts to convert pwdLastSet to another timestamp.
    As I got from some Google's [links|http://anothersysadmin.wordpress.com/2010/10/22/convert-pwdlastset-to-a-human-readable-date/] pwdLastSet it counts time in nanoseconds.
    Consult you MS Active Diractory team for help to create the converting script of create another attribute in AD with the format that match the portal's timestamp. Then you'll map  the new AD attribute to the "lastpasswordchange" attribute of the portal.
    Regards, Mikhail.

  • Simple type values retrieving in dynamic programming

    Hello,
    Can somebody help me to get the values of a simple type in dynamic programming. I am using the following code:
    wdcontext.currentcustomergraph().getgraphstyle().
    After the values selected in the drop-down, I am not able to get the selected value in dynamic code. Please help.
    Thanks,
    Sunita.

    Hello Vishwas,
    I already did everything what you mentioned. When I use this in WdDoModifyView( )
    wdContext.currentContextElement().getCustomerGraphStyles()
    I am not able to retrieve the values inside customerGraphStyles().
    Thanks,
    Sunita.

  • Regarding Dynamic Programming in HR-ABAP

    Hi,
         I have problem on the dynamic programming. The Reqirement is like, Infotype
    0008 if shows one Initial screen , into that infotype we have to add five fields this is
    an Enhancement and after we adding that fields into that infotype we should do some logics based on the wagetype , and once we enter an input to that IT 0008
    we get that five field values l. How can i solve this problem please help me.
    Regards,
    Sadanandam

    Please this is and Urgent Requirement

  • Attribute mapping in replication

    Hi,
    We have around 10 servers running DS5.2P4.
    Now we are building DS6.3 servers for an acquired enterprise and would like to store the new directory information in one of the old 5.2 servers for data recovery.
    The problem is that the schema in 6.3 is different compared to the old 5.2P4.
    So is attribute mapping possible in replication between 6.3 and 5.2 Directory servers.
    Thanks

    Hi,
    Please tell me when you are getting this error and please explain a bit more what exactly you want to do..
    Thanks
    --Anil                                                                                                                                                                                                                                                                       

  • Adv. Pricing: Custom Attribute mapped to Std. Volume's ITEM_QUANTITY field

    Advanced Pricing: A Custom Attribute is mapped to Std. Volume's ITEM_QUANTITY field, to be able to capture a user-defined volume onto the Standard Quantity field via. Attribute Mapping. However the expected behavior is not achieving. Still the PTE prices if off the OM/ASO's Quantity field, and not based on the number that goes into the attribute field.
    PTE= 'Order Fulfillment', Context Type = 'Pricing Context', Context = 'VOLUME', Code = 'ITEM_QUANTITY'.
    Attribute Mapping Method = ATTRIBUTE MAPPING.
    Click on Attribute Mapping button
    Application Name=Advanced Pricing
    Line Level User Source Type=PL/SQL API
    User Value String= OE_ORDER_PUB.G_LINE_REC.ATTRIBUTE10
    When I create the Sales Order in OM, at the line level after entering the item, I entered a number in attribute10, then
    also a value in the standard quantity field, and Save. The item had price
    breaks defined in the pricelist. But the price returned was based on the value
    in the standard Quantity field, not the value in attribute10. Even when I
    reprice the line (Actions-->Price Line), there is no change.
    Expected behavior is to get the Price off the Attribute that mapped to the 'ITEM_QUANTITY' field (which is a standard/seeded attribute).
    Does anyone made such expected behavior to work (without being used with a Customer Price API)?

    can someone pls reply?
    Thanks!

Maybe you are looking for