Skip to Content
0
Former Member
Nov 12, 2013 at 06:37 PM

Error in application WEB Dynpro

30 Views

Hi experts, I am programming a Web dynpro and I have two inputs (Class Sales Organization and Sales), when run i get this error "A dynamically specified column name is unknown", this is the code:

The method is the search button

Declaración de datos

DATA: lo_el_context TYPE REF TO if_wd_context_element,

ls_context TYPE wd_this->element_context,

lv_vkorg TYPE wd_this->element_context-vkorg,

lv_auart TYPE wd_this->element_context-auart.

*Obtener elementos vía selección

lo_el_context = wd_context->get_element( ).

*Obtener un unico atributo

lo_el_context->get_attribute(

EXPORTING

name = 'VKORG'

IMPORTING

value = lv_vkorg ).

*Obtener elementos vía selección

lo_el_context = wd_context->get_element( ).

*Obtener un unico atributo

lo_el_context->get_attribute(

EXPORTING

name = 'AUART'

IMPORTING

value = lv_vkorg ).

*Declaración de datos para tabla

DATA: lt_hdr TYPE STANDARD TABLE OF VBAK,

ls_cond TYPE c,

lt_cond LIKE TABLE OF ls_cond.

*Condición

CONCATENATE 'VKORG = ''' lv_vkorg '''' INTO ls_cond.

APPEND ls_cond TO lt_cond.

CONCATENATE 'AUART = ''' lv_auart '''' INTO ls_cond.

CONCATENATE 'AND' ls_cond INTO ls_cond SEPARATED BY space.

APPEND ls_cond TO lt_cond.

This piece of code generates the error me

SELECT vbeln erdat erzet auart vkorg

FROM vbak

INTO TABLE lt_hdr

WHERE (lt_cond).

*

*Declarar datos de cabecera

DATA: lo_nd_header TYPE REF TO if_wd_context_node.

*Navegar desde CONTEXT hacia HEADER via selección

lo_nd_header = wd_context->get_child_node( name = wd_this->wdctx_header ).

*Declarar todos los atributos

lo_nd_header->bind_table( lt_hdr ).

Please can you help me.

Best Regards.