Smartform in Abap Webdynpro

Hi Expert,
I am new to SmartForm and WDP. I try to follow the below instruction to do, but got lots of error. Could anyone help me on this?
http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785
My smartform name is ZSGPayslip and with 1 parameter named "MYDATE".
According to the instruction, I should only create 1 node and 1 attribute, but I am not sure why the below code is calling another. Please hlep.
Thanks,
WF
Edited by: williamfok on Feb 1, 2010 12:59 PM
Edited by: williamfok on Feb 1, 2010 12:59 PM

To call A smartform in Web dynpro View, Make an Interactive UI element on Layout
Create A node name  PDF with an attribute SOURCE type string in context tab of view.
Bind the Interactive UI element with Source attribute . And write the below code in WDDOINIT method to call Smartform  ZG2_SMARTFORM_TEST.
method WDDOINIT.
* Reading Node for display
   DATA LO_ND_NODE_FOR_DISPLAY TYPE REF TO IF_WD_CONTEXT_NODE.
   DATA LO_EL_NODE_FOR_DISPLAY TYPE REF TO IF_WD_CONTEXT_ELEMENT.
   DATA LS_NODE_FOR_DISPLAY TYPE WD_THIS->ELEMENT_NODE_FOR_DISPLAY.
* navigate from <CONTEXT> to <NODE_FOR_DISPLAY> via lead selection
   LO_ND_NODE_FOR_DISPLAY = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_NODE_FOR_DISPLAY ).
* get element via lead selection
   LO_EL_NODE_FOR_DISPLAY = LO_ND_NODE_FOR_DISPLAY->GET_ELEMENT( ).
* get all declared attributes
   LO_EL_NODE_FOR_DISPLAY->GET_STATIC_ATTRIBUTES(
     IMPORTING
       STATIC_ATTRIBUTES = LS_NODE_FOR_DISPLAY ).
* Calling Smartform
   DATA LV_SMARTFORM       TYPE RS38L_FNAM.
   DATA LS_SSFCTRLOP       TYPE SSFCTRLOP.
   DATA LS_OUTPUT_OPTIONS  TYPE SSFCOMPOP.
   DATA LS_JOB_OUTPUT_INFO TYPE SSFCRESCL.
   DATA LT_LINES           TYPE STANDARD TABLE OF TLINE.
   DATA LV_BIN_FILESIZE    TYPE I.
   DATA LV_PDF_XSTRING     TYPE XSTRING.
   data LT_OTFDATA TYPE TABLE OF ITCOO.
* -- Get the name of the smartform function module
   CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
     EXPORTING
       FORMNAME           = 'ZG2_SMARTFORM_TEST'
*     VARIANT            = ' '
*     DIRECT_CALL        = ' '
     IMPORTING
       FM_NAME            = LV_SMARTFORM
     EXCEPTIONS
       NO_FORM            = 1
       NO_FUNCTION_MODULE = 2
       OTHERS             = 3.
   IF SY-SUBRC <> 0.
     BREAK-POINT.
* Implement suitable error handling here
   ENDIF.
* -- Call the smartform
   LS_SSFCTRLOP-NO_DIALOG = SPACE.
   LS_SSFCTRLOP-GETOTF    = ABAP_TRUE.
   LS_SSFCTRLOP-NO_DIALOG = 'X'.
   LS_SSFCTRLOP-PREVIEW = 'X'.
   LS_SSFCTRLOP-GETOTF = 'X'.
   LS_SSFCTRLOP-LANGU = 'EN'.
   LS_SSFCTRLOP-DEVICE =  'PRINTER'. "LOCAL_PRINTER2 'LOCAL_PRINTER1'.
   LS_OUTPUT_OPTIONS-TDPRINTER  = 'PDF'. "'PDF1'.
   LS_OUTPUT_OPTIONS-TDDEST     = 'LP01'.
   LS_OUTPUT_OPTIONS-TDIMMED    = 'X'.
   Ls_OUTPUT_OPTIONS-TDDELETE   = 'X'.
   Ls_OUTPUT_OPTIONS-TDLIFETIME = 'X'.
   Ls_OUTPUT_OPTIONS-TDDEST     = 'LOCL'.
   CALL FUNCTION LV_SMARTFORM
     EXPORTING
       CONTROL_PARAMETERS = LS_SSFCTRLOP
       OUTPUT_OPTIONS     = LS_OUTPUT_OPTIONS
       USER_SETTINGS      = 'X'
       GS_NODE_FOR_DISPLAY = LS_NODE_FOR_DISPLAY
*     custom_input       = ls_your_custom_smartform_input
     IMPORTING
       JOB_OUTPUT_INFO    = LS_JOB_OUTPUT_INFO
     EXCEPTIONS
       OTHERS             = 0.
