on 11-12-2009 7:29 PM
I tried the following,
How to display a smarform in PDF via Webdynpro
and it is complaining about syntax.
type element_zinput is unknown.
Appreciate your help.
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.
Hi Maulik,
The tutorial didn't explain anything about the input fields to the smartforms. U should declare a context in the component controller to get the input to the Smart forms FM.
Ranganathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your your prompt response. It was quite helpful.
For now, I commented out a lot of code and modified another set of code to make the smartform work without the input field.
I haven't yet figured out how I am going to pass the input from the screen to the method. I deployed a smartform using a BSP long time ago which was quite easy and straight forward. My current task is to migrate it under Web Dynpro.
I am an experienced ABAP developer however I am just getting my feet wet in WD4A.
If you have any specific pointers as to how to move one input field from the screen to the method would be helpful.
Thanks & Regards,
Maulik
hi Maulik ,
how to move one input field from the screen to the method would be helpful
1 create a context attribute attr1 of type string under context node say UI
2 go to ur rootelement container in ur view , right click ->insert element
insert Input Field UI
3 bind the Value property of ur Input UI to this context attribute attr1
4 in ur appropriate method , where u want to obtain the field value , press CONTROL + F7 for controol wizard
select the radio button read context node /attribute , selct the attribute attr1 , which is binded to ur input UI
the code wizard wud automatically , generate the corresponding code for u , using the get_attribute method
DATA lo_nd_ui TYPE REF TO if_wd_context_node.
DATA lo_el_ui TYPE REF TO if_wd_context_element.
DATA ls_ui TYPE wd_this->element_ui.
DATA lv_attr1 LIKE ls_ui-attr1.
* navigate from <CONTEXT> to <UI> via lead selection
lo_nd_ui = wd_context->get_child_node( name = wd_this->wdctx_UI ).
* get element via lead selection
lo_el_ui = lo_nd_ui->get_element( ).
* get single attribute
lo_el_ui->get_attribute(
EXPORTING
name = `ATTR1`
IMPORTING
value = lv_enable ).
//reading the context attribute ATTR1 under the context node UI
I hope it wud be helpful
regards,
amit
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.