how to create a Table data type and modifying it!

PS this is a self note!
I use to creat a working area to store the data temp and then only modify the Internal structure which is quite a hassle.
Short cut!

* Declare the type of Internal structure!
TYPES: BEGIN OF ty_report,
         SKIP(1)      TYPE C,
         SEQNO        TYPE I,
         butxt        TYPE t001-BUtxt,      " Company name
         pernr        TYPE p0761-pernr,     " PF No.
       END OF ty_report.
 
* Declare the Internal table Please take note of the declaration which will help us modify the table direct
DATA: t_report TYPE STANDARD TABLE OF TY_report WITH HEADER LINE INITIAL SIZE 0. 

* the coding below is when you want to change it
    LOOP AT t_report  WHERE SKIP NE 'X'.
        t_report-
butxt'TESTING'.
        MODIFY t_report.
    ENDLOOP.
 

 
-------------
simple eh phew...
0 comments:

Post a Comment

message

Labels

NuffNang

Search google

Blog Archive

My Blog List

Twitter

Message

Followers