adspace


i want to add 2 records to a table but the last field in the
table is 1000 char long.Is it possible?if yes how?

Answer Posted / Ruchit Kumar Sajjan

Yes, it's possible to insert two records into a table with a column that has a length of 1000 characters. Here's an example in SAP ABAP:nn```abap
DATA: lt_data TYPE TABLE OF zmytable WITH UNIT OF LINE FIELDS:
field1 TYPE string,
field2 TYPE string,
field3 TYPE string.

DATA(ls_record) = VALUE zmytable FOR field1 'Value 1' field2 'Value 2' field3 'Very Long String'.
APPEND ls_record TO lt_data.

DATA(ls_record) = VALUE zmytable FOR field1 'Value 3' field2 'Value 4' field3 'Another Very Long String'.
APPEND ls_record TO lt_data.

LOOP AT lt_data INTO DATA(ls_data).
WRITE: / ls_data.n ENDLOOP
```nThis code creates a table with three fields, and inserts two records into the table. Both the last fields (field3) have long strings.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi every one ! You people are doing a great job here , Im going to attend Tata Technologies interivew on this sunday,Can anyone who has already attended this company interivew or other companies interivews in abap pls share ur experience with me and help me to get into job my id ushareddyabap@gmail.com. Thankyou verymcuh

2010


please give the remaining answers.

2307


What is the project you are currently working and work that you are doing

1606


What work you have done in HR module

1458


What is your current client number?

1141


what comes in Timkein written test I hope some body can tell me at this id plz tell it before 9 pm 19 march

2233


How can we handle table control in bdc? : abap bdc

1190


How do you get the number of lines in an internal table? How to use a specific number occurs statement?

1029


1/ How do u apprach if error occur in sending idocs ? 2/ where u assigned process code ?

2070


Did you create secondary index?

1241