on 02-01-2012 11:04 AM
hi
this is sathya, i very thank ful to your answers, coming to my problem
i have written the code for file upload action method, in this below code there is no syntax problem.
but there is a run time error , i.e convt_no_number
kindly rectify that.
data: lt_final type table of zalvtab,
ls_final type zalvtab,
"t_table1 TYPE STANDARD TABLE OF str_itab,
"fs_table TYPE str_itab,
i_data TYPE STANDARD TABLE OF string,
lo_nd_zalvtab TYPE REF TO if_wd_context_node,
lo_el_zalvtab TYPE REF TO if_wd_context_element,
l_string TYPE string,
l_xstring TYPE xstring,
fields TYPE string_table,
lv_field TYPE string.
DATA : t_table TYPE if_main=>elements_sel_node,
data_table TYPE if_main=>elements_sel_node.
" get single attribute
wd_context->get_attribute(
EXPORTING
name = `upload`
IMPORTING
value = l_xstring ).
CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
EXPORTING
in_xstring = l_xstring
IMPORTING
out_string = l_string.
SPLIT l_string AT cl_abap_char_utilities=>newline INTO TABLE i_data.
" Bind With table Element.
LOOP AT i_data INTO l_string.
SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
READ TABLE fields INTO lv_field INDEX 1.
ls_final-ebeln = lv_field.
READ TABLE fields INTO lv_field INDEX 2.
ls_final-ekorg = lv_field.
READ TABLE fields INTO lv_field INDEX 3.
ls_final-bukrs = lv_field.
READ TABLE fields INTO lv_field INDEX 4.
ls_final-ebelp = lv_field.
READ TABLE fields INTO lv_field INDEX 5.
ls_final-menge = lv_field.
READ TABLE fields INTO lv_field INDEX 6.
ls_final-netpr = lv_field.
READ TABLE fields INTO lv_field INDEX 7.
ls_final-aedat = lv_field.
READ TABLE fields INTO lv_field INDEX 8.
ls_final-waers = lv_field.
READ TABLE fields INTO lv_field INDEX 9.
ls_final-description = lv_field.
APPEND ls_final TO lt_final.
ENDLOOP.
lo_nd_zalvtab = wd_context->get_child_node( 'sel_node' ).
lo_nd_zalvtab->bind_table( lt_final ).
Hi sathya,
just check in debugging where exactly are you getting the error.
I think there night be problem with converting the fields in your context while you are uploading.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sathya,
I guess you are trying to upload data from excel file(XLS format).
If it is correct then you cannot do this in webdynpro, first you save the excel file as tab delimited.
Open your excel file->save as->other formats->give file type as TEXT(Tab delemited).
Now use this file to upload. It should work perfectly.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.