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
Hi, Since the listener.log grows so quick and becomes large (~10M) , i zip it and create another blank listener.log in the same location. However, the server stops to write to the log!!!!!!! Could anybody tell me why ??? (ps. i set the same permissio [More]
Hi, After BI SP16 Upgrade, we noticed that data load to a cube with DTP (7X DS) with partioning active, it would error out saying, "Error while updating to target " " type INFOCUBE....we applied note '1148007' and did reactivation of relate [More]
Cann't boot latest installation media. Computer is DSA-3020 with POULSBO GMA500 graphics. I tryied almost everything nomodeset, quiet splash, acpi=off, acpi_osi=Linux, mem=896mb, vga=771.... Interesting is that I see all outputs during kernel boot. B [More]
I have an ODBC application that connects to an Oracle 10g database. Currently, my SQLDriverConnect() function call uses the following connection string: DRIVER={Oracle in OraClient10g_home1}; DBQ=MyDB.world; DBA=W; UID=foo; PWD=bar This requires an e [More]
Hi, The XSLT SE in the Java CAPS 6 GA version only supports XSLT 1.0. Does anyone know when XSLT 2.0 will be supported? Thanks.Hi Kurt, At this time, there's no plan to support schema-aware xslt in Java CAPS 6. It would likely require partnering with [More]
I am using checkgmail and it has a serious memoryleak problem. After few hours of running, its memory usage goes from initial 50M, to 500M, to 2000M, and does not stop there. So I am trying to have it killed and restarted if it exceeds, say, 200M. Wh [More]
i bought final cut pro and i was stupid and deleted imovie 08.... i need it back for a project at school and was wondering if there is a way besides reseting my mac back to the original factory ****...i don't wanna lose all my filesDo you have your o [More]
I have the Blackberry Curve and tried to use the disk from the original package from ATT but it wasn't great.  The guy at the ATT store told me it is better to download a desktop manager from the Blackberry site but I don't know which one I should do [More]
Like, what is it? Is it a radio with a telephone inside it? I heard about this new invention of the "computer", and I was wondering whether it was an iPad taped to a calculator, or a satellite dish with a walkie talkie on it? Those darn kids mak [More]
Hi Gurus, How to set up depreciation key of low value assets to get asset fully depreciated irrespective of depreciation start date. For example : Asset No : xxxxxxx xx APC       : 5000 INR Dep. Key : xxx (100% Depreciation) O.Dep.Start Date : 14/05/ [More]