Sitemap

Amicuk Programming Answers

Confused with the internal table

-0001-11-30   Views:0

Advertisement

Hello, I am getting confused again by the usage of work space for an internal table. Say for example I have a internal table itab that is defined as: DATA:ITAB TYPE STANDARD TABLE OF Txxx. Then I define a work space for the internal table. DATA:WS_IT

Hello,
I am getting confused again by the usage of work space for an internal table.
Say for example I have a internal table itab that is defined as:
DATA:ITAB TYPE STANDARD TABLE OF Txxx.
Then I define a work space for the internal table.
DATA:WS_ITAB LIKE ITAB.
Now say for example, I would like to fill in some data to this internal table, can I do:
WS_ITAB-FIELD1 = 3.
APPEND WS_ITAB INTO ITAB INDEX 1.
where FIELD1 is a valid field in Txxx?
If not, how should I accomplish my goal? Thanks a lot!

The replay answer
Advertisement
Yes, you have the right idea.  When working with work areas it is a good idea to define them like line of itab. This way, anytime itab changes, the wa will also be updated.
DATA: ITAB TYPE STANDARD TABLE OF Txxx.
<b>data: wa like line of itab</b>.
You can add a line to your internal table by filling the work area and appending to the internal table.
wa-fld1 = 'A'.
wa-fld2 = 'B'.
wa-fld3 = 'C'.
append wa to itab.
You can insert into a specific index by using INSERT.
Insert wa into itab index 1.
Regards,
Rich heilman

Go to See the other 8 answers

Confused with the internal table

Category:DefaultRelease time:-0001-11-30Views:130

Hello, I am getting confused again by the usage of work space for an internal table. Say for example I have a internal table itab that is defined as: DATA:ITAB TYPE STANDARD TABLE OF Txxx. Then I define a work space for the internal table. DATA:WS_IT[More]

Internal table occurs 0 --------- why obsolate?

Category:DefaultRelease time:2015-10-11Views:130

Hi, Can anybody tell why the declaration of internal table occurs 0 and internal table with header line is obsolate now? Explain the adavantages of newer one. is there any performance related issue? Thanks in advance Debjani LahiriHi, Like all other[More]

Creation of Sorted and Standard and Hashed Internal Tables ..

Category:DefaultRelease time:-0001-11-30Views:130

Hi .. Pls  specify me.. how to create .. sorted ,Standard and Hashed Internal Tables... pls give me  the full code  regarding ...this .. ThnksStandard tables This is the most appropriate type if you are going to address the individual table entries u[More]

Internal Table and Structures

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I am a beginer. I know how to create a structure and how to create an internal table using ABAP/4. My problem is, i don't understand where to use internal table and structure, also i find myself very confused about the explicit work areas. Plese[More]

Difference betwen the internal tables

Category:DefaultRelease time:-0001-11-30Views:130

Hai friends,            Pls give me the types  of internal tables and their   differences .and its usage by example.   regrds, Prashanth.Internal tables Definition Data structure that exists only at program runtime. An internal table is one of two st[More]

Select on MARA resulting into # values in internal table for one field

Category:DefaultRelease time:2015-10-11Views:130

Hi Team, I have written a SELECT statement on MARA table as below. TRY.         SELECT matnr zzwftag FROM mara CLIENT SPECIFIED           INTO CORRESPONDING FIELDS OF TABLE gt_mara WHERE           mandt = sy-mandt AND           zzwftag NE space      [More]

How to create Dynamic Internal table in ALV?

Category:DefaultRelease time:2015-10-11Views:130

Hi all, I have to create a ALV report based on dynamic internal table. The requirement is that when I enter the months in my selection screen I should get the data relevant to those many months only. For eg if in selection I have given January to Mar[More]

To convert XML to ABAP internal table can we do it with DOM or we need XSLT

Category:DefaultRelease time:2015-10-11Views:130

I have a requirement where I need to collect the data from XML file into an internal table. I need to collect this data into an internal table as I should make use of this data and do Goods Receipt in SAP. My XML file is very very complex and the chi[More]

How to display Internal Table in ALV?

Category:DefaultRelease time:2015-10-11Views:130

Hi all, can anyone teach me the simple way to insert my internal table records to ALV by providing me the sample codes from the start of declaration to the end? Below is how i define my internal table: DATA: DOM_NAME(40) TYPE C,        P_TABLE(40) TY[More]

Data present in  internal table, now how to open it in PDF format

Category:DefaultRelease time:2015-10-11Views:130

Dear Friends, my Scenario is.. I have uploaded a pdf file in my database table through  GUI_UPLOAD. It is uploaded. Now when user click on some button then that file should be displayed again in pdf format directly. (No download to user PC using GUI_[More]

ABAP OO - Passing Internal Tables from Method to Method

Category:DefaultRelease time:2015-10-11Views:130

I'm new to writing methods. I have a need to build an internal table in METHOD1 and pass the internal table to METHOD2. I'm confused how to declare the table in 'Parameter' section of the METHOD2. I have specified the following: Parameter = WTAB1 Typ[More]

Hot
Good Afternoon. I want to upgrade XIR3 to XIR3.1 for enabling IIS+SSO with Active Directory. But when I want to upgrade my system, I have the Following error: Product: BusinessObjects Edge Series 3.0 -- Error 2902. Operation ixfAssemblyCopy called ou [More]
Hi, Please help in writing a UDF for these fields in mapping, which I need for the object Iu2019m doing currently. The fields are like this: 1)         batch_no = "TRUNC((GetMaxObjid('x_txn_sap_parts')-POWER(2,28))/5000)+1", 2)         lot_id = [More]
I'm finally posting here about it, because I can't keep it in anymore. Pages '08, dear Apple reps and forum-goers, is too sleek and functions way too much as I'd expect it to do, so that it's actually unexpectedly capable. This is a real problem as I [More]
Hello, Oracle Database 11g and Red hat 5 I have a very different kind of issue. I am handling the ORACLE db(remote db with all the important data). On the other side their is a MS SQL server db(local db with some testing data in it). All the users wi [More]
I recently upgraded to Mac OSX Yosemite and unfortunately, my Photoshop CS4 will not open. The message says it requires Java SE6. I now have Java 7 update 71. I would appreciate suggestions from anyone who can help to resolve this problem. Thank you. [More]
Hi Experts, Let me know on how to trigger a workflow using generic object services. My requirement is to trigger the FI document reversal document using Object services. Any info or docs relevant to this, please share with me.. Thanks, Dinesh.Dinesh, [More]
i have spoken with support twice i think, i am having to reinstall windows 7 and have no idea how it got than way. When i go to install the windows everything is fine until i get to where it is installing files and there is 4 different sections and t [More]
I want to create a cube or a fact table in database. Oracle Enterprise Manager's Help doc said that there is guide to create cube. But I cannot find in OEM. How can I create a cube? Thanks.CREATE TABLESPACE users DATAFILE '/u01/oracle/oradata/mynewdb [More]
I would really appreciate your help. I am turning around trying to align a legend of a graph. My application is coded in Labview 2014 in Windows 7. Before it was in XP and older LabVIEW and I had no problem. I have a user interface with a graph. I ma [More]
So my upgrade from 7.X to 8.X IPCC failed because Cisco isn't (yet) supporting the hardware (DL380G6) they told me buy for 7.x...     My regional Cisco rep said they are seeing that the latest version says should work (but TAC doesn't agree/ know thi [More]