Smart forms in web dynpro abap

how to use smart forms in web dynpro abap ????
what are the steps??

Hi Ankit,
1.create a node(Eg:PDF)  with attribute(SOURCE type xstring )  
2.use Interactiveform UI element in the view
3.Bind the pdfSource property of the UI to the attribute SOURCE
4.in method write logic for call the smart form
  Pass the output of the smartform function call to
  function module CONVERT_OTF to convert it to PDF data.
method displaypdf .
data : l_x(1) value 'X'.
data: lv_text type char3,
lv_syucomm type char1,
ls_pdf type xstring,
lv_fm_name type rs38l_fnam,
lv_control_parameters type ssfctrlop,
lv_output_options type ssfcompop,
lv_ssf_output type ssfcrescl,
lt_otfdata type table of itcoo.
data:
node_input1 type ref to if_wd_context_node,
elem_input1 type ref to
if_wd_context_element,
stru_input1 type
ig_componentcontroller=>element_zinput.
* navigate from <CONTEXT> to <INPUT1> via lead selection
node_input1 = wd_context->get_child_node( name
ig_componentcontroller=>wdctx_zinput ).
* get element via lead selection
elem_input1 = node_input1->get_element( ).
* get all declared attributes
elem_input1->get_static_attributes(
importing
static_attributes = stru_input1 ).
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM_NAME'
importing
fm_name = lv_fm_name
exceptions
no_form = 1
no_function_module = 2
others = 3
if sy-subrc <> 0.
* Error MESSAGE
endif.
* Set relevant control parameters
lv_control_parameters-getotf = l_x. "OTF output
lv_control_parameters-no_dialog = l_x. "No print dialog
lv_control_parameters-preview = space. "No preview
* Set relevant output options
lv_output_options-tdnewid = l_x. "Print parameters,
lv_output_options-tddelete = space. "Print parameters,
call function lv_fm_name
exporting
* ARCHIVE_INDEX * ARCHIVE_INDEX_TAB *
ARCHIVE_PARAMETERS control_parameters = lv_control_parameters
* MAIL_APPL_OBJ * MAIL_RECIPIENT * MAIL_SENDER
output_options = lv_output_options
user_settings = space
pernr = stru_input1-zpernr
reinr = stru_input1-zreinr
pdvrs = stru_input1-zpdvrs
importing
* DOCUMENT_OUTPUT_INFO job_output_info = lv_ssf_output
* JOB_OUTPUT_OPTIONS exceptions
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 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.
refresh lt_otfdata.
lt_otfdata[] = lv_ssf_output-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.
data: l_dummy type standard table of tline,
pdf_data type xstring,
pdf_size type i.
clear: pdf_data, pdf_size.
* convert otf to pdf
call function 'CONVERT_OTF'
exporting
format = 'PDF'
importing
bin_filesize = pdf_size
bin_file = pdf_data
tables
otf = lt_otfdata[]
lines = l_dummy
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.
data:
node_pdf type ref to if_wd_context_node,
elem_pdf type ref to
if_wd_context_element,
stru_pdf type
if_componentcontroller=>element_pdf ,
item_source like stru_pdf-source.
* navigate from <CONTEXT> to <PDF> via lead selection
node_pdf = wd_context->get_child_node( name if_componentcontroller=>wdctx_pdf ).
* get element via lead selection
elem_pdf = node_pdf->get_element( ).
* set single attribute
elem_pdf->set_attribute(
exporting
name = `SOURCE`
value = pdf_data ).
endmethod.
Thanks
Chinnaiya P

