‎2008 Mar 05 6:51 AM
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.
‎2008 Mar 05 7:39 AM
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.
‎2008 Mar 05 6:57 AM
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
‎2008 Mar 05 7:39 AM
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.
‎2008 Mar 05 8:55 AM
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 .
‎2008 Mar 05 9:04 AM
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.
‎2008 Mar 07 5:06 AM