REFRESH LT_OTFDATA.
LT_OTFDATA[] = LS_JOB_OUTPUT_INFO-OTFDATA[].
CALL FUNCTION 'SSFCOMP_PDF_PREVIEW'
EXPORTING
I_OTF                    = LT_OTFDATA
EXCEPTIONS
CONVERT_OTF_TO_PDF_ERROR = 1
CNTL_ERROR               = 2
OTHERS                   = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* -- Convert the OTF data to xstring
   CALL FUNCTION 'CONVERT_OTF'
     EXPORTING
       FORMAT                = 'PDF'
       MAX_LINEWIDTH         = 255
     IMPORTING
       BIN_FILESIZE          = LV_BIN_FILESIZE
       BIN_FILE              = LV_PDF_XSTRING
     TABLES
       OTF                   = LT_OTFDATA[]
       LINES                 = LT_LINES
     EXCEPTIONS
       ERR_MAX_LINEWIDTH     = 1
       ERR_FORMAT            = 2
       ERR_CONV_NOT_POSSIBLE = 3
       ERR_BAD_OTF           = 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.
   CHECK LV_PDF_XSTRING IS NOT INITIAL.
   DATA LO_ND_PDF TYPE REF TO IF_WD_CONTEXT_NODE.
   DATA LO_EL_PDF TYPE REF TO IF_WD_CONTEXT_ELEMENT.
   DATA LS_PDF TYPE WD_THIS->ELEMENT_PDF.
   DATA LV_SOURCE TYPE WD_THIS->ELEMENT_PDF-SOURCE.
* navigate from <CONTEXT> to <PDF> via lead selection
   LO_ND_PDF = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_PDF ).
* get element via lead selection
   LO_EL_PDF = LO_ND_PDF->GET_ELEMENT( ).
* @TODO handle not set lead selection
   IF LO_EL_PDF IS INITIAL.
   ENDIF.
* set single attribute
   LO_EL_PDF->SET_ATTRIBUTE(
     NAME =  `SOURCE`
     VALUE = LV_PDF_XSTRING ).
endmethod.

