Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table control

Former Member
0 Likes
490

Hi all ,

i m using table control with wizard and i want to take diffrent fields from diffrent tables but problem is that table control with wizard ask for only one table.

can any one tell me how can we select diffrent fields from diff table in table control with wizard??

its urgent .

regards saurabh.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
458

HI,

1.Create the structure using the fields which you want.

2.Define the internal table for this structure.

3.In layout in custome control give this internal table name instead of dictionary table name.

4.click on second radiobutton(not "from dictionary table"),which is from program.

5.place the fields in your custom control.

Reward points,if it is useful.

Thanks,

chandu.

5 REPLIES 5
Read only

Former Member
0 Likes
458

Hello,

Why ur going for table control wizard???? !!!!

It will be much more easier for u if u use tc without wizard.

And for u, its not possible to select all the fields into a TC with a wizard.

Neeraj

Read only

Former Member
0 Likes
459

HI,

1.Create the structure using the fields which you want.

2.Define the internal table for this structure.

3.In layout in custome control give this internal table name instead of dictionary table name.

4.click on second radiobutton(not "from dictionary table"),which is from program.

5.place the fields in your custom control.

Reward points,if it is useful.

Thanks,

chandu.

Read only

0 Likes
458

Hi chandu.....

thanks for reply.....

i got yr reply and done it vary well but there is one problem

that how can i get data in table control while using structure as ITAB .

plz. reply soon and send me codes..

its urgent.

regards saurabh .

Read only

0 Likes
458

Hi,

observe the following example and change your code.

TOP-INCLUDE-CODE

TABLES: EKKO.

DATA: OK_CODE TYPE SY-UCOMM.

CONTROLS: TC100 TYPE TABLEVIEW USING SCREEN 100.

DATA: IT_EKKO LIKE EKKO OCCURS 0 WITH HEADER LINE.

DATA: CUR TYPE I.

DATA: I_EKKO2 LIKE EKKO OCCURS 0 WITH HEADER LINE.

DATA: V_FNAM TYPE I,V_FVAL(10) TYPE N.

SCREEN-100(whichi created) code

PROCESS BEFORE OUTPUT.

*MODULE STATUS_0100.

LOOP AT IT_EKKO CURSOR CUR WITH CONTROL TC100.

ENDLOOP.

*

PROCESS AFTER INPUT.

LOOP AT IT_EKKO.

MODULE MODIFY_ITAB.

ENDLOOP.

MODULE USER_COMMAND_0100.

Double click on "MODULE MODIFY_ITAB" and write the code

module MODIFY_ITAB input.

APPEND IT_EKKO TO I_EKKO2.

endmodule. " MODIFY_ITAB INPUT

PAI CODE

module USER_COMMAND_0100 input.

CASE OK_CODE.

WHEN 'INS'.

LOOP AT I_EKKO2.

MODIFY EKKO FROM I_EKKO2.

ENDLOOP.

SELECT * FROM EKKO INTO TABLE IT_EKKO.

IF SY-SUBRC = 0.

MESSAGE S003(ZCSMSG).

ENDIF.

WHEN 'FETCH'.

SELECT * FROM EKKO INTO TABLE IT_EKKO UP TO 2000 ROWS.

TC100-LINES = SY-DBCNT.

WHEN 'EXIT'.

LEAVE PROGRAM.

ENDCASE.

endmodule. " USER_COMMAND_0100 INPUT

In Layout create u=table control and name it as TC100.

Reward points,if it is useful.

Thanks,

chandu.

Read only

0 Likes
458

hi chandu....

thanx for reply .