Calling a Smart Form on Click of a Table Row..

Hi All,
I have one requirement.
I have developed one applicaiton, in which from R3, the values are coming in form of a table. Now, on Click of a Table row, it should call a smart form developed in R3 for that selected row attribute. Also the smart form should open in a new window, so that user can take a print of it.
How to add this new view and how to get the selected Row value ?
Please help me.

Hi,
To open the new window, I have added blow code:
IWDWindowInfo windowInfo = (IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("InfoPopup");
IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo, true);
window.open();
but, getting error message as : IWDWindowInfo cannot be resolved
what should be the import parameter? Also please tell me how to search for the Import parameters for the respected attribute/code?
Please help.

Similar Messages

  • Calling a smart form on click of a button in web dynpro abap

    Hi experts,
    I have a requirement like if I click a button in a view i need ti generate a PDF through smart form.
    Is this possible. If so please tell me the way..
    Thanks & Regards

    Hi Sharma,
    Create Interactive form in your view, create one node say PDF_SOURCE under this one attribute PDF_SOURCE of type XSTRING.
    Bind this to IF form Datasource and pdfsource.
    in your button action write code to call your smartform
    using SSF_FUNCTION_MODULE_NAME
    using FM  CONVERT_OTF and attach_file_to_response
    *convert to pdf
      call function 'CONVERT_OTF'
        EXPORTING
          format                = 'PDF'
        IMPORTING
          bin_filesize          = lv_bytecount
        TABLES
          otf                   = ls_job_output_info-otfdata
          lines                 = lt_lines
        EXCEPTIONS
          err_conv_not_possible = 1
          err_bad_otf           = 2.
      loop at lt_lines into ls_line.
        lv_string = ls_line.
        export mydata = lv_string to data buffer lv_buffer.
        import mydata to l_xline from data buffer lv_buffer in char-to-hex
        mode.
        concatenate l_pdfstring l_xline into l_pdfstring in byte mode.
      endloop.
      call method cl_wd_runtime_services=>attach_file_to_response
        EXPORTING
          i_filename      = 'ZWTY_PACKINGSLIP'
          i_content       = l_pdfstring
          i_mime_type     = 'BIN'
          i_in_new_window = abap_false
          i_inplace       = abap_false.
    also check this..
    http://abapcodexperiments.wordpress.com/2011/03/20/smartform-pdf-webdynpro-abap/
    Call smartform in web dynpro abap
    Cheers,
    Kris.

  • How to call a custom form on click of a button?

    We have a requirement to call a custom form on clicking a button which is on a standard form. I cant modify the standard form. Is this possible to handle this event from CUSTOM.pll or forms personalization?
    some sample code will help. Thanks in Advance,
    Message was edited by: 988490e8-2268-414d-b867-9d9a911c0053

    Hi,
    I think you are working with Oracle EBS.
    I don't think so that we can able to call the custom form on clicking button.
    We can call the form from the standard form using both custom.pll and form personalization
    In custom.pll using zoom function we can do this and in form personalization we can call the form by using form function, In both we call the form by creating a special menu in standard from and we used to call.
    So please check further, and let me know if any i can help you any.
    Regards
    Sri     .

  • Opening a new view in a new window on click of a table row entry.

    Hi Guys,
    How to open a new View of a same application in a new window (just like a pop up) on a click of a Table Row entry?
    I am using NWDS 7.0 version. So please suggest acccorrdingly.

    Hi Nikesh,
    first of all you will have to declare use of onLeadSelect event handler for your table (note that it will only be triggered when a lead selection occurs not a multiselection).
    Also, you can build at design time a View and a Window (for example, PopupWin) in your WebDynpro Component, and embed the view into the window.
    In your code for onLeadSelect function, you can use something like this to pop up the window.
    public void onActionRowSelection(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionSeleccionTabla(ServerEvent)
        IWDWindowManager windowManager = wdComponentAPI.getWindowManager();
        IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("PopupWin");
        IWDWindow window = windowManager.createModalWindow(windowInfo);
        window.setWindowPosition(WDWindowPos.CENTER);
        window.setWindowSize(new WDCssSize(450, WDWindowUnitOfLength.PX) , WDCssSize.UNDEFINED);
        // Store handle ti window in context attribute to able to close it later
        wdContext.currentContextElement().setPopup(window);
        window.show();
        //@@end
    Hope it helps,
    David

  • Error in calling/converting smart form from ECC to pdf in portal.

    Hi,
    We have a requirement in our project where we have to show IT form in portal exactly in the way payslip are shown in ESS
    Screen, that is in the pdf form in ess portal screen.
    For this my HR abap consultant has made one customize smart form which is being called from a RFC FM.
    After the FM lf_fm_name gets executed , the OTF data is being captured and then converted in to PDF.
    After that the PDF is then converted into XSTRING format which is then supplied to the portal side through export parameter
    of the RFC.
    Now when we debugged the RFC, the conversion is taking place perfectly fine in to XSTRING.This is wat we assume.
    Portal Side: I have used Iframe ui ELEMENT in my webdynpro java and its property source I have binded with a value attribute
    of type string and I am executing above customize RFC given to me by my HR abap consultant and after executing that RFC with
    userID and payroll year as its import parameter I am taking export parameter of that RFC with name pdf_string of type XSTRING
    of that RFC into my webdynpro java value attribute which i binded to source property of Iframe.
    Now when we see the output in portal , first of all pdf is not getting generated and its showing the error message:
    file does not begin with '%pdf-' and secondly errored Adobe form getting opened outside Iframe window its not coming within
    Iframe window like what payslip comes inside Iframe UI element.
    I want to know what mistake we are doing in our ABAP coding or portal coding.
    Please help.

    Hi Satyam,
    You can use the existing SAP GRT framework for developing the app.
    Its easy and provides more features.
    See this wiki:
    http://wiki.sdn.sap.com/wiki/display/WDJava/HowtodevelopcustomWebDynproESSapplicationsusingGenericReportingTool%28GRT%29
    Regards
    Yugandhar Reddy

  • MULTIPLE COMMAND NODE CALL IN SMART FORMS

    Hi all
    Hi All,
    I am designing a Smart form. i have 5 page . In my page2 (main window ) i call a command node to call page 3 with some condition it's working fine and now i going to call another page in my page2 (main window ) just behind the first command node to call the page3 but the problem is my first command take the cursor in the page3 but not come on page2 (main window ) and gives error .
    Regards,
    Kuldeep Singh

    hi,
    when the first command get executed, then the control moves into the new page....
    but ur second command is in old page, i mean from where u called ur first command... then the control is in one page, and the command is in another page...then how can u get that executed...?
    here do one thing, using first command u r calling one page, in that page place this secod command, then after executing that page, u can get the required one using the second command...
    hope its clear.
    if any doubts, plz revert back.

  • Smart form problem with multiple pages & table problem

    Hi experts,
    I have a problem with my smart form with multiple pages
    Situation: I have a smart form that ALWAYS has at least 2 pages. In one page the quotation, in the second page (basically this is the 3rd page as the 2nd page is optional) the terms and conditions. Sometimes however, when there are many items in the quotation more than 1 page is needed for the quotation.
    The (optional) second page of a quotation has a different header than the first page of a quotation. So I made a second page with 2 secondary windows (where the header texts are in). The main window is after the secondary windows and has to finish the quotation.
    The problem is that my headers of the second page are never printed, it stays a blank space. The table however does continue and is printed.
    Another problem I have is that I have a table (with the quotations) with 6 columns. The first 2 columns are displayed correctly but once the 3rd column the columns are shown on a lign below.
    Regards,
    PJ

    I would suggest another approach to this problem.
    Use just one page. For the headers on the first page, use a secondary window and on the conditions tab, choose the additional event - Only on First Page.
    For the different header on the second page, create another secondary window on the same page (probably even overlapping the first header on your layout). But in this one, on the conditions tab, choose the additional event - Not on First Page.
    The table should flow as you would be using the Main window for this one.
    As for columns, if they are too wide and wont fit in the same line, it would move to the next line. So you would have to re-adjust the line width and test.
    Hope this resolves your problem.
    Regards,
    Ancy
    Edited by: abapfreak on Oct 4, 2010 11:52 AM

  • How to pass hidden field values on a click of a table row

    hi all,
    href = "bookAndNonBook.do"
    I am very new to struts. I have created a table using displaytable tag which displays results in a tabular format. In addtion, i have a hidden field (prodType), the table rows are getting highlighted when i get my mouse on a particular row.
    Following is the code from the results.jsp file
    <body
    onload="addRowHandlers('row', 'rowMouseOver')"
    bgcolor="#FFFFFF" text="#000000" leftmargin="100" topmargin="50"
    marginwidth="" marginheight="" rightmargin="30">
    <html:form action="/bookAndNonBook" method="post">
    <display:table name="sessionScope.productSearchList" id="row"
    sort="list" export="true" defaultsort="1" defaultorder="ascending"
    pagesize="15" decorator="org.displaytag.decorator.TotalTableDecorator"
    class="dataTable">
    <display:column property="prodType" title="ProdType" class="prodType"
    headerClass="prodType" media="html" />
    <display:column title="Title" property="titleName" sortable="true"
    class="title" headerClass="title" />
    </display:table>
    </html:form>
    </BODY>
    I am calling a funtion addRowHandlers which passes the table id (which is row) and the rowMouseover for highlighting the rows on mouse over.
    the code for function addRowHandlers is
    function addRowHandlers(tableId, rowClassName) {
    var previousClass = null;
    var table = document.getElementById(tableId);
    var rows = table.getElementsByTagName("tr");
    for (i = 1; i < rows.length; i++) {
    rows.onmouseover = function () {
    previousClass = this.className;
    this.className = this.className + " " + rowClassName ;
    this.style.cursor="hand";
    rows.onmouseout = function () {
    this.className = previousClass;
    this.style.cursor='';
    rows.onclick = function (){
    var cell = this.getElementsByTagName("td")[0];
    var ProdType = cell.innerHTML;
    alert("value of prodType = " + ProdType);
    when i run the above code and click on a particular row it returns me the value in the hidden field i.e. prodType for that particular row
    Now where i am having problem is i want that on the basis of prodType my jsp file should call different actions for different prodType as returned....somwhat a function like this
    function submitProduct(prodType) {
    if(prodType == "BK")
    resultsForm.action = "/bookProduct.do";
    else if(prodType == "NB")
    resultsForm.action = "/nonbookProduct.do";
    but i am unable to figure out that how do i this..
    Any help will be really appreciated
    Thanks
    Sam

    can you please suggest some good struts forums where i can post my question
    thanks in advance
    Sam

  • Calling a smart form or script

    hi guys,
    can we call 2 smartforms from the same driver program and call 2 sap scripts from same driver program if so can any one help me by giving some code for both smartform and scripts.
    thanks
    pavan.

    Not sure about SmartForms, but yes to SAPscript.  You can do it in configuration.
    For example-
    Use txn NACE.
    Select V1 for SALES and pick OUTPUT TYPES.
    Select BA00 for the Order Confirmation and choose PROCESSING ROUTINES.
    Select 1 for PRINTOUT and hit the details icon (magnifying glass).
    You can list up to 5 programs and SAPscript layout sets.  They will all get processed in sequence.

  • Smart form requirement(related to TLine table output)

    Hi,
    I am trying to display smartform developed in ABAP  from webdynpro java as a PDF .The output is taken from a BAPI which is returning the output in TLINE table. I have tried printing the table output which consists of special characters but I am not able to get the output from the BAPI.
    Can anybody please tell what can be done for the same.Looking forward for the reply.
    Regards,
    Pawan

    Hi Pawan,
    I should clarify.  If you are planning to use Web Dynpro your first task is to get data into the Context Controller of the Web Dynpro component you are using.  Data is obtained via an Adaptive Web Service model which is generated for you by Web Dynpro if you provide it a WSDL.  So you need to create a Web Dynpro Project (If you plan to use the NWDI which most projects will it is best to create development component project of type Web Dynpro rather than just a Web Dynpro project), Anyhow once you you will an empty models folder in the project. Right click this to be prompted for the model type.  The model will be generated if the WSDL meets the criteria for generating a model. If it is created you still need to initiatlize the model in the wdDoInit() method of the Web Dynpro component controller and place the model nodes correctly in the Context of the Component Controller.
    This is accessed using wdContext from wdDoInit().  Once the data is properly in the context you will need to use context mapping to map the data into the context of the view controller from which it can be applied to the UI components in the Views layouts.

  • SMART FORMS: Frame Border of a Table in whole Window

    Hello there.
    The situation:
    I have a table in the main window which is filled via an loop over an internal table.
    I don´t know the exact point of start from the table because  before printing the table I print dynamic texts which can have different length.
    The frame of the table should end everytime at the end of the main window. If I have more than one page the first page is correct but the frame ends with the last position. But the frame should end at the end of the main window.
    The minimum length does not help because the main window is on the first page shorter than on the following pages.
    Can I use the footer of the table in this case? Do you have any idea?
    I can´t imagine that SAP have no solution in this case.
    Greetings
    Mark

    Hi!
    Unfortunetaly it is really urgent.
    Can´t nobody give me any feedback?
    Greetings
    Mark

  • Panel form in view mode when table row select

    Dear All,
    I have a table and a detail form(created by dragging the vo in form).
    by default when i select the row in af:table then the detail form is in edit mode. I want to have default view mode(panel form fields to be uneditable) and an edit button in the panelform when the user clicks the edit button then panelform fields should be in editable and other operation buttons(create,createInsert,commit,rollback,execute) to be visible.
    Any pointers to this type of problem.??
    Regards,
    Santosh.
    jdeveloper 11.1.1.4.0
    Edited by: Santosh Vaza on May 20, 2011 12:31 PM

    I'm not aware of a component which dose this out of the box. You can however implement a method in a bean which goes through the component tree beginning from your panel form and set all editable components to disable until you click the edit button. Then you use a similar method to set all components back to enabled.
    Timo

  • How to call text editors in smart forms?

    In my module pool program,I included text editors for three fields.I want that fields in smart forms too.I need to know how these text editors are called in smart forms?

    Hi achu,
             Any text that gets saved has a corresponding entry in table STXH table. It usually has the following parameters : TDOBJECT,TDNAME,TDID and TDSPRAS.
    What you have to do is create a new text element and under general attributes ---> Type  - give Include Text.
    And in the include text you give the above four parameters which correspond to the text you want to display.
    P.S. Do not forget to check the 'No error if no text exists' checkbox.
    Hope this helps.
    Regards,
    Arun

  • How to Call smart form in Action

    Hi All,
    Could some one tell me how to call the smart form in action.
    Eg. PB40 - Offer Contract Action.
    Appreciate your respnse.
    Regards
    Raj

    Hi ,
    attached you find  some  abap code to call a smartform with some comments in it. Hope that helps:
    DATA: l_fn_name               TYPE rs38l_fnam
          , l_devtype               TYPE rspoptype
          , ls_output_options       TYPE ssfcompop
          , ls_control_parameters   TYPE ssfctrlop
          , ls_job_output_info      TYPE ssfcrescl
          , l_pdf_fsize             TYPE i                      "#EC NEEDED
          , lt_otf_tab              TYPE tsfotf
          , lt_pdf_lines            TYPE TABLE OF tline
    To do
       The mapping from the UI structure to the Smortform structure has to be
       implemented here or in a pirvate method.....
    Call function module u201CSSF_FUNCTION_MODULE_NAMEu201D to get the name of the smartform.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = zh38tm_cl_zz_2gen_bl_constants=>c_smartforms_hipo
        IMPORTING
          fm_name            = l_fn_name
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc = 0.
       Call function module u201CSSF_GET_DEVICE_TYPEu201D to get the print parameter
        CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
          EXPORTING
            i_language             = sy-langu
          IMPORTING
            e_devtype              = l_devtype
          EXCEPTIONS
            no_language            = 1
            language_not_installed = 2
            no_devtype_found       = 3
            system_error           = 4
            OTHERS                 = 5.
        IF sy-subrc = 0.
        Fill label structure to smartform
         ls_labels = zh38pm_cl_zz_bl_perf_plan=>set_sf_label( ).
         Set output parameters u201CLANGUAGEu201D, u201CNO_DIALOGu201D and u201CGETOTFu201D
          ls_output_options-tdprinter     = l_devtype.
          ls_control_parameters-no_dialog = abap_true.
          ls_control_parameters-getotf    = abap_true.
          ls_control_parameters-langu     = sy-langu.
         Call smartform with the structures u201CIMP_S_PERF_PLANu201D, u201CCHG_S_PRINT_PLAN
          CALL FUNCTION l_fn_name
            EXPORTING
              control_parameters      = ls_control_parameters
              output_options          = ls_output_options
              s_doc_processing        = gs_doc-s_doc_processing
              s_header_display        = gs_doc-s_header_display
              s_header_texts          = gs_doc-s_header_texts
              s_header_status         = gs_doc-s_header_status
              t_header_appraiser      = gs_doc-t_header_appraiser
              t_header_appraisee      = gs_doc-t_header_appraisee
              t_header_part_appraiser = gs_doc-t_header_part_appraisers
              t_header_other          = gs_doc-t_header_others
              s_header_dates          = gs_doc-s_header_dates
              t_header_add_data       = gs_doc-t_header_add_data
              t_body_columns          = gs_doc-t_body_columns
              t_body_element_descr    = gs_doc-t_body_element_descr
              t_body_elements         = gs_doc-t_body_elements
              t_body_cells            = gs_doc-t_body_cells
              t_body_cell_notes       = gs_doc-t_body_cell_notes
              t_body_cell_val_values  = gs_doc-t_body_cell_val_values
              t_body_cell_val_ranges  = gs_doc-t_body_cell_val_ranges
              t_body_cell_val_c_like  = gs_doc-t_body_cell_val_c_like
              t_body_cell_val_descr   = gs_doc-t_body_cell_val_descr
            IMPORTING
              job_output_info         = ls_job_output_info
            EXCEPTIONS
              formattinl_error        = 1
              internal_error          = 2
              send_error              = 3
              user_canceled           = 4.
          IF sy-subrc = 0.
            APPEND LINES OF ls_job_output_info-otfdata TO lt_otf_tab.
            exp_t_otf = lt_otf_tab.
           Call function module u201CCONVERT_OTFu201D to convert the smartform data
          to exporting parameter u201CEXP_PDF_XSTRING
            CALL FUNCTION 'CONVERT_OTF'
              EXPORTING
                format                = 'PDF'
              IMPORTING
                bin_filesize          = l_pdf_fsize
                bin_file              = exp_pdf_xstring
              TABLES
                otf                   = lt_otf_tab
                lines                 = lt_pdf_lines
              EXCEPTIONS
                err_max_linewidth     = 1
                err_format            = 2
                err_conv_not_possible = 3
                OTHERS                = 4.
            IF sy-subrc ne 0.
              CLEAR exp_pdf_xstring.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    First you have to determine the smartforms function modules name the wxecute it.

  • Call text element and command in smart forms

    Hi, I have create a smart form that have one text element and one command. The command is for do a page break.
    I have seen that you can call the smart form from a program doing:
    1.-'SSF_FUNCTION_MODULE_NAME'
    2.-call function fm_name
    That is not ok for me because I want to call to the smart forms manually as befores it done with sap-script, open form, write , close form...
    What function Have I to use to call to the text element?
    What function Have I to use to call to the command?
    Someone have and example calling a smart form from an abap.
    Thanks in advance.
    MANUEL

    Hi Vinod, I do not understand very good that you propose.
    I explain more details of I have to do:
    I have a abap program that read and write some data, I want to pass every line of the report to smart form, and in some lines comes a break page that I have to force also in the smart form, the idea
    LOOP AT ITAB.
       IF ITAB-LINE EQ '<BREAK>'.
    BREAK PAGE IN SMART FORM
       ELSE.
    PASS ITAB-LINE TO SMART FORM
       ENDIF.
    ENDLOOP.
    In order to do that I have created in the smart forms one text element X_LINE that represents every line and a command NEWPAGE that force page break.
    Is possible to do that I want by the way that you propose?
    Thanks in advance.
    MANUEL

Maybe you are looking for