Similar Messages

  • Smartform & ABAP Webdynpro & Internal table

    Hi Expert,
    I am able to open the smartfrom by using ABAP Webdynpro.
    But when I try to add the table under "Global Settings -> From Interface -> Table"
    Paramemter Name       Type Assignment    Associated Type
    I_ZSG_PAY_DATA     Like                          ZSG_PAY_DATA
    It works fine when I test it in t-code SMARTFORMS. But when I use the same ABAP Webdynpro program to open this smartform, the error appear.
    "Calling Parameter incorrect"
    Could you please let me know how to fix it?
    Thanks a lot,
    WF

    Hi William,
    If you have a working smartform then you should be able to display it in WD by passign its XSTRING to the PDFSOURCE of it.
    Just check that where you have written the code to get the XSTRING of smartform in WD. You might have modified the smartform interface and forgot to call the revised FM generated after the smartform was changed in WD.
    Just re-write the entire code to generate XSTRING for smartform and see if it works or not.
    You can also try to put a break point in the code and see where exactly it is failing i.e. whether it is to do with calling smartform or converting it or WD related.
    Thanks,
    Abhishek

  • Convert smartform as PDF from ABAP Webdynpro

    Hi,
    I want to convert smartform as pdf from ABAP webdynpro.
    Flow: SmartForm-->Generating Function Module -->Getting Output Data --> Converting OTF to PDF --> Open/Save PDF file in ABAP webdynpro.
    What are the sequence of function modules to be used for this?
    OR
    Is there any other way to convert smartform as pdf from ABAP webdynpro?
    plz give me the flow and FM'details clearly in detail.

    Look here https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785
    Cheers
    Graham Robbo

  • Display Smartform Pdf output in ABAP Webdynpro application

    Hello,
    there is a solution for displaying Smartform output in Java Webdynpro application in this forum. Since i want to start an project in ABAP Webdynpro i need a solution for this technology since i don't want to recreate all the paperwork again using Adobe. Is there any solution available?
    Thanks
    Udo Ahle

    Hello,
    this is the solution which i was able to implement using the hints given by Heidi and Thomas. Thank you for the support. With this solution it is possible to reuse oldstyle sapscripts and smartforms in todays environment.  Here is the sample code which solves the problem:
    In WDA you define for example a pushbutton to start the display of the PDF.
    In the onaction method you implement:
    method ONACTIONSHOW_PDF .
      data LX_pdf type xstring.
    * get PDF from existing sapscript or smatform
      call function 'Y_PDF_GET' destination '46c'
        IMPORTING
          ex_PDF = LX_PDF.
    * append the pdf to the response
      cl_wd_runtime_services=>attach_file_to_response(
        i_filename  = 'Hello.PDF'
        i_content   = lx_pdf
        i_mime_type = 'application/pdf'
        i_in_new_window = 'X'
        i_inplace       = 'X' ).
    endmethod.
    The function 'Y_PDF_GET' is implemented as follows:
    FUNCTION Y_PDF_GET .
    *"*"Local interface:
    *"  EXPORTING
    *"     VALUE(EX_PDF) TYPE  XSTRING
    *"  TABLES
    *"      ET_OTF STRUCTURE  ITCOO OPTIONAL
      data: lf_filesize type i,
            lt_otf type table of ITCOO,
            lt_lines type table of tline,
            tline type tline.
    * start sapscript or smatforms and return
      perform make_otf.
      CALL FUNCTION 'READ_OTF_FROM_MEMORY'
        TABLES
          OTF                = lt_otf
       EXCEPTIONS
         MEMORY_EMPTY       = 1
         OTHERS             = 2
      et_otf[] = lt_otf.
      CALL FUNCTION 'CONVERT_OTF'
       EXPORTING
         FORMAT                      = 'PDF'
    *   MAX_LINEWIDTH               = 132
    *   ARCHIVE_INDEX               = ' '
       IMPORTING
         BIN_FILESIZE                = lf_filesize
        TABLES
          OTF                         = lt_otf
          LINES                       = lt_lines
       EXCEPTIONS
         ERR_MAX_LINEWIDTH           = 1
         ERR_FORMAT                  = 2
         ERR_CONV_NOT_POSSIBLE       = 3
         OTHERS                      = 4
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    * convert tline to xstring as needed in
    * in web dynpro            
      field-symbols <X>.
      data: st(268) type c.
      data l1 type i.
      data len type i.
      data maxline type i value 134.
      l1 = 0.
      loop AT lt_lines INTO tline.
        clear st.
        st+l1(maxline) = tline.
        len = maxline + l1.
        l1 = maxline - strlen( tline ).
        ASSIGN st TO <x> TYPE 'X'.
        CONCATENATE ex_pdf <x>(len) INTO ex_pdf.
      endloop.
    ENDFUNCTION.
    The make_otf for sapscript is the following:
    * the next attribute enables the otf output.
    * no other output will be generated
    <b>options-TDGETOTF = 'X'</b>
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
    *         APPLICATION        = 'TX'
    *         ARCHIVE_INDEX      = ARCHIVE_INDEX
             ARCHIVE_PARAMS     = ARCHIVE_PARAMS
                DEVICE             = DEVICE
                DIALOG             = ' '
                FORM               = FORM
                LANGUAGE           = language
               OPTIONS            = OPTIONS
    *     IMPORTING
    *          LANGUAGE           =
    *          NEW_ARCHIVE_PARAMS =
    *          RESULT             =
           EXCEPTIONS
                CANCELED           = 1
                DEVICE             = 2
                FORM               = 3
                OPTIONS            = 4
                UNCLOSED           = 5
                OTHERS             = 6.
    *... make some write forms
      data lT_OTF     type table of     ITCOO.
    * get the otf data
      CALL FUNCTION 'CLOSE_FORM'
    *     IMPORTING
    *          RESULT   = result
           TABLES
               OTFDATA  = lt_otf
           EXCEPTIONS
                UNOPENED = 1
                OTHERS   = 2.
    * put otf into memory for later usage
      if not lt_otf is initial.
        CALL FUNCTION 'SAVE_OTF_TO_MEMORY'
    * EXPORTING
    *   MEMORY_KEY       = 'DEF_OTF_MEMORY_KEY'
          TABLES
            OTF              = lt_otf.
      endif.
    For Smartforms technology it is possible to implement the same concept.

  • Convert smartform to pdf from ABAP webdynpro

    Hi,
    I want to convert smartform to pdf from ABAP webdynpro and
    I want to display pdf in ABAP wedynpro view or portal iview.
    what are the steps needs to be followed?
    what are the classes and interfaces needs to be used?

    Hi,
    Please check this it might be useful.
    Data: tab_otf_data    type  ssfcrescl,
             wa_out_opt      type  ssfcompop,
             wa_con_params   type  ssfctrlop.
              wa_rspoid       type  rspoid,
    parameter:p_file like rlgrap-filename no-display.
    Follow control parameters
           wa_out_opt-tdimmed = 'X'.
             wa_out_opt-tdnewid = 'X'
            wa_con_params-no_dialog = 'X '.
    if you want print direct  pass
            wa_out_opt-tddest  = 'printer' (SAP Printer)
    If you are using multiple header records  use loop other wise no need
       note that when multple headers
      pass count and count > 1 means more than one header change control parameters to create single spool for all.
    Loop itabXXXX.                                      " multiple header starts
      count = count + 1.
          if count > 1.
            wa_con_params-no_open = ' '.
            wa_out_opt-tdnewid = ' '.
          endif.                                               " multiple header ends
    call function  fm_name
            exporting
              control_parameters = wa_con_params
              output_options     = wa_out_opt
              header_header      = wa_ven
            importing
              job_output_info    = tab_otf_data
            tables
              header_details     = itab_final
            exceptions
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              others             = 5.
             at last.                                                         " multiple header starts
            wa_con_params-no_close = ' '.
            wa_con_params-no_dialog = 'X'.
          endat.                                                           " multiple header ends
    endloop.
    you will get  the otf data and spool id from  'tab_otf_data'
    read table tab_otf_data-spoolids index 1 into wa_rspoid.  " Now you get spool no in wa_rspoid.
    " pass spool in to rstxpdft4 it converts to pdf".
    submit rstxpdft4
               with spoolno = wa_rspoid
               with p_file = p_file
               and return.
    I feel that your problem will solve....
    Thanks,
    Hari

  • Print button in ABAP WebDynpro

    Hello all,
      The client has requested a 'Print' button in our webdynpro application - ie a simple button that triggers the browser command Ctrl P.
    I have searched the forum, and it seems that this is not possible, because WebDynpro cannot execute browser commands (or indeed, javascript).
    Can someone please suggest a solution - OR - confirm that this functionality is not possible?
    thanks
    Paul
    Note: Note: We do NOT want to use ALV, Adobe or Smartforms. We just want to print what's on the webdynpro screen.

    Micky,
    I thank you for that clear response: It is not possible to print from ABAP WebDynpro.
    > What should that printbutton do?
    We want it to do the same as Ctrl P, which is to print the entire web page. (We don't have frames etc)
    >WD4A is normally intended to be used with Adobe Interactive forms
    This is news to me! Is this an accepted view in the SAP communit... that WebDynpro requires Adobe to achieve full functionality? That is disappointing, to say the least. And a step back from BSP.
    We are building multiple online calculators, and it would be a huge overhead to have to develop (and maintain) an Adobe form for each calculator, simply to enable the user to print the contents of the screen....
    I have read in SDN that you can invoke a browser Print command from Java Webdynpro. A class WDPrintService has been provided.
    Printing in Web Dynpro, finally
    How can it be that this functionality is "not possible" for one flavour of WebDynpro, but plainly available in the other....?
    cheers
    Paul

  • Your opinion on:  BSP or Java Webdynpro or ABAP Webdynpro?

    Could you please give me your opinion on the business scenario we have here:
    We are implementing SRM 4.0 with backend R/3 4.6C, WAS 6.4 and Portal 6.0. SRM has its typical shopping cart applications mainly for procurement and the workflow trail displaying the approval. The client wants us to build a few custom forms on the web frontend of SRM (or may be in Portal). The idea is to store these forms and display when needed with the status info just like a shopping cart.
    <b>Now the requirements for these forms are as follows:</b>
    1. These forms will have multiple fields which need to have the F4 kind of help. (the F4 options will reside in SRM or R/3)
    2. The form should have some kind of a ALV grid  (autoexpanding feature) which will allow the user to put in multiple line items so that they could submit more items on one form.
    3. Users need to be able to attach a spreadsheet to the form which should not be editable once the form is submitted. The attached spreadsheet should be stored. (We are planning on using Archivelink Filenet for this)
    4. Upon submission, a workflow will be kicked off as per the defined Org structure for approval of the form.
    5. After submission, the user should be able to go and view the approval status of the form and also print the summary of the values that he entered in the form. (may be a smartform could be provided for this)
    We looked at different options to accomplish this task:
    <b>BSP:</b>
    Creating BSP pages and giving access as links to the user on the webfrontend of SRM. Now, if we go the BSP route, we need to develop in SRM as the R/3 4.6 c does not have BSP development capabilities. If we take this approach, I am not sure if all the above requirements (specially like attaching spreadhseets) will be met with BSP pages.
    SAP Webdynpro Java: 
    It seems that the Webdynpro is easier to use because of the graphical tools available. But the only problem if we go this route is that we will have to find a java guy.
    SAP Webdynpro ABAP:
    We currently have WAS 6.4. As per the documentation, the ABAP Webdynpro development tool is available from NW04s onwards. So, we are still not sure if we could use it. But, we want to push towards upgrading if necessary. Being an old time ABAPer, developing ABAP Webdynpro seems do-able. (i know it may not be that easy).
    Last but not the least, DIALOG Program:
    Creating a dialog program in R/3 or SRM seems fairly simple. Then, an iview could be created on the portal for this transaction, though at this point I am not sure how a spreadsheet could be attached and stored within a dialog program.
    The creation of the workflow may not be that bad after the original form is designed. The graphical display of the approval trail might be difficult, but we might get away with a report for that. For printing the details of the form, I guess I could develop a smartform and put out a button on the screen to print it out in the display view.
    Could you please give me your opinion /  best approach for accomplishing this task, keeping in mind the complexities of these new dimension products?
    Thanks
    Sri

    I would say that all four solutions to solving your tasks are technically feasible.  Here are some thoughts that I had however:
    First ABAP Webdynpro: it is true that ABAP webdynpro is only available with Netweaver04s.  04S is still in ramp-up which means that only a subset of the customer base is allow to implement it.  It will not become generally available until later this year (check the service marketplace for current release estimates).  That being said, it probably elimintes WDA as a possiblity for your project unless you are will to wait and to upgrade.
    However having worked with WDA for a while it is probably the best tool to custom develop what you describe.  It has excellent built-in F4 value help.  It also has a damn fine ALV grid implementation.  The spreadsheet could be just as simple as file upload in binary or your could try your hand at office integration.  Finally for the form you could use Adobe Interactive Forms which also has very nice integration into WDA. 
    Now to Dialog Programming: You could of course use dialog programming.  It seems a little bit of a waste to custom build something so large if WDA is in your near future.  There are obvious disadvantages (little OO structure, no MVC, etc).  You would have ALV grid, office integration and of course F4 help.  You could still use Adobe forms if you implement this on the 640 system.  However there are integration points with dialog and Adobe Interactive Forms.  You could still use printed forms however. If you did the dialog program on the 640 system, you could use the integrated ITS to expose it to the web.  The integrated ITS in my experience has quite nice performance although the look and feel remains just like the SAPGui.
    The Java Webdynpro route:  Well you hit the nail on the head - if you don't have a Java programmer already and you don't have the bandwidth to invest in learning Java, this can be a problem.  The Java Webdynpro environment is quite nice.  There are some things I like better than ABAP and some things that ABAP is defintely still better at.  However when it comes to heavy integration with an ABAP backend - ABAP Webdynpro is still the way to go.  Java Webdynpro does have a help feature (OVS), but it isn't "for free" or nearly as nice as the ABAP Webdynpro (perhaps it will get there some day).  That is one of the major advantages of WDA - its closeness to the business data brings several framework advantages like F4 and field help.  WebDynpro Java in 640 also doesn't have an ALV grid implementation.  I am sure that this is something both environments will eventually have, but right now ABAP has the advantage.  On the other hand, Webdynpro Java has equal support when it comes to office integration, file upload, and Adobe Forms support.  You would have a more difficult time integration SmartForms however.
    Finally we come to BSP.  Honestly if I were in your position I would probably choose BSP (unless you could wait for the ABAP Webdynpro upgrade).  You could build a nice MVC OO application using BSP (stateful or stateless).  The BSP product is mature and quite well documented thanks to SDN.  You have the BSP Extensions which when used in Design2003 use the Unified Renderer.  That means that your output will look nearly identical to the same UI elements in Webdynpro.  Also BSP supports portal integration (session management, eventing, and themes). 
    The downside to BSP is that it isn't a full framework (also one of its advantages).  You can insert all your own html and javascript (unlike webdynpro). But this also means that SAP doesn't delivery as many framework services.  For instance there is no ALV or Value Help.  There is no Office Integration or Adobe Forms integration.  There is some farily good Smart Forms integration.  Now the upside- many people have already hit these limitations and overcame them.  In the weblogs on SDN and in a certain SAP Press book (cough, cough) you will find out of the box solutions for many of these problems.  You can find ready to use solutions for Adobe Integration, Office Integration (using Microsoft Office Web Controls), and F4 help.  It will mean investing a little more time up front to get this "home grown framework" up and running - but it is perfectly feasible. 
    There is a learning curve to all these new technologies however.  This sounds like an abmious project.  I wouldn't want to try and tackle this project in any of these technologies if I was new to them.  With Webdynpro or BSP - consider giving yourself time to learn the environment and cut your teeth on some demo apps before jumping into such a huge development.

  • IE Script error when double clicking on a view in Abap Webdynpro component

    Hello experts,
    I am running mini SAP trial version 2004 with Internet explorer 7.0 and also installed gui patch 23.
    I am making a sample application in SE80 and when double clicking on a view in Abap Webdynpro component I get following error:
    <b>Internet Explorer Script Error</b>
    An error has occured in the script on this page.
    Line: 1
    Char: 1
    Error: 'wdp_show_menu' is undefined
    Code: 0
    URL: http://satellite5200:8000/sap/bc/wdvd/painting.html?_vdrespkey=EOJ6V1JQMX0VLTQ7AP6DQM64Y&_vdframe=painting&sap-client=000
    Do you want to continue running scripts on this page?
    Thanks in advance.
    Bhupendra

    Hi Bhupendra,
       If you are seeing this error in the Se 80 editor , i guess you can ignoire that ...While running the application it will not show any error.
    Thanks
    Anzy

  • SOFM: Dsiplay method is not working when called from ABAP Webdynpro

    Hi All,
    I want to open an attachment from ABAP Webdynpro.
    I have approached in this fashion:
    1) Get the attachments as SOFM object key
    2) On Click of a link on Webdynpro, I am calling a function module within which I am creating an instance of the SOFM object
    3) Then I am calling the DISPLAY method
    It is not opening.
    But, if it opens when I driectly execute the function module. It open when I directly test the business object.
    Any Idea ?
    Thanks & Regards,
    Deb

    Display Method uses the Dialogue Module, You should not access such methods in web dynpro which are SAPGUI specific.
    Web Dynpro Applications are run in Browser environment which cannot understand Dialog, it can understand only HTML.
    Read the attachments and get the content and use FileDownload UI element to show it to user.
    Abhi

  • Error while trying to call a ABAP webdynpro appl. as a link on html form

    Hi,
      When I am trying to call a ABAP Webdynpro aplication as a link on html form. I get the following error
    Error when processing your request
    What has happened?
    The URL http:///sap/bc/webdynpro/form_ap/ (Path of ABAP webdynpro application) was not called due to an error.
    Note
    The following error text was processed in the system DRD : Error in Web Dynpro Runtime System
    The error occurred on the application server DRD_06 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: GET_REQUEST_INPLUG_PARAMETERS of program CL_WDR_CLIENT_APPLICATION=====CP
    Method: INIT of program CL_WDR_CLIENT_APPLICATION=====CP
    Method: IF_WDR_RUNTIME~CREATE of program CL_WDR_MAIN_TASK==============CP
    Method: HANDLE_REQUEST of program CL_WDR_CLIENT_ABSTRACT_HTTP===CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Method: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP
    Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
    Module: %_HTTP_START of program SAPMHTTP 
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system DRD in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server DRD_06 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server DRD_06 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 102 -u:  -l: E -s: DRD -i: DRD06 -w: 0 -d: 20081002 -t: 032939 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    Any help will be greatly appreciated.
    Thanks
    RM

    RM,
    url clearly shows that it is unable to get host and port.check how you are building that url in html page
    Thanks
    Bala Duvvuri

  • Zci type ADOBE Interactive Form in ABAP Webdynpro short dump

    Adobe Reader version 8.1.2
    Life Cycle Designer version 7.1.4270.1.421766
    ECC 6.0 patch 13
    When I ran the 'FP_PDF_TEST_00' , it shows
    Version Information: 710.20061024154505.342190
    In my ABAP Webdynpro app., it has 3 inputfields.
    In the Form layout, I changed the form layout type to 'ZCI' for interactive form, and Insert the WebDynpro Script.
    And in the ABAP Webdynpro view layput designer, I enabled the pdf form element.
    All objects compiled without any problem.
    During the runtime, it got the following short dump:
    21 METHOD       CX_WD_GENERAL=================CP    CX_WD_GENERAL=================CM003     5
        CX_WD_GENERAL=>RAISE                                                                     
    20 METHOD       CL_WD_ADOBE_SERVICES==========CP    CL_WD_ADOBE_SERVICES==========CM008   193
        CL_WD_ADOBE_SERVICES=>CREATE_PDF                                                         
    19 METHOD       /1WDA/LADOBE==================CP    /1WDA/LADOBE==================CCIMP  1955
        CL_INTERACTIVE_FORM_ZCI=>IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT                         
    Our BASIS sent me the ADS trace:
    SAP Interactive Forms by Adobe
    Render Error Report
    'pdf' Log Entries
    restoreState is not a valid attribute of subform, Attribute not loaded. Line 5.
    Invalid node type: dataGroup
    The fault occurred on line 0.
    The SOM expression '$record.BAPIBNAME' for the dataRef specified on field 'BAPIBNAME', resolved to an incompatible node type of 'dataGroup'.
    Any comment or advise?

    Hi,
    As far as i know when you use Adobe forms in a WD4A application, language is your "web" connection language.
    You can have a look at standard class CL_WD_ADOBE_SERVICE, it's used when generating an adobe forms from WD4A. , more particulary look at method DETERMINE_DOCPARAMS.
    regards

  • Deleting row from table in ABAP webdynpro

    Hi all,
    Can anyone help me regarding deletion of a row from a table in ABAP webdynpro.
    I have written a code like this :
        DATA:
          NODE_STUDINFOSYS                    TYPE REF TO IF_WD_CONTEXT_NODE,
          ELEM_STUDINFOSYS                    TYPE REF TO IF_WD_CONTEXT_ELEMENT,
          STRU_STUDINFOSYS                    TYPE IF_COMPONENTCONTROLLER=>ELEMENT_STUDINFOSYS .
      navigate from <CONTEXT> to <STUDINFOSYS> via lead selection
        NODE_STUDINFOSYS = WD_CONTEXT->GET_CHILD_NODE( NAME = IF_COMPONENTCONTROLLER=>WDCTX_STUDINFOSYS ).
      get element via lead selection
        ELEM_STUDINFOSYS = NODE_STUDINFOSYS->GET_ELEMENT(  ).
    deleting data selected via lead selection
        NODE_STUDINFOSYS->REMOVE_ELEMENT( ELEMENT = ELEM_STUDINFOSYS ).
    *But I am getting an error:*
    Error when processing your request
    What has happened?
    The URL http://hsdnt24s11.hclt.corp.hcl.in:8000/sap/bc/webdynpro/sap/znet310_add_del_sech/ was not called due to an error.
    Note
    The following error text was processed in the system HE6 : The lead selection has not been set. VIEW_ADD_DEL_01
    The error occurred on the application server hsdnt24s11_HE6_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISEELEMENT_NOT_FOUND of program CL_WDR_CONTEXT_NODE===========CP
    Method: PATH_TABLE_GET_ELEMENT2 of program CL_WDR_CONTEXT_NODE===========CP
    Method: GET_BOUND_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system HE6 in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server hsdnt24s11_HE6_00 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server hsdnt24s11_HE6_00 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 800 -u: SUMANK -l: E -s: HE6 -i: hsdnt24s11_HE6_00 -w: 0 -d: 20081220 -t: 155832 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team
    Can anyone help me???

    Hi Suman,
    this issue seems to be not specific to the FPM. I would like to suggest you to address this problem in the ABAP forum.
    Best regards,
    Thomas

  • Doubts in ABAP WebDynpro

    Hi Experts,
    I am new to ABAP WebDynpro and self-learning going through SDN stuff and other online-help. Please provide me
    your kind explanation on below doubts.
    1. When do we use GET_ATTRIBUTE and GET_STATIC_ATTRIBUTE
    2. How to read the index of a particular selected row in table?
    3. How do you change position of a particulr node dynamically?
    4. Is it possible to execute a component without a window?
    5. Is it possible to run a VIEW without embeding into a window in Webdynpro application?
    6. How to read the content entered in PARAMTER and SELECT-OPTION elements in ABAP Webdynpro? Can anybody pass code how to read entries?
    I mean GET_ATTRIBUTE or GET_STATIC_ATTRIBUTES is used for reading attribute value. 
    7. Is it possible to fix the Message window position? Show at the bottom of a screen? Please provide some code for this.
    8. Is it possible to change the color of a laber attached to a attribute dynamically? For example somefield is mandatory but you forgot to enter and press on u2018Continueu2019 then program should show that elementu2019s lable with redcolor text. Please provide me example code.
    Thanks in advance for the support and useful explanation!
    Regards,
    Meera.

    Hi
    Refer the answers inline
    1) When do we use GET_ATTRIBUTE and GET_STATIC_ATTRIBUTE
    GET_ATTRIBUTE
    Method to get the values of a context attribute.
    The prerequisite for this method is that the application knows the data type of the attribute.
    The value of the given attribute is copied to the export parameter. To do this the export parameter must have a data type to which a value can be written.
    GET_STATIC_ATTRIBUTES
    This method copies the static attributes to the transferred variable. If the structure is not identical, a move-correspondingis performed, which is not as efficient as a direct move, but is still useful in many cases.
    Static attributes are those that either have been declared or that belong to the structure with which the node was declared.
    2) How to read the index of a particular selected row in table?
    data: lr_element type ref to if_wd_context_element,
              lv_index type i.
      lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT'  ).
      lv_index = lr_element->get_index( ).
    3) How do you change position of a particulr node dynamically?
        Explain Bit deeply
    4) Is it possible to execute a component without a window?
        No it is not possible, actually the component view can be viewed by embedding it to the window
    5) Is it possible to run a VIEW without embeding into a window in Webdynpro application?
        No it is not possible, without window you cant run the view
    6) Is it possible to run a VIEW without embeding into a window in Webdynpro application?
      DATA LO_ND_MAIN_NODE TYPE REF TO IF_WD_CONTEXT_NODE.
      DATA LO_EL_MAIN_NODE TYPE REF TO IF_WD_CONTEXT_ELEMENT.
      DATA LS_MAIN_NODE TYPE WD_THIS->ELEMENT_MAIN_NODE.
      DATA LV_INP_VALUE LIKE LS_MAIN_NODE-INP_VALUE.
    navigate from <CONTEXT> to <MAIN_NODE> via lead selection
      LO_ND_MAIN_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = 'MAIN_NODE' ).
    get element via lead selection
      LO_EL_MAIN_NODE = LO_ND_MAIN_NODE->GET_ELEMENT(  ).
    get single attribute
      LO_EL_MAIN_NODE->GET_ATTRIBUTE(
        EXPORTING
          NAME =  `INPUT_VALUE`
        IMPORTING
          VALUE = LV_INP_VALUE ).
    7) Is it possible to fix the Message window position? Show at the bottom of a screen?
        Yes it is possible to show the messages by using the message area UI element in the needed position
    8. Is it possible to change the color of a laber attached to a attribute dynamically? For example somefield is mandatory but you      forgot to enter and press on u2018Continueu2019 then program should show that elementu2019s lable with redcolor text.
        Im working onit and let you know after i complete.
    Regards
    Arun.P

  • ABAP Webdynpro Development - Script Error when Accessing Visual Elements

    I am encountering a strange error at my client .  I can't use the Abap Webdynpro visual elements to build views .
    To reproduce the error :
    - T-code SE80
    - Open up any ABAP webdynpro component .
    - Open up one of the view  and go on Tab Layout .
    Normal Screen : You would see many WYSIWYG items ( buttons, radiobutton , text elements etcu2026. ) at the left side u2026 these elements are used to build the view .
    Here : No elements displayed and when we click on that area we get an error   . 
    Instead of the elements to get displayed .. lines are displayed and when you try to open up ( click ) the lines , an internet explorer script error stating the following occurs ( although the abap wendynpro is edited in SAP Gui ) :
    An Error has occured in the script on this page .
    Line : 1
    Char : 25
    Error : Object Required
    Code: 0
    URL : http://hdrerpdev05.bchydro.bc.ca:8100/sap/bc/wdvd/toolbar.html?_vdrespkey=4KE8FGJO3P88DO8K5XCEYHTEA&_vdframe=toolbar&usedynp=&usepat=&sap-client=100
    Anybody had had the same kind of error before ^^????
    Thanks and Best Regards !

    Hi,
    we are getting the some what related errors in SE80 -> Web Dynpro Layout
    An Error has occured in the script on this page .
    Line : 1
    Char : 1
    Error : Object Expected
    Code: 0
    URL : http://<FQDN>:8000/sap/bc/wdvd/painting.html?_vdrespkey=4KZ4LYLFQA2I7X53H3CRICKFC&_vdframe=painting&sap-client=230
    An Error has occured in the script on this page .
    Line : 110
    Char : 2
    Error : Could not complete the operation due to error 80020101
    Code: 0
    URL : http://<FQDN>:8000/sap/bc/wdvd?_vdrespkey=4KZ4LYLFQA2I7X53H3CRICKFC&_vdframe=no_add_ui_lib&sap-client=230
    Recently, we have upgraded our ERP system (SAP ECC 6.0 SPS17) with EHP4 SPS8. SAP_BASIS and SAP_ABA patch level same on 701_0008.
    FQDN is mantianed at icm/host_name_full parameter in system as well as in /etc/hosts file with associated system IP address.
    As suggested by  Ted Dinh,  we do not find any duplicate MIME files in our MIME Repository (SE80) and we cleared/invalidated  ICM cache many times in problem analysis.
    As suggested by  Thierno Diarra , in our affected system domain WDY_MD_UI_ELEMENT_CATEGORY is well maintained in value ranges.
    We have raised SAP OSS Message for the same, they told us to check dns server connectivity/settings with the affected system. we did the suggested DNS settings in affected system. But  still the same error message is occuring. They have suggested same sap notes like #979039 and #1009930 & #1483210 , but all the corrections/suggections/SICF service status as mentioned, are found OK in our system.
    Regards,
    Bhavik G. Shroff

  • ABAP webdynpro with interactive form - launching failure

    We are doing some prototype in the solution manager box using ABAP webdynpro and Adobe Interactive Form. I created a webdynpro with a very simple Adobe form embedded in an view.
    But when I test the webdynpro, I got the following error page in internet browser, any idea?
    Error when processing your request
    What has happened?
    The URL http://md1as086.medimmune.com:8001/sap/bc/webdynpro/sap/z_wd_bookflight_gebo/ was not called due to an error.
    Note
    The following error text was processed in the system SMT : WebDynpro Exception: ADS: Request start time: Tue Mar 06 11:53:06 EST 2007(200.101). ?&#43970;.RuntimeProcessor.process(RuntimeProc
    The error occurred on the application server MD1AS086_SMT_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE of program CX_WD_GENERAL=================CP
    Method: CREATE_PDF of program CL_WD_ADOBE_SERVICES==========CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/LADOBE==================CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/LADOBE==================CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L8STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L8STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L8STANDARD==============CP
    Method: IF_WDR_VIEW_ELEMENT_ADAPTER~SET_CONTENT of program /1WDA/L7STANDARD==============CP
    Method: CONV_VIEW_INTO_VE_ADAPTER_TREE of program CL_WDR_INTERNAL_WINDOW_ADAPTERCP
    Method: SET_CONTENT_BY_WINDOW of program CL_WDR_INTERNAL_WINDOW_ADAPTERCP
    What can I do?
    If the termination type was RABAX_STATE, then you can find more information on the cause of the termination in the system SMT in transaction ST22.
    If the termination type was ABORT_MESSAGE_STATE, then you can find more information on the cause of the termination on the application server MD1AS086_SMT_01 in transaction SM21.
    If the termination type was ERROR_MESSAGE_STATE, then you can search for more information in the trace file for the work process 0 in transaction ST11 on the application server MD1AS086_SMT_01 . In some situations, you may also need to analyze the trace files of other work processes.
    If you do not yet have a user ID, contact your system administrator.
    Error code: ICF-IE-http -c: 200 -u: CHEUNGJ -l: E -s: SMT -i: MD1AS086_SMT_01 -w: 0 -d: 20070306 -t: 115305 -v: RABAX_STATE -e: UNCAUGHT_EXCEPTION
    HTTP 500 - Internal Server Error
    Your SAP Internet Communication Framework Team

    Hi,
    Is you ADS Configured ?
    Check that out.
    Regards
    <i><b>Raja Sekhar</b></i>

Maybe you are looking for