‎2008 Jul 23 8:34 AM
Hi
I added one field to standard internal table using append structure.
How enter data to that fields?
Please tell me.
Thanks.
‎2008 Jul 23 8:41 AM
‎2008 Jul 23 8:35 AM
Hi,
Is it Standard Table or INternal table?
Thanks,
Sriram POnna.
‎2008 Jul 23 8:40 AM
Hi Sriram,
Thanks for your answer.
Here insert records into standard table.
Please tell me.
Thanks.
‎2008 Jul 23 8:40 AM
You don't add fields using APPEND, you update the internal table adding the current line you issued the APPEND command, with the given table structure/fields.
If you want to add a field, one way to do it is through TABLE MAINTENANCE.
Now, if you meant you want to modify data in your internal table, let's say, for a specific field, you have to use the MODIFY command, like the following:
MODIFY [internal_table] INDEX sy-tabix (in case you are in a loop - that is going to modify the current line being looped) FROM [work_area_variable] TRANSPORTING [list of specific fields you want to modify].
If you want to update the given line with all the work area's contents, you can omit the TRANSPORTING clause.
Hope this helps.
Avraham
‎2008 Jul 23 8:41 AM
‎2008 Jul 23 8:53 AM
Hi Amit
Thanks for your answer.
SCARR table in am inserted PHONE field using append structure.
After i wrote Program like this.
SCARR-CARRID = 'AA'.
SCARR-PHONE = '2233865'.
INSERT SCARR.
But its not adding the records to standard table.
Please tell me.
Thanks.
‎2008 Jul 23 9:13 AM
Hi Sri,
If ur phone number field is same for all records then just one statement will do the trick.
UPDATE scarr SET phone = 'ur phone number'.
If the number is different then u have to follow this logic.
SELECT * INTO TABLE i_scarr FROm scarr.
LOOP AT i_scarr INTO wa_scarr.
Get the phone number based on ur conditions.
wa_scarr-phone = 'Ur phone no.'
MODIFY i_scarr FROM wa_scarr TRANSPORTING phone.
ENDLOOP.
MODIFY scarr FROM TABLE i_scarr.
This will modify the whole table with the respective phone number.
Thanks,
Vinod.
‎2008 Jul 23 10:17 AM
Hi Vinod,
Thanks for your answer. My problem solved.
Thanks allot.
‎2008 Jul 23 1:47 PM
‎2008 Jul 23 8:57 AM
‎2008 Jul 23 9:02 AM
If you want to insert the scarr structure values to your table, add
APPEND scarr TO table_name to your program. But only if scarr is your work area and not your table.
Regards
Avraham