How to list a table field as a checkbox on ALV with button to update tbl

The requirement of my report transaction is to display rows of the z_table
where one of the fields (revision complete? y/n) is to be displayed as a
checkbox.
This checkbox is editable for the user to check or uncheck.
When the user edits the checkbox, there is to be a clickbutton on the ALV Grid
that says UPDATE TABLE
When the clickbutton is pressed a status screen or message should be displayed
telling the user that X number of rows were updated.
The output of the ALV grid should be refreshed to display the output but with
the edited rows gray'ed out.
Can anyone help me with an example of how to do this?  I am new to ABAP so as
much detail you can give the better.  Hopefully that will help others as well
Thanks!!
Corey

Hi,
The following steps might be useful .
In the final internal table for display,in the data definition define a field of character 1,
eg: mark(1) .
This must be first field for display.
Then, while populating fieldcat,make options checkbox as 'X' AND edit  as 'X'.
example code:
  READ TABLE IT_FIELDCAT INTO WA_FIELDCAT INDEX 1.
  WA_FIELDCAT-CHECKBOX = 'X'.
  WA_FIELDCAT-EDIT = 'X'.
  MODIFY IT_FIELDCAT FROM WA_FIELDCAT INDEX SY-TABIX.
Now, copy the status of the standard alv program(STANDARD_FULLSCREEN) to your program.
In the application tool bar add button for update with function code (eg:upd).
Also, in the export parameters of the fm (reuse_alv_grid_display),  give form name.
Eg:
     I_CALLBACK_USER_COMMAND = 'USER_COMMAND'
In this form, write the coding for updating ur Z-table .
Note:
1) After selecting the entries , user must save the data, so that the data selected wil be reflected in the final internal tabe say,it_final. (the mark field wil be 'X'.)
2)While updating ur Z-table, make sure u update only the entries selected(eg: loop at it_final where mark = 'X'.)
3)Once the updation is done, pop up a message & call the form for alv display ( in the form alv fieldcat used must be refreshed & make the field edit = ' '  for all the fields that is updated) .
eg: 
  READ TABLE IT_FIELDCAT INTO WA_FIELDCAT INDEX 1.
  WA_FIELDCAT-EDIT =  ' ' .
  MODIFY IT_FIELDCAT FROM WA_FIELDCAT INDEX SY-TABIX.
Hope this info is useful to you.
Regards,
Viji

Similar Messages

  • Hi gurus how to provide the table field validations

    hi gurus how to provide the table field validations , plz help me

    Hi,
          Say you need to provide valdiation for WERKS(Plant) field.
    Goto SE11. Find the domain of the field. (Say WERKS in our case.) now goto the domain, click on value range. Now at the bottom you will find the value table. Note this table (T001W).
    In your report, at selection screen, you need to validate the field against this table. like this
    At selection-screen,
    select single werks from T001W where werks = p_werks.
    if sy-subrc NE 0
    message e000 with 'Plant not found'.
    endif.
    Reward points if useful.

  • MARA table field STAWN (Comm./imp. code EU ) is not updating in MARC table

    Dear Experts,
    From MARA table field STAWN (Comm./imp. code EU ) is not updating in MARC table field STAWN (Comm./imp. code EU ) by MM02 Transaction
    Is there any SAP standard functionality to over come above issue or needed  ABAP coding for the same ????
    Regards
    Hanumant

    Dear All,
    Thanks for your reply
    I tried to update the the field after adding plant and other detail actually that field will be gray mode (display) and cannot update
    my question i want to update MARC_STAWN field (Forign trade import) for my existing all material , those material MARA_STAWN (basic data 3 ) is also blank but system is allowing me to update in MARA_STAWN (basic data 3) but system will not update to MARC_STAWN (Forign trade import) field.
    What is the best method to Coppy all MARA Stawn fields to the MARC Stawn field.
    Regards
    Hanumant.

  • How do i lock all fields without using the signature function with adobe lifecycle designer 9

    How do i lock all fields without using the signature function with adobe lifecycle designer 9 ...
    I want it to have the same affect as when a signature is used but not use that function. I want a button that says lock all fields. And then you can click it again to unlock all fields...
    Thanks

    Here you go!
    LOCK the form once its SAVEd?

  • How can i get Google maps back on, i lost them with the ios6 update, the new maps are terrible

    how can i get Google maps back on, i lost them with the ios6 update, the new maps are terrible

    It's still not known if and when Google Maps becomes available in the AppStore. This is today's story: http://www.macrumors.com/2012/09/25/google-has-not-yet-submitted-a-google-maps-a pp-to-apple/

  • How to check which Table & Field is populating Data source

    Hi,
    My requirment is to check from which Table and Which field the data is extracted in the data source
    Data Source : 0MAT_PLANT_ATTR
    Field in Data Source :  MINBE
    Now i want to check from where (Table/Field) in R/3 is populating the Field MINBE in Data source 0MAT_PLANT_ATTR
    How can i do that

    Hi,
    Since you have the extract structure and the extractor, you can try Extractor Checker RSA3.Execute ST05 (activating SQL Trace), switch on the trace and execute the extractor checker. Once the extractor checker presents the results
    switch off trace. The clcik on Display trace and you will see all the tables that were hit by the extractor checker to retrieve data and present it to you.
    Note: Set the break point in the Extractor Function module.
    View the ST05 Extended Trace list. The Object name shows the Tables accessed.
    Hope this helps.
    Thanks,
    JituK

  • How to show all table fields in correct alv disply

    Hi all,
    This is my report that disply in ALV . but this is only displying the join table (t_p0001_p0002) fields.i want to disply the other two table fields i.e t_pa0315 and t_pa0007.what is the logic to ALV disply the other two table fields like the table t_pa0001_pa0002.pls help me regarding this.
    send me the code its urgent.
    thanks!
    Vipin
    pls find the code below:->
    REPORT Y_WP03 .
    DEFINE m_fieldcat.
      add 1 to ls_fieldcat-col_pos.
      ls_fieldcat-fieldname   = &1.
      ls_fieldcat-ref_tabname = &2.
      append ls_fieldcat to lt_fieldcat.
    END-OF-DEFINITION.
    TYPE-POOLS: slis.                      " ALV Global types
    tables:pa0001,
           pa0315,
           pa0007,
           disvariant.
         Selection-Screen
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    *SELECTION-SCREEN SKIP 1.
    SELECT-OPTIONS: s_pernr FOR pa0001-pernr.            " Personnel No
    SELECT-OPTIONS: s_orgeh FOR pa0001-orgeh .           " Organization unit
    SELECT-OPTIONS: s_werks FOR pa0001-werks.            " Personnel Area
    SELECT-OPTIONS: s_plans FOR pa0001-plans.            " Position
    SELECT-OPTIONS: s_ebeln FOR pa0315-ebeln.            " Purchase order
    SELECTION-SCREEN END OF BLOCK blk1.
    SELECTION-SCREEN BEGIN OF BLOCK b2k2 WITH FRAME TITLE text-002.
    *SELECT-OPTIONS: s_var FOR disvariant-variant.
    PARAMETERS: p_disva1 LIKE disvariant-variant.
    SELECTION-SCREEN END OF BLOCK b2k2.
                     Type Definition                                     *
    TYPES :
    BEGIN OF ty_pa0001_pa0002,
        pernr TYPE pa0001-pernr , " Personnel no.
        endda TYPE pa0001-endda , " end date
        begda TYPE pa0001-begda , " start date
        bukrs TYPE pa0001-bukrs , " company code
        werks TYPE pa0001-werks , " Personnnel area
        persg TYPE pa0001-persg , " Employee group
        persk TYPE pa0001-persk , " Employee subgroup
        btrtl TYPE pa0001-btrtl , " Personnnel subarea
        abkrs TYPE pa0001-abkrs , " Payroll area
        kostl TYPE pa0001-kostl , " cost center
        orgeh TYPE pa0001-orgeh , " Organizational Unit
        plans TYPE pa0001-plans , " Position
        nachn TYPE pa0002-nachn , " Last name
        vorna TYPE pa0002-vorna , " First name
        midnm TYPE pa0002-midnm , " Middle name
      END   OF ty_pa0001_pa0002 ,
    BEGIN OF ty_pa0315,
       pernr TYPE pa0315-pernr , " Personnel no.
       kostl TYPE pa0315-kostl , " Sending cost center
       lstar TYPE pa0315-lstar , " Activity type
       werks TYPE pa0315-werks , " Plant
       lifnr TYPE pa0315-lifnr , " Vendor number
       ebeln TYPE pa0315-ebeln , " Sending pruchase ord
       ebelp TYPE pa0315-ebelp , " Sending PO item
       lstnr TYPE pa0315-lstnr , " Activity number
    END   OF ty_pa0315,
    BEGIN  OF ty_pa0007,
      pernr TYPE pa0007-pernr,
      schkz TYPE pa0007-schkz,
    END  OF ty_pa0007.
    *BEGIN  OF ty_pa0002,
    pernr TYPE pa0002-pernr,
    nachn TYPE pa0002-nachn,
    vorna TYPE pa0002-vorna,
    midnm TYPE pa0002-midnm,
    *END  OF ty_pa0002.
                     Data Declaration                                    *
    DATA :
      t_pa0001_pa0002 TYPE STANDARD TABLE OF ty_pa0001_pa0002 ,
      w_pa0001_pa0002 TYPE ty_pa0001_pa0002 ,
      t_pa0315 TYPE STANDARD TABLE OF ty_pa0315 ,
      w_pa0315 TYPE ty_pa0315 ,
      t_pa0007 TYPE STANDARD TABLE OF ty_pa0007 ,
      w_pa0007 TYPE ty_pa0007 .
    t_pa0002 TYPE STANDARD TABLE OF ty_pa0002 ,
    w_pa0002 TYPE ty_pa0002 .
    START-OF-SELECTION .
      SELECT a~pernr
             a~endda
             a~begda
             a~bukrs
             a~werks
             a~persg
             a~persk
             a~btrtl
             a~abkrs
             a~kostl
             a~orgeh
             a~plans
             b~nachn
             b~vorna
             b~midnm
             INTO TABLE t_pa0001_pa0002
             FROM pa0001 AS a INNER JOIN pa0002 AS b
             ON apernr = bpernr
             WHERE a~pernr IN s_pernr
             AND   a~werks IN s_werks
             AND   a~orgeh IN s_orgeh
             AND   a~plans IN s_plans.
      SORT t_pa0001_pa0002 BY pernr .
      IF NOT t_pa0001_pa0002[] IS INITIAL .
        SELECT pernr
               kostl
               lstar
               werks
               lifnr
               ebeln
               ebelp
               lstnr
               FROM pa0315
               INTO TABLE t_pa0315
               FOR ALL ENTRIES IN t_pa0001_pa0002
               WHERE pernr = t_pa0001_pa0002-pernr
               AND   kostl = t_pa0001_pa0002-kostl
               AND   ebeln IN s_ebeln.
        SELECT pernr
               schkz
               FROM pa0007
               INTO TABLE t_pa0007
               FOR ALL ENTRIES IN t_pa0001_pa0002
               WHERE pernr = t_pa0001_pa0002-pernr.
        SELECT pernr
               nachn
               vorna
               midnm
               FROM pa0002
               INTO TABLE t_pa0002
               FOR ALL ENTRIES IN t_pa0001
               WHERE pernr = t_pa0001-pernr .
      ENDIF.
    PERFORM f_display_data.
    FORM f_display_data.
      DATA:
        ls_fieldcat TYPE slis_fieldcat_alv,
        lt_fieldcat TYPE slis_t_fieldcat_alv.
    Build the field catalog
      m_fieldcat 'PERNR' 'PA0001'.
      m_fieldcat 'NACHN' 'PA0002'.
      m_fieldcat 'VORNA' 'PA0002'.
      m_fieldcat 'MIDNM' 'PA0002'.
      m_fieldcat 'BUKRS' 'PA0001'.
      m_fieldcat 'WERKS' 'PA0001'.
      m_fieldcat 'PERSG' 'PA0001'.
      m_fieldcat 'PERSK' 'PA0001'.
      m_fieldcat 'BTRTL' 'PA0001'.
      m_fieldcat 'ABKRS' 'PA0001'.
      m_fieldcat 'ORGEH' 'PA0001'.
      m_fieldcat 'PLANS' 'PA0001'.
      m_fieldcat 'SCHKZ' 'PA0007'.
      m_fieldcat 'KOSTL' 'PA0315'.
      m_fieldcat 'LSTAR' 'PA0315'.
      m_fieldcat 'WERKS' 'PA0315'.
      m_fieldcat 'LIFNR' 'PA0315'.
      m_fieldcat 'EBELN' 'PA0315'.
      m_fieldcat 'EBELP' 'PA0315'.
      m_fieldcat 'LSTNR' 'PA0315'.
      m_fieldcat 'BEGDA' 'PA0001'.
      m_fieldcat 'ENDDA' 'PA0001'.
    Display the list
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = sy-cprog
          i_callback_user_command = 'USER_COMMAND'
          it_fieldcat             = lt_fieldcat
        TABLES
          t_outtab                = t_pa0001_pa0002.
    ENDFORM.                               " F_DISPLAY_DATA_VBAK
          FORM USER_COMMAND                                             *
    FORM user_command USING u_ucomm     TYPE syucomm
                            us_selfield TYPE slis_selfield.     "#EC CALLED
      CASE u_ucomm.
        WHEN '&IC1'.
          READ TABLE t_pa0001_pa0002 INDEX us_selfield-tabindex INTO
    w_pa0001_pa0002.
          CHECK sy-subrc EQ 0.
      ENDCASE.
    ENDFORM.                               " USER_COMMAND

    Hey,
    Look at ur code.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-cprog
    i_callback_user_command = 'USER_COMMAND'
    it_fieldcat = lt_fieldcat
    TABLES
    t_outtab = <b>t_pa0001_pa0002</b>.
    Here you're passing only the join table t_pa0001_pa0002. If you want to display the other tables as well, then u must have an internal table that has the columns of all the 3 tables. Then u need to buil;d the fieldcatalog accordingly and then display that table,
    Cheers,
    Sam

  • How to populate custom table field value into standard DFF

    Hi Gurus
    I am newbie to the OAF
    I have a requirement to populate the custom table field value into standard DFF. we enabled the DFF in ReqDistDFFOnAcct(po_req_distributions_all). On the requisition tab as soon as i click on the checkout button, the custom field value has to be shown in the requisition distributions DFF field along with the standard Columns like charge account, percent, qty and when we click on the next button, it has to hit the base table ie., po_req_distributions_all.
    the standard columns data is showing the screen. how to acheive this requirement programatically
    There is a EO for the req distributions table. please help me how to achevie this requirement.
    Any help woud be greatly appreciated.
    Thank You!
    Krishna

    Thanks Aj. Finally i made some progress....but i am getting an error in the inst_top OPMN folder 10/10/08 15:37:14 Error: <connector name="OracleASjms" path="OracleASjms.rar" /> will not be bootstrapped since corresponding module declaration was not found in application.xml. I cleared the cache, bounced the webserver. Could not able to understand what is this error
    Following is the code that i have written. I am not able to find out what is the error. please help me how to fix this error. there is no changes in the page and the value is not auto populating. the page is having the normal behaviour as the standard one.
    Thanks in Advance for your help...
    public class xxCheckoutDistsCO extends CheckoutDistsCO
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    String UnitId="";
    //First get the Application Module
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject vo = (OAViewObject)am.findViewObject("PoRequisitionLinesVO");
    String Reqlineid="";
    String Linenum="";
    String DeliverLoc="";
    if(vo.first() !=null)
    Reqlineid= vo.first().getAttribute("RequisitionLineId").toString();
    Linenum = vo.first().getAttribute("LineNum").toString();
    DeliverLoc = vo.first().getAttribute("DeliverToLocationId").toString();
    // if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    // pageContext.writeDiagnostics("TEST >", Reqlineid,1);
    // pageContext.writeDiagnostics("TEST >", Linenum,2);
    // pageContext.writeDiagnostics("TEST >", DeliverLoc,3);
    UnitId=null;
    String Querry="select amli_icx_oaf_utils.get_blding_unit_id (?,?,?) from dual";
    try
    PreparedStatement ps=am.getOADBTransaction().getJdbcConnection().prepareStatement(Querry);
    ps.setInt(1,Integer.parseInt(Reqlineid));
    ps.setInt(2,Integer.parseInt(Linenum));
    ps.setInt(3,Integer.parseInt(DeliverLoc));
    ResultSet rs=ps.executeQuery();
    // ps.execute();
    // am.getOADBTransaction().commit();
    while (rs.next())
    System.out.println(" Query Results ");
    UnitId= rs.getString(1);
    System.out.println(" first > ");
    rs.close();
    ps.close();
    catch(SQLException a)
    System.out.println(" Error "+a);
    System.out.println(" Second > ");
    System.out.println(" Third > "); ----the program is executing upto here...it is not setting the value after this.
    OAViewObject povo = (OAViewObject)am.findViewObject("PoReqDistributionsVO");
    if(povo.getCurrentRow()!=null ) --------If i remove this condition i am getting the nullpointer exception in page.....
    System.out.println(" Fourth > ");
    povo.getCurrentRow().setAttribute("Attribute12",UnitId);
    // if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    // pageContext.writeDiagnostics("TEST >", UnitId, 1);
    Thanks
    krishna

  • How can I add table fields with existing structure ?

    I like to add PSTLZ field to stucture KOMGG.Is it possible to add table field with the existind structure.If yes how can I do this?kindly help me on this.

    hi
    go to se11
    in change mode select the button append
    create new append which starts from Zpstlz in this komgg structure and add data element and domain to this field and activate with request number
    then in field catalogue this field should be visible ,here ends your append
    now it is ready to use in condition tables.
    reward if helps !!!!!

  • How to deselect refrence table fields in Maintenance view.

    Hello,
            Could any one tell me how to deselect all fields here except mara .
    In the first link as below it shows the table selection tab in maintain view window.
    http://postimage.org/image/6701iidlh/
    When i click Relationships after selecting one base table , i get the second link as u see below
    http://postimage.org/image/p7wpknnht/
    I m unable to deselect the referenced tables Could some one throw light on this.
    Thanks
    Edited by: sarat on Nov 23, 2011 11:50 AM

    HI ,
    Find the below thread ,
    Hiding primary key field in Table maintenance generator
    It will help you to deselect refrence table fields in Maintenance view.  
    Regards,
    Saravana.S

  • How to make a table field Required

    Hi,
    I tried to make a table field as 'Required'. It works fine. But it gives unexpected results. Imagine the table has 10 rows. when the user make an entry in the first row, the system gives the error messages for the required field in the remaining rows as well. How can we restrict it so that it checks for the required field only for the row with entries. How to specify the condition type?
    Kind Regards
    Shahul

    Hi,
    check this :
    don't set table field as 'Required'.If your table data contains in a internal table , then use Below code under <b>PAI</b> event.
      LOOP AT i_data.
        CHAIN.
          FIELD:  i_data-fld1.
          MODULE validate_field.
        ENDCHAIN.
      ENDLOOP.
    MODULE validate_field INPUT.
    write the code to validate the each line of the table control, if validation fails , cursor will stop at the table control row
    ENDMODULE.
    Regards
    Appana

  • How to list all the Fields for an Active Directory Object

    How do I list all the fields that an Active Directory object contains? I know the most common ones, but would like to enumerate through all the fields and obtain the type of fields and their values...

    Here is my complete code - I only put snippets so that the post was not too huge...
    Option Explicit
    Const ADS_SCOPE_SUBTREE = 2
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
    Dim adoCommand, adoConnection, adoRecordSet
    Dim dtmDate, dtmValue
    Dim j
    Dim lngBias, lngBiasKey, lngHigh, lngLow, lngValue
    Dim objADObject, objClass, objDate, objFile, objFSO, objRootDSE, objShell
    Dim pathToScript
    Dim strAdsPath, strConfig, strDNSDomain, strHex, strItem, strProperty, strValue
    Dim strFilter, strQuery
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("Wscript.Shell")
    pathToScript = objShell.CurrentDirectory
    Set objFile = objFSO.CreateTextFile(pathToScript & "\TestAD.csv")
    ' Determine Time Zone bias in local registry.
    ' This bias changes with Daylight Savings Time.
    lngBiasKey = objShell.RegRead("HKLM\System\CurrentControlSet\Control\TimeZoneInformation\ActiveTimeBias")
    If (UCase(TypeName(lngBiasKey)) = "LONG") Then
    lngBias = lngBiasKey
    ElseIf (UCase(TypeName(lngBiasKey)) = "VARIANT()") Then
    lngBias = 0
    For j = 0 To UBound(lngBiasKey)
    lngBias = lngBias + (lngBiasKey(j) * 256^j)
    Next
    End If
    ' Determine configuration context and DNS domain from RootDSE object.
    Set objRootDSE = GetObject("LDAP://RootDSE")
    strConfig = objRootDSE.Get("configurationNamingContext")
    strDNSDomain = objRootDSE.Get("defaultNamingContext")
    Set adoCommand = CreateObject("ADODB.Command")
    Set adoConnection = CreateObject("ADODB.Connection")
    adoConnection.Provider = "ADsDSOObject"
    adoConnection.Open "Active Directory Provider"
    adoCommand.ActiveConnection = adoConnection
    adoCommand.CommandText = "SELECT * FROM 'LDAP://" & strDNSDomain & "'WHERE objectClass=user'"
    adoCommand.Properties("Page Size") = 1000
    adoCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
    Set adoRecordSet = adoCommand.Execute
    Set adoRecordSet = adoCommand.Execute
    adoRecordSet.MoveFirst
    Do Until adoRecordSet.EOF
    strAdsPath = adoRecordSet.Fields("ADsPath").Value
    ' Bind to Active Directory object specified.
    Set objADObject = GetObject(strAdsPath)
    Set objClass = GetObject(objADObject.Schema)
    ' Write which object is grabbed from AD
    objFile.Write(Replace(strAdsPath, ",", ";;;"))
    ' Enumerate mandatory object properties.
    For Each strProperty In objClass.MandatoryProperties
    On Error Resume Next
    strValue = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    On Error GoTo 0
    If (TypeName(strValue) = "String") Or (TypeName(strValue) = "Long") Or (TypeName(strValue) = "Date") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Byte()") Then
    strHex = OctetToHexStr(strValue)
    objFile.Write("," & strProperty & "|||" & CStr(strHex))
    ElseIf (TypeName(strValue) = "Variant()") Then
    For Each strItem In strValue
    On Error Resume Next
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strItem), ",", ";;;"))
    If (Err.Number <> 0) Then
    On Error GoTo 0
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    On Error GoTo 0
    Next
    ElseIf (TypeName(strValue) = "Boolean") Then
    objFile.Write("," & strProperty & "|||" & CBool(strValue))
    Else
    objFile.Write("," & strProperty & "|||Type:" & TypeName(strValue))
    End If
    Else
    Err.Clear
    sColl = objADObject.GetEx(strProperty)
    If (Err.Number = 0) Then
    For Each strItem In sColl
    objFile.Write("," & strProperty & "|||" & CStr(strItem))
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Next
    On Error GoTo 0
    Else
    Err.Clear
    Set objDate = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    lngHigh = objDate.HighPart
    If (Err.Number = 0) Then
    lngLow = objDate.LowPart
    If (lngLow < 0) Then
    lngHigh = lngHigh + 1
    End If
    lngValue = (lngHigh * (2 ^ 32)) + lngLow
    If (lngValue > 120000000000000000) Then
    dtmValue = #1/1/1601# + (lngValue / 600000000 - lngBias) / 1440
    On Error Resume Next
    dtmDate = CDate(dtmValue)
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||<Never>")
    Else
    objFile.Write("," & strProperty & "|||" & CStr(dtmDate))
    End If
    Else
    objFile.Write("," & strProperty & "|||" & FormatNumber(lngValue, 0))
    End If
    Else
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Else
    On Error GoTo 0
    objFile.Write("," & strProperty)
    End If
    On Error GoTo 0
    End If
    End If
    Next
    ' Enumerate optional object properties.
    For Each strProperty In objClass.OptionalProperties
    On Error Resume Next
    strValue = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    On Error GoTo 0
    If (TypeName(strValue) = "String") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Long") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Date") Then
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strValue), ",", ";;;"))
    ElseIf (TypeName(strValue) = "Byte()") Then
    strHex = OctetToHexStr(strValue)
    objFile.Write("," & strProperty & "|||" & CStr(strHex))
    ElseIf (TypeName(strValue) = "Variant()") Then
    For Each strItem In strValue
    On Error Resume Next
    objFile.Write("," & strProperty & "|||" & Replace(CStr(strItem), ",", ";;;"))
    If (Err.Number <> 0) Then
    On Error GoTo 0
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    On Error GoTo 0
    Next
    ElseIf (TypeName(strValue) = "Boolean") Then
    objFile.Write("," & strProperty & "|||" & CBool(strValue))
    Else
    objFile.Write("," & strProperty & "|||Type:" & TypeName(strValue))
    End If
    Else
    Err.Clear
    sColl = objADObject.GetEx(strProperty)
    If (Err.Number = 0) Then
    For Each strItem In sColl
    objFile.Write("," & strProperty & "|||" & CStr(strItem))
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Next
    On Error GoTo 0
    Else
    Err.Clear
    Set objDate = objADObject.Get(strProperty)
    If (Err.Number = 0) Then
    lngHigh = objDate.HighPart
    If (Err.Number = 0) Then
    lngLow = objDate.LowPart
    If (lngLow < 0) Then
    lngHigh = lngHigh + 1
    End If
    lngValue = (lngHigh * (2 ^ 32)) + lngLow
    If (lngValue > 120000000000000000) Then
    dtmValue = #1/1/1601# + (lngValue / 600000000 - lngBias) / 1440
    On Error Resume Next
    dtmDate = CDate(dtmValue)
    If (Err.Number <> 0) Then
    objFile.Write("," & strProperty & "|||<Never>")
    Else
    objFile.Write("," & strProperty & "|||" & CStr(dtmDate))
    End If
    Else
    objFile.Write("," & strProperty & "|||" & lngValue)
    End If
    Else
    objFile.Write("," & strProperty & "|||Value cannot be displayed")
    End If
    Else
    On Error GoTo 0
    objFile.Write("," & strProperty & "||| ")
    End If
    On Error GoTo 0
    End If
    End If
    Next
    objFile.WriteLine("")
    adoRecordSet.MoveNext
    Loop
    objFile.Close
    ' Function to convert OctetString (Byte Array) to a hex string.
    Function OctetToHexStr(arrbytOctet)
    Dim k
    OctetToHexStr = ""
    For k = 1 To Lenb(arrbytOctet)
    OctetToHexStr = OctetToHexStr _
    & Right("0" & Hex(Ascb(Midb(arrbytOctet, k, 1))), 2)
    Next
    End Function
    I have been able to obtain all the Computer, Contact, Group and OU objects without issue with this code...

  • Tools to list all table-field used by a program

    Hello everyone
    Is there any available tool providing the list of fields used by a program?
    There are several tools to list the tables used by a program but I need to have a list of the fields of those tables.
    Here is a scenario.
    DATA: lv_matnr TYPE matnr.
    SELECT SINGLE matnr INTO lv_matnr FROM mara WHERE mtart = 'FERT'
    WRITE:/ lv_matnr.
    The list should contain the following information:
    MARA-MATNR
    MARA-MTART
    Because both fields are used by the program. None of the other fields of the table mara should be listed.
    Regards
    dstj

    All BlackBerry device use the same APN blackberry.net. This is unique accross all carrier.
    tanzim                                                                                  
    If your query is resolved then please click on “Accept as Solution”
    Click on the LIKE on the bottom right if the post deserves credit

  • How do I change a field in the sum in ALV (List or grid)

    My alv, for example:
    1.10
    2.30
    1.50
    Sum(DO_SUM) : 4.90
    But I need to CEIL( 4.90 ) before showing .
    It should be shown as 5.00 in alv.
    How do I change this field in the sum ?

    Use the following code in a PBO module or in an adequate event method
    data: total type ref to data,
          subtotal1 type ref to data.
    field-symbols: <total> like gt_sflight,
                   <subtotal1> like gt_sflight.
    call method grid1->get_subtotals
      importing
        ep_collect00 = total
        ep_collect01 = subtotal1.
    assign total->* to <total>.
    assign subtotal1->* to <subtotal1>.
    Look at [ALV Grid Control (BC-SRV-ALE)|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf]
    Regards

  • How to Transfer Database Table Field to Data Type in XI

    Dear All,
    Dear All,
    I am working on scenario to transfer data(Database Table) from Non SAP System to SAP system through XI.
    While Defining "Data Type" in XI i want to create Data Type as of Database table in my(Oracle Database).There is any direct method to import Database Table field into "Data Type" in XI.
    thanks,
    RP

    Hi;
    Edit plus is a tool using which you can edit your file and make changes to it.
    You can download it from net ,just search for it on google.
    this will help you to get in the field names of the table by editing the file .
    Mudit

Maybe you are looking for

  • Is there a way to stop apps from running in the background on my 3gs?

    I was told that apps could be "turned off" in the iphone, which saves on battery life and removes the apps from the main screen, placing them in a scrollable line at the bottom. I even saw the guy do it! Now, I can't figure out how he did it!

  • How to search for a song?

    I'm searching for a song using the search box on the top right hand side of the page.  When I hit enter the screen flashes a page and then goes blank

  • Field Status control for fields at Account assignment level .

    Hi All , I have to take care of enabling / disabling / hiding / making fields mandatory  for some of the standard and custom fields for SC and PO depending on the Account assignment value . I am not sure how to go about this . I think this has to do

  • Weblogic.descriptor.DescriptorException: Unmarshaller failed

    Caused by: com.bea.xml.XmlException: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.ParamValueBeanImpl@1e184cf(/ContextParams)" I know that Thread was posted already but what I read did not really fix t

  • Anybody have an issue with the blue dot on new emails dissapearing??

    I recently reloaded my email accounts on my iPhone 4 (and ipad) on the direction of an apple store employee so my iPad, iPhone and iMac would sync (show email activity as if I were just using one device and not having new messages show unread or not