‎2009 Jul 13 4:00 PM
Hi Guys,
I am using this structure LBBIL_INVOICE.
My Internal table is like this structure.
I used Modify statement as below
Loop at itab-it_gen tinto wa.
" some read condition for getting one value.
wa-x = read condition value.
Modify itab-it_gen from wa.
Endloop.
I am getting error as The field Itab-it_gen cannot be changed.
What is the procedure to modify itab-it_gen?
Thanks,
Prasad.
Edited by: Dheeru Prasad on Jul 13, 2009 5:00 PM
‎2009 Jul 13 4:17 PM
Per my understanding, you can try below
Loop at itab-it_gen tinto wa.
data: index type sy-tabix.
index = sy-tabix.
" read condition
wa-x = read condition value.
Modify itab-it_gen index from wa
transporting x.
Endloop.Edited by: Raja gurrala on Jul 13, 2009 5:17 PM
‎2009 Jul 13 4:39 PM
Dear Raja,
Still I am getting the same error message The field ITAB-IT_GEN cannot be changed.
Here IT_GEN has some more fields.How to update one field of IT_GEN.
Thanks,
Prasad.
Edited by: Dheeru Prasad on Jul 13, 2009 5:40 PM
‎2009 Jul 13 4:48 PM
Hi,
I think u have used this table in a form routine in which u might have used this table as using parameter. Instead use it as changing parameter.
I do not know if that is the case. Plz chk and let me know if there are concerns.
Thanks
sourav
‎2009 Jul 13 4:54 PM
Sorry. I should not see your requirment.
You can make use of below code to make it to work for you.
COMPANY internal table has Address. Similarly like ITAB has IT_GEN
adress-street= 'Rue des Montagnes'.
address-city = 'Geneve'.
READ TABLE company_tab
WITH TABLE KEY name = 'COMP1'
INTO company.
READ TABLE company-addresses TRANSPORTING NO FIELDS
WITH TABLE KEY city = address-city.
idx = sy-tabix.
MODIFY company-addresses FROM address INDEX idx.
MODIFY TABLE company_tab FROM company.Hope it helps you.
Regards,
Raja
‎2009 Jul 13 4:51 PM
Hi,
this is a similar working example:
DATA BEGIN OF SYSTTB OCCURS 0.
INCLUDE STRUCTURE SYST.
DATA X.
DATA END OF SYSTTB.
DATA WA LIKE LINE OF SYSTTB.
MOVE-CORRESPONDING SYST TO SYSTTB.
APPEND SYSTTB.
LOOP AT SYSTTB INTO WA.
MOVE 'X' TO WA-X.
MODIFY SYSTTB FROM WA.
ENDLOOP.
REgards,
Angelo.
‎2009 Jul 13 5:36 PM
‎2009 Jul 15 3:27 PM