‎2007 Nov 28 3:28 PM
Hi All,
LOOP AT lt_outtab.
lt_outtab-bktxt = 'Test'.
MODIFY lt_outtab INDEX sy-tabix.
ENDLOOP.
Im trying to modify value of BKTXT.. before passing to FM
While compiling Im getting error like
"The data object "LT_OUTTAB" has no structure and therefore no component called BKTXT.
What might be error?
How can modify contents of lt_outtab.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = g_repid
is_layout = l_layout
it_fieldcat = lt_fieldcat
it_excluding = gt_excluding
it_sort = lt_sortinfo
i_save = 'A'
is_variant = l_variant
it_events = lt_alv_event
is_print = flg_statistikdruck "OP-08
TABLES
t_outtab = lt_outtab.
‎2007 Nov 28 3:35 PM
Hi
Let's know how the structure lt_outtab is defined:
- Or it isn't an internal table;
- Or it's an internal table without an headerline;
- Or there isn't the field BKTXT
Max
‎2007 Nov 28 3:35 PM
Hi
Let's know how the structure lt_outtab is defined:
- Or it isn't an internal table;
- Or it's an internal table without an headerline;
- Or there isn't the field BKTXT
Max
‎2007 Nov 28 3:37 PM
Your table LT_OUTTAB is the table defined without the header line.
So define some work area and handle it like this:
LOOP AT lt_outtab into wa_outtab.
wa_outtab-bktxt = 'Test'.
MODIFY lt_outtab from wa_outtab INDEX sy-tabix.
ENDLOOP.
Regards,
Naimesh Patel
‎2007 Nov 28 3:42 PM
DATA gt_alv TYPE STANDARD TABLE OF rfums_tax_gt_alv
INITIAL SIZE 0 WITH HEADER LINE.
field-symbols <gt_alv> like line of gt_alv.
PERFORM print_table TABLES <gt_alv>-t_auste_ep "lt_outtab here it's filling
USING
par_lis1
var_avp1
c_auste_ep
par_var1
'BUKRS'
'MWSKZ'
'PRINT_AUSTE_SUM'
'TOP_OF_PAGE_AUSTE_EP'
'CREATE_FIELDCAT_EP'.
FORM print_table TABLES lt_outtab
USING
l_check_append TYPE c
l_check_avp TYPE c
---------------
---------------
‎2007 Nov 28 3:48 PM
Hi
FORM print_table TABLES lt_outtab
In this way the interface parameter LT_OUTTAB is ANY table, the structure is determinated at run time.
U need to use the field-symbols:
FIELD-SYMBOLS: <WA> TYPE ANY,
<VALUE> TYPE ANY.
LOOP AT LT_OUTTAB ASSIGNING <WA>.
ASSIGN COMPONENT 'BKTXT' OF STRUCTURE <WA> TO <VALUE>.
IF SY-SUBRC = 0.
<VALUE> = 'Test'.
ENDIF.
ENDLOOP.Max
‎2007 Nov 28 3:50 PM
Than you can define the workarea like:
data: wa_outtab like RFUMS_TAX_ITEM. " <<
LOOP AT LT_OUTTAB INTO WA_OUTTAB.
* USE THE WA_OUTTAB work aread data manipulation.
WA_OUTTAB-BKTXT = 'TEST'.
MODIFY LT_OUTTAB FROM WA_OUTTAB INDEX SY-TABIX.
ENDLOOP.Regards,
Naimesh Patel
‎2007 Nov 28 3:56 PM
Try this:
FORM print_table
TABLES lt_outtab structure gt_alv "<====
Rob
‎2007 Nov 28 3:59 PM
Hi Perez,
I think Rob is right. You should declare your FORM statement like this :
FORM print_table TABLES lt_outtab STRUCTURE RFUMS_TAX_ITEM
USING
l_check_append TYPE c
l_check_avp TYPE c
Regards,
Nicolas
‎2007 Nov 28 4:01 PM
Max,
Thank you very much for your help..it's working..
Naimesh,
It's modifying lt_outtab with your code But I got dump while output....
"Data objects in a Unicode program are not convertible.
Anyway thank you very much .....
‎2007 Nov 28 3:36 PM
‎2007 Nov 28 3:39 PM
You are doing this in a form where you have passed the table, but not added the STRUCTURE addition to the FORM statement.
Rob