Code to display stored multiple documents from KM into table.

Hi.
I stored some documets(multiple documents) in KM those documents i have to display(multiple documents) inside table.
Regards,
mahesh

Hi
Iam using below code iam able to access only one document at a time.I want multile documents in table.
public void wdDoInit()
    //@@begin wdDoInit()
     wdThis.wdGetComp_Form_16Controller().executeZess_Form16_File_Details_Input();
               wdThis.wdGetComp_Form_16Controller().executepersonalrfc();
               wdContext.currentContextElement().setCa_pernr(wdContext.currentOutput12Element().getPernr());
               wdContext.currentContextElement().setCa_name(wdContext.currentOutput12Element().getEmpname());
     wdContext.nodeCa_node().invalidate();
      try {
//          Getting the useru2026u2026 
                              IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
                              IUser sapUser = wdClientUser.getSAPUser();
                              com.sapportals.portal.security.usermanagement.IUser ep5User =  WPUMFactory.getUserFactory().getEP5User(sapUser);
                       //          Getting the Resourceu2026u2026u2026       
                                     IResourceContext resourseContext = new ResourceContext(ep5User);
                                     IResourceFactory resourseFactory = com.sapportals.wcm.repository.ResourceFactory.getInstance();  
                           // execute RFC...          
                                     int size = wdContext.nodeIt_Files1().size();
          //String a = size+"";
          for(int i=0; i<wdContext.nodeIt_Files1().size(); i++)
                                        IPrivateForm_16View.IIt_Files1Node node = wdContext.nodeIt_Files1();
                                        IPrivateForm_16View.ICa_nodeElement ele = wdContext.createCa_nodeElement();
                                   String file_path = wdContext.nodeIt_Files1().getIt_Files1ElementAt(i).getZfile_Name();
                                   //String file_path = "knagakrishna";
                           //Get a RID for the file
                               RID file = RID.getRID("/documents/FORM16/" + file_path );
                               // RID file = RID.getRID("/documents/FORM16/");
                           //get the file itself from KM
                                     IResource resource = resourseFactory.getResource(file, resourseContext);
                      //collections can not be opened, therefore we have to ignore them
                                     if(!resource.isCollection())
                                        {   byte[] bcontent = this.getByteArrayFromResource(resource); 
                      //get resource type   
                                                  WDWebResourceType resourceType = WDWebResourceType.getWebResourceTypeForFileExtension(resource.getRID().extension()); 
                                                  IWDResource iwdResource = null;
                      //resource type is known
                                               if (resourceType != null)       
                                                   { iwdResource = WDResourceFactory.createResource(bcontent, resource.getName(), resourceType );
//          resource type is not known        
                                               else
                                                    { iwdResource = WDResourceFactory.createResource(bcontent, resource.getName(), WDWebResourceType.PDF); 
//          save resource in context 
//          wdContext.currentContextElement().setFileResource(iwdResource); 
//           wdContext.currentContextElement().setCa_path1(iwdResource.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal())) ;
                    ele.setCa_path(iwdResource.toString()); 
                    ele.setCa_company(wdContext.nodeIt_Files1().getIt_Files1ElementAt(i).getButxt());
                    //ele.setCa_year(wdContext.nodeIt_Files1().getIt_Files1ElementAt(i).getZyear());
                    ele.setCa_year(wdContext.nodeIt_Files1().getIt_Files1ElementAt(i).getZyear());
                     ele.setCa_pernr(wdContext.nodeIt_Files1().getIt_Files1ElementAt(i).getPernr());
                    if( ""== ele.getCa_path())
                            // wdContext.currentContextElement().setCa_error("Letter Does not Exist!!") ;
                            ele.setCa_link( false);
                    else{
                      ele.setCa_link( true);
                                    wdContext.nodeCa_node().addElement(i,ele);
                                    //wdContext.nodeCa_node().add(ele); 
                                   // ele.node().invalidate();
     } catch (Exception e) {
          wdComponentAPI.getMessageManager().reportWarning("No Form16 exist, please contact ASK-HR at .");
Edited by: Mahesh Shirke on Jun 8, 2011 10:24 AM
Edited by: Mahesh Shirke on Jun 8, 2011 10:24 AM

Similar Messages

  • Download of multiple documents from Solution Manager

    Is there a way to download multiple documents from Solution Manager SOLAR01 project documentation tabs from multiple nodes rather than going one by one?

    Hi,
    At the application there is no such functionality but I belive if you try to download it directly from knowledge warehouse, you'll be able. You'll just need to pay attention to which folder is stored the documents. For this check the wiki page for documents in solar01 and solar02.
    http://wiki.sdn.sap.com/wiki/x/rBoMDg
    Kind regards, Fabricius

  • How to read multiple documents from a system directory?

    Hi,
    I'm trying to read multiple documents from a specific folder that contains pdfs, jpgs... the only activity I found is the Read Document, but this activity does not have the option to read all docs under my folder!.
    so any one can tell me if there is another activity can do it or is there any good solution to loop on the folder and read all the docs? any script will be helpful.
    Thanks
    Hussam

    Hi,
    After many hours of searching and readings, I found a solution, I do not know if it is the best, but  anyhow this is my solution:
    By using a service operation called "Find" from a service named "FileUtilsService", this operation will return a list of strings with the names of all files and/or directories under the path you want.
    Then by using the "Read Document"  I was able to get one file and store it in a dcoumnet variable, and by using a simple looping technique I got all  the files I want.
    hope this will help others
    Hussam

  • Extract Multiple Rows from a Single Table into a Single Row in a New Table

    I have a table in a database that contains contact data like name, address, phone number, etc.
    The folks who designed the database and wrote the application wrote it so that all contact records are placed in that table, regardless of contact type. In fact, the contacts table does not even have a column for "type" even though there are many
    different types of contacts present in that table.
    I am trying to write a mail merge style report in SRSS, that gets sent to a specific type of contact, based on criteria provided that must be obtained from another table, and that data is then used to get back to a specific set of contacts from the contacts
    table.
    The attached file directly below describes my problem and all related information in an extremely detailed way.
    SRSSMailMergeIssue.pdf
    Unless there is a way to make a SRSS Tablix point to two different data sets in SRSS, it looks like I have to combine multiple rows from the same table into a new table.
    If anyone can review the details in the attached pdf file and possibly point me in the direction I need to run to solve this probelm, I would greatly appreciate it.
    I also included a document (below) that shows the tables I reference in the probelm description.
    dbtables.pdf

    I found a solution.... and posted it below
    select
    dk.ucm_docketnumber [UCM DocketNumber],
    dk.ucm_docketid [UCM DocketID],
    vc.FirstName [Victim FirstName],
    vc.MiddleName [Victim MiddleName],
    vc.LastName [Victim LastName],
    vc.Suffix [Victim Suffix],
    vc.Address1_Line1 [Victim AddressLine1],
    vc.Address1_Line2 [Victim AddressLine2],
    vc.Address1_Line3 [Victim AddressLine3],
    vc.Address1_City [Victim City],
    vc.Address1_StateOrProvince [Victim StateProvince],
    vc.Address1_PostalCode [Victim Postalcode],
    oc.FirstName [Offender FirstName],
    oc.MiddleName [Offender MiddleName],
    oc.LastName [Offender LastName],
    oc.Suffix [Offender Suffix],
    oc.Address1_Line1 [Offender AddressLine1],
    oc.Address1_Line2 [Offender AddressLine2],
    oc.Address1_Line3 [Offender AddressLine3],
    oc.Address1_City [Offender City],
    oc.Address1_StateOrProvince [Offender StateProvince],
    oc.Address1_PostalCode [Offender Postalcode],
    pc.FirstName [Arresting Officer FirstName],
    pc.MiddleName [Arresting Officer MiddleName],
    pc.LastName [Arresting Officer LastName],
    pc.Address1_Line1 [Arresting Officer AddressLine1],
    pc.Address1_Line2 [Arresting Officer AddressLine2],
    pc.Address1_Line3 [Arresting Officer AddressLine3],
    pc.Address1_City [Arresting Officer City],
    pc.Address1_StateOrProvince [Arresting Officer StateProvince],
    pc.Address1_PostalCode [Arresting Officer Postalcode]
    FROM ucm_docket dk
    left outer join ucm_victim v on dk.ucm_docketid = v.ucm_docketnumber
    left outer join contact vc on vc.contactid = v.ucm_victimlookup
    left outer join ucm_offender o on o.ucm_offenderid = dk.ucm_offenderlookup
    left outer join contact oc on oc.contactid = o.ucm_individualid
    left outer join contact pc on pc.contactid = dk.ucm_ArrestingOfficerLookup
    WHERE (dk.ucm_docketnumber = @DocketNUM)

  • How do I copy a document from pages into email (not pdf) and have color and format the same as the document created in pages?

    How do I copy an entire document from pages into email (not pdf) and have color and format the same as the document created in pages?

    Pages ’09 v4.3 and Pages v5.2.2 are entirely different document architectures. Consequently, copying and pasting a table from Pages ’09 circumvents the customary translation process  that would occur if you opened that Pages ’09 document in Pages v5.
    Make a backup copy of the Pages ’09 document that has the table in it, and then open this document in Pages v5.2.2. The table is translated into Pages v5 document format and displayed correctly. You can even select this Pages v5.2.2 table, and then copy/paste it into another Pages v5.2.2 document with accurate results.

  • How Do I Display HTML Formatted Text From A Data Table In Crystal Reports?

    I'm creating reports in Crystal XI.  The information being displayed in the reports comes from data tables where the text is formatted in HTML.
    I've worked with Crystal Reports enough to know that HTML text pulled from a data table doesn't appear in Crystal the same way it does in a web browser.  Crystal Reports ignores all the tags (...unless I'm missing something...) and just displays the text.
    Someone far more Crystal savy than I (...who I don't have access to...) came up with a Formula Field workaround that tricks Crystal Reports into displaying some basic HTML tags.  Here's that workaround:
    <!--
    stringVar TableName := ;
    TableName := Replace (TableName, "<ul>","<br> <br>");
    TableName := Replace (TableName, "<li>", "<br>   &bull; ");
    TableName := Replace (TableName, "</li>", "");
    TableName := Replace (TableName, "</ul>","<br> <br>");
    TableName := Replace (TableName, "<a", "<u><font color='blue'");
    TableName := Replace (TableName, "</a>", "</font></u>");
    TableName
    -->
    QUESTION - Does any similar workaround exist so I can display an HTML Table in Crystal Reports?  If not, is there any way to display HTML formatted text from a data table in Crystal Reports as it would appear in a web browser?

    Hi Steven,
    To display html text in Crystal Reports follows these steps.
    1. Right click on the field and select Paragraph tab.
    2. Under 'Text Interpretation' select 'HTML Text' and click OK.
    I have tried using the way,but it never works.So reply me if there is any way to solve the issue

  • Save document from word into sharepoint library does not work !

    Hi,
    I'm trying to resolve a problem that i have with word and my sharepoint website.
    Some of my users have to open and RDP session on a windows 2008 server and work from there. They open their session with their credential and they do everything they do in local on sharepoint using IE.
    BUT, we have always and ever had an issue on this server as they c'ant save a document (Word or Excel) from office. They have to upload it from sharepoint uising IE. In example, i want to save my document from word into the sharepoint document library I  have
    this error message :
    "Windows doesn't find (http://intranet.sharepoint.com/DocumentLibrary/). Check and retry".
    If I open my sharepoint site and i upload the document it works perfectly. Also if I open and edit an existing document from any library it will work with word. The problem seems to happen when i want to browse sharepoint from word for saving files...
    As this server is a windows 2008, IE version is 9 and the office version is the same as on all computers (Office 2010 SP2 32Bit)
    Any help would by appreciated
    Regards

    Hi,
    I understand you encountered the issue when save document from Office client application to SharePoint 2010 site.
    Is there any Proxy settings in networking side? Please bring up IE > Internet options > Connections > Lan settings. If so, please uncheck options in Proxy server and test the issue again.
    If you have deploy GPO to add SharePoint site into Trusted sites, please check if there is any other GP associated with trusted sites that might affect the issue. You could also remove it from Trusted sites via IE options and test the issue again.
    In addition, please provide more error message to help narrow down the issue, you could locate error information in Event log at least.
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • How do I save documents from iCloud into pages on my ipad?

    HOw do I save documents from iCloud into pages using an ipad?

    Where are you expecting to see "iCloud document?" Pages stores copies of your documents in iCloud but the documents appear in the Pages app. When you edit the document changes are automatically saved to iCloud. You do not go to iCloud to look for documents to open or copy.

  • Multiple Hierarchies from Single Dimension Table in OBIEE-11g?

    Is it possible to have Multiple Hierarchies from Single Dimension Table in OBIEE-11g?
    Like 1)Year-Qtr-Month-Weeks 2)Year-Month-Days

    Hi,
    or if your lowest level is the same like
    Day->month->year->Total
    Day->businessMonth->businessyear->Total
    Then yes, it is.
    Create the first, then you start to create the second by adding your top(business year) level on the same level as the one you have (year) both under your total.
    Then when you would add your second base level, there is a special option for it, something like use other hierarchy level/shared level (sorry can't recall and does not have a connection right now) then you select your existing day level under your businessmonth level.
    Hope this helps,
    Regards,
    D

  • Display a PDF Document from a standard transacction

    Hi.
    I need to display a PDF document located in a server outside SAP. The idea is to implement a menu exit and add a new button to a standard transaction. When the user press the new button a PDF document must be displayed.
    I want to know if this solution is possible and if you know any function in SAP to display a PDF document.
    Thanks.
    Diana.

    hi,
    chk out this link..here you can find various ways in displaying PDF..
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=how%20to%20display%20pdf&cat=sdn_all
    thanks
    jaideep
    *reward points if useful..

  • Codes to open Video or Documents from Library to open in new tab by default

    Hi 
    I am using Sharepoint 2013 Office 365 web version to build and edit the TeamSite. 
    Is there a way using SharePoint Designer or Scripts to Open the Video or Documents from the Document/Asset Library to open them in new tab or window when clicked? 
    Currently, When clicking on video it opens in the same IE window, I could change the Thumbnails view to All asset view then right click and open it in a new windows. But I want this to happen by default when clicking the link
    I would appreciate your view in detail. 
    Regards, 
    Daniel 

    Hi,
    If you just want to open the video or document in a new tab, yes, it can be achieved with JavaScript or JSLink.
    However, it is not a recommended behavior to add script for such a functionality into a page cause it is more like an option of browser behavior and it would
    make the pages in a site difficult in maintenance.
    The easiest way I think, you can perform a “Middle click” or “Ctrl + Left click” to open the video or document in a new tab.
    To achieve it using JavaScript, we will have to modify all the “onclick” properties of the items in a library after the page loaded which should be an extra burden of your
    browser.
    Here is a link with script demo about how to open a link in new tab for your reference:
    http://junestime.wordpress.com/2013/02/26/javascript-open-links-in-new-windowtab-in-sharepoint-2010/
    Feel free to reply if there are any questions.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Printing multiple documents from CV04N

    Hi friends,
    I have a list of documents arrived thru CV04N transaction. Now I need to print multiple documents at one go. When I select a group of documents and clicked the Print Icon at the top of the list, the system is printing only the first document in the group. My requirement is all the document in the group needs to be printed.
    Any pointers on how to achieve this.
    Regards
    S.Sivakumar

    Hi toocann
    Thanks for the inputs provided. The  programs "CV120_DOC_CHECKOUT_VIEW" and "CV120_START_APPLICATION" are to be added at what place in the BADI?
    Regards
    S.Sivakumar

  • Inserting multiple selection from checkbox into one column of the database

    Hi,
    How to insert multiple selection values from checkbox into one column of the database.
    Anyone can u help me
    Thanx

    hi
    try to use request.getParameterValues("fieldname")

  • Abap logic not fetching multiple rows from master data table

    Hi
    I just noticed that my logic is fetching only 1 row from master data table.
    ProdHier table
    PRODHIERACHY            Level
    1000                                  1
    1000011000                      2
    10000110003333              3
    10000110004444              3
    '10000110005555              3*
    logic only fetches one row of level 3, I would like to fetch all level 3 rows.
    DATA: ITAB type table of /BI0/PPROD_HIER,
          wa like line of ITAB.
    Select * from /BI0/PPROD_HIER INTO wa where /BIC/ZPRODHTAS = 3.
    IF wa-PROD_HIER(10) = SOURCE_FIELDS-PRODH2.
         RESULT = wa-PROD_HIER.
         ELSEIF wa-PROD_HIER(5) = SOURCE_FIELDS-PRODH1.
         RESULT = wa-PROD_HIER.
    ENDIF.
    ENDSELECT.
    thanks

    Hi,,
    I have implemented the logic in end routine and it still reads only the first row.
    I am loading only PRODH1 and PROD2 but now I want to get all values of PRODH3 from the master data table.
    The first 5 values are PRODH1 and first 10 values belongs to PRODH2.
    Whenever PRODH2 = 1000011000 in source I should get the following values
    10000110001110
    10000110001120
    10000110001130
    I have multiple rows of 1000011000 so my result should be
      1000011000               10000110001110
      1000011000               10000110001120
      1000011000               10000110001130
    DATA: ITAB type table of /BI0/PPROD_HIER,
    wa like line of ITAB.
    data rp type _ty_s_TG_1.
    Select  * from /BI0/PPROD_HIER INTO table itab where /BIC/ZPRODHTAS = 3.
    LOOP AT RESULT_PACKAGE INTO rp.
    read table itab into wa with key PROD_HIER(5) = rp-PRODH1.
    IF sy-subrc EQ 0.
         rp-PRODH3 = wa-PROD_HIER.
         ELSE.
    read table itab into wa with key PROD_HIER(10) = rp-PRODH2.
    IF sy-subrc EQ 0.
         rp-PRODH3 = wa-PROD_HIER.
    ENDIF.
    ENDIF.
    MODIFY RESULT_PACKAGE FROM rp.
    ENDLOOP.
    Edited by: Bhat Vaidya on Sep 10, 2010 11:27 AM
    Edited by: Bhat Vaidya on Sep 10, 2010 11:37 AM

  • How to create a Pages document from a Numbers table

    I need to generate a number of Pages documents, extracting entries from a Numbers table. Does anyone have an applescript to do this?
    Best
    Paolo ([email protected])

    Your question is not very descriptive of what you are trying to do. You might get better assistance if you provided a bit more information. I think even I, as an AppleScript novice, could write an AppleScript that would "extract entries from a Numbers table" and write them to a Pages document but I'm sure you have more in mind than that simple action.

Maybe you are looking for