‎2008 Mar 03 3:06 PM
in a internal table i_claim i have 4 fields and in the custom table i have 20 fields, know i am updating in enque with i_claim to custom table it is showing error as i_claim is not long off what is this error reflect to and how do i need to solve this.
‎2008 Mar 03 3:21 PM
Hi Rocky,
To update DB table using internal table, you need to have the internal table of the same type as DB table.
Regards,
Atish
‎2008 Mar 03 3:21 PM
Hi Rocky,
To update DB table using internal table, you need to have the internal table of the same type as DB table.
Regards,
Atish
‎2008 Mar 03 3:24 PM
check this code,
PARAMETERS p_carrid TYPE scarr-carrid.
DATA scarr_tab TYPE SORTED TABLE OF scarr
WITH UNIQUE KEY carrid.
DATA: idx TYPE sy-tabix,
scarr_wa TYPE scarr.
SELECT *
FROM scarr
INTO TABLE scarr_tab.
READ TABLE scarr_tab
WITH TABLE KEY carrid = p_carrid
TRANSPORTING NO FIELDS.
idx = sy-tabix.
scarr_wa-currcode = 'EUR'.
MODIFY scarr_tab INDEX idx FROM scarr_wa
TRANSPORTING currcode.
<REMOVED BY MODERATOR>
venkat.
Edited by: Alvaro Tejada Galindo on Mar 3, 2008 10:30 AM
‎2008 Mar 03 3:25 PM
Hi,
If you want to pass the data from internal table to Database table..use INSERT statement
First Declare the internal table structure as Database Table.
and fill the internal table with data.
and use INSERT statement.
Check this program...
TABLES:MARA.
DATA:ITAB LIKE MARA OCCURS 0 WITH HEADER LINE.
START-OF-SELECTION.
ITAB-MATNR = '123ABCDA'. .
ITAB-MBRSH = 'C'.
ITAB-MTART = 'FERT' .
ITAB-MEINS = 'KG' .
APPEND ITAB.
ITAB-MATNR = '123ABCDB'. .
ITAB-MBRSH = 'C'.
ITAB-MTART = 'FERT' .
ITAB-MEINS = 'KG' .
APPEND ITAB.
LOOP AT ITAB.
INSERT MARA FROM ITAB.
MODIFY MARA .
ENDLOOP.
‎2008 Mar 03 3:33 PM
Hi Rocky,
DO like this....
Declare a Structure/work area and an internal table of type custom_table.
Loop at I_claim.
Move-corresponding i_claim to wa_custom. "Move fields to be modified in custom table
Append wa_custom to i_custom.
Endloop.
Modify custom_table from table I_custom.
Cheers!!!
Lokesh