2007 Feb 23 9:42 AM
Hi all,
In program if we create workarea or internal tables where exactly they stored i mean their structure or their dat at run time.
Pleas tell me does they store in application server or presentation server.
thanks a lot
Hi all,
In program if we create workarea or internal tables where exactly they stored i mean their structure or their dat at run time.
Pleas tell me does they store in application server or presentation server.
thanks a lot
2007 Feb 23 9:43 AM
i,
See the definition for a table with wa.
TYPES : BEGIN OF ty_mara,
matnr LIKE mara-matnr,
mtart LIKE mara-mtart,
matkl LIKE mara-matkl,
END OF ty_mara.
* Internal table
DATA : i_output TYPE ty_mara OCCURS 0 WITH HEADER LINE.
************************************************************************
* Work Areas:
DATA: wa_output TYPE ty_mara.
When u r looping at the table or reading u can use wa.
LOOP AT i_output INTO wa_output.
READ TABLE itab INTO wa_itab WITH KEY
matnr = wa_output -matnr.
if sy-subrc = 0.
wa_output-netpr = wa_itab-netpr.
MODIFY i_output FROM wa_output.
ELSE.
APPEND wa_output TO i_output.
ENDIF.
CLEAR wa_output , wa_itab.
ENDLOOP.
ENDIF.http://www.sap-img.com/abap/difference-between-work-area-and-header-line.htm
These are temporarily used for storing data.
Hope u r clear, reward poinst if this helps.
2007 Feb 23 9:55 AM
Hi Judit,
Thanks for your reply but i did not get the answere.
Actually what i need is you told that wa or internal tables are for temporary storage.
My quetion where exactly this temporary storage location occurs?is it in presentation server or application server.
thank you very much
2007 Feb 23 9:55 AM
Hi,
I hope it should be the Application server.
Thanks,
Prashanth
2007 Feb 23 9:59 AM
Hi prashanth,
Thank you very much.
i have one doubt if it is in applicationarea.
If any thing stored in application server then it can be accesed by all the users under that client.ok
so at runtime if wa stored in application server as temporary storage then there is a possibility of using this wa by other users under client na.
Please correct me if i am wrong.
2007 Feb 23 10:06 AM
Hi Shweta,
When ever a user opens in another client or the same one he has his Work Process and so everything will be newly created if you (The same user) is opening another session in the same Client and Server then the WA will have the same values as you ahve said.
Thanks,
Prashanth
2007 Feb 23 10:12 AM
Hi,
When a user executes a dialog program he will get his own WORK PROCESS for this execution so once the work process is assigned to him the data relevant for this program will be ROLLED IN into the work process so its exclusive for that user, once the execution is over the data will be ROLLED OUT and the wrok process is free to pickup any users any program waiting for execution.
Regards,
Sesh
2007 Feb 23 9:56 AM
Hi,
As you know the all the dialog programs will be process by the DIALOG WORKPROCESS of the application server the data related to a program will also be stored in the ROLL AREA of the DIALOG WORK PROCESS.
Each work process has its own memory area called ROLL AREA. When a dialog program is picked up by a dialog workprocess then it will allocate the memory that is required for this program.
So its application server memory.
Regards,
Sesh
2007 Feb 23 10:10 AM
<b>An internal table is a temporary table stored in RAM on the application server. </b>It is created and filled by a program during execution and is discarded when the program ends. Like a database table, an internal table consists of one or more rows with an identical structure, but unlike a database table, it cannot hold data after the program ends. <b>Use it as temporary storage for manipulating data or as a temporary private buffer</b>.
occurs does not limit the number of rows that can be added to the internal table. For example, if you specify occurs 10, you can put more than 10 rows into the internal table. The number of rows you can put into an internal table is theoretically only limited by the amount of virtual memory available on the application server.
The system uses the occurs clause only as a guideline to determine how much memory to allocate. The first time a row is added to the internal table, enough memory is allocated to hold the number of rows specified on the occurs clause. If you use that memory up, more is allocated as needed.
Alternatively, you can specify occurs 0. If you do this, the system allocates 8KB pages of memory at a time. However, there are no advantages to using occurs 0 other than the fact it is only a little easier to code occurs 0 than it is to estimate the size of the internal table.
<b>Don't use occurs 0 if you expect to store less than 8KB in an internal table. If you do, the system will allocate 8KB from the paging area. Memory will be wasted and paging could increase, resulting in poorer performance.</b>