Generation of document no in web dynpro

Dear All,
I have requiriment where  i have to generate  document no when material ,plant , storage location ,deliverydate
etc  are entered  into table fields and save button is clicked  in a web dynpro application. Then the above details must be saved into a custom table along with the generated document number.
Thanks and Regards,

hi,
Create a number range object in SNRo T-Code ans Use NUMBER_GET_NEXT using the number range.
Use this number for saving the data.
Regards,
Madhu

Similar Messages

  • Trigger File Generation to a Server from Web Dynpro Application

    Hi Everybody! Hope you had a good new years eve
    Is it possible to generate a File on a Server outgoing from Web Dynpro?
    I tried to use GUI_DOWNLOAD. But as I couldn't use the GUI_DOWNLOAD from the Web Dynpro, I wrote a Report "ZCMI_EXPORT_FILE" that generates a Text-File. When I start the Report by myself, the file gets generated. All fine.
    To be able to generate the File from Web Dynpro, I created a Batch Input Function Module, that I call in the Web Dynpro. The File is not created and it does not show any errors.
    Do you have any idea how i can get this working? I'd also be happy with a different approach.
    Best Regards and Thanks,
    Steffen
    REPORT that is called with Batch Input from Web Dynpro:
    call function 'ZFM_GENERATE_EXPORT'
      exporting
        it_detail_record     = lt_records
        is_export            = gs_export
      importing
        ev_string            = gs_export-document
        et_dataset           = data_tab
      exceptions
        parameter_is_initial = 1
        others               = 2.
    if sy-subrc <> 0.
    endif.
    concatenate '\\SERVER\EXPORT\' gs_export-filename into lv_filename.
    call function 'GUI_DOWNLOAD'
      exporting
        filename                = lv_filename
      tables
        data_tab                = data_tab
      exceptions
        file_write_error        = 1
        no_batch                = 2
        gui_refuse_filetransfer = 3
        invalid_type            = 4
        others                  = 5.
    if sy-subrc <> 0.
      exit.
    endif.

    HI,
    GUI_DOWNLOAD does not get's executed in the Backgroud.
    there is no way to do it as a background job.. create the folder.. transfer the file to the application server in the backgorund using OPEN DATASET... use the tcode CG3Y to download the file from the app server to your folder..

  • Upload documents from ESS Web Dynpro through Archivelink

    Hi Guys
    I am aware that ESS Whos Who has a functionality where the user can upload his own Photo and this makes use of the SAP Archivelink Architecture.
    We wish to make an iView that enables users to upload documents (other than photos) using Archivelink. This should be possible since it can be done for photos anyway.
    Does anyone know how to go about it? What are the configuration steps / coding required. Any help will be appreciated.
    Thanks and Regards
    Joy Kaushish

    Hi Joy!
    I haven't implemented from java, but from ABAP.
    You have to call the FM "ARCHIV_CREATE_TABLE".
    e.g.
      constants: c_sap_object like toaom-sap_object value 'PREL'.
      data: l_ar_object like toaom-ar_object.
      data: object_id like toa_dara-object_id.
      data: flength like sapb-length.
    call function 'ARCHIV_CREATE_TABLE'
          exporting
            ar_object                = l_ar_object
            object_id                = object_id
            sap_object               = c_sap_object
            flength                  = flength
          tables
            binarchivobject          = curr_dat
          exceptions
            error_archiv             = 1
            error_communicationtable = 2
            error_connectiontable    = 3
            error_kernel             = 4
            error_parameter          = 5
            others                   = 6.
    I hope, this hint helps!
    Thanks in advance for rewarding points!
    Peter

  • Unable to upload File to DMS (Document Managemt Sys) Via web Dynpro App

    Hi .
    I want add file to DMS i,e, SAP Document Management System .
    I first tried calling BAPI : BAPI_CREATE_DOCUMENT2 in Report and I was successfull.
    I am trying out same thing via Web Dynpro Application but I am getting error in Return of BAPI .Error is Error while checking in and storing: C:\Documents and Settings\Desktop\Hi.doc.
    I am pasting code I have written on click of Upload .
    method ONACTIONON_UPLOAD .
    implicitly available data objects
    wd_Context type ref to if_wd_context_node.
    wd_This type ref to if_FileUpload.
    DATA: gv_documento TYPE draw-doknr ,
    gv_clase TYPE draw-dokar VALUE 'Z99' ,
    gv_version TYPE draw-dokvr VALUE '00',
    gv_part TYPE draw-doktl VALUE '000',
    gv_descripcion TYPE drat-dktxt VALUE 'Description111',
    gv_return TYPE bapiret2,
    filename(60) type c ,
    lt_documentdata TYPE STANDARD TABLE OF bapi_doc_draw2,
    ls_documentdata LIKE LINE OF lt_documentdata,
    lt_characteristicvalues TYPE STANDARD TABLE OF bapi_characteristic_values ,
    lt_classallocations TYPE STANDARD TABLE OF bapi_class_allocation ,
    lt_documentfiles TYPE STANDARD TABLE OF bapi_doc_files2 ,
    ls_documentfiles LIKE LINE OF lt_documentfiles ,
    lv_content type xstring ,
    size type i.
    DATA lo_el_context TYPE REF TO if_wd_context_element.
    DATA ls_context TYPE wd_this->element_context.
    DATA lv_filename LIKE ls_context-filename.
    get element via lead selection
    lo_el_context = wd_context->get_element( ).
    get single attribute
    lo_el_context->get_attribute(
    EXPORTING
    name = `FILENAME`
    IMPORTING
    value = lv_filename ).
    ls_documentdata-documenttype = 'Z99'.
    ls_documentdata-documentversion = '000'.
    ls_documentdata-documentpart = '00'.
    ls_documentdata-description = 'Test Document Created Parag'.
    ls_documentdata-STATUSEXTERN = 'WR'.
    ls_documentdata-USERNAME = 'I046361'.
    ls_documentdata-WSAPPLICATION1 = 'DOC'.
    ls_documentdata-DOCFILE1 = lv_filename.
    ls_documentdata-DATACARRIER1 = 'DEFAULT'.
    ls_documentfiles-wsapplication = 'DOC'.
    ls_documentfiles-docfile = lv_filename.
    ls_documentfiles-storagecategory = 'DMS_C1_ST'.
    ls_documentfiles-checkedin = 'X'.
    APPEND ls_documentfiles to lt_documentfiles.
    CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
    EXPORTING
    documentdata = ls_documentdata
    pf_http_dest = 'SAPHTTP'
    IMPORTING
    return = gv_return
    TABLES
    documentfiles = lt_documentfiles.
    IF gv_return-type CA 'AE'.
    WRITE gv_return-message.
    ELSE.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    EXPORTING
    wait = 'X'.
    ENDIF .
    endmethod.
    Now Can anyone tell
    In case of Web Dynpro what Is this code right ?
    Do I need to change value of Parameters I have Set ?
    Do i need to some change as I am trying to Upload file Via WebApplication ?
    Do I have to change data Carrier ?
    Please let me know urgently .Points will be surely Given ...
    Regards ,
    Parag

    Hi ,
    Finally I was successfull in Uploading Docs.It seems I was not getting right Parameters ..anyways correct code is as follows ...
    method ONACTIONON_UPLOAD .
      implicitly available data objects
      wd_Context type ref to if_wd_context_node.
      wd_This    type ref to if_FileUpload.
    DATA:     gv_documento    TYPE draw-doknr            ,
              gv_clase        TYPE draw-dokar   VALUE 'Z99'  ,
              gv_version      TYPE draw-dokvr              VALUE '00',
              gv_part         TYPE draw-doktl VALUE '000',
              gv_descripcion  TYPE drat-dktxt VALUE 'Description111',
             gv_return       TYPE  BAPIRETURN ,
              gv_return       TYPE  BAPIRET2 ,
              gv_ruta         TYPE bapi_doc_files2-docfile VALUE 'C:\BAPI_DMS.doc' ,
              filename(60) type c ,
              lt_documentdata         TYPE STANDARD TABLE OF bapi_doc_draw2,
              ls_documentdata         LIKE LINE OF  lt_documentdata,
              lt_characteristicvalues TYPE STANDARD TABLE OF bapi_characteristic_values ,
              lt_classallocations     TYPE STANDARD TABLE OF bapi_class_allocation ,
              lt_documentfiles        TYPE STANDARD TABLE OF bapi_doc_files2 ,
              ls_documentfiles        LIKE LINE OF lt_documentfiles ,
              lv_content type xstring ,
              size type i ,
              lt_binary              TYPE TABLE OF sdokcntbin ,
              ls_binary              LIKE LINE OF lt_binary ,
              lv_size                TYPE I  ,
              ls_doc_status          TYPE  CVAPI_DOC_STATUS ,
              ls_API_ctrl            TYPE  CVAPI_API_CONTROL ,
              l_MSG                  TYPE  MESSAGES ,
              lt_files type STANDARD TABLE OF CVAPI_DOC_FILE  ,
              lt_drao  TYPE STANDARD TABLE OF DRAO  ,
              ls_drao  LIKE LINE OF lt_drao ,
              lv_documenttype      TYPE  DRAW-DOKAR ,
              lv_documentnumber TYPE  DRAW-DOKNR ,
              lv_documentversion TYPE  DRAW-DOKVR ,
              lv_documentpart  TYPE  DRAW-DOKTL ,
              lv_text          TYPE string .
          FIELD-SYMBOLS <fs> TYPE ANY.
      DATA lo_el_context TYPE REF TO if_wd_context_element.
      DATA ls_context TYPE wd_this->element_context.
      DATA lv_filename LIKE ls_context-filename   .
    get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    get single attribute
      lo_el_context->get_attribute(     EXPORTING       name =  `FILENAME`     IMPORTING       value = lv_filename ).
      lo_el_context->get_attribute(     EXPORTING       name =  `FILECONTENT`     IMPORTING       value = lv_content ).
    CONCATENATE lv_text 'by' sy-uname 'cretaed at ' sy-uzeit INTO lv_text .
      ls_documentdata-documenttype    = 'Z99'.
      ls_documentdata-documentversion = '00'.
      ls_documentdata-documentpart    = '000'.
      ls_documentdata-description     = 'Test Document Created in Web Dynpro ABAP '.
      ls_documentdata-STATUSEXTERN    = 'WR'.
      ls_documentdata-USERNAME        = 'I046361'.
      ls_documentdata-WSAPPLICATION1 = 'DOC'.
      ls_documentdata-DOCFILE1        = lv_filename.
      ls_documentdata-DATACARRIER1    = 'DEFAULT'.
      ls_documentfiles-DOCUMENTTYPE       = 'Z99'.
      ls_documentfiles-WSAPPLICATION      = 'DOC'.
      ls_documentfiles-DOCUMENTVERSION    = '00'.
      ls_documentfiles-DOCUMENTPART       = '000'.
      ls_documentfiles-DOCFILE            = lv_filename.
      ls_documentfiles-description        = 'Test Document Created in Web Dynpro ABAP  '.
      ls_documentfiles-CREATED_BY         = sy-uname.
      ls_documentfiles-CHECKEDIN          = 'X'.
      ls_documentfiles-DOCFILE            = lv_filename.
      APPEND ls_documentfiles  to lt_documentfiles .
        CALL FUNCTION 'BAPI_DOCUMENT_CREATE2'
        EXPORTING
            documentdata    = ls_documentdata
            pf_http_dest    = 'SAPHTTPA'
        IMPORTING
            DOCUMENTNUMBER  = lv_DOCUMENTNUMBER
            return          = gv_return
        TABLES
          documentfiles = lt_documentfiles.
    IF gv_return-type CA 'AE'.
      WRITE gv_return-message.
    ELSE.
       CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING     wait = 'X'.
       get message manager
       data lo_api_controller     type ref to if_wd_controller.
       data lo_message_manager    type ref to if_wd_message_manager.
       lo_api_controller ?= wd_This->Wd_Get_Api( ).
       CALL METHOD lo_api_controller->GET_MESSAGE_MANAGER
         RECEIVING
           MESSAGE_MANAGER = lo_message_manager
    CLEAR lv_text .
    CONCATENATE 'Dcoument ' lv_filename 'Successfully stored with Document No. ' lv_DOCUMENTNUMBER INTO lv_text .
       report message
       CALL METHOD lo_message_manager->REPORT_SUCCESS
         EXPORTING
           MESSAGE_TEXT             = lv_text
          PARAMS                   =
          MSG_USER_DATA            =
          IS_PERMANENT             = ABAP_FALSE
          SCOPE_PERMANENT_MSG      = CO_MSG_SCOPE_CONTROLLER
          VIEW                     =
          SHOW_AS_POPUP            =
          CONTROLLER_PERMANENT_MSG =
          MSG_INDEX                =
          CANCEL_NAVIGATION        =
    ENDIF .
    endmethod.

  • View KM document in Web Dynpro application

    Hello - Does anyone have any tips for accessing KM documents in a web dynpro application?  I have tried some of the examples found here but several of the methods were deprecated.  Any help would be appreciated.  Thank you.

    Hi
    Refer this sample code. unfortunately that page is not opening directly.
    public void getAllStores( )
        //@@begin getAllStores()
         String prefix = "/documents/Public Documents/Store Data/";
         wdContext.nodeStoreTable().invalidate();
         IPrivateDocManageView.IStoreTableElement contentElement;
         try {
              IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
              com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
              com.sapportals.portal.security.usermanagement.IUser ep5user =
                             WPUMFactory.getUserFactory().getEP5User(sapUser);
              IResourceContext resourceontext = new ResourceContext(ep5user);
              IResourceFactory resourcefactory =
                             com.sapportals.wcm.repository.ResourceFactory.getInstance();
              RID pathRID = RID.getRID(prefix);
              com.sapportals.wcm.repository.IResource resource =
                             resourcefactory.getResource(pathRID, resourceontext);
              ICollection collection = (ICollection) resource;
              IResourceList resoucelist = collection.getChildren();
              IResourceListIterator resourelistiterator =
                             resoucelist.listIterator();
              while (resourelistiterator.hasNext()) {
                   String store = null;
                   com.sapportals.wcm.repository.IResource tempresouce =
                                  resourelistiterator.next();
                   if (tempresouce.getName().equals(
                             wdContext.currentFilterDataElement().getFromStore())) {
                        contentElement = wdContext.createStoreTableElement();
                        contentElement.setObjectName(
                                       prefix + tempresouce.getName());
                        wdContext.nodeStoreTable().addElement(contentElement);
                        tempresouce = resourelistiterator.next();
                        while (!tempresouce.getName().equals(
                                  wdContext.currentFilterDataElement().getToStore())) {
                             contentElement = wdContext.createStoreTableElement();
                             contentElement.setObjectName(
                                            prefix + tempresouce.getName());
                             wdContext.nodeStoreTable().addElement(contentElement);
                             tempresouce = resourelistiterator.next();
                        tempresouce = resourelistiterator.next();
                        break;
              } // while iterate
         } catch (Exception e) {
                        e.printStackTrace();
    Mandeep Virk

  • Illegal dependency error on deploying GP Web Dynpro application

    Hello All,
    We have created a GP application (FamilyStatusChange) on NWDS 7.0.11. We are using EP. 7.0 SP11.
    On deploying and running this application via NWDS
    java.lang.NoClassDefFoundError: com/sap/caf/eu/gp/co/api/EngineException
    When I try to checkin and activate the activity corresponding to FamilyStatusChange, the activation fails and I get the following error:
    Development Component Build (2007-06-29 03:27:08)
      Component name: FamilyStatusChange
      Component vendor: xyz.com
      SC compartment: xyz.com_SC_XYZ_PORTAL_SP11_1
      Configuration: JD2_XYZSP11_D
      Location: JD2_XYZSP11_D
      Source code location: http://dads:51900/dtr/ws/XYZSP11/adobe.com_SC_XYZ_PORTAL_SP11/dev/active/DCs/xyz.com/FamilyStatusChange/_comp/
      DC root folder: /usr/sap/JD2/JC19/j2ee/CBS/85/.B/13602/DCs/xyz.com/FamilyStatusChange/_comp/
      DC type: Web Dynpro
      Host: dads
    DC Model check:
       All used DCs are available locally
       validating dependency to build plugin "sap.com/tc/bi/bp/webDynpro"
       validating dependency to  public part "default" of DC "sap.com/tc/cmi"
       validating dependency to  public part "default" of DC "sap.com/tc/ddic/ddicruntime"
       validating dependency to  public part "default" of DC "sap.com/tc/ddic/metamodel/content"
       validating dependency to  public part "default" of DC "sap.com/tc/wd/webdynpro"
       validating dependency to  public part "default" of DC "sap.com/tc/logging"
       validating dependency to  public part "default" of DC "sap.com/tc/wdp/metamodel/content"
       validating dependency to  public part "default" of DC "sap.com/com.sap.aii.proxy.framework"
       validating dependency to  public part "default" of DC "sap.com/com.sap.aii.util.misc"
       validating dependency to  public part "default" of DC "sap.com/com.sap.exception"
       validating dependency to  public part "default" of DC "sap.com/com.sap.mw.jco"
       validating dependency to  public part "default" of DC "sap.com/caf/eu/gp/api"
       validating dependency to  public part "default" of DC "sap.com/caf/eu/gp/api/wd"
       ERROR: Illegal dependency: Access list does not allow use of sap.com/caf/eu/gp/api for xyz.com/FamilyStatusChange(xyz.com_SC_XYZ_PORTAL_SP11_1) with respect to public part default.
       Build failed with errors.
    Also when I try to add used DCs (public part "default" of DC "sap.com/caf/eu/gp/api" and public part "default" of DC "sap.com/caf/eu/gp/api/wd") to this application, I get the illegal dependency error.
    Please let me know if there is any settings / access that need to be in place so that this application runs fine. Also let me know the Jar files that need to be added to make this app work.
    Regards,
    Vibha

    Hi Romain,
    I am still working on the issue. But here are my findings. I am stuck up with Basis team to deploy the missing Jar files.
    I had created a GP webdynpro application in EP7 SP6. When we moved to SP11, I copied the same application from SP6 track to SP11 track. Then I got the error upon deployment. Now the catch here is the way GP related Interfaces and classes are used in SP7 and above.
    The changes can be summarized as follows:
    1. You need to reference to DC caf/eu/gp/api but instead of using the Public Part
    “default” you need to use Public Part “external”
    2. All published Interfaces now start with the prefix “IGP”
    3. All published Classes now start with the prefix “GP”
    Please go through the document "Implementing a Web Dynpro Callable Object which Implements the GP Interface" on SDN.
    For illegal dependency issue, if the DC has already been added then you get this error. If required, remove the used DC and add it again.
    Also ensure that the DCs that you are adding as Used DC in your application are deployed on the J2EE engine.If not deploy them through SDM.
    My development configuration contains the following DCs:
    - caf/eu/gp/api(PP - External)
    - caf/eu/gp/api/wd(PP - GPWebDynproCO)
    - com.sap.exception
    - com.sap.security.api.sda
    - tc/logging
    Hope this solves your issue.
    Regards,
    Vibha Singhal
    Message was edited by:
            Armin Reichert

  • DOCUMENTATION  FOR WEB DYNPRO ON ABAP

    Hi all.
      I am an abap developer.I am new to web dynpro.
    I want to learn this web dynpro.
    can any  body tell me the  documents for this web dynpro.
    how to read and how to down load the software on to my desk top from net.
    thanks in advance,
    regards,
    Eswar.M

    Hi,
    see <a href="https://wiki.sdn.sap.com/wiki/display/WDABAP">SDN WDA Wiki</a> There you can also find the link to the documentation.
    Regards, Heidi

  • Excel download feature in Web Dynpro Abap using OAOR document

    Hi Friends,
    I am facing an issue in implementing excel download feature in Web Dynpro.
    Problem: I have stored an excel document in OAOR. I am displaying data on screen using ALV display in WDA.
    I will provide a button to download excel in toolbar of ALV. When user clicks on this button i need to pick the document from OAOR and fill that with my screen values and download it to users desktop.
    Please help me in this. Problem is when i am calling these classes c_oi_container_control_creator=>get_container_control and cl_gui_custom_container from my View's method they are returning error.
    Thanks & Regards,
    Saud

    HI,
    You cannot use GUI classes and methods in web dynpro . That will dump.
    Instead you can use file down load UI element or..
    If you have the content in xstring format use ATTACH_FILE_TO_RESPONSE method of CL_WD_RUNTIME_SERVICES class.
    Regards,
    Madhu

  • BADI for changing Appraisal document application name for Web dynpro ABAP

    Hi,
    For Appraisal document customizing through PHAP_CATALOG_PA, We have BADI HRHAP00_BSP_TMPL  to change the BSP application name which can be used in Web layout for output display. Using this we can change application name from HAP_DOCUMENT to custom BSP application name
    Similarly, what is the BADI for changing Web dynpro ABAP applictaion name? Currently its triggering HAP_MAIN_DOCUMENT.
    how do we change application name to some custom web dynpro application name
    Regards,
    Kothand

    Hi Karim,
    I don't know, if there is any chance to get the Webdynpro application name. At least in the ABAP System fields is no information about the webdynpro application name.
    One remark: I have allways problems with BAPIS / BADIS that behave different depending on the caller. Could it be a good idea to pass some information through the interface / parameters?
    Best regards
    Renald

  • Getting and Printing A PDF Document From R/3 Using Web Dynpro

    I would like specific information on getting and printing a document residing R/3 using web dynpro.  My environment is Netweaver 04s SR2, an it will not include ITS or the ABAP stack. It connects to remote R/3.  I will not be using Adobe Interactive Forms.       I only need get/render/print the doc.  My question is in 3 parts.
    1) Getting the PDF from R/3
         a) In terms of the RFC ABAP module, how should it return the pdf (a table?)
         b) How should the document be stored within the Component Controller context
             for display.
    2) Converting the R/3 returned binary into a form that is renderable within
        Web Dynpro.  (Does the Form UI Element Require it to be converting and if so
                              what is the best way to do this)
    3) Printing the PDF from the corresponding iView in the portal. (If I am using the
        form ui element to display it, how can printing be initiated in the portal)
    Thanks

    Hi,
    In webdynpro there s a fecility to convert the general data to PDF by uisng th InterativeForm UI Element.
    This for u need to do the following things.
    1. Need to configure the ADS(Adobe document services) in your VA(Visual Admin).
    2. Once ADS is configured we  can utilize the UI element Interactiveform It has contain the Adobedesigner by using this we can design the PDF and binding with the model nodes.
    3. Develop the Function module in the r/3 side and import into WD side and those are created as Model nodes and we canutilize in the 2 step.
    4.When u run the application u can display the pdf with how u design ur PDF form.
    This is generally doing the PDF by using PDF.
    Or do u think any other way post ur issues.
    Thanks,
    Lohi.

  • How modify a ms word document in web dynpro

    Hello,
    I have a Web Dynpro that shows a .doc document with the OfficeControl but I would like to modify the document before showing. How can I do it?
    The document have several fields that I have to replace with the corresponding values.
    I have seen in Office 2003 you can save the document as a .xml and make the changes in that way but we have Office 2002.
    Thank you in advance.

    Hi Experts,
    I am facing a similar situation.
    I have NWDS04s version, 7.7.07, but I am <b>still not able to see the expertMode property</b> for the office control UI element.
    Are there any SAP notes related to this, or any other Patch that i need to install?
    Thanx in advance,
    Alka.

  • Reading and displaying Ms.Word document with web dynpro java

    Hi,
    I'm using NetWever developer studio 7..0.21.
    I'm developing web dynpro java application.I'm in difficulty to read and display word document with its original format in web dynpro view. Is it possible?
    If possible , is there a blog etc.?
    Thanks.

    Hello,
    You have to use the Office Integration Library. Please, follow the documentation below:
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/32853febec3c17e10000000a114084/frameset.htm
    I hope this helps you.
    Regards,
    Blanca

  • Display documents (jpg,doc,tff,ppt,pps,xls,pdf etc) in web dynpro

    Hi experts,
                    I have a requirement to upload the document of any type (jpg,doc,tff,ppt,pps,xls,pdf etc)  to a Z table (may be in a binary format) in a web dynpro application.
    I think this can be achieved through Fileupload view element.
    In another  window, I need to display the document based on what is selected in the table row. Which control or method can display any type of document?  As far as I know, the office control view element can only display documents of type (.doc and .xls).
    Please provide pointers on this or any example will help me.
    Thanks,
    AmitJain

    Abhimanyu,
                  Thanks for the reply. Wonderful it worked like a miracle.
    Awarded full points.
    Thanks
    Code I used in the action:  onactionclick
    METHOD onactionclick .
      DATA: content TYPE xstring.
      DATA:  lr_context_view_node          TYPE REF TO if_wd_context_node.
      wd_context->get_attribute(
          EXPORTING
            name =  `PDF`
          IMPORTING
            value = content ).
      CALL METHOD cl_wd_runtime_services=>attach_file_to_response
        EXPORTING
          i_filename      = 'Default_pdf.pdf'
          i_content       =   content
          i_mime_type     =   'pdf'
         i_in_new_window = ABAP_FALSE
         i_inplace       = ABAP_FALSE
    ENDMETHOD.
    Edited by: Amit Jain on Apr 2, 2009 5:46 PM

  • How can I write java code in web dynpro to show KM content document?

    Dear all developer
    SDN developer who have any easy example java code for get and show KM content documents(documents/com.xx.km/.). We are develop this project by Netweaver Studio 7.0 and using WEB Dynpro application.
    Thank for all comment and advice.
    Jumnong Boonma

    Hi
    i dont have the exact code but yes..i can refer to the link for Web Dynpro applications for the Portal.
    [http://help.sap.com/erp2005_ehp_03/helpdata/EN/42/fa080514793ee6e10000000a1553f7/frameset.htm]
    Here look out for Absolute Navigation.
    Hope it helps...
    Thanks..

  • Web Dynpro Model Generation for Application Services

    Hi Experts,
    I'm currently experimenting with the new functionality provided by CE, but there is one thing that I can't seem to figure out. How does the new Web Dynpro model generation work with regards to CAF Application Services? I'm trying to call an application service from a web dynpro application, but it seems as if models are completely different from Netweaver 7.0. What type of model do I need to create? Do I have to expose the application services as web services?
    I've tried creating an EJB model and then binding the model to the context, but I kept receiving null pointer exceptions when doing this and I'm not sure if this is the correct way to do this. Can anybody point me to some good documentation on Web Dynpro/CAF interaction in CE?
    Thank you,
    JP

    Hi JP,
    You are right, the CAF models are completely different in NW CE 7.1 compared to NW 7.0.
    CAF Application Services in CE 7.1 are in fact EJBs. So the EJB model importer is the way to go. You can find <a href="http://help.sap.com/saphelp_nwce10/helpdata/en/45/dd45e4bc295595e10000000a1553f7/frameset.htm">documentation</a> and some <a href="http://help.sap.com/saphelp_nwce10/helpdata/en/45/f7f744aea471fae10000000a1553f6/frameset.htm">tutorials</a> on help.sap.com. If you still have troubles after you go thru these, please post your concrete issues and I'm sure we'll be able to figure out what's been going wrong.
    HTH!
    -- Vladimir

Maybe you are looking for