Similar Messages

  • Smart form in Web dynpro ABAP

    Hi experts,
                   In my scenario i have to display smartform from WDA. The smartform will show the employee records when i pass PERNR as the input parameter. i have used the following FM's SSF_FUNCTION_MODULE_NAME and CONVERT_OTF. and converted it into PDF and binded the source file to interactive form. Now the form is getting displayed.
    My problem is when i pass single pernr its fetching the record of particular pernr and when i pass multiple pernr its not fetching the records of multiple pernr.
    when i set the value for below control parameter its getting values for single pernr:-
    cparam-no_dialog  = 'X'.
    cparam-preview = 'X'.
    cparam-getotf = 'X'.
    when i set values for these parameters cparam-no_open = 'X' and cparam-no_close = 'X'  to fetch multiple PERNR nothing is getting displayed in the form.
    What should i have to do to show multiple records. Is any other control parameters is to be passed.
    Please help me out of this issue.
    Regards,
    Susil.

    Susil,
    It has something to do the logic inside the smartforms,nothing with the control parameters
    Thanks
    Bala Duvvuri

  • Search Help on Adobe Interactive Form with Web Dynpro ABAP

    Hi All,
    I have created Adobe Interactive Form with ZCI type and XML based interface type using Webdynpro ABAP.
    I placed a text field USER_NAME on the form ( data element is linked to search help USER_COMP ).
    Added Native WD UI element 'Value Help' to form to search for users and changed script
    *var fieldName = "INSERT_NAME_HERE*"; to var fieldName = "USER_NAME";
    The problem is that when I click on the value help button, nothing happens.
    Is any more additional steps required ?
    Thanks
    Karu

    Hello
    Check this
    F4 Value Help on Adobe Interactive Form with Web Dynpro ABAP
    Thanks
    Anirudh

  • Calling adobe form from Web Dynpro ABAP

    Hi Friends,
                        This is the following error, which i got when i tested my application. Calling adobe form from Web Dynpro ABAP.
      WebDynpro Exception: ADS: Request start time: Tue Nov 16 14:00:22 YEKT
      2010(200,101).
                        Can some one tell me how to solve this....
    Regards
    Sankar

    Hi,
    Please refer to this same link in forum
    WebDynpro Exception: ADS: Request start time, start Interactive Form
    WebDynpro Exception: ADS: Request start time
    Thanks
    Pradeep

  • How to View Smartforms or SAP Script Forms in Web Dynpro ABAP

    Do anyone have idea of how to View Smartforms or SAP Script Forms in Web Dynpro ABAP?
    Please let me know. Thanks

    Hi Sameeksha,
    You can display an smartform in WDA as an pdf file. Try go through this [article |https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0de1eb8-0b98-2910-7996-8a3c2fcf6785]where Nanda does explain about the same.
    Regards,
    Uday

  • Interactive form in web dynpro abap

    hi experts,
                   i am beginner to adobe interactive form in web dynpro using abap.
    my scenario:
                        To  use  interactive form ui element  and place all fields of lfa1 in view.
         my context look like
                       context:
                                    adobe(node 1, 1:n, singleton = true)
                                       lfa1(node2,1:n,singleton =true) with its fields.
                                       pdf_source(attribute)
                       layout type : zci layout and xml interface.
        my view look like:
                                    all fileds of lfa1.
                                    button-add.(to add to below table)
                                    table.
                                    button-submit to sap.
    i want to place all fields in view and get values from the user online and need to display the same in an table in same view and
    when the user click ok entered values should be displayed  in table  and after clicking submit to sap it should hit the database table.
    as i am beginner dont know how to do.pls i need ur help in finishing it.thanks in advance.
    cheers,
    vinoth.

    hi all,
             expecting reply from u all. pls help me and give some sugesstion.
    regards,
    vinoth.

  • Problem with Table display in Adobe Form of Web Dynpro ABAP

    Hi Team,
    I'm trying to display a table in Adobe Print Form (not interactive). The table is bound to the context node in the Web Dynpro ABAP where the cardinality is 0:N. I get a short dump. Don't know what to do here. I'm able to display individual fields from my context successfully. Looks like something is missing when I try to display a table. Any pointers to display a data table in Adobe? Any step by step example you know of where I can find out what I did wrong? Many thanks for your time
    We are on support pack SP06 on 2004S release.
    DUMP INFORMATION:
    Short text                                                               
        Access via 'NULL' object reference not possible.                 
    What happened?                                                           
        Error in the ABAP Application Program  The current ABAP program "CL_WD_ADOBE_SERVICES==========CP" had to be terminated because it has come across a statement that unfortunately cannot be executed.
    An exception occurred that is explained in detail below.                    
    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not caught in procedure "CREATE_PDF" "(METHOD)", nor was it propagated by a RAISING clause.

    Hi Thomas,
    We upgraded our system(2004S) to SP10 so that we can use the ADOBE form printing in Web Dynpro ABAP but could not apply note 1034425 because of the validity constraints in SNOTE. All the pre-requisite notes are already in the system apart from one note 1029721 which talks about supporting input helps. We don't want to use input helps in our system and cannot upgrade to SP11 because of problems with Business functionality.
    Questions:
    1) Is note 1034425 absolutely dependent on 1029721?
    2) If NOT, can someone please correct the validity so that we can implement using SNOTE.
    3) Would it be OK if we manually apply the changes specified in 1034425 without implementing 1029721?
    4) If all of the above is not applicable, is there any other note which fixes the above mentioned short dump.
    Your help in this matter will greatly help us in using the ADOBE services provided by SAP WDA.
    Thanks much

  • Issue While printing / Previewing a Adobe form in Web Dynpro ABAP application

    Dear All,
    We have designed 4 different adobe forms using SFP transaction for 4 different countries in SAP system.
    Every country have different terms and conditions and therefore we have placed static texts (Hardcoded text) with text in different styles. Some text is in bold, some in different font (Bold, Italic). Font and Paragraph settings of the text was done as per expected. All the forms have same font and paragraph settings.
    When we Launch Web Dynpro ABAP application to open the form in Print preview or to take print, form is not getting displayed / printed as it is designed in SFP. But if you open the form in SFP, everything looks fine.
    It is working fine for 3 different forms but problem with only 1 form.
    Kindly guide what is the reason for this strange issue when previewed or taken print. It is very urgent.
    Thanks,
    Bharath.K

    Dear All,
    Thanks for your responses.
    We had identified the reason.
    Customer has provided terms and conditions for all 4 countries in PDF document. Along with PDF, for 3 out of 4 countries customer has shared pre-prepared word document with pre aligned and justified terms and conditions as per expected outcome. We copied this text from word to Adobe form layout. It worked fine. For 1 country, customer have not shared terms and conditions in word document. Therefore we had copied text directly from adobe PDF document in to Form layout. Then this issue happened.
    Solution for this issue is to, prepared a word document with expected alignment and justification of terms and conditions text . Then copied from word to adobe livecycle designer form layout. It worked fine.
    Thanks,
    Bharath.

  • Submit button  from Interactive adobe form in Web Dynpro ABAP

    Hi all,
    We seem to be having a problem with the 'submit' button on the Interactive Form for the Web Dynpro ABAP.  The submit button is from the Web Dynpro active X or web Dynpro Native in the form designer. The submit button doesn't trigger the action in Web Dynpro. we are currently running on support pack 9 for the ABAP stack. We have Internet Explorer browser version 6.  Could someone tell me if there are requirements for the IE version that will work in conjunction with a particular ABAP stack version.  And, are there specific IE security settings or administrative privilages required with this version of the ABAP stack.  Or, any other ideas as to why this does not seem to work. 
    Thanks in advance,
    Michelle Hong

    Hi Michelle,
    Could you tell me how you resolved the problem - as I'm facing exactly the same issue!
    Many Thanks
    Christine

  • Adobe Reader error with SAP interactive form in Web dynpro ABAP

    Hi,
    We are having a strange intermittent problem with Adobe Reader. When we try to open PDF files from SAP Frontend we get an error pop-up. The pop-up does not have any text. The title of the pop-up has "Adobe Reader". There is a blue question mark and an OK button. The form is inserted into Web Dynpro ABAP page. This web dynpro application is executed in SAP GUI by this program:
    REPORT  TEST1 MESSAGE-ID SWDP_RUNTIME.
    start-of-selection.
      CALL FUNCTION 'WDY_EXECUTE_IN_PLACE'
        EXPORTING
         PROTOCOL               = 'HTTPS'       " HTTP | HTTPS
        INTERNALMODE           = 'X'    "SPACE - browser is started
        PARAMETERS             =
          APPLICATION            = 'Z_FORM'
         CONTAINER_NAME         = 'TEST'
        EXCEPTIONS
          INVALID_APPLICATION    = 1
          BROWSER_NOT_STARTED    = 2
          OTHERS                 = 3.
      IF sy-subrc EQ 1.
        MESSAGE a400.
      ELSEIF sy-subrc = 2.
        MESSAGE a401.
      ELSEIF sy-subrc = 3.
        MESSAGE a667.
      ENDIF.
    Adobe Reader version is 9.1.2
    Is there any solution for this?
    Many thanks for answer.

    Jiri,
    The reason why I thought downgrading would help is because Reader 9 and above is probably not fully supported by SAP yet.
    You can maybe open an OSS and see if Adobe 9 is fully supported or not.
    Chintan

  • ADOBE INTERACTIVE FORMS in Web dynpro ABAP

    Hi
    Iam new to this Web dynpro ABAP.I can able to import the pdf file in the Web dynpro ABAP.While i was taking the values in the "Data View"....Iam getting
    "Adobe live cycle designer" has encountered a problem.we are sorry for the inconvinience..."
    Please help me where i went wrong.
    Regards
    Sushma

    Hi,
    i am getting warnings in the pdf.
    "Field f1 may not work properly.Using Normal Data Binding when the default data connection is defined and produces undefined data results.
    can you give more details...so that i shall try to help you.
    any how one more advise we have sepate forums for adobe forms try in this too.
    [Web Dynpro ABAP;
    Regards,
    Mahesh.Gattu

  • Interactive Form within Web Dynpro ABAP

    Hi,
    I've an Adobe interactive form element within Web Dynpro ABAP view. I've more than one WebDynproActiveX buttons within the Interactive form (like Submit, Cancel, Clear).
    How can I differentiate the user selection within Webdynpro  ? Whether the user selected Submit or Cancel or Clear ? Can we associate any function code for each button ?
    Thanks
    Ravikumar

    Hi Ravi,
    You can take a context attribute lets say "STATUS"(string) in your form context.  For your buttons in the form, in click event set the value. like
    STATUS.rawValue = "1";      (eg Submit)
    STATUS.rawValue = "2";      (eg Cancel)
    And in your submit event read this context attribute and you can use CASE like when 1 , when 2 etc and you can execute your code accordingly.
    it should solve your problem.
    With Regards,
    Ravi.D

  • F4 Value Help on Adobe Interactive Form with Web Dynpro ABAP

    Hello,
    I have created an Interactive Form with ZCI type.
    I placed a text field MATNR on the form.
    Then I placed a Native WD UI element 'Value Help' as mentioned in the below link: http://help.sap.com/saphelp_nw70/helpdata/EN/42/fb2fe500553ee4e10000000a1553f7/frameset.htm
    This form was then embeded into Web Dynpro ABAP view.
    The problem is that when I click on the F4 button, nothing happens.
    Is anything else needs to be done?
    Thanks
    Sagar

    Hi Amol,
    After binding the Context variable in the view, and in the Adobe Layout Designer from the Library go to WebDynpro Native Tab and drag and drop the Value Help and for this automatically JavaScript is being generated, go that script and edit the line
    Var fieldname = "yourfieldname";
    Note: Don't forget to link the context attribute to search help. ie. in the context properties of the attributes select the input help mode as dictionary search help and specify the name of the search help present in data dictionary.
    And now go to Utilities and click on u201CInsert Web Dynpro Scriptu201D.
    Also make sure that you specify the Layout as ZCI Layout in the Propertioes of the Adobe Form.
    Ragards,
    Amol Patil.

  • How to integrate a Smart Form in Web Dynpro and how to view it on portal?

    Hi,
    I have created a Smart Form in ABAP. I need to use it in Web Dynpro. How can this be done?
    I want to integrate this Smart Form in a Web Dynpro Application and then display this Smart Form on the Portal (when I deploy the Web Dynpro application).
    Is it compulsory to first convert the Smart Form into PDF Format? Is there some other way ??
    Thanks in Advance.
    Regards,
    Harshada

    Hi,
    Go through Re: Web Dynpro and Smart Forms.
    Regards,
    Satyajit.

  • Data node mapped to  Adobe Form empty - Web Dynpro ABAP

    Hi,
    I've created a web dynpro component in ABAP. One of the view contains an interactive Adobe form.
    Form properties : Data source and pdf source are mapped
    Enabled checked
    Submit action mapped to a method. This method reads the node mapped to the form.
    Form Layout: Used ZCI Layout and Inserted web dynpro script (XML interface)
    Dragged attributes from data view to create text fields.
    Submit button used from Web dynpro native group
    I could not read data from the form.
    When I submit the form, data is not captured in the context.
    I have used the same context for view and could save the data from the view. But from the adobe form, I cannot read the data.
    Is there anything I missed. I have been on this since 2 days with no solution. I dont see any mistake but the form doesnt work.
    Version: Adobe Designer : 8.1 (from market place)
    SAP Netweaver 2004s SP18
    Any help on this is appreciated.
    P.S. Used all possible help from SDN existing posts and SAP notes.
    Thanks in advance,
    Srinivas

    Hi Srinivas,
    place a button on webdynpro view it self then try.
    make sure your form is working in interactive mode.
    else keep this conde in modifyview method.
    method WDDOMODIFYVIEW.
    data: LR_INTERACTIVE_FORM type ref to CL_WD_INTERACTIVE_FORM,
    LR_METHOD_HANDLER type ref to IF_WD_IACTIVE_FORM_METHOD_HNDL.
    check first_time = abap_true.
    LR_INTERACTIVE_FORM ?= VIEW->GET_ELEMENT(u2018<<ID_OF_YOUR_UIELEMENT>>u2019).
    LR_METHOD_HANDLER ?= LR_INTERACTIVE_FORM->_METHOD_HANDLER.
    LR_METHOD_HANDLER->SET_LEGACY_EDITING_ENABLED( abap_true ).
    endmethod.
    or try these links
    For More Information look at the link below.
    http://help.sap.com/saphelp_nw70/helpdata/en/2c/241a427ff6db2ce10000000a1550b0/frameset.htm
    Please look into SAP Notes: 1229392
    You can also look at the elearning below:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/media/uuid/c766e918-0b01-0010-99b1-c2b78cd059b3
    Regards,
    Mahesh

Maybe you are looking for