Skip to Content
0
Former Member
Apr 17, 2008 at 07:38 AM

Text Symbols with parameter in WDA application

67 Views

Hi, Experts,

i want to use Text Symbols in my WD aplication with parameter.

The action:

According your document,

1. Create the assistant class(zz_00_test_008) that super class is CL_WD_COMPONENT_ASSISTANCE.

2. Code the text and fill placeholders in my text element.

M01 - This is test for %PARA1% .

3. Type the zz_00_test_008 to a new created WDA(zz_00_test_007) as assistant class.

4. Code in the wddoinit method in my WDA(zz_00_test_007).

METHOD wddoinit .

DATA lo_nd_ee_test TYPE REF TO if_wd_context_node.

DATA lo_el_ee_test TYPE REF TO if_wd_context_element.

DATA ls_ee_test TYPE wd_this->element_ee_test.

DATA lv_test LIKE ls_ee_test-test.

wd_assist->if_wd_component_assistance~get_text(

exporting

KEY = 'M01'

PARA1 = 'wangpeng'

receiving

text = lv_test ).

lo_nd_ee_test = wd_context->get_child_node( name = wd_this->wdctx_ee_test ).

lo_el_ee_test = lo_nd_ee_test->get_element( ).

lo_el_ee_test->set_attribute(

EXPORTING

name = `TEST`

value = lv_test ).

ENDMETHOD.

create a context node(ee_test) with attribute(test).

Bind the context attribute(ee_test-test) to a textview.

3. run my WDA.

The result is in the WEB page: This is test for %PARA1% . I found that the %PARA1% isn't replaced by 'wangpeng'.

How can I send the 'wangpeng' to the parameter for replacing the %PARA1%.

Best regards,

tao