Getting List of Figures, List of Tables titles into main TOC

I have a book (all in one file) with three TOCs: List of Tables, List of Figures, main Table of Contents. I want the TOC titles from List of Tables and List of Figures to show up in the main TOC. They don't.
Does anyone know why? Do TOCs not pick up text from other TOCs?
Ken

If it's going to work, you'd need to make the lists for tables & figures first, and include the styles you used for the tiltles of those in the things to search for on the main TOC. I presume you did this?
By first, you mean temporally, not spatially, right? In print order, Contents comes before List of Tables which comes before List of Figures. Yes, I'm pretty sure I set it up right, but I'm starting to think that TOCs just ignore other TOCs. Is that intended behavior?
Sure, I'll just type in the two missing titles. I just wanted it to work automatically, because I know I'll probably have to generate a new TOC about a month from now and I probably won't remember to add those two titles again.
Ken

Similar Messages

  • SET/GET not working when I submit one program into Main program.

    Hi All,
    I am using set/get parameter as follows but somewht it is not working.. Please help.
      IF ( uf_instn = 'ACEFR' and uf_messg <> 'BSP' ).
        set parameter id 'AJN' field lf_jobname.
        set parameter id 'AJC' field gf_jobcount.
      ENDIF.
      SUBMIT   zace_interface
        USER   sy-uname
        VIA    JOB lf_jobname
        NUMBER gf_jobcount
        WITH   SELECTION-TABLE lt_seltab
      TO     SAP-SPOOL
        AND    RETURN.
    in the zace_interface program I have another submit program
        submit zrsbdcsub and return
                        user 'ZACE_INTERFACE'
                        with mappe eq lf_group
                        with von eq sy-datum
                        with bis eq sy-datum
                        with fehler eq space
                        with logall eq co_true.
    ad inside this submit im using
                  get parameter id 'AJN' field v_jobname.
                  get parameter id 'AJC' field v_jobcount.
    but i am not able to get the values into v_jobname & v_jobcount.
    Can you please help me in this regard. how i will get the values in v_jobname & v_jobcount.
    Thanking you in advance
    Regards,
    Prashant

    Hi..,
    any way u r executing the programs in the same session but between diff. internal sessions u can use the IMPORT and EXPORT options ( ABAP MEMORY )
    or do one thing...
    <b>In the first program Copy these fields into a file in the <b>application server</b>,, and in the Second submit program u retrieve these variable values from the Application server file into these two variables!!</b>
    just now i have solved one of the issues of this Kind by using an Application server file.
    In the first program..
    IF ( uf_instn = 'ACEFR' and uf_messg <> 'BSP' ).
    OPEN dataset 'FILE' for output in text mode encoding default.
    transfer lf_jobname to 'FILE'.
    transfer gf_jobcount to 'FILE'.
    CLOSE dataset 'FILE'.
    ENDIF.
    and instead of using the GET parameters in the second program ..
    OPEN dataset 'FILE' for input in text mode encoding default.
    read dataset 'FILE' into v_jobname.
    read dataset 'FILE' into v_jobcount.
    CLOSE dataset 'FILE'.
    This has solved my problem !!!!! hope this helps u also!!
    regards,
    sai ramesh

  • How to include in table of contents the list of figures and list of tables?

    How to include in table of content the "Table of contents", "List of figures" and "List of tables"? All are generated with function Table of contents, but they will not appear in generated table of contents even if they have proper style of headings - Heading 1, as other chapter.
    I get this in generated Table of contentes of my dissertaion thesis:
    Table of contents
    Preface
    Table of contents <- missing
    List of tables <- missing
    List of figures <- missing
    Introduction
    Main
    Conclusion
    Is it ok, that generated lists are not included in table of contents?

    You've just confused me.
    My understanding of how this is set up is that either:
    This is a book, and there is a master TOC that includes all book documents and a document-specific TOC in each component file, or
    This is a single file and there is one master TOC that includes all sections and a section-specific TOC that includes only the individual section.
    In the first case, I think you would want two TOC styles set up, one that includes the chapter heads (if I understood how you said this worked) for the for the master, and you would include all docs in the book when you generate it, and a second style for the individual chapters, with the subheadings you want to include.
    In the second case, it would be similar, but instead of only one style to cover the section TOCS, I think you would need to create a unique set of pargraph styles for the headings in each section (they can all be the same format, based one section, just with unique names), and then make a TOC style for each section that includes only the styles from that section.
    OK,  wait a sec. I just reread what you said: "Another thing: when the numbers are "linked" and updating well, they  display indide a little box. Not a text box, but a kind of little frame  around the numbers. That frame makes it imposible to delete just one  number: when the TOC says that Section 6.1 is in page 135, for example,  you cannot delete just the 5, it deletes, not just the 3 numbers, but  also the doted tab."
    I think these are NOT normal TOCs created by using Layout > TOC (but you could replace them with ones that are, if you set up your styles properly and the text you want to include is appearing on the pages). Those little boxes you mention sound like cross-references, which should update automatically without any intervention at all. Unfortunately, cross-refs can be flakey, especially if they point to another document. I'd open the cross-refs panel and see if you need to recreate a bunch of links.

  • Get data source schema - List tables has failed

    Hi, I am trying to expose tables from a SQL Azure Database to OData feed on power bi's data source setting and I got the following alert:
    Get data source schema - List tables and views has failed.  Please check Windows Event Log for Gateway Instance (InstanceName1) errors.
    Thanks in advance.

    Hi,
    Thank you for your question.
    I am trying to involve someone familiar with this topic to further look at this issue.
    In the meantime please have a check on the below link and check if it helps.
    http://whitepages.unlimitedviz.com/2013/09/power-bi-working-with-the-data-management-gateway/
    https://support.office.com/en-us/article/Create-a-Data-Source-and-Enable-OData-Feed-in-Power-BI-Admin-Center-9dbd3091-8961-4564-adf6-2a3aeff0b2b4?ui=en-US&rs=en-US&ad=US
    Regards,
    Mekh.

  • How to get data from subsites list of SharePoint 2010 in ssrs

    Hi,
    Can someone help me on this issue.
    I want to create a report using ssrs, I have some of the data in SQL and some of the data in sharepoint list.
    First I need to go to SQL and get the data from the table which contains URL for the subsite in sharepoint.
    after that I need to go to all the subsites and go to perticulat list in the subsites and get data from that list.
    for example, their is a top level site "abc"
    it contains sub site "123", "456","567", etc.. All this sub sites contain a list by name "Sample List", Now I need to go to that sub site list(Sample List) and get list-item column say "created By" which
    is created on particular date. 
    in my report, I need to print the sub site "url/Title" which comes from SQL database and list-item column  "Created By" of that sub site list "Sample List".
    I tried using subreport inside a report by using "Microsoft SharePoint List" as a datasource, but when it comes to real time we don't know how many subsites will be created, so we can't create a datasource for each subsite site.
    I guess we need to be using XML as a datasource, but how can we go to particular subsite in query while using XML, since all subsites have list with the same name ?
    I appreciate your help.
    Thank you,
    Kishore 

    Hi Kishore,
    SQL Server Reporting Services(SSRS) supports expression-based connection strings. This will help us to achieve the goal you mentioned in this case:
    Create a new report
    Create a Data Source in the report with the connection string like this:
    http://server/_vti_bin/lists.asmx (We use static connection string instead of expression-based connection string now, as it is not supported to get fields based on expression-based connection string in design time. We will change it to be expression-based
    connection string later)
    Create the data set(as you have done using XML query language). Please use list name instead of GUID in the listName parameter.
    Design the report(e.g. Add controls to the report)
    Now, let's change the connection string to be expression-based. First, please add a parameter to the report, move this parameter to top. This parameter is used to store the sub site name.
    Open the Data Source editor, set the connection string to be: ="http://server/" & Parameters!parameterCreatedInStep5.value & "_vti_bin/lists.asmx"
    In the main report, pass the sub site name to the report we created above via the parameter created in step5
    That is all.
    Anyway, this is actually a SQL Server Reporting Service(SSRS) question. You can get better support on this question from:
    http://social.technet.microsoft.com/Forums/en/sqlreportingservices/threads
    For more information about Expression-Based connection string, please see:
    http://msdn.microsoft.com/en-us/library/ms156450.aspx#Expressions
    If there is anything unclear, please feel free to ask.
    Thanks,
    Jinchun Chen
    Jin Chen - MSFT

  • To get details after second list in interactive report

    hai abap experts,
    i got a problem, i have written acode in which 3rd list is not executing how to write code for 3rd list(my 3rd list is to get item details by call transaction 'me23')
    i'll send u all my  code lz check n help out.
    TABLES : EKKO,
             EKPO,
             LFA1,
             EKET.
    SELECT-OPTIONS :  S_LIFNR FOR EKKO-LIFNR,
                      S_BSART FOR EKKO-BSART,
                      S_AEDAT FOR EKKO-AEDAT.
    ************************INTERNAL TABLES*******************************
    DATA : BEGIN OF RESULTS OCCURS 1000,    "DATA RETRIEVAL RESULTS
                 LIFNR LIKE EKKO-LIFNR,
                 EBELN LIKE EKKO-EBELN,
                 EBELP LIKE EKPO-EBELP,
                 AEDAT LIKE EKKO-AEDAT,
                 ERNAM LIKE EKKO-ERNAM,
                 LINES(3) TYPE N,
                 NETWR LIKE EKPO-NETWR,
                 MENGE LIKE EKPO-MENGE,
                 WEMNG LIKE EKET-WEMNG,
                 TXZ01 LIKE EKPO-TXZ01,
          END OF RESULTS.
    DATA : BEGIN OF WRK,                       "WORK FIELD DEFINATIONS
              HDRSW(1),                        "LIST HEADER SWITCH
              TITLE2(40),                      "2ND TITLE LINE FOR REPORT
           END OF WRK.
    DATA : BEGIN OF SELECT,                    "USER SELECTION FIELDS
                EBELN LIKE EKKO-EBELN,         "PURCHASE ORDER NO
                CHECKBOX(1) TYPE C,
           END OF SELECT.
    DATA : BEGIN OF STATS,                      "STATISTICS
           START_TIME LIKE SY-UZEIT,
           END_TIME LIKE SY-UZEIT,
           PROC_TIME LIKE SY-UZEIT,
           RECS_EKPO LIKE SY-DBCNT,
           RECS_EKKO LIKE SY-DBCNT,
       END OF STATS.
    **************************EVENTS**************************************
    INITIALIZATION.
      CLEAR S_AEDAT.
      S_AEDAT-SIGN = 'I'.
      S_AEDAT-OPTION = 'BT'.
      S_AEDAT-LOW = SY-DATUM - 30.
      S_AEDAT-HIGH = SY-DATUM.
      APPEND S_AEDAT.
    AT SELECTION-SCREEN.
      LOOP AT S_LIFNR.
        CHECK S_LIFNR-OPTION = 'EQ'.
        SELECT SINGLE * FROM LFA1 WHERE LIFNR = S_LIFNR-LOW.
        IF SY-SUBRC NE 0.
          MESSAGE E002 WITH 'VENDOR' S_LIFNR-LOW 'NOT FOUND IN LFA1'.
        ENDIF.
      ENDLOOP.
    START-OF-SELECTION.
      GET TIME.
      STATS-START_TIME = SY-UZEIT.
      SET PF-STATUS 'MAIN'.
      PERFORM DATA_RETRIEVAL.
      PERFORM PROCESS_DATA.
      PERFORM DISPLAY_LIST.
      PERFORM WRITE_SELECTIONS.
      PERFORM WRITE_STATISTICS.
    AT LINE-SELECTION.
      CHECK NOT SELECT-EBELN IS INITIAL.
      PERFORM DISPLAY_ITEM_DETAIL USING SELECT-EBELN.
      CLEAR : SELECT-EBELN.
    AT USER-COMMAND.
       CASE SY-UCOMM.
          WHEN 'DSA'.
            PERFORM CLEAR_ALL_SELECTED.
          WHEN 'DSL'.
             PERFORM DISPLAY_ALL_SELECTED.
       ENDCASE.
    TOP-OF-PAGE.
      CASE WRK-HDRSW.
        WHEN '1'.
          WRK-TITLE2 = 'PROGRAM SELECTIONS'(002).
        WHEN '2'.
          WRK-TITLE2 = 'PROGRAM DETAIL'(003).
        WHEN '3'.
          WRK-TITLE2 = 'PROGRAM SUMMARY'(004).
        WHEN '4'.
          WRK-TITLE2 = 'PROGRAM STATISTICS'(005).
      ENDCASE.
      FORMAT COLOR COL_HEADING.
      PERFORM PGH_STANDARD_HEADING
          USING        TEXT-001
                        WRK-TITLE2.
      IF WRK-HDRSW = '2'.
        WRITE : /01 SY-VLINE,
                 02 'VENDOR #'(103),
                 16 SY-VLINE,
                 17 'PO #'(104),
                 32 SY-VLINE,
                 33 'ENTRY DATE'(105),
                 43 SY-VLINE,
                 44 'USER'(106),
                 59 SY-VLINE,
                 60 'LINES'(107),
                 70 SY-VLINE,
                 71 'AMOUNT'(108),
                 91 SY-VLINE.
        WRITE : /01 SY-ULINE(91).
      ENDIF.
      FORMAT RESET.
    **************************SECONDRY LIST*******************************
    TOP-OF-PAGE DURING LINE-SELECTION.
      CASE WRK-HDRSW.
        WHEN '5'.
          WRK-TITLE2 = 'DETAIL LISTING'(201).
      ENDCASE.
      FORMAT COLOR COL_HEADING.
      PERFORM PGH_STANDARD_HEADING
          USING        TEXT-001
                        WRK-TITLE2.
      IF WRK-HDRSW = '5'.
        WRITE : /01 SY-VLINE,
                 02 'VENDOR #'(103),
                 16 SY-VLINE,
                 17 'PO #'(104),
                 32 SY-VLINE,
                 33 'ENTRY DATE'(105),
                 43 SY-VLINE,
                 44 'USER'(106),
                 59 SY-VLINE.
        WRITE : /01 SY-ULINE(59).
        FORMAT COLOR COL_KEY.
        WRITE : /01 SY-VLINE,
                 02 RESULTS-LIFNR,
                 16 SY-VLINE,
                 17 RESULTS-EBELN,
                 32 SY-VLINE,
                 33 RESULTS-AEDAT DD/MM/YY,
                 43 SY-VLINE,
                 44 RESULTS-ERNAM,
                 59 SY-VLINE.
        WRITE : /01 SY-ULINE(101).
        FORMAT COLOR COL_HEADING.
        WRITE : /01 SY-VLINE,
                 02 'LINE'(301),
                 07 SY-VLINE,
                 08 'DESCRIPTION'(302),
                 48 SY-VLINE,
                 49 'QTY ORDERDED'(303),
                 64 SY-VLINE,
                 65 'QTY RECEIVED'(304),
                 80 SY-VLINE,
                 81 'AMOUNT'(305),
                 101 SY-VLINE.
        WRITE : /01 SY-ULINE(101).
      ENDIF.
      FORMAT RESET.
    *************************SUBROUTINES**********************************
    FORM DISPLAY_ALL_SELECTED.
    DATA : LINE_NUMBER LIKE SY-LILLI.
              LINE_NUMBER = 1.
      DO.
      CLEAR : SELECT-CHECKBOX,
              SELECT-EBELN.
    READ LINE LINE_NUMBER   FIELD VALUE SELECT-CHECKBOX
                                           SELECT-EBELN.
      IF SY-SUBRC NE 0.
            EXIT.
      ENDIF.
    ADD 1 TO LINE_NUMBER.
    CHECK SELECT-CHECKBOX = 'X'.
    NEW-PAGE.
    PERFORM DISPLAY_ITEM_DETAIL USING SELECT-EBELN.
    ENDDO.
    ENDFORM.
    FORM CLEAR_ALL_SELECTED.
    DATA : LINE_NUMBER LIKE SY-LILLI.
             LINE_NUMBER = 1.
      DO.
      READ LINE LINE_NUMBER   FIELD VALUE SELECT-CHECKBOX
                                           SELECT-EBELN.
      IF SY-SUBRC NE 0.
            EXIT.
      ENDIF.
    IF SELECT-CHECKBOX = 'X'.
    CLEAR : SELECT-CHECKBOX.
    MODIFY LINE LINE_NUMBER FIELD VALUE SELECT-CHECKBOX
                                      SELECT-EBELN.
    ENDIF.
    ADD 1 TO LINE_NUMBER.
    ENDDO.
    ENDFORM.
    FORM DATA_RETRIEVAL.
      SELECT * FROM EKKO WHERE BSART IN S_BSART
                           AND AEDAT IN S_AEDAT
                           AND LIFNR IN S_LIFNR.
        CLEAR RESULTS.
        RESULTS-LIFNR = EKKO-LIFNR.
        RESULTS-EBELN = EKKO-EBELN.
        RESULTS-AEDAT = EKKO-AEDAT.
        RESULTS-ERNAM = EKKO-ERNAM.
        SELECT * FROM EKPO WHERE EBELN = EKKO-EBELN.
          MOVE 1 TO RESULTS-LINES.
          MOVE EKPO-NETWR TO RESULTS-NETWR.
          RESULTS-EBELP = EKPO-EBELP.
          RESULTS-TXZ01 = EKPO-TXZ01.
          RESULTS-MENGE = EKPO-MENGE.
          APPEND RESULTS.
        ENDSELECT.
      ENDSELECT.
    ENDFORM.                    "DATA_RETRIEVAL
    FORM PROCESS_DATA.
      LOOP AT RESULTS.
        CLEAR RESULTS-WEMNG.
        SELECT * FROM EKET WHERE EBELN = RESULTS-EBELN
                       AND EBELP = RESULTS-EBELP.
          ADD EKET-WEMNG TO RESULTS-WEMNG.
        ENDSELECT.
        MODIFY RESULTS.
      ENDLOOP.
    ENDFORM.                    "PROCESS_DATA
    FORM DISPLAY_LIST.
      DATA : TOT_LINES(3) TYPE N.
      DATA : TOT_AMT      LIKE EKPO-NETWR.
      DATA : WRT_FLAG(1)  TYPE C.
      SORT RESULTS BY LIFNR EBELN.
      NEW-PAGE.
      WRK-HDRSW = '2'.
      LOOP AT RESULTS.
        AT END OF EBELN.
          MOVE 'X' TO WRT_FLAG.
        ENDAT.
        ADD 1 TO TOT_LINES.
        ADD RESULTS-NETWR TO TOT_AMT.
        IF WRT_FLAG = 'X'.
          WRITE : /01 SY-VLINE,
                   02 SELECT-CHECKBOX AS CHECKBOX,
                   04 RESULTS-LIFNR,
                   16 SY-VLINE,
                   17 RESULTS-EBELN,
                   32 SY-VLINE,
                   33 RESULTS-AEDAT MM/DD/YY,
                   43 SY-VLINE,
                   44 RESULTS-ERNAM,
                   59 SY-VLINE,
                   60 TOT_LINES,
                   70 SY-VLINE,
                   71 TOT_AMT,
                   91 SY-VLINE.
          SELECT-EBELN = RESULTS-EBELN.
          HIDE : SELECT-EBELN.
          CLEAR : SELECT-EBELN.
          WRITE : /01 SY-ULINE(91).
          CLEAR : WRT_FLAG,
                  TOT_LINES,
                  TOT_AMT.
        ENDIF.
        AT END OF LIFNR.
         SUM.
          FORMAT COLOR COL_GROUP.
          WRITE : /01 SY-VLINE,
                   02 'TOTAL FOR VENDOR:'(101),
                       RESULTS-LIFNR,
                   70 SY-VLINE,
                   71 RESULTS-NETWR,
                   91 SY-VLINE.
          WRITE : /01 SY-ULINE(91).
          FORMAT RESET.
        ENDAT.
      ENDLOOP.
      IF SY-SUBRC NE 0.
        FORMAT COLOR COL_NEGATIVE.
        WRITE : /01 SY-VLINE,
                 02 'NO RECORDS FOUND'(102),
                 91 SY-VLINE.
        WRITE : /01 SY-ULINE(91).
        FORMAT RESET.
      ENDIF.
    ENDFORM.                    "DISPLAY_LIST
    FORM DISPLAY_ITEM_DETAIL USING L_EBELN.
    CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
    SET PARAMETER ID 'BES' FIELD L_EBELN.
    *GET PARAMETER ID 'BES' FIELD L_EBELN.
      WRK-HDRSW = '5'.
      SET PF-STATUS 'STLI'.
      LOOP AT RESULTS WHERE EBELN = L_EBELN.
        WRITE : /01 SY-VLINE,
                 02 RESULTS-EBELP,
                 07 SY-VLINE,
                 08 RESULTS-TXZ01,
                 48 SY-VLINE,
                 49(15) RESULTS-MENGE,
                 64 SY-VLINE,
                 65(15) RESULTS-WEMNG,
                 80 SY-VLINE,
                 81 RESULTS-NETWR,
                 101 SY-VLINE.
          WRITE : /01 SY-ULINE(101).
        ENDLOOP.
      IF SY-SUBRC NE 0.
        FORMAT COLOR COL_NEGATIVE.
        WRITE : /01 SY-VLINE,
                 02 'NO RECORDS FOUND'(102),
                 91 SY-VLINE.
        WRITE : /01 SY-ULINE(91).
        FORMAT RESET.
      ENDIF.
    ENDFORM.                    "DISPLAY_ITEM_DETAIL
    FORM WRITE_SELECTIONS.
      NEW-PAGE.
      WRK-HDRSW = '1'.
      WRITE : /01 SY-VLINE,
               02 'VENDOR NUMBER'(112),
               25 SY-VLINE.
      LOOP AT S_LIFNR.
        WRITE : 26 S_LIFNR,
                91 SY-VLINE.
        WRITE : /01 SY-ULINE(91).
      ENDLOOP.
      IF SY-SUBRC NE 0.
        WRITE : 26 '*ALL*'(200),
                91 SY-VLINE.
        WRITE : /01 SY-ULINE(91).
      ENDIF.
      WRITE : /01 SY-VLINE,
               02 'PO TYPE'(111),
               25 SY-VLINE.
      LOOP AT S_BSART.
        WRITE : 26 S_BSART,
                91 SY-VLINE.
        WRITE : /01 SY-ULINE(91).
      ENDLOOP.
      IF SY-SUBRC NE 0.
        WRITE : 26 '*ALL*'(200),
                91 SY-VLINE.
        WRITE : /01 SY-ULINE(91).
      ENDIF.
      WRITE : /01 SY-VLINE,
               02 'ENTRY DATES'(112),
               25 SY-VLINE.
      LOOP AT S_AEDAT.
        WRITE : 26 S_AEDAT,
                91 SY-VLINE.
        WRITE : /01 SY-ULINE(91).
      ENDLOOP.
      IF SY-SUBRC NE 0.
        WRITE : 26 '*ALL*'(200),
                91 SY-VLINE.
        WRITE : / SY-ULINE(91).
      ENDIF.
    ENDFORM.                    "WRITE_SELECTIONS
    FORM WRITE_STATISTICS.
      NEW-PAGE.
      WRK-HDRSW = '4'.
      GET TIME.
      STATS-END_TIME = SY-UZEIT.
      IF STATS-END_TIME > STATS-START_TIME.
        STATS-PROC_TIME = STATS-END_TIME - STATS-START_TIME.
      ELSE.
        STATS-PROC_TIME = '240000'.
        STATS-PROC_TIME = STATS-PROC_TIME - STATS-START_TIME.
        STATS-PROC_TIME = STATS-PROC_TIME + STATS-END_TIME.
      ENDIF.
      WRITE : /01 SY-VLINE,
               02 'START TIME'(113),
               25 SY-VLINE,
               26 STATS-START_TIME USING EDIT MASK '__:__:__',
               91 SY-VLINE.
      WRITE : /01 SY-ULINE(91).
      WRITE : /01 SY-VLINE,
               02 'END TIME'(114),
               25 SY-VLINE,
               26 STATS-END_TIME USING EDIT MASK '__:__:__',
               91 SY-VLINE.
      WRITE : /01 SY-ULINE(91).
      WRITE : /01 SY-VLINE,
               02 'PROCESSING TIME'(115),
               25 SY-VLINE,
               26 STATS-PROC_TIME USING EDIT MASK '__:__:__',
               91 SY-VLINE.
      WRITE : /01 SY-ULINE(91).
      WRITE : /01 SY-VLINE,
               02 'EKKO RECORDS READ'(116),
               25 SY-VLINE,
               26 STATS-RECS_EKKO,
               91 SY-VLINE.
      WRITE : /01 SY-ULINE(91).
      WRITE : /01 SY-VLINE,
               02 'EKPO RECORDS READ'(117),
               25 SY-VLINE,
               26 STATS-RECS_EKPO,
               91 SY-VLINE.
      WRITE : /01 SY-ULINE(91).
    ENDFORM.                    "WRITE_STATISTICS
    FORM PGH_STANDARD_HEADING USING L_TITLE1
                                    L_TITLE2.
      FORMAT COLOR COL_HEADING.
      PERFORM PGH_WRITE_DATE_TIME.
      PERFORM PGH_WRITE_TITLE USING L_TITLE1.
      PERFORM PGH_WRITE_REPORT_PAGE.
      PERFORM PGH_WRITE_USERID.
      PERFORM PGH_WRITE_TITLE USING L_TITLE2.
      PERFORM PGH_WRITE_SYSTEM_CLIENT.
      FORMAT RESET.
    ENDFORM.                    "PGH_STANDARD_HEADING
    FORM PGH_WRITE_USERID.
      WRITE : /01 SY-ULINE(91).
      WRITE : /01 SY-VLINE,
               02 'USERID:',
               10 SY-UNAME,
               91 SY-VLINE.
    ENDFORM.                    "PGH_WRITE_USERID
    FORM PGH_WRITE_DATE_TIME.
      WRITE : /01 SY-ULINE(91).
      WRITE : /01 SY-VLINE,
               02 'DATE:',
               10 SY-DATUM MM/DD/YYYY,
               21 '/',
               23 SY-UZEIT USING EDIT MASK'__:__:__',
               91 SY-VLINE.
    ENDFORM.                    "PGH_WRITE_DATE_TIME
    FORM PGH_WRITE_TITLE USING L_TITLE.
      DATA : L_LINSZ LIKE SY-LINSZ.
      DATA : L_TITLEL LIKE SY-TABIX.
      DATA : L_START LIKE SY-TABIX.
      L_LINSZ = SY-LINSZ.
      L_TITLEL = STRLEN( L_TITLE ).
      L_START = ( L_LINSZ / 2 ) - ( L_TITLEL / 2 ).
      POSITION L_START.
      WRITE :/01 SY-VLINE,
              02 L_TITLE,
              91 SY-VLINE.
    ENDFORM.                    "PGH_WRITE_TITLE
    FORM PGH_WRITE_REPORT_PAGE.
      DATA : L_LINSZ LIKE SY-LINSZ.
      DATA : L_START LIKE SY-TABIX.
      L_LINSZ = SY-LINSZ.
      L_START = L_LINSZ - 24.
      POSITION L_START.
      WRITE : /01 SY-VLINE,
               02 'REPORT:', SY-REPID, 'PG', (4) SY-PAGNO,
               91 SY-VLINE.
      POSITION L_LINSZ.
    ENDFORM.                    "PGH_WRITE_REPORT_PAGE
    FORM PGH_WRITE_SYSTEM_CLIENT.
      DATA : L_LINSZ LIKE SY-LINSZ.
      DATA : L_START LIKE SY-TABIX.
      L_LINSZ = SY-LINSZ.
      L_START = L_LINSZ - 24.
      POSITION L_START.
      WRITE :/01 SY-VLINE,
              02 'SYSTEM:', SY-SYSID,'/',SY-MANDT,
              91 SY-VLINE.
      POSITION L_LINSZ.
    WRITE :/01 SY-VLINE.
      WRITE : /01 SY-ULINE(91).
    ENDFORM.                    "PGH_WRITE_SYSTEM_CLIENT

    There is a very minor correction in your logic.
    FORM DISPLAY_ITEM_DETAIL USING L_EBELN.
    CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
    SET PARAMETER ID 'BES' FIELD L_EBELN.
    *GET PARAMETER ID 'BES' FIELD L_EBELN.
    instead of this try
    SET PARAMETER ID 'BES' FIELD L_EBELN.
    CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
    you should always set the parameter id first and then call the transaction.
    i tried it in my system and it seems to be working.

  • How to get listitems from different lists using Js

    Hi,
    I want to search my web for all the lists that contains a certain checkbox column (get it by name).
    Once I have this list, I want to iterate through all of them and get the list items with this column checked.
    I got the lists, but when I tried to get the fields - I got an error - the system doesn't recognizes the fields.
    To be more specific - in the code I've posted below in method onGetFieldsSuccess I'm getting an error in the first line, as I can't retrieve the enumerator.
    In the MSDN I saw how to retrieve list's fields, but there it was a specific list. Is there a way to get the lists who have a specific field?
    Any help will be appreciated
    <script> 
    ExecuteOrDelayUntilScriptLoaded(showFavorites, "sp.js"); 
    var ctx;
    var lists;
    function showFavorites()
         ctx = new SP.ClientContext.get_current();
         var web = ctx.get_site().openWeb("/legal");
         ctx.load(web);
         lists = ctx.get_site().openWeb("/legal").get_lists();
         ctx.load(lists);
         ctx.executeQueryAsync(Function.createDelegate(this, this.onGetListSuccess), Function.createDelegate(this, this.onFail));
    var list;
    var fields;
    function onGetListSuccess(sender, args) {
              var listEnumerator = lists.getEnumerator();
              while (listEnumerator.moveNext()) {
                   list = listEnumerator.get_current();
                   ctx.load(list);
                   fields = list.get_fields();
                    ctx.load(fields , 'Include(Title)');
                   ctx.executeQueryAsync(Function.createDelegate(this, this.onGetFieldsSuccess), Function.createDelegate(this, this.onFail));
    function onGetFieldsSuccess(sender, args)
          var fieldEnumerator = fields.getEnumerator();
        while (fieldEnumerator.moveNext()) {
            var field = fieldEnumerator.get_current();
            var name = field.get_staticName();
            if (name == "MyFavorite") {
                alert(list.get_title()); 
                break;
    function onFail(sender, args) {
        console.log(args.get_message());
    </script>​​​​​​​​​​​​​​​​​​​​​​​​​

    Thanks a lot Thriggle,
    I've used your advise, and other then some syntax problems (as you predicted :) everything worked just fine!
    (I had to add another executeQueryAsync to get the listItems files - but that wasn't a problem).
    The only issue that I have is that it takes FOREVER to load, and once it does load - it returns duplicates of the same results (sometimes 3, sometime up to 10).
    I only have 13 tables with about 50 list items in each table, and from that only 6 tables have the specified field - so it shouldn't have taken THAT long (sometimes I see the results after 45 seconds after the page finished loading).
    should I have used a new client context for each query? or is there a place where I'm getting unnecessary loops (I've made sure that I have only 1 list item that matches the 
    I'm resending the complete code. maybe there's something I've missed here.
    <cfheader name="X-XSS-Protection" value="0"></cfheader>​​​​​ ​​​<script>
    ExecuteOrDelayUntilScriptLoaded(showFavorites, "sp.js"); 
    function showFavorites()
         var displayTable = document.getElementById("myFavoritesTable");
         for(var i = displayTable.rows.length - 1; i > 0; i--)
                displayTable.deleteRow(i);
       var fieldToLookFor = "MyFavorite";
         var ctx = new SP.ClientContext.get_current();
         var web = ctx.get_site().openWeb("/legal");
         var lists = web.get_lists();
         ctx.load(web);
         ctx.load(lists, 'Include(Title,Fields)');
         ctx.executeQueryAsync(Function.createDelegate(this, function(){
         var matchingLists = [];
         var listEnum = lists.getEnumerator();
         while(listEnum.moveNext()){
              var currList = listEnum.get_current();
              var containsField = false;
              var fields = currList.get_fields();
              var fieldEnum = fields.getEnumerator();
              while(fieldEnum.moveNext()){
                   if(fieldEnum.get_current().get_staticName() == fieldToLookFor){ containsField = true; break;}
              if(containsField){
                  matchingLists.push(currList.get_title());            
         //alert(matchingLists);
         var i = 0;
         while(i < matchingLists.length){
              var list = lists.getByTitle(matchingLists[i]);
              i++;
              var camlQuery = new SP.CamlQuery();
              var camlString = '<View><Query><FieldRef Name=\'' + fieldToLookFor + '\' /><Value Type=\'Integer\'>1</Value></Query></View>';
              camlQuery.set_viewXml(camlString);
              var items = list.getItems(camlQuery);
              ctx.load(items);
              ctx.executeQueryAsync(Function.createDelegate(this,function(){
                   var itemEnum = items.getEnumerator();
                   while(itemEnum.moveNext()){
                        var item = itemEnum.get_current();
                        var file = item.get_file();
                        ctx.load(file);
                        ctx.executeQueryAsync(Function.createDelegate(this,function(){
                        var table = document.getElementById("myFavoritesTable");
    // Create an empty <tr> element and add it to the 1st position of the table:
    var row = table.insertRow(-1);
    // Insert new cells (<td> elements) at the 1st and 2nd position of the "new" <tr> element:
    var cell1 = row.insertCell(0);
    var cell2 = row.insertCell(1);
    var cell3 = row.insertCell(2);
    var cell4 = row.insertCell(3);
    cell1.innerHTML = "XX";
    cell2.innerHTML = item.get_id();
    cell3.innerHTML = "<a href='" + item.get_file().get_serverRelativeUrl() + "' alt=''>" + item.get_file().get_name() + "</a>" ;
    cell4.innerHTML = "";
                     }),Function.createDelegate(this,function(sender, args){
                  alert(args.get_message());
              }),Function.createDelegate(this,function(sender, args){
                  alert(args.get_message());
    }), Function.createDelegate(this, function(sender, args){ 
         alert(args.get_message()); 
    </script>​​​​​ 
    <table id="myFavoritesTable">
       <tbody> 
          <tr valign="top" class="ms-viewheadertr"> 
             <th nowrap="nowrap" class="ms-vh"> 
                <table> 
                   <tbody> 
                      <tr> 
                         <td width="100%" nowrap="nowrap" class="ms-vb">שם טבלה 
                            <img src="/_layouts/15/images/blank.gif" height="1" width="13" alt="" style="visibility: hidden;"/> </td> 
                      </tr> 
                   </tbody> 
                </table> 
             </th> 
             <th nowrap="nowrap" class="ms-vh"> 
                <table> 
                   <tbody> 
                      <tr> 
                         <td width="100%" nowrap="nowrap" class="ms-vb">ID 
                            <img src="/_layouts/15/images/blank.gif" height="1" width="13" alt="" style="visibility: hidden;"/> </td> 
                      </tr> 
                   </tbody> 
                </table> 
             </th> 
             <th nowrap="nowrap" class="ms-vh"> 
                <table> 
                   <tbody> 
                      <tr> 
                         <td width="100%" nowrap="nowrap" class="ms-vb">כותרת 
                            <img src="/_layouts/15/images/blank.gif" height="1" width="13" alt="" style="visibility: hidden;"/> </td> 
                      </tr> 
                   </tbody> 
                </table> 
             </th> 
             <th nowrap="nowrap" class="ms-vh"> 
                <table> 
                   <tbody> 
                      <tr> 
                         <td width="100%" nowrap="nowrap" class="ms-vb">מסמך ​ 
                            <img src="/_layouts/15/images/blank.gif" height="1" width="13" alt="" style="visibility: hidden;"/> ​​​​​​​</td> 
                      </tr> 
                   </tbody> 
                </table> 
             </th> 
          </tr>
       </tbody> 
    </table>​ 
    <p>​​​​​​​​​</p>

  • How can I set up a List of Figures with extra text?

    I'm writing my Art History dissertation, which includes a substantial group of figures at the end.  My advisor has requested that I caption the images, but also provide a List of Figures before the actual images begin.  I've got it figured out this far--I'm using the Table of Contents feature to automatically number the captions and then pull the caption text back to the List of Figures. 
    Here's the snag:  I need to include attribution information about where I found the images I'm using, but only in the list of figures.  My advisor specifically requested that I not include this information in the captions as he felt it cluttered the images.  How can I include small amounts of text (for example "After Jones 1987, Fig. 22") for hundreds of images in the List of Figures without putting this info in the captions themselves? 
    Of course, just typing the info into the List of Figures doesn't work--as soon as the list is updated the extra text gets erased.  I've been playing around with hidden layers, but when I create a new hidden layer with text frames the numbering of the original layer is disturbed.  Any ideas about how to preserve the numbering and include the extra information in the List of Figures without adding it to the visible caption? I'd be very grateful for any help.

    Perhaps at the end of your caption, in a [None] coloured text, 0.1 pt size? Don't put it into a separate paragraph, 'cause you'd need to pick this up as well for your TOC. To edit this invisibly small text, you can use the Story Editor.
    (And I got quite far suggesting making it Conditional Text, which you would normally hide, having it show only when you generated the List of Figures, before a few dormant neurons woke up and demanded attention.
    'Course it would work -- you would get the extra text in your list, and if you hide the conditional text again, your document would reverse to "normal" state. However, making the conditional text visible may cause your text to reflow, and thus your regular Contents would be okay but the List of Figures -- generated with more text in your document! -- could well be off by a few pages ...)

  • Difficulty in using a variable to pass a list of names between 2 tables

    Hi All,
    I am trying to pass a list of names from one table as a variable to another table and trying to find the Highest level they exist at in the hierarchy. I am having some troubles with the variable and need some guidence and also if this should be a procedure or not.
    this is what i have now :
    Variable man_name Varchar;
    exec :man_name = (Select full_name from direct_manager_report)
    UPDATE direct_manager_report
    Set Manager_level_number =
    (Select 'Manager_Level_0' from manager_hierarchy where level_0_manager_name = man_name
    UNION
    Select 'Manager_Level_1' from manager_hierarchy where level_0_manager_name < > man_name AND level_1_manager_name = man_name
    UNION
    Select 'Manager_Level_2' from manager_hierarchy where level_1_manager_name < > man_name AND level_2_manager_name = man_name
    UNION
    Select 'Manager_Level_3' from manager_hierarchy where level_2_manager_name < > man_name AND level_3_manager_name = man_name
    Where full_name = man_name;
    Let me know what modifications have to be done for this the variable to get the name from table 1 and find the manager level from table 2 and populate it back in table 1.
    Any help is appreciated.
    Thanks

    Frank Kulash wrote:
    Hi,Thanks for your reply. I am sorry for not providing enough information.
    What's wrong with what you have now? I want to pass the manager name (about 2000) from direct_manager_report to the variable which i pass to manager_hierarchy table to find the highest level for each manager
    If it doesn't give the right results, then how is anyone except you to know what the right results are?
    Variable man_name Varchar;
    exec :man_name = (Select full_name from direct_manager_report)Does that really work for you?No thats why i said this is what i have and i am trying to see the best to past the list of manager names to get the level number.
    UPDATE direct_manager_report
    Set Manager_level_number =
    (Select 'Manager_Level_0' from manager_hierarchy where level_0_manager_name = man_name
    UNION
    Select 'Manager_Level_1' from manager_hierarchy where level_0_manager_name < > man_name AND level_1_manager_name = man_nameIt looks like something is missing on the line above. Did you mean "level_0_manager_name != man_name"?
    This site doesn't like to display the &lt;&gt; inequality operator. Always use the other (equivalent) inequality operator, !-, when posting here.
    UNION
    Select 'Manager_Level_2' from manager_hierarchy where level_1_manager_name < > man_name AND level_2_manager_name = man_name
    UNION
    Select 'Manager_Level_3' from manager_hierarchy where level_2_manager_name < > man_name AND level_3_manager_name = man_name
    Where full_name = man_name;Are you sure the UNION will never return more than 1 row?
    Let me know what modifications have to be done for this the variable to get the name from table 1 and find the manager level from table 2 and populate it back in table 1.Whenever you have a problem, post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data (in this case, the contents of table1 after everything is finished).
    See the forum FAQ {message:id=9360002}Sorry did not realize the missing !. Yes the union will always return one record for each manager name passed. I have tested the select part which hard coding the manager name and it does update the level number correctly. but i am struggling with passing a large list of values as a variable.
    This is the output i am looking for in the direct manager report table is :
    Manager Name | Manager Level Number
    ABC Manager Level 0
    XYZ Manager Level 1
    This is the structure of the manager hierarchy:
    Manager Level 0 Manager Level 1 Manager Level 2...Manager Level 14
    ABC ABC ABC ABC
    ABC XYZ XYZ XYZ
    Let me try the below but hopefully i am more clear on the requirement now.
    >
    You may want something like this
    MERGE INTO  direct_manager_report     dst
    USING   (
             SELECT    dmr.full_name
             ,           'Manager_Level_'
                    || MIN ( CASE  dmr.full_name
                                 WHEN  level_0_manager_name  THEN '0'
                                 WHEN  level_1_manager_name  THEN '1'
                                 WHEN  level_2_manager_name  THEN '2'
                                 WHEN  level_3_manager_name  THEN '3'
                               END
                     ) AS manager_level_number
             FROM      manager_hierarchy  dmr
             JOIN      manager_hierarchy      mh   ON   dmr.full_name IN ( level_0_manager_name
                                                                   , level_1_manager_name
                                                , level_2_manager_name
                                                , level_3_manager_name
             GROUP BY  dmr.full_name
         )                    src
    ON     ( dst.full_name  = src.full_name )
    WHEN MATCHED THEN UPDATE
    SET     dst.manager_level_number = src.manager_level_number
    Edited by: user599926 on Jun 4, 2013 9:41 PM

  • Can I use automatically select only first line of a caption to include in List of Figures?

    Is there a setting in the TOC utility in ID CS6 that will allow me to use only the first sentence in a caption to include in a list of Figures?
    Example
    Willard's Wharf, Cocoa, Florida, 1887.   This was Cocoa's first  blah blah blah.  Photo by a dead guy.  courtesy of a nice old lady whose grandmother collected it.
    In the example above, the entire passage is currently formatted using a paragraph style sheet in Arno Pro Caption.  When I'm done, I would like to have that first phrase or sentence in bold, which I planned to do with a character style sheet.  The remainder will be in regular type. 
    Now that I understand more how the TOC utility works, I'm wondering, can I make a paragraph style for the title phrase, and a second paragraph style for the remaining text in the caption that follows  If so, how to I ensure that the second paragraph will follow on the same line where ever the first paragraph style ends?  Nested styles, maybe?  If nested styles are the way to go, comments on or pointers to the simplest strategy to make this work will be appreciated.
    Captions are not consistent.  Some have a name and date; others are a Title phrase or sentence, followed, sometimes, by up to several sentences.  Typically, however, there is only one sentence after the title. I also usually have a "Courtesy of . . ." statement acknowledging the source of the photo.
    I'm a newbie using id cs6, for the first time, to format a book.  I'm enjoying using the program, but a few details sometimes bring me to a stop.
    Thanks
    Roy

    Roy,
    In fact, you only need a char style to control that you correctly mark what you want in the LOF.
    See how I do:
    1/ I create the para style "Caption" [color: Red] and insert a grep style in it.
    2/ I create the char style "Char_Caption" [color: Blue]. It only needs to control what I want in the LOF.
    3/ What I have to do is insert a "N-Joiner" in the "Caption" text. See the grep code of the grep style defined in the "Caption" para style.
    4/ I generate the TOC, only with the "Caption" para style. I select the story where I insert the TOC and launch this simple regex.
    Done! 

  • How do i print out a menu list; I want to print the titles in my iTunes folder

    I want to print the titles in my iTunes folder, can you say how to do it?
    Grab only takes a screen grab.
    Copy and paste won't keep the albums together.
    iTunes album list is too many pages.
    Thanks

    I have found an answer in the finder and dock section which has allowed me to copy and paste into Word or Excel. It has not copied the format of the window, but with some work will let me print the lists:-
    Print a list of files and folders
        184 Views   2 Replies Latest reply: May 28, 2012 10:54 AM by BDAqua                             
            Level 1 (0 points)    jdrescher
    jdrescher May 28, 2012 9:18 AM  
    Dose anyone know an easy way of listing files and folders from a disk? I need an inventory of the names on some ZIP disks.
              Level 10 (171,925 points)     Niel
    Re: Print a list of files and folders     May 28, 2012 10:15 AM    (in response to jdrescher) 
    Find and open the Script Editor or AppleScript Editor in the Applications folder and run the following:
    do shell script "ls -R " & quoted form of POSIX path of (choose folder)
    Copy and paste the resulting text.                                                            (66765)
    BDAqua
    Re: Print a list of files and folders     May 28, 2012 10:54 AM    (in response to jdrescher) 
    You can also get TextWrangler...
    Drag any Folder, even a Whole drive to a new text window & get a list like this...

  • Performance issue during SharePoint list data bind to html table using Ajax call(Rest API)

    Hello,
    I am having multiple lists in my SharePoint Site. I am using SharePoint REST APIs to get data from these lists and bind a HTML Table. Suppose, I have 5 lists with 1000 records each, I am looping 5000 times to bind each row(record) to this html table. This
    is causing performance issue which is taking a very long time to bind. 
    Is there any way So that I can reduce this looping OR is there any better approach to improve the performance. Please kindly Suggest.  Thank you for your help :)
    Warm Regards,
    Ratan Kumar Racha

    Hi Racha,
    For handling large data binding in a page,
    AngularJS would be a great option if you might would worry about the performance.
    You can get more information about using AngularJS from the two links below:
    https://www.airpair.com/angularjs/posts/angularjs-performance-large-applications
    http://www.sitepoint.com/10-reasons-use-angularjs/
    Best regards
    Patrick Liang
    TechNet Community Support

  • FMs to get the order items list for an order template

    Hello everyone,
    I'm looking for sap FMs (or tables) to get the order items list for a given order template in CRM backend.  Any advice/suggestions?
    Thanks, Jin

    Hello Jin,
    Function module CRM_ORDER_READ with either the Header GUID will give you everything about the order and you can optimize the call by limiting the sets you want to get in the export tables.
    The item list (administration data) can be from ET_ORDERADM_I and the details about the products can be found from ET_PRODUCT_I
    FYI, this will work for any transaction - Order, Quotation and of course Order Templates too.
    Easwar Ram
    http://www.parxlns.com

  • Pending Routing or BOM material list with material in MARA table

    I want to tally the material codes in MARA table with the materials without routing and BOM . i.e. pending Routing or BOM material list with material in MARA table.
    Before MRP run How we will get this list ?
    Pl' give reply.
    Thanks .
    Regards.

    Hi Kishore,
    SAP does not have any standard reports to suite your requirement. What i would suggest is to take couple of data extract from table to validate.
    1. First dowload all materials which should have "BOM" and "Routing". This you can do by extracting "MARC" table data where field "BESKZ = 'E' or 'X' ".
    2. Now you can extract the data from "MAST" for BOM and "MAPL" for Routing details.
    Now do VLOOK up in excel to find the mismatch data.
    This can also be done by a customised program, which i dont think it is required since it is going to be used only once.
    You could also try SQVI with table joins
    Hope this helps...Reward your points if so,
    Regards,
    Prasobh

  • Need To Get Folder and Subfolders List

    Hi All
    I have a requirement which will give me the list of folder and subfolders list for a given path. I can achieve this using xp_cmdshell.
    But it is admin level usage. So i need to get with the use SP_OAMethod using file system object.
    Please help me to do the same.

    Hello Amarnath, Finally i have the code that you are looking for. 
    SELECT * FROM dbo.dir('c:\testfolder') WHERE IsFolder =1
    --------------- USER DEFINE FUNCTION
    CREATE FUNCTION [dbo].[Dir](@Wildcard VARCHAR(8000))
    RETURNS @MyDir TABLE
    -- columns returned by the function
    [name] VARCHAR(2000), --the name of the filesystem object
    [path] VARCHAR(2000), --Contains the item's full path and name.
    [ModifyDate] DATETIME, --the time it was last modified
    [IsFileSystem] INT, --1 if it is part of the file system
    [IsFolder] INT, --1 if it is a folsdder otherwise 0
    [error] VARCHAR(2000) --if an error occured, gives the error otherwise null
    AS
    -- body of the function
    BEGIN
    DECLARE
    --all the objects used
    @objShellApplication INT,
    @objFolder INT,
    @objItem INT,
    @objErrorObject INT,
    @objFolderItems INT,
    --potential error message shows where error occurred.
    @strErrorMessage VARCHAR(1000),
    --command sent to OLE automation
    @Command VARCHAR(1000),
    @hr INT, --OLE result (0 if OK)
    @count INT,@ii INT,
    @name VARCHAR(2000),--the name of the current item
    @path VARCHAR(2000),--the path of the current item
    @ModifyDate DATETIME,--the date the current item last modified
    @IsFileSystem INT, --1 if the current item is part of the file system
    @IsFolder INT --1 if the current item is a file
    IF LEN(COALESCE(@Wildcard,''))<2
    RETURN
    SELECT @strErrorMessage = 'opening the Shell Application Object'
    EXECUTE @hr = sp_OACreate 'Shell.Application',
    @objShellApplication OUT
    --now we get the folder.
    IF @HR = 0
    SELECT @objErrorObject = @objShellApplication,
    @strErrorMessage = 'Getting Folder"' + @wildcard + '"',
    @command = 'NameSpace("'+@wildcard+'")'
    IF @HR = 0
    EXECUTE @hr = sp_OAMethod @objShellApplication, @command,
    @objFolder OUT
    IF @objFolder IS NULL RETURN --nothing there. Sod the error message
    --and then the number of objects in the folder
    SELECT @objErrorObject = @objFolder,
    @strErrorMessage = 'Getting count of Folder items in "' + @wildcard + '"',
    @command = 'Items.Count'
    IF @HR = 0
    EXECUTE @hr = sp_OAMethod @objfolder, @command,
    @count OUT
    IF @HR = 0 --now get the FolderItems collection
    SELECT @objErrorObject = @objFolder,
    @strErrorMessage = ' getting folderitems',
    @command='items()'
    IF @HR = 0
    EXECUTE @hr = sp_OAMethod @objFolder,
    @command, @objFolderItems OUTPUT
    SELECT @ii = 0
    WHILE @hr = 0 AND @ii< @count --iterate through the FolderItems collection
    BEGIN
    IF @HR = 0
    SELECT @objErrorObject = @objFolderItems,
    @strErrorMessage = ' getting folder item '
    + CAST(@ii AS VARCHAR(5)),
    @command='item(' + CAST(@ii AS VARCHAR(5))+')'
    --@Command='GetDetailsOf('+ cast(@ii as varchar(5))+',1)'
    IF @HR = 0
    EXECUTE @hr = sp_OAMethod @objFolderItems,
    @command, @objItem OUTPUT
    IF @HR = 0
    SELECT @objErrorObject = @objItem,
    @strErrorMessage = ' getting folder item properties'
    + CAST(@ii AS VARCHAR(5))
    IF @HR = 0
    EXECUTE @hr = sp_OAMethod @objItem,
    'path', @path OUTPUT
    IF @HR = 0
    EXECUTE @hr = sp_OAMethod @objItem,
    'name', @name OUTPUT
    IF @HR = 0
    EXECUTE @hr = sp_OAMethod @objItem,
    'ModifyDate', @ModifyDate OUTPUT
    IF @HR = 0
    EXECUTE @hr = sp_OAMethod @objItem,
    'IsFileSystem', @IsFileSystem OUTPUT
    IF @HR = 0
    EXECUTE @hr = sp_OAMethod @objItem,
    'IsFolder', @IsFolder OUTPUT
    --and insert the properties into a table
    INSERT INTO @MyDir ([NAME], [path], ModifyDate, IsFileSystem, IsFolder)
    SELECT @NAME, @path, @ModifyDate, @IsFileSystem, @IsFolder
    IF @HR = 0 EXECUTE sp_OADestroy @objItem
    SELECT @ii=@ii+1
    END
    IF @hr <> 0
    BEGIN
    DECLARE @Source VARCHAR(255),
    @Description VARCHAR(255),
    @Helpfile VARCHAR(255),
    @HelpID INT
    EXECUTE sp_OAGetErrorInfo @objErrorObject, @source OUTPUT,
    @Description OUTPUT, @Helpfile OUTPUT, @HelpID OUTPUT
    SELECT @strErrorMessage = 'Error whilst '
    + COALESCE(@strErrorMessage, 'doing something') + ', '
    + COALESCE(@Description, '')
    INSERT INTO @MyDir(error) SELECT LEFT(@strErrorMessage,2000)
    END
    EXECUTE sp_OADestroy @objFolder
    EXECUTE sp_OADestroy @objShellApplication
    RETURN
    END---- OUTPUT
    Regards, RSingh

Maybe you are looking for