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
I've had this printer a little over a year and it worked fine. Today it started showing black splotches on the back of my documents. I cleaned the roller the best that I could and noticed that there was a ton of sludge in the waste tanks/ink reservoi [More]
Hey MSI faithful.  I am getting ready to perform a major upgrade.  I am currently using a five year old KT4VL.  Based on the fact that this board has lasted me for five years and is still going strong, MSI has won me over and I will be sticking with [More]
Have Windows XP Pro Upgraded from Nano to Video, but even though I reinstalled, the features shown in Itunes seem to be still those of the Nano. There is no "enable storage device" under general, and when connect the Ipod to the computer and att [More]
Hi, The calculated key figure used in the report (Balance Sheet Value) is adding stock value + flow value. I’m not sure what those two fields connect to in R3 but it appears that they do not calculate correctly.      I attempted to trace those two da [More]
Hi, How the scope parameter behaves for the lock object ,means if we pass scope =1 wat is this mean ,and what are the possible values that we give to this parameterHii Tarun.. This comes under Database Updates Concept in SAP. Let me give u basic idea [More]
Hi, Is there any way to extract the Business Partners from CRM system into BI for a specific number range or filter by number range. please provide me with the steps and some related links. Thanks Akila.Rhi Satish, for crm extraction, try check bi be [More]
Hi Experts, I need to configure alerts dnamically for all types of errors, must to intimated to the registered users via email. Please suggest how this could be done. Regards, SushamaHi use transaction code = alrtcatdef create Alert Category Create s [More]
Hi everyone, I am trying to create an application from the scrach, i deleted all the pages including the login and stared creating me own login page, now i face the following problems. I Created the custom login and is working fine, but once i login [More]
Hi Frnds! I am not able to hear any sound that is downloaded dynamically into sound objects of flash file. NOTE: This problem only occurs when you are playing files in INTERNET EXPLORER or AOL. The files play absolutely fine in FIREFOX. Is this a sec [More]
Hi! Is there a way to define default drawing aids? For example, I would like a form to show a specific grid, with "snap to grid activated" and "snap to center of page" deactivated directly after it is created, without having to define [More]