Code to get a document

Hi,
I am trying to show the documents saved for the projects.
For this I created a FM to pull all the names of the documents saved for a project.
But how do I get them to open the document by double clicking on the output of the FM.Is there some other method to do all this.
The point is I must be able to open a document by double clicking on its name.
Thank you,

Hi
U can try to this little program:
PARAMETERS: P_EXT LIKE SOOD-FILE_EXT,
                                  FILE(100).
DATA: PROGRAM LIKE  SOXPC-PATH.
CALL FUNCTION 'SO_PROGNAME_GET_WITH_PATH'
  EXPORTING
    DOCTYPE                 = P_EXT
IMPORTING
   PATHNAME                = PROGRAM
* TABLES
*   RE                      =
EXCEPTIONS
   PATH_NOT_FOUND          = 1
   PROGRAM_NOT_FOUND       = 2
   NO_BATCH                = 3
   X_ERROR                 = 4
   OTHERS                  = 5
IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'WS_EXECUTE'
  EXPORTING
    COMMANDLINE              = FILE
    PROGRAM                  = PROGRAM
* IMPORTING
*   RBUFF                    =
EXCEPTIONS
   FRONTEND_ERROR           = 1
   NO_BATCH                 = 2
   PROG_NOT_FOUND           = 3
   ILLEGAL_OPTION           = 4
   GUI_REFUSE_EXECUTE       = 5
   OTHERS                   = 6
IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Max

Similar Messages

  • Getting the documents in open line items for t-code f-53

    Hello gurus,
    In one scenario i want to get the document numbers against which the accounting document number is created after posting(saving) in t-code F-53. I am using BTE event -00001030 (posting of standard data). In this function module i am getting the tables t_bkpf and t_bseg etc.. in which the newly generated document number (Belnr) is present in the table. But the field AUGBL is blank. I want to get the document for which this clearing is being done. How can i get the open line items?

    Thanks, I solved the problem

  • I just paid for Adobe Export PDF and now when I click on an attachment received in an email I don't get the document, but a bunch of codes.  This is extremely important to go back to the other.

    I just bought Adobe Export PDF because I wanted to convert documents received in Adobe to a Work document.  Why do the documents that I receive in an email now not show up in readable form?  Why does it just show some kind of code instead of the document?

    These documents are opening in a window, correct? Along the top of it, assuming you are on Windows, there should be a bar with a title in it, just like most apps.
    It sounds to me as if you are being send PDF files, not Word documents. Why are you sure they are Word documents. IGNORE THE WORD ICON, that would be part of the problem.

  • T-Code to view SAP Document no.

    Dear,
    Need a T-code to view SAP Document number created while SAP Stock Creation.
    After creation through MB1C a number is generated & i need to know what is the process to get this Document Number.
    Thanks in Advance.

    hi,
    You can check MSEG table to get numbers..
    Or USe MB51 to get list of material document as per your selections on the initial screen...
    Regards
    Priyanka.P

  • How to get the "Document Info" in illustrator

    In illustrator using "Document Info" we can get the file information. Like that how to get the document information using script. Anyone please help me.
    Regards,
    Prabudass

    I think sample code in the SDK contains a 'skeleton' plugin, I'd start with that. It should also provide a list of suites that get automatically loaded, I think it's in Suites.h. Just make sure AIDocumentSuite is in the list, and if it's not, just follow the examples in that file to add it. That should end up with a global variable called 'sDocument', which has all the suite functions as methods.
    Then it's something like:
    AIDocumentSetup setup;
    AIErr error = sDocument->GetDocumentSetup(&setup);
    // check error to make sure it's kNoErr
    Then you just have to inspect the setup struct for (hopefully) the answers you're looking for.

  • Getting the document ID of an uploaded document

    Hello All,
    Perhaps someone out there can help with this assumingly simple task of getting the document id of a file that was uploaded.
    Back ground:
    I have a separate system which retains records of transactions. Paperwork is often received as a part of these transactions and my intention is to store those documents into SharePoint. I want to store the document id on the record to facilitate easy retrieval
    of the document. No need to search by meta tags or the like; I will have the specific document id which will point to the document.
    Environment:
    I currently have SharePoint 2013 online. The program that creates and maintains the records is an in-house VB.Net application running on 4.5 framework. The document repository is defined as a record center and contains several content types and meta tags
    (columns) already defined. Again the application is written in VB.
    Goal:
    Upload a given document, get the document id, and store that id to the record.
    What I have done:
    I have created a function that will take a given file name and proceed to upload the document to the given SharePoint list. It then proceeds to update the meta tags with information that will help find it using alternative methods. I have also spend hours
    upon hours researching every corn of every forum to find an answer. But to no avail.
    The problem:
    I cannot find how to get the document id of the document that I uploaded. Either it is so easy that no-one has bothered to post how it is done. Or it is not doable. I say this because I can find absolutely no reference to how to get the document id. There
    is lots of references on how to get the name, the url, the meta tags, etc... But NO example on getting the document id. Very frustrating. Below is the code that I am using. Can someone suggest how I can go about getting the document id. Please treat me like
    I am a noob and spell it out. Sample code would be great! I have already burnt way too much time on this seemingly simple task. I would greatly appreciate any help.
    Thanks
    Mike
    Imports Microsoft.VisualBasic
    Public Class Class1
    Private mVarTitle As String
    Private mVarStockCode As String
    Public Property DocTitle() As String
    Get
    Return mVarTitle
    End Get
    Set(value As String)
    mvartitle = value
    End Set
    End Property
    Public Property StockCode() As String
    Get
    Return mVarStockCode
    End Get
    Set(value As String)
    mVarStockCode = value
    End Set
    End Property
    Public Function UploadFile(FileName As String, Path As String, ListName As String, ContentType As String)
    'For each record, copy the file from knowledgetree to the local directory and then upload it with the metatags.
    Dim mKTFile As String = String.Empty
    Dim mFileName As String = String.Empty
    Dim mSource As String = String.Empty
    Dim mTarget As String = String.Empty
    Dim mTitle As String = String.Empty
    Dim mStockCode As String = String.Empty
    Dim mDocId As String = String.Empty
    Dim mCTid As String = String.Empty
    Dim mBaseKTFolder As String = "\\<computerName>\c$\Program Files\ktdms\documents\"
    mFileName = FileName
    mKTFile = Path
    mTitle = mVarTitle
    mStockCode = mVarStockCode
    mKTFile = Replace(mKTFile, "/", "\")
    mSource = mBaseKTFolder & mKTFile
    mTarget = ".\temp\" & mFileName
    UpdateStatus("uploading " & lrows.ToString)
    ' Copy the file to a new folder and rename it.
    My.Computer.FileSystem.CopyFile(
    mSource,
    mTarget,
    Microsoft.VisualBasic.FileIO.UIOption.AllDialogs,
    Microsoft.VisualBasic.FileIO.UICancelOption.DoNothing)
    Dim mpassword As New System.Security.SecureString()
    Dim mp As String = "<adminPassword>"
    For k = 1 To Len(mp)
    mpassword.AppendChar(Mid(mp, k, 1))
    Next
    Dim mycred As New Microsoft.SharePoint.Client.SharePointOnlineCredentials("<AdminUserId>", mpassword)
    Dim url As String = "https://<SharePoint URL>/sites/rms"
    Dim listTitle As String = ListName
    Using clientContext = New ClientContext(url)
    clientContext.Credentials = mycred
    Using fs = New System.IO.FileStream(mTarget, System.IO.FileMode.Open)
    Dim fi = New System.IO.FileInfo(mTarget)
    Dim list = clientContext.Web.Lists.GetByTitle(listTitle)
    clientContext.Load(list.RootFolder)
    clientContext.ExecuteQuery()
    Dim fileUrl = [String].Format("{0}/{1}", list.RootFolder.ServerRelativeUrl, fi.Name)
    fileUrl = Replace(fileUrl, "#", " ")
    Microsoft.SharePoint.Client.File.SaveBinaryDirect(clientContext, fileUrl, fs, True)
    Dim web As Web = clientContext.Web
    Dim newFile As Microsoft.SharePoint.Client.File = web.GetFileByServerRelativeUrl(fileUrl)
    clientContext.Load(newFile)
    clientContext.ExecuteQuery()
    '*****this section finds the content type and sets
    Dim contentTypeColl As ContentTypeCollection = clientContext.Web.ContentTypes
    clientContext.Load(contentTypeColl)
    clientContext.ExecuteQuery()
    mCTid = String.Empty
    '/ Display the content type names that are available in the website
    For Each ct As ContentType In contentTypeColl
    If ct.Name = ContentType Then
    mCTid = ct.Id.StringValue
    End If
    Next
    '***************End content type find.
    newFile.ListItemAllFields("ContentTypeId") = mCTid
    newFile.ListItemAllFields("Title") = mTitle
    newFile.ListItemAllFields("StockCode") = mStockCode
    '******This is the section where I have tried to get the uploaded document Id.
    '******None of these statements work.
    mDocId = newFile.ListItemAllFields("Document ID").ToString
    mDocId = newFile.ListItemAllFields("_dlc_DocId").ToString
    mDocId = newFile.ListItemAllFields("DocID").ToString
    newFile.ListItemAllFields.Update()
    clientContext.Load(newFile)
    clientContext.ExecuteQuery()
    End Using
    End Using
    ' Delete the file .
    My.Computer.FileSystem.DeleteFile(mTarget)
    UploadFile = mDocId
    End Function
    End Class

    Thanks Micheal for confirming SharePoint version.
    Is your VB code working with SharePoint 2010 Client Object model? It would give the idea that there is some poroblem in SharePoint 2013 CSOM.
    By the way, I tried the below code  in C# and I was able to print the Document ID and it worked for me.
     using (ClientContext clientContext = new ClientContext("http://<<Server Name>>:2425/sites/test/"))
                    Web site = clientContext.Web;
                    // Change your document library name
                    List docLib = site.Lists.GetByTitle("tester");
                    clientContext.Load(docLib);
                    CamlQuery caml = new CamlQuery();
                    ListItemCollection items = docLib.GetItems(caml);
                    clientContext.Load(items);
                    clientContext.ExecuteQuery();
                    // Iterate through all items in the document library
                    foreach (ListItem item in items)
                        Console.WriteLine("File Name:: " + item.FieldValues["Title"]);
                        Console.WriteLine("Document Id : " + item.FieldValues["_dlc_DocId"]);
                    Console.ReadLine();
    Output:
    File Name:: Remove_URL
    Document Id : TEST-1-1
    File Name:: Request
    Document Id : TEST-1-2
    Please check that your code is working with SP2010 or not?
    Thanks
    Ashish
    Ashish Gupta Click "Vote As Helpful"! if you think that post is helpful in responding your question click "Mark As Answer, if you think that this is your answer for your question.

  • T-codes to get payment run report for different company codes?

    Hello sap gurus,
    I have a scenario like -
    > use of IDocs to process vendor and employee payments. Both bank transfers and checks will be processed through interface.
    Now, What is the t-code to get report for payments for different customer, comp codes and vendor?
    I am new to SAP in testing.
    Appreciate ur help......
    Regards,
    Shamsher
    Edited by: shamsher123 on Jun 4, 2010 11:52 AM

    Hello,
    See the List below hope this will help.
    MIR5 - Display List of Invoice Documents
    S_ALR_87012105 - List of Down Payments Open On Key Date - Vendors
    S_ALR_87012085 - Vendor Payment History with OI Sorted List
    S_P99_41000099 - Payment List
    Prashant Rathore.

  • How to read/get the document attached to PO line item

    Hi experts,
    I got a requirement wherein I need to read/get the document attached at PO line item and to send that document through mail as an attacment .
    please suggest me how to proceed on this.

    actually your are picking up the correct data from Table EKET (EKET-EINDT) but your are printing that in item data loop for EKET might have already executed in your script and the header of that internal table consist the last entry of the table so for that. Fetch the delivery date explicite from the Table EKET when your in item level processing and print that.
    For Example u can use this code.
    To print you have write the this code in Script item level printing window "MAIN" window
    Following perform is called to get the line item delivery date in PO
    {/: PERFORM GET_DEL_DATE IN PROGRAM ZPerform_prog
    /: USING &EKPO-EBELN&
    /: USING &EKPO-EBELP&
    /: CHANGING &DEL_DATE&
    /: ENDPERFORM}
    {* Dellivery date &DEL_DATE& }
    write the below code in the Z program "ZPerform_prog"
    { FORM get_del_date  TABLES in_par STRUCTURE itcsy
                             out_par STRUCTURE itcsy.
      READ TABLE in_par WITH KEY 'EKPO-EBELN'.
      CHECK sy-subrc = 0.
      $_po_no = in_par-value.
      READ TABLE in_par WITH KEY 'EKPO-EBELP'.
      CHECK sy-subrc = 0.
      $_po_line = in_par-value.
      SELECT *
      FROM eket UP TO 1 ROWS WHERE ebeln EQ $_po_no AND ebelp EQ $_po_line.
        $_del_date = eket-eindt.
        CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
          EXPORTING
            date_internal            = eket-eindt
          IMPORTING
            date_external            = $_del_date
          EXCEPTIONS
            date_internal_is_invalid = 1
            OTHERS                   = 2.
        READ TABLE out_par WITH KEY 'DEL_DATE'.
        CHECK sy-subrc EQ 0.
        out_par-value = $_del_date.
        MODIFY out_par
                    INDEX sy-tabix.
        CLEAR : $_po_no , $_po_line ,$_del_date.
      ENDSELECT.
    ENDFORM.                    "GET_DEL_DATE }

  • How to get the document which is associated with a process having specific Guid value?

    when a PDF file is opened, AcroRd32.exe is started automatically, and we get the GUID value of that adobe reader.
    In c#, can't we get the document associated with the GUID value,  I mean the total PDF file which is opened in adobe reader at runtime.
    Here I'm struck up in code, can anyone suggest how to where I was missing something.
    Acrobat.CAcroAVDoc AcroAvDoc;
    Type AcrobatCAcroType;
    AcrobatCAcroType = Type.GetTypeFromCLSID(new Guid("{CA8A9780-280D-11CF-A24D-444553540000}"));  This CLSID is of adobe reader's.
    ///////Here I think I'm missing something
    Object obj = Activator.CreateInstance(AcrobatCAcroType);
    AcroAvDoc = (Acrobat.CAcroAVDoc)obj;
    I think I can get the full PDF document with AcroAvDoc.GetPDDoc();
    Thank you...

    Post your question in the forum for Acrobat SDK.

  • Create a  BAPI for T-Code FBV0(Post Parking Document)

    Hello Experts,
    I need to create a BAPI for the T-code FBV0(Post Parking Document). Please help me with a sample code.
    Thanks,
    Suma

    Hello There.
    I would like to suggest my opinion,
    To know the Function module for a particular Transaction,
    1. Table TSTC gives the Program name for a particular transaction.
    There are includes which contain (say) "Global data" and "Function modules".
    2. To get BAPI function modules, Transaction BAPI is the most powerfull solution for any module.
    One more thing, to be kept in mind while creating a BAPI is to create a function module and make it RFC enabled.
    BAPIs are nothing but RFC enabled function modules.
    Hope that's usefull.
    Good Luck & Regards.
    Harsh Dave

  • Get the document info panel details

    I need to get the document info panel (Windows>Document Info) details through scripting in illustrator cs3. Kindly advice me is it possible or not.

    I think sample code in the SDK contains a 'skeleton' plugin, I'd start with that. It should also provide a list of suites that get automatically loaded, I think it's in Suites.h. Just make sure AIDocumentSuite is in the list, and if it's not, just follow the examples in that file to add it. That should end up with a global variable called 'sDocument', which has all the suite functions as methods.
    Then it's something like:
    AIDocumentSetup setup;
    AIErr error = sDocument->GetDocumentSetup(&setup);
    // check error to make sure it's kNoErr
    Then you just have to inspect the setup struct for (hopefully) the answers you're looking for.

  • ABAP code to get MM Movement Types into BI

    Hi All,
    I need help in ABAP code to extract data on MM tables for Purchase Price Variance Raw Material. I'm getting material documents for all reversals 102 movement type and not extracting followed up 544 or 543 values for same documents. I don't have much idea about ABAP in depth.
    program using BSIS, BKPF , EKBE, MSEG, MKPF, EKPO tables to extract data.
    See below pieces of code from program.
    DATA: TEMP_AWKEY LIKE BKPF-AWKEY,
          YEAR(4) TYPE N,
          WRX_AMT TYPE BSEG-DMBTR,
          PRD_AMT TYPE BSEG-DMBTR,
          WP_AMT TYPE BSEG-DMBTR,
          QTY TYPE BSEG-MENGE,
          I_BSIS_WA TYPE I_BSIS_TYPE,
          MATDOC TYPE MSEG-MBLNR,
          MATDOC_YEAR TYPE MSEG-MJAHR,
          PERIOD(2) TYPE N.
    DATA:
                ITAB_MSEG TYPE HASHED TABLE OF ITAB_MSEG_TYPE WITH UNIQUE KEY MBLNR MJAHR ZEILE WITH HEADER LINE INITIAL SIZE 0,
          ITAB_MSEG2 TYPE HASHED TABLE OF ITAB_MSEG_TYPE WITH UNIQUE KEY MBLNR MJAHR ZEILE WITH HEADER LINE INITIAL SIZE 0,
    READ TABLE ITAB_BSEG WITH TABLE KEY BUKRS = I_BSIS-BUKRS BELNR = I_BSIS-BELNR GJAHR = I_BSIS-GJAHR BUZEI = I_BSIS-BUZEI  .
          IF SY-SUBRC EQ 0.
            MOVE :
               ITAB_BSEG-MEINS TO I_BSIS-MEINS,
               ITAB_BSEG-SHKZG TO I_BSIS-SHKZG,
               ITAB_BSEG-MATNR TO I_BSIS-MATNR,
               ITAB_BSEG-WERKS TO I_BSIS-WERKS,
               ITAB_BSEG-MENGE TO I_BSIS-MENGE,
               ITAB_BSEG-BEWAR TO I_BSIS-BEWAR,
               ITAB_BSEG-DMBTR TO I_BSIS-DMBTR,
               ITAB_BSEG-KTOSL TO I_BSIS-KTOSL,
               ITAB_BSEG-XREF3 TO I_BSIS-XREF3,
               ITAB_BSEG-PEINH TO I_BSIS-PEINH,
               ITAB_BSEG-EBELN TO I_BSIS-EBELN,
               ITAB_BSEG-EBELP TO I_BSIS-EBELP.
           IF ITAB_BSEG-SHKZG = 'H' .
             I_BSIS-DMBTR = I_BSIS-DMBTR * -1.
             ITAB_BSEG-DMBTR = ITAB_BSEG-DMBTR * -1.
           ENDIF.
    IF NOT I_BSIS[] IS INITIAL.
          SELECT * FROM MSEG
          INTO CORRESPONDING FIELDS OF TABLE ITAB_MSEG
          FOR ALL ENTRIES IN I_BSIS
          WHERE MBLNR = I_BSIS-MATDOC
          AND   MJAHR = I_BSIS-MATDOC_YEAR
          ORDER BY PRIMARY KEY.
         LOOP AT ITAB_MSEG.
           LOOP AT I_BSIS WHERE MATDOC = I_MSEG_WE-MBLNR. "AND MATDOC_YEAR = I_MSEG_WE-MJAHR.
             MOVE :
                ITAB_MSEG-BWART TO I_BSIS-BWART.
             MODIFY I_BSIS TRANSPORTING BWART.
           ENDLOOP.
         ENDLOOP.
    IF WA_ZBW_MM_PPVCALC-BWART = '    '.
    MATDOC_YEAR = WA_ZBW_MM_PPVCALC-AWKEY+10(4).
         MATDOC = WA_ZBW_MM_PPVCALC-AWKEY(10).
          SELECT * FROM MSEG
          INTO CORRESPONDING FIELDS OF TABLE ITAB_MSEG2
         FOR ALL ENTRIES IN I_BSIS
          WHERE MBLNR = MATDOC
          AND   MJAHR = MATDOC_YEAR
          ORDER BY PRIMARY KEY.
      LOOP AT ITAB_MSEG2.
      WA_ZBW_MM_PPVCALC-BWART = ITAB_MSEG2-BWART.
      ENDLOOP.
      ENDIF.
    Please let me know where I need to change the logic to pick all movement types documents.
    Thanks,
    SAP_BI_AP
    Edited by: SAP_BI_AP on Jun 23, 2010 10:35 PM

    Hi
    There is one std tcode COOIS where u can get the information what u have asked
    Pls check
    regards
    Vijay

  • ALV tree: code is getting dumped............................

    Hi all,
    I want to display output using ALV tree. I havent worked on this before, So kindly provide me useful sample programs to display output using ALV tree.
    Also i am creating field catalog using following code:
      data :  gt_fieldcatalog type lvc_t_fcat. "Fieldcatalog
    get fieldcatalog
      call function 'LVC_FIELDCATALOG_MERGE'
           EXPORTING
                i_structure_name = 'TP_OUTTAB'
           CHANGING
                ct_fieldcat      = gt_fieldcatalog.
    But its getting dumped and  "NO_FIELDCATALOG_AVAILABLE"  exception is raised.
    Also strucure TP_OUTTAB is as:
    TYPES: BEGIN OF tp_outtab,
           aufnr              TYPE    aufk-aufnr,  
           txt                TYPE    t003p-txt,     
           maktx              TYPE    makt-maktx,
           charg              TYPE    afpo-charg,    
           icon               TYPE    char4,         
           prueflos           TYPE    afko-prueflos,                     prueflos _ r              TYPE    icon-id,      
           ext_roses(5),                                   
          expt_roses         TYPE    icon-id,      
           zurl(8), "                               
           zurl_r             TYPE    icon-id,       
           crstat_t           TYPE    icon-id,     
           crstat             TYPE    icon-id,       
           adres              TYPE    cochp-adres,  
           END OF tp_outtab.
    Kindly tell me why the code is getting dumped. Seems there is some problem with structure.
    Regards,
    Sachin

    Hi,
    try the following example.
    TYPE-POOLS: SLIS.
    DATA: BEGIN OF I_VBAK OCCURS 0,
          VBELN LIKE VBAK-VBELN,
          ERNAM LIKE VBAK-ERNAM,
          ERDAT LIKE VBAK-ERDAT,
          AUDAT LIKE VBAK-AUDAT,
          VAR1,
          END OF I_VBAK.
    DATA: BEGIN OF I_VBAP OCCURS 0,
          VBELN LIKE VBAP-VBELN,
          POSNR LIKE VBAP-POSNR,
          MATNR LIKE VBAP-MATNR,
          CHARG LIKE VBAP-CHARG,
          END OF I_VBAP.
    DATA: FLDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
          LAYOUT TYPE SLIS_LAYOUT_ALV,
          KEY TYPE SLIS_KEYINFO_ALV.
    DATA: IT_HEADER1 TYPE SLIS_T_LISTHEADER.
    DATA: WA_HEADER1 TYPE SLIS_LISTHEADER.
    DATA: IT_EVE1 TYPE SLIS_T_EVENT,
          WA_EVE1 TYPE SLIS_ALV_EVENT.
    SELECT VBELN ERNAM ERDAT AUDAT FROM VBAK
    INTO CORRESPONDING FIELDS OF TABLE I_VBAK
    UP TO 20 ROWS.
    SELECT VBELN POSNR MATNR CHARG FROM VBAP
    INTO CORRESPONDING FIELDS OF TABLE I_VBAP
    UP TO 20 ROWS.
    FLDCAT-FIELDNAME = 'VBELN'.
    FLDCAT-TABNAME = 'I_VBAK'.
    FLDCAT-REF_FIELDNAME = 'VBELN'.
    FLDCAT-REF_TABNAME = 'VBAK'.
    FLDCAT-SELTEXT_M = 'SALES DOC.'.
    FLDCAT-COL_POS = 0.
    FLDCAT-KEY = 'X'.
    APPEND FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'ERNAM'.
    FLDCAT-TABNAME = 'I_VBAK'.
    FLDCAT-REF_FIELDNAME = 'ERNAM'.
    FLDCAT-REF_TABNAME = 'VBAK'.
    FLDCAT-SELTEXT_M = 'NAME OF PERSON'.
    FLDCAT-COL_POS = 1.
    APPEND FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'ERDAT'.
    FLDCAT-TABNAME = 'I_VBAK'.
    FLDCAT-REF_FIELDNAME = 'ERDAT'.
    FLDCAT-REF_TABNAME = 'VBAK'.
    FLDCAT-SELTEXT_M = 'RECORD DATE'.
    FLDCAT-COL_POS = 2.
    APPEND FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'AUDAT'.
    FLDCAT-TABNAME = 'I_VBAK'.
    FLDCAT-REF_FIELDNAME = 'AUDAT'.
    FLDCAT-REF_TABNAME = 'VBAK'.
    FLDCAT-SELTEXT_M = 'DOCUMENT DATE'.
    FLDCAT-COL_POS = 3.
    APPEND FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'POSNR'.
    FLDCAT-TABNAME = 'I_VBAP'.
    FLDCAT-REF_FIELDNAME = 'POSNR'.
    FLDCAT-REF_TABNAME = 'VBAP'.
    FLDCAT-SELTEXT_M = 'SALES DOC ITEM'.
    FLDCAT-COL_POS = 4.
    APPEND FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'MATNR'.
    FLDCAT-TABNAME = 'I_VBAP'.
    FLDCAT-REF_FIELDNAME = 'MATNR'.
    FLDCAT-REF_TABNAME = 'VBAP'.
    FLDCAT-SELTEXT_M = 'MATERIAL NO'.
    FLDCAT-COL_POS = 5.
    APPEND FLDCAT.
    CLEAR FLDCAT.
    FLDCAT-FIELDNAME = 'CHARG'.
    FLDCAT-TABNAME = 'I_VBAP'.
    FLDCAT-REF_FIELDNAME = 'CHARG'.
    FLDCAT-REF_TABNAME = 'VBAP'.
    FLDCAT-SELTEXT_M = 'BATCH NUMBER'.
    FLDCAT-COL_POS = 6.
    APPEND FLDCAT.
    CLEAR FLDCAT.
    LAYOUT-EXPAND_FIELDNAME = 'VAR1'.
    KEY-HEADER01 = 'VBELN'.
    KEY-ITEM01 = 'VBELN'.
      CLEAR WA_EVE1.
      WA_EVE1-NAME = 'TOP_OF_PAGE'.
      WA_EVE1-FORM = 'TOP-OF-PAGE1'.
      APPEND WA_EVE1 TO IT_EVE1.
    CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
      EXPORTING
       I_CALLBACK_PROGRAM             = SY-REPID
       IS_LAYOUT                      = LAYOUT
       IT_FIELDCAT                    = FLDCAT[]
       IT_EVENTS                      = IT_EVE1[]
        I_TABNAME_HEADER               = 'I_VBAK'
        I_TABNAME_ITEM                 = 'I_VBAP'
        IS_KEYINFO                     = KEY
      TABLES
        T_OUTTAB_HEADER                = I_VBAK
        T_OUTTAB_ITEM                  = I_VBAP
    EXCEPTIONS
       PROGRAM_ERROR                  = 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.
    FORM TOP-OF-PAGE1.                                        WA_HEADER1-TYP = 'H'.
      WA_HEADER1-INFO = 'Hierarchical Display'.
      APPEND WA_HEADER1 TO IT_HEADER1.
      CLEAR WA_HEADER1.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_HEADER1[].
      REFRESH IT_HEADER1.
    ENDFORM.                    "TOP-OF-PAGE1
    Reward points,if it is useful.
    Thanks,
    chandu.

  • URL Get HTTP Document Bug (LV2012)

    I know the Internet Toolkit is deprecated, but since it's still available it should still work.
    Unfortunately the URL Get HTTP Document.vi does not work in Internet TK 2012 for other than text files. It worked fine in LV8.5 with the corresponding Internet TK, but the 2012 version only returns the last part of the content.
    I'm going to switch to the HTTP Client palette, but it's still a pain to find such problems in TKs that used to work fine - losing a lot of time to find the issue.
    See attached snippet which reads a .rtf file from ni.com. HTTP client palette returns correct contents, URL Get HTTP Document only the last chunk.

    Hi,
    I managed to get the URL Get HTTP Document.vi from the ITK to download .tiff files (to save them to a hard-drive location) from a connected device in LV2012 32-bit.
    But now I need to transfer this code over to a computer unsing LV2012 64-bit, hence no ITK - has anyone made/got a VI that will do the job of "URL Get HTTP Document.vi", without the need for the ITK libraries, in LabVIEW 2012 64-bit? Or can show me a way of doing this, with relative ease?
    Many thanks!

  • How to format programming source-code in a Framemaker document?

    I have to write up a technical document in Framemaker that explains various programming source-code.
    So my document consists of a bunch of text, followed by a bunch of source code (Java, XML) and then followed by more text, etc.
    What I'm confused about is how to format source code as part of my document. Has anyone done this for a technical document and come across any instructions or tips? So far my Googling hasn't produced anything relevant to what I need to do.

    If you haven't created a paragraph format that uses a fixed-width font, such as Courier or a console font, you need to do that.
    If you want to preserve line breaks in the code, and if it has fairly long lines, you're likely to need to specify a font size of 7 pt. or so. For really long lines, you may need to go to a landscape page format or incorporate a way of telling your readers that the lines wrap.
    Those are the basics. If you want to get fancier, I usually set up a table so I can apply a contrasting background tone, and format each line of code as a cell (it's a one-column table). You can also add a second column to hold line numbers, if you want.
    Art

Maybe you are looking for