How to populate Value in Pop Up Via Value table

Hi Experts,
I have created one Zfield and assign it to a structure . Then structure is mapped to its corresponding Field group .  I have provided the value table to the Domain of the same Zfield . But at the execution the F4 pop up is appearing but the data (From the Value table) is not populating in the pop up.
Kindly let me know the procedure to populate the data in popup via Value table....
Though i know that for some standard fields like Country and Region, already the standard domain LAND1 is provided with the value table T005 and it works fine.
Kindly suggest. Points will be rewarded for every helpful sugesstion.
Thanks
Sunil

Hi
In the fieldgrop structure for this field, fill in the field INPUT HELP as VALUE_TABLE and generate the layout. The values will appear in F4 now.
Regards
Karthik

Similar Messages

  • How to populate a Dropdown List from a Value Node

    Hi
    I have a WD application Java with an Interactive Form. In the WD context I have a value node of cardinality 0..n. In the Interactive Form I need to have the values of this node within a dropdown list. Which type of DDL is best choice and how do I manage to get the node values into the list.
    We are working on NW2004 with Designer 7.08.
    Thank you for any suggestions.
    René Morel

    hi,
    With respect to your problem please refer to this guide/tutorial.
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/98af7acd-0401-0010-f697-bfa06971b65e
    Hope this helps you.
    Thanks,
    kris

  • How to populate a listbox with key in a table control

    I have the following code:
    MODULE carga_huecos INPUT.
    DATA: BEGIN OF li_huecos OCCURS 0,
            key(40) TYPE c,
            text(80) TYPE c,
    END OF li_huecos.
    DATA: BEGIN OF estru_hueco OCCURS 0,
          hueco LIKE zmov_wm-hueco,
    END OF estru_hueco.
    CLEAR: li_huecos, estru_hueco.
    REFRESH: li_huecos, estru_hueco.
    SELECT lgpla
        FROM lagp
        INTO TABLE estru_hueco
      WHERE lgnum = 'WWM' AND
            lgtyp = i_zmov_wm-almacen.
      LOOP AT estru_hueco.
        li_huecos-key  = estru_hueco-hueco.
        li_huecos-text = estru_hueco-hueco.
        APPEND li_huecos.
        CLEAR li_huecos.
      ENDLOOP.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = 'I_ZMOV_WM-HUECO'
          values          = li_huecos[]
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    I see that internal table  li_huecos has the values I need. But vrm_set_values function is not working. I need this values to be seen in a table control field which I have defined as "listbox with key". The name of the internal table associated to the table control is "I_zmov_wm" and the field is HUECO.
    After function is executed sy-subrc = 0 but no value is seen in the list.
    Thanks.

    hi ,
    instead of this 
    LOOP AT estru_hueco.
    li_huecos-key = estru_hueco-hueco.
    li_huecos-text = estru_hueco-hueco.
    APPEND li_huecos.
    CLEAR li_huecos.
    ENDLOOP.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'I_ZMOV_WM-HUECO'
    values = li_huecos[]
    EXCEPTIONS
    id_illegal_name = 1
    OTHERS = 2.
    IF sy-subrc 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    add this 
    data : name  type vrm_id  .
    LOOP AT estru_hueco.
    li_huecos-key = estru_hueco-hueco.
    li_huecos-text = estru_hueco-hueco.
    APPEND li_huecos.
    CLEAR li_huecos.
    ENDLOOP.
    name  = 'I_ZMOV_WM-HUECO' .
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id =   name
    values = li_huecos[]
    EXCEPTIONS
    id_illegal_name = 1
    OTHERS = 2.
    IF sy-subrc 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    regards
    Deepak.

  • How to populate a text field by some value from table in Oracle seeded page through Personalization?

    I have to populate Description field by default in AGIS page (Advanced Global Intercompany System).
    Field Description:
    messageTextInput: Description
    VO: FunTrxHeaderVO
    VO Attribute: Description
    VO is entity based.
    Now if the field is null then I have to populate this value by some value from table for selected batch_id.
    Example:
    (SELECT DESCRIPTION FROM fun_trx_batches WHERE batch_id =
    211061)
    Also, this value is being populated in the Batch Information region in the same page. So the problem is also be treated as to copy a value from one messageStyledText to messageTextInput in a same page.
    Can this be done through personalization, w/o coding?
    Please suggest if you any idea how to resolve..
    Regards,
    Pahari

    Not sure why it is not displying in the front page list??
    I have to search it.
    Admin team, please help.
    Regards,
    Pahari

  • ALV pop-up via ALV table view

    Hello Folks,
    I have an ALV table view, after selecting any line item in the view i have button "DETAIL" which would pop up another view with the details in ALV view again.
    I have done the below steps but iam unable to get the alv pop-up with details. I would really appreciate if anyone can help me with this.
    My main view <i>V_OVERVIEW</i> is the initial Table view and i have created another View <i>V_POPUP</i> which just has a Viewcontainer. <i>V_OVERVIEW</i> is embeded in window <i>W_MAIN</i> and <i>V_POPUP</i> is embeded in <i>W_POPUP</i>.
    The view V_POPUP has the following code in its MODIFYVIEW method.
    DATA:node_wage TYPE REF TO if_wd_context_node,
           node_detail type ref to if_wd_context_node,
           lt_sltd_elmnts TYPE wdr_context_element_set,
           lr_element TYPE REF TO if_wd_context_element,
           wa_detail TYPE if_v_pop_up=>element_wage_benefit,
           it_detail TYPE if_v_pop_up=>elements_wage_benefit.
      data : lt_ssn type table of ZUT_XFERRED_SSN,
             lt_return type table of bapiret2.
      node_wage = wd_context->get_child_node( 'WAGE_BENEFIT' ).
      lt_sltd_elmnts = node_wage->get_selected_elements( abap_true ).
      lr_element->get_static_attributes(
        IMPORTING static_attributes = wa_detail ).
      CALL FUNCTION 'ZZ_GET_DETAIL'
        EXPORTING
          i_ob_key = objectkey
          i_quarter  = -quarter
        TABLES
          T_DTL  = lt_dtl
          T_RETURN   = lt_return.
      navigate from <CONTEXT> to <TP_RATES> via lead selection
      node_detail = wd_context->get_child_node( name =
                       ig_componentcontroller=>wdctx_ssn_details ).
      node_detail->bind_elements( new_items = lt_dtl ).
    The main View V_OVERVIEW has the button "DETAIL" which calls the window W_POPUP to show view V_POPUP embeded in it as a popup, here is the code in the Button handler
    DATA:
        l_api_main TYPE REF TO if_wd_view_controller,
        l_window_manager TYPE REF TO if_wd_window_manager,
        l_popup TYPE REF TO if_wd_window,
        l_cmp_api TYPE REF TO if_wd_component.
    * Pop to confirm
      CLEAR : l_api_main, l_cmp_api,
              l_window_manager, l_popup.
      l_api_main = wd_this->wd_get_api( ).
      l_cmp_api = wd_comp_controller->wd_get_api( ).
      l_window_manager = l_cmp_api->get_window_manager( ).
      l_popup = l_window_manager->CREATE_WINDOW(
      WINDOW_NAME = 'W_POP_UP'
      TITLE = 'Details' ).
      l_popup->open( ).

    hey folks nevermind i got it.
    Thanks

  • How to populate the webservice XML data in to Table  ODI- Webserice invoke

    Hi,
    I have multiple work orders in my oracle db table, That means multiple WorkOrder_Item_ID's are there in my source table. When I start transfer the data from source to Target using ODI , I need to get the information of multiple Work order Item_IDs from the Webservice response data ( XML data) of another system by calling ODI Webservice Invoke in ODI and insert the same Webservice XML response data in my source table in the corresponding Item_ID's.
    My First question : How can I take the data from Webservice XML and put in to correspoding Item relevent data in to Source Table
    Second question: How can I send the multiple work order item ID at the same time to the Webservice and insert the relevant item data in to Source table using ODI.
    Finally this combined soure table data should be moved to Target table in ODI.. That I know.. How to do it.
    Can any one please give answers for the above said two questions.
    Thanks,
    Rajesh
    Edited by: user11226287 on Oct 30, 2009 4:40 AM
    Edited by: user11226287 on Nov 1, 2009 10:44 PM
    Edited by: user11226287 on Nov 1, 2009 10:59 PM

    I find some words in the implementation guide, it says:"To collect data from your non-Oracle ERP systems or your trading partners' systems,you model each non-Oracle ERP system or trading partner as an Oracle Applications organization and store their setup and transaction data there".
    But I can't find where to model the application organization for the legacy system.
    anyone can give some clues? Thanks in advance.

  • How to populate last 10 records from data base table

    Hi,
    My requirement is to populate last 10 transfer order items confirmed from LTAP. as the table is too large there is no point to fetch all the records and filter them...
    Please let me know better way (in terms of performace) to get last 10 records from LTAP.
    Thanks in advance.
    Nag

    Hi brother,
    the following code is working......(sample code)
    data itmara type mara occurs 0 with header line.
    select matnr from mara into corresponding fields of table itmara up to 20 rows.
    sort itmara descending by matnr.
    loop at itmara .
    write:/ itmara-matnr.
    if sy-tabix = 10.
    exit.
    endif.
    endloop.
    plz reward with maximum points
    Edited by: sreejith gn on May 13, 2008 12:52 PM

  • How to populate DUNS_NUMBER in AR through Customer Interface tables

    Hi,
    We are working on Customer Interface using custome Interface tables and run the standard Customer Interface program.
    As part of source data, we have data for D-U-N-S number, which should be populated to D-U-N-S number field displayed under Profiles Tab in Customer screen.
    I believe that field refers to DUNS_NUMBER_C or DUNS_NUMBER in HZ_ORGANIZATION_PROFILES base table.
    My question is what is the column(field) in Interface table to be populated which maps to the D-U-N-S number on the screen said above. ?
    Appreciate your quick response.
    Regards,
    Ram

    what you did?

  • How to populate the organization_code column in ST table for legacy system

    Hi, dear all,
    Now I use the stage table to load the setup&transaction collection data from a non-EBS legacy system to ASCP system.
    My question is: how to populate the organization_code column in the stage table?If the source system is EBS system, maybe it's an inventory organization code. But for the non-EBS system, which value is need fo this field? keep it as blank? or assign some value for it?
    Thanks
    Edited by: 852938 on 2011-5-4 下午10:24

    I find some words in the implementation guide, it says:"To collect data from your non-Oracle ERP systems or your trading partners' systems,you model each non-Oracle ERP system or trading partner as an Oracle Applications organization and store their setup and transaction data there".
    But I can't find where to model the application organization for the legacy system.
    anyone can give some clues? Thanks in advance.

  • How to populate username to database table automatically

    Hi Experts,
    I have a query that   how to populate the username like in every standard table we have field called 'created by'.
    so i want to populated that field to our database automatically when user make an entry through his/her userid.
    Can anybody help me out.
    Thanks & Regards,
    Vipul

    Hi,
    I understand that you had created a Ztable and when user enters USER ID, Username should automatically get populated into that field.
    You cfan achive this by creating an ew module.
    In PAI module at Chain and ENdchain create a new module. ex : Module Cust.
    Place a breakpoint and then try to execute it. If the cursor is triggering it then you can place a pice of code in that module.
    Ex :
    types : begin of ty_usr,
                      USERID
                       USERNAME
                end of ty_usr.
    data : t_usr type standard table of ty_usr,
              wa_usr type ty_usr.
       Select USERID
                  USER NAME
                  from XYZ table
                  into table t_USR
                  where USERID =  INPUT field (UserId) filled by the user in that table.
             Then you can populate the t_usr-USERNAME into the Field of the Ztable.
              In this way, if the user just put the User id and press enter it will automatically populate the Usrename into the Field.
    This will fix the issue.

  • How to populate Values in Value Set via API or Interface

    Dear frds:
    i need to know is there any API or interface available to load thousands of values in particular valueset via API or Interface. I know Dataload is the alternative but i don't want to use that as the data is too much so its not feasible.
    waiting for your response
    Thanks.

    There is no API for fnd_flex_values.
    You will have to do a direct table insert (or call FND_FLEX_VALUES_PKG which does nothing but a direct table insert).
    Sandeep Gandhi

  • How to populate read only input field or text view form value help only

    Hi experts,
    I have one requirement to populate a read-only field or text view from value help.
    User cant put any value there.value comes only from the value help.
    For example,
    when we read context using Code Wizard,we cant type any value there.value only comes from value help.
    How to implement that functionality?
    Please reply.
    Thanks in advance,
    Subhasis.

    Yes it is possible.
    1.Create a context Attribute and then bind this attribute to the Text view UI element.
    2. read context attribute and then set value to the context attribute like this way.
    DATA:
        elem_context1                        TYPE REF TO if_wd_context_element,
        stru_context1                        TYPE if_first=>element_context ,
        item_potxt                          LIKE stru_context-potxt.
    get element via lead selection
      elem_context1 = wd_context->get_element(  ).
    stru_context1-potxt = 'PO'.
    elem_context1->set_attribute(
        VALUE  = stru_context1
        name   = 'POTXT'
    thanks
    Suman
    Edited by: suman kumar chinnam on Sep 9, 2008 12:12 PM

  • Populate values in pop up

    Hi
    I have a requirement like when I select a table row , a pop up should appear with the fields populated with the values of the selcted row.
    I need some pointers on how to populate the fields of the pop up with the selected row values.
    Both the table and the pop up view are created using value node option.
    Thanks
    Sushma

    Hi Sushma,
    First you need to identify the row selected on the table view. This can be done by writing this code in the
    ON SELECT Event Handler.
        cl_thtmlb_util=>get_event_info(
          EXPORTING
            iv_event = htmlb_event_ex
          IMPORTING
            ev_index = lv_index ).
    *Use the Iterator to get the rows based on index
    *lr_iterator TYPE REF TO if_bol_bo_col_iterator
    lr_iterator ?= me->typed_context->contextnodename->collection_wrapper->get_iterator( ).
    *lr_entity TYPE REF TO cl_crm_bol_entity.
    lr_entity ?= lr_iterator->get_by_index( iv_index ).
    Once we have the selected entity, we can call a pop up and display data in it.
    Since you said the pop up is created with a value node with required attributes, populate a BOL Collection lr_col using the entity.
        gr_popup = comp_controller->window_manager->create_popup(
          iv_interface_view_name = ''POP_UP/MainWindow''
          iv_usage_name = 'cupopup'
          iv_title = lv_title ).
      gr_popup->set_display_mode( if_bsp_wd_popup=>c_display_mode_surrounded ).
      gr_popup->open( iv_inbound_plug = gc_searchhelp
                                      iv_collection   =   lr_col ).
    Regards,
    Masood Imrani S.

  • How to populate class based on value of seed class attribute instead of doing reg/script discovery again?

    I have a seed class. I populate that seed class using script discovery and it has attribute 1,2 and 3. Those 3 attributes are all populated via the script discovery too.
    Now I created a new application class which use the seed class as target. The criteria is if attribute 1 equal to a certain value. Here comes the question, how to create this discovery? In authoring console the options are registry discovery, script discovery
    and custom discovery. Since attribute 1 is already populated in seed class using script, I think I can use that instead of doing another script discovery for the new application class. 
    However I didn't find a way to do that. Any suggestions?

    I pasted the base seed MP as following.
    The base MP has two classes: "MyBaseMP.MyApps.Candidates" and "MyBaseMP.MyApps".
    "MyBaseMP.MyApps.Candidates" is created from "Windows.Computer" class. Then it is discovered by "MyBaseMP.MyApps.Candidates.RegDiscvoery". 
     "MyBaseMP.MyApps" is created from "Windows.Local.Application" class. It is then discovered by "MyBaseMP.MyApps.ScriptDiscovery". This script discovery is targeting on "MyBaseMP.MyApps.Candidates" class. The script
    also populated 5 attribute for  "MyBaseMP.MyApps" and they are APPLICATION, LOB, GROUP, ENVIRONMENT and STATE.
    This base MP works as expected.
    Now I want to create a new custom MP. The new MP has a new class "MyFinanceApps" created from  "MyBaseMP.MyApps". The service model is very simple just like following
      <TypeDefinitions>
        <EntityTypes>
          <ClassTypes>
            <ClassType ID="MyFinanceApps" Accessibility="Internal" Abstract="false" Base="MyBaseMP!MyBaseMP.MyApps" Hosted="true" Singleton="false" />
          </ClassTypes>
        </EntityTypes>
      </TypeDefinitions>
    I want to populate this class if LOB attribute echos to "Finance". How to make this discovery then? Sure I can create another script discovery but since those values already discovered in the seed class, is there any way I can use them?
    The MyBaseMP is as following:
    <ManagementPack ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <Manifest>
        <Identity>
          <ID>MyBaseMP</ID>
          <Version>1.0.0.0</Version>
        </Identity>
        <Name>MyBaseMP</Name>
        <References>
          <Reference Alias="SC">
            <ID>Microsoft.SystemCenter.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Windows">
            <ID>Microsoft.Windows.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="Health">
            <ID>System.Health.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
          <Reference Alias="System">
            <ID>System.Library</ID>
            <Version>6.1.7221.0</Version>
            <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
          </Reference>
        </References>
      </Manifest>
      <TypeDefinitions>
        <EntityTypes>
          <ClassTypes>
            <ClassType ID="MyBaseMP.MyApps" Accessibility="Internal" Abstract="false" Base="Windows!Microsoft.Windows.LocalApplication" Hosted="true" Singleton="false">
              <Property ID="APPLICATION" Type="string" Key="true" CaseSensitive="false" Length="256" MinLength="0" />
              <Property ID="GROUP" Type="string" Key="false" CaseSensitive="false" Length="256" MinLength="0" />
              <Property ID="LOB" Type="string" Key="false" CaseSensitive="false" Length="256" MinLength="0" />
              <Property ID="STATE" Type="string" Key="false" CaseSensitive="false" Length="256" MinLength="0" />
              <Property ID="APP_TYPE" Type="string" Key="false" CaseSensitive="false" Length="256" MinLength="0" />
              <Property ID="ENVIRONMENT" Type="string" Key="false" CaseSensitive="false" Length="256" MinLength="0" />
            </ClassType>
            <ClassType ID="MyBaseMP.MyApps.Candidates" Accessibility="Internal" Abstract="false" Base="Windows!Microsoft.Windows.Computer" Hosted="false" Singleton="false" />
          </ClassTypes>
        </EntityTypes>
      </TypeDefinitions>
      <Monitoring>
        <Discoveries>
          <Discovery ID="MyBaseMP.MyApps.Candidates.RegDiscovery" Enabled="true" Target="Windows!Microsoft.Windows.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal">
            <Category>Discovery</Category>
            <DiscoveryTypes>
              <DiscoveryClass TypeID="MyBaseMP.MyApps.Candidates" />
            </DiscoveryTypes>
            <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.FilteredRegistryDiscoveryProvider">
              <ComputerName>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
              <RegistryAttributeDefinitions>
                <RegistryAttributeDefinition>
                  <AttributeName>FoundAppKey</AttributeName>
                  <Path>SOFTWARE\MyCompany\SystemCenter</Path>
                  <PathType>0</PathType>
                  <AttributeType>0</AttributeType>
                </RegistryAttributeDefinition>
              </RegistryAttributeDefinitions>
              <Frequency>180</Frequency>
              <ClassId>$MPElement[Name="MyBaseMP.MyApps.Candidates"]$</ClassId>
              <InstanceSettings>
                <Settings>
                  <Setting>
                    <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
                    <Value>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
                  </Setting>
                </Settings>
              </InstanceSettings>
              <Expression>
                <SimpleExpression>
                  <ValueExpression>
                    <XPathQuery Type="String">Values/FoundAppKey</XPathQuery>
                  </ValueExpression>
                  <Operator>Equal</Operator>
                  <ValueExpression>
                    <Value Type="String">true</Value>
                  </ValueExpression>
                </SimpleExpression>
              </Expression>
            </DataSource>
          </Discovery>
          <Discovery ID="MyBaseMP.MyApps.ScriptDiscovery" Enabled="true" Target="MyBaseMP.MyApps.Candidates" ConfirmDelivery="false" Remotable="true" Priority="Normal">
            <Category>Discovery</Category>
            <DiscoveryTypes>
              <DiscoveryClass TypeID="MyBaseMP.MyApps" />
            </DiscoveryTypes>
            <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider">
              <IntervalSeconds>300</IntervalSeconds>
              <SyncTime />
              <ScriptName>MyApps.Script.Discovery.vbs</ScriptName>
              <Arguments>$MPElement$ $Target/Id$ $Target/Property[Type="Windows!Microsoft.Windows.Computer"]/DNSName$ $MPElement$</Arguments>
              <ScriptBody><![CDATA[
    Option Explicit
    ' Definitions for Registry Walking
    Const HKEY_LOCAL_MACHINE = &H80000002
    Dim oReg
    Dim arrValues, arrSubKeys
    Dim strComputer, strKeyPath, subkey, strProperty, strArrValue
    ' Define where the App Subkeys are located, strKeyPath MUST end with a slash!
    strKeyPath = "SOFTWARE\MyCompany\SystemCenter\"
    strComputer = "."
    Dim WshShell, bKey
    ' Definitions for SCOM Discovery
    Dim oAPI
    Set oAPI = CreateObject("MOM.ScriptAPI")
    Dim oArgs
    Set oArgs = WScript.Arguments
    ' Check for the required script arguments.
    if oArgs.Count < 3 Then
        ' If the script is called without the required arguments,
        ' create an information event and then quit. 
        Call oAPI.LogScriptEvent(WScript.ScriptName,101,0, _
            "script was called with fewer than three arguments (" & oArgs.Count & " arguments) and was not executed.")
        Wscript.Quit -1
    End If
    Dim SourceID, ManagedEntityId, TargetComputer
    SourceID = oArgs(0) ' The GUID of the discovery object that launched the script.
    ManagedEntityId = oArgs(1) ' The GUID of the computer class targeted by the script.
    TargetComputer = oArgs(2) ' The FQDN of the computer targeted by the script.
    Dim oDiscoveryData, oInst
    Set oDiscoveryData = oAPI.CreateDiscoveryData(0, SourceID, ManagedEntityId)
    ' Functions for Registry Walking
    ' Create Shell Object
    Set WshShell = WScript.CreateObject("WScript.Shell")
    ' Create WMI Object, and check for existence
    On Error Resume Next
    Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ 
        strComputer & "\root\default:StdRegProv")
    Select Case Err.Number
      Case 0:
    'Error Code 0 = 'success'
    'Wscript.Echo "DEBUG:  Opened WMI"
      Case Else
    'Any other error code is a failure code
    Notify("ERROR:  Can not open WMI")
    Wscript.Quit 1
    End Select
    On Error Goto 0 'Turn error reporting back on
    ' Check to ensure first level reg key exists
    If RegistryKeyExists("HKLM\" & strKeyPath) Then
    If oReg.EnumKey(HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys) > 0 Then
    ' We have NO subkeys
    Notify("ERROR: No Subkeys defined")
    Wscript.Quit 1
    End if
    Else
    Notify("DEBUG: Key [" & strKeyPath & "] doesn't exist")
    Wscript.Quit 1
    End If
    'Check size of arrSubKeys for sub keys
    If Not IsArray(arrSubKeys) Then
    ' We have NO subkeys
    Notify("ERROR: No Subkeys defined")
    Wscript.Quit 1
    End If
    For Each subkey In arrSubKeys
    'Wscript.Echo "DEBUG: subkey = " & subkey
    strProperty = ""
    'Check to ensure Subkey Exists
    If RegistryKeyExists("HKLM\" & strKeyPath & "\" & subkey & "\") Then
    'Get Values under each key
    'Wscript.Echo "DEBUG:  Create OBJECT"
    ' Discovered the application. Create the application instance.
    Set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='MyBaseMP.MyApps']$")
    ' Define Property
    Call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", TargetComputer)
    If RegistryValueExists("HKLM\" & strKeyPath & "\" & subkey & "\ENVIRONMENT") Then
    'Wscript.Echo "DEBUG: Value " & strArrValue & " found"
    strProperty = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\ENVIRONMENT")
    Else
    'Wscript.Echo "DEBUG: value " & strArrValue & " NOT found"
    strProperty = "NONEXISTANT"
    End If
    Call oInst.AddProperty("$MPElement[Name='MyBaseMP.MyApps']/ENVIRONMENT$", strProperty)
    If RegistryValueExists("HKLM\" & strKeyPath & "\" & subkey & "\STATE") Then
    'Wscript.Echo "DEBUG: Value " & strArrValue & " found"
    strProperty = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\STATE")
    Else
    'Wscript.Echo "DEBUG: value " & strArrValue & " NOT found"
    strProperty = "NONEXISTANT"
    End If
    Call oInst.AddProperty("$MPElement[Name='MyBaseMP.MyApps']/STATE$", strProperty)
    If RegistryValueExists("HKLM\" & strKeyPath & "\" & subkey & "\APP_TYPE") Then
    'Wscript.Echo "DEBUG: Value " & strArrValue & " found"
    strProperty = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\APP_TYPE")
    Else
    'Wscript.Echo "DEBUG: value " & strArrValue & " NOT found"
    strProperty = "NONEXISTANT"
    End If
    Call oInst.AddProperty("$MPElement[Name='MyBaseMP.MyApps']/APP_TYPE$", strProperty)
    If RegistryValueExists("HKLM\" & strKeyPath & "\" & subkey & "\LOB") Then
    'Wscript.Echo "DEBUG: Value " & strArrValue & " found"
    strProperty = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\LOB")
    Else
    'Wscript.Echo "DEBUG: value " & strArrValue & " NOT found"
    strProperty = "NONEXISTANT"
    End If
    Call oInst.AddProperty("$MPElement[Name='MyBaseMP.MyApps']/LOB$", strProperty)
    If RegistryValueExists("HKLM\" & strKeyPath & "\" & subkey & "\GROUP") Then
    'Wscript.Echo "DEBUG: Value " & strArrValue & " found"
    strProperty = WshShell.RegRead("HKLM\" & strKeyPath & "\" & subkey & "\GROUP")
    Else
    'Wscript.Echo "DEBUG: value " & strArrValue & " NOT found"
    strProperty = "NONEXISTANT"
    End If
    Call oInst.AddProperty("$MPElement[Name='MyBaseMP.MyApps']/GROUP$", strProperty)
    'Set Application Name
    'Wscript.Echo "SET APPLICATION NAME: " & subkey
    Call oInst.AddProperty("$MPElement[Name='MyBaseMP.MyApps']/APPLICATION$", subkey)
    'Wscript.Echo "SUBMIT INSTANCE"
       Call oDiscoveryData.AddInstance(oInst)
    Else
    ' Registry Sub Key does not exist
    Notify("ERROR: A found registry subkey, [" & subkey & "] doesn't actually exist")
    End If
    Next
    ' Submit the discovery data for processing.
    Call oAPI.Return(oDiscoveryData) 
    ' A helper function to remove the extension from a file name.
    Function StripExtension (sFile)
    StripExtension = Left(sFile, Len(sFile) -4)
    End Function
    '* Registry Value Exists (Function)
    '* Returns a value (true / false)
    'This function checks to see if a passed registry value exists, and
    'returns true if it does
    'Requirements: The registry value you are looking for (RegistryValue)
    Function RegistryValueExists (RegistryValue)
      'Ensure the last character is NOT a backslash (\) - if it is, we aren't looking for a value
      If (Right(RegistryValue, 1) = "\") Then
        'It's not a registry value we are looking for
    'Wscript.Echo "No slash....returning false"
        RegistryValueExists = false
      Else
        'If there isnt the value when we read it, it will return an error, so we need to resume
        On Error Resume Next
        'Try reading the value
        WshShell.RegRead RegistryValue
        'Catch the error
        Select Case Err.Number
          Case 0:
            'Error Code 0 = 'success'
            RegistryValueExists = true
          Case Else
            'Any other error code is a failure code
            RegistryValueExists = false
        End Select
        'Turn error reporting back on
        On Error Goto 0
      End If
    End Function
    '* Registry Key Exists (Function)
    '* Returns a value (true / false)
    'This function checks to see if a passed registry key exists, and
    'returns true if it does
    'Requirements: The registry key you are looking for (RegistryKey)
    'Note: RegistryKey MUST end in a backslash (\), or FALSE will be returned
    Function RegistryKeyExists (RegistryKey)
       Dim errDescription
      'Ensure the last character is a backslash (\) - if it isn't, we aren't looking for a key
      If (Right(RegistryKey, 1) <> "\") Then
        'It's not a registry key we are looking for
        RegistryKeyExists = false
      Else
        'If there isnt the key when we read it, it will return an error, so we need to resume
        On Error Resume Next
        'Try reading the key
        WshShell.RegRead RegistryKey
        'Catch the error
    ' Wscript.Echo "Err.Number = " & Err.Number
    ' Wscript.Echo "Err.Message = " & Err.Message
        Select Case Err.Number
          'Error Code 0 = 'success'
          Case 0:
            RegistryKeyExists = True
            'Wscript.Echo "DEBUG: Case 0: Key Exists"
          'This checks for the (Default) value existing (but being blank); as well as key's not existing at all (same error code)
          Case &h80070002:
            'Read the error description, removing the registry key from that description
            ErrDescription = Replace(Err.description, RegistryKey, "")
            'Clear the error
            Err.clear
            'Read in a registry entry we know doesn't exist (to create an error description for something that doesnt exist)
            WshShell.RegRead "HKEY_ERROR\"
            'The registry key exists if the error description from the HKEY_ERROR RegRead attempt doesn't match the error
            'description from our RegistryKey RegRead attempt
            If (ErrDescription <> Replace(Err.description, "HKEY_ERROR\", "")) Then
              RegistryKeyExists = true
            Else
              RegistryKeyExists = false
            End If
          'Any other error code is a failure code
          Case Else:
            RegistryKeyExists = false
        End Select
        'Turn error reporting back on
        On Error Goto 0
      End If
    End Function
    Function Notify(strNotifyMessage)
    Call oAPI.LogScriptEvent(Wscript.Name,101,0, strNotifyMessage)
    End Function]]></ScriptBody>
              <TimeoutSeconds>60</TimeoutSeconds>
            </DataSource>
          </Discovery>
        </Discoveries>
      </Monitoring>
      <LanguagePacks>
        <LanguagePack ID="ENU" IsDefault="true">
          <DisplayStrings>
            <DisplayString ElementID="MyBaseMP">
              <Name>MyBaseClass</Name>
            </DisplayString>
            <DisplayString ElementID="MyBaseMP.MyApps">
              <Name>MyBaseMP.MyApps</Name>
            </DisplayString>
            <DisplayString ElementID="MyBaseMP.MyApps" SubElementID="APPLICATION">
              <Name>APPLICATION</Name>
            </DisplayString>
            <DisplayString ElementID="MyBaseMP.MyApps.Candidates">
              <Name>MyBaseMP.MyApps.Candidates</Name>
            </DisplayString>
            <DisplayString ElementID="MyBaseMP.MyApps.Candidates.RegDiscovery">
              <Name>MyBaseMP.MyApps.Candidates.RegDiscovery</Name>
            </DisplayString>
            <DisplayString ElementID="MyBaseMP.MyApps.ScriptDiscovery">
              <Name>MyBaseMP.MyApps.ScriptDiscovery</Name>
              <Description />
            </DisplayString>
          </DisplayStrings>
        </LanguagePack>
      </LanguagePacks>
    </ManagementPack>

  • How to populate default values for BP (FPP1 is  tcode in ECC 6.0)

    Hello ,
    I am creating BP in ECC 6.0 using Fpp1 tcode.  How to populate default values when i hit create BP person.   any badi  triggers when we are creating BP in ECC.
    guide me.

    Hi Premanand,
    To default fields, you need to do the following steps :
    1. Create a Z module e.g. : Z_DEFAULT_FIELDS_DIALOG.
    2. Enter suppose you want to default fiels Name, title, country, write code as follows  :
    DATA : ls_busdefault LIKE busdefault.     
      ls_busdefault-title = '0002'.
      ls_busdefault-mc_name1 = 'TEST'.
      ls_busdefault-mc_name2 = 'Default'.
      ls_busdefault-country = 'IN'.
        CALL FUNCTION 'BUP_BUPA_FIELDVALUES_SET'
        EXPORTING
          i_busdefault = ls_busdefalut.
    3. Now got to transaction BUS7, select event ISDAT, click on Event--> function modules.
    4. Register your Z module Z_DEFAULT_FIELDS_DIALOG in this list, Save.
    This should solve your problem. Please note : You can only default those fields contained in structure BUSDEFAULT.
    Cheers,
    Rishu.

Maybe you are looking for

  • How can I transfer voice memos from my iPhone 4 without syncing and having all music/video/audiobook content deleted from my phone?

    I would like to be able to transfer several very long voice memos from my iPhone 4 to my PC.  They are too long to email to myself. I manage music manually, so the phone doesn't sync automatically.  I have also not checked off "include voice memos" i

  • SpeedGrade doesn't show the videos on my sequence

    Everytime that I export via Direct Link from Pro to SpeedGrade, the process seems to happen without problems. But when I try to see the different clips on the sequence the screen just shows black. Is like the video wasn't transferred at all, because

  • 10.4.7 problem...Please help

    I am kind of concerned about this. I trust Apple not to send me faulty software. But I am worried... Ever since installing the 10.4.7 update...my iMac G5 will not stop running a couple of things called "pplogger" & "pploader". My cooling fan is runni

  • My ipad VIDEOS app doesn't show the movie Names with IOS 7

    I just upgraded to IOS 7.  The Apple VIDEOS app no longer displays the file name for videos that don't have album art.  I have to tap on each video screen shot (which is typically meaningless) to bring up the info/play screen to see the movie's "Name

  • Apex 4 Theme 20- Modern Blue IR Issue in IE8

    The DHTML drop down on the magnifying glass icon to the left of the search does not display in IE 8. It seems to "hide behind" some other element. Works well in FF. Tried on a number of PC, consistly fails on IE8 and works in FF. Is it an issue in ou