‎2007 Jun 15 11:26 AM
hello friends,
i am told that i will be implementing table control in module pool, next week.
can any one plz tell me which commands to use and what their purpose is.
thanks and reagrds.
‎2007 Jun 15 11:27 AM
‎2007 Jun 15 11:27 AM
‎2007 Jun 15 11:57 AM
hi,
<b>follow these steps for implemeting table control in module pool program.</b>
1) <b>Declaration of table control in the module pool program</b>
<b>syntax</b>
<b>CONTROLS <name> TYPE TABLEVIEW USING SCREEN <screen number>.</b>
here name----> table control name( give you as per your needs)
screen number---->provide in which screen you design table control
2) <b>Desiging table control on screen.</b>
to design table control on the screen, you need SE51(screen painter) here click on TABLE in control bar and place it on the screen . you can adjust the length and width of the table control.
name the table control (here you need to use the same name which you have used for declaration of table control in module pool program.
3) <b>passing data to table control.</b>
you need to code a LOOP statement in both PBO and PAI event of the screen.
with LOOP statement ypu can transfer data from program to table control and table control to program.
<b>syntax</b>
PBO.
LOOP AT <internal table> WITH CONTROL CURSOR < scroll variable>.
module assign.
ENDLOOP.
PAI.
LOOP AT <internal table>.
ENDLOOP.
<b>in module poop program.</b>
module assign.
**sample code.
kna1-kunnr = itab-kunnr.
kna1-name1 = itab-name1.
kna1-ort01 = itab-ort01.
endmodule.the tableview has few importent fields like..
LINE----> number of displayable rows in a table.
TOP_LINE----> the row of table where the screen dispalys start.
CUREENT_LINE----> the row currently being placed inside LOOP.
regards,
Ashokreddy.
‎2007 Jun 15 1:23 PM
thank you friends, for the replies,
can any one plz tell me
1)how to track changes,
2) disable few input fields
thanks again.
‎2007 Jun 15 1:31 PM
hi,
2)IN ONE OF THE pbo MODULES WRITE BELOW CODE.
DATA:cols TYPE cxtab_column.
LOOP AT TABC_200-cols INTO cols.
IF cols-SCREEN-FIELDNAME = 'UR FIELD'.
cols-SCREEN-INVISIBLE = '1'.
MODIFY TABC_200-cols FROM cols.
ENDIF.
ENDLOOP.
RGDS,
BHARAT.
‎2007 Jun 15 4:45 PM
Hai,
To modify the screen you have to use the table control structure.
You will get a structure with the name which you created the table control.
this structure is called deep structure. Deep structure means a structure with one of the field is an internal table or string or xstring. In this case this structure contains one internal table as one of the field. Here in this structre you have fields to modify the table control and the internal table contains the information about the columns. By using this you can modify the columns of the internal table.
you will get the structure with the name of the table control which you are declaring in the top include.
For better reference go through the seimens material. Its good for beginers.
‎2007 Jun 15 4:57 PM