Application Development 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: 

TAble Control Pblm

Former Member
0 Kudos

Hi,

I am Using one screen and Three Table control Using.

First Table Control.

i am Itab Declare for tc1.

Table:lips.

Deli.no

Deli.Item.

Sale Order.

Sale order Item.

Delivery Qty.

Sales Unit

The Above field All Display to Tc1.

The Value All Display .

Second Table Control for TC2.

itab1 Declare for tc2.

Table:Same.

The above Deli.no Against

Item

material no

Batch

storage location

Delivery Qty.(Batch Against).

The Above Field all display to tc2.

But Run the pgm the value not display in tc2.

what way go to display the value.

Plz, Mail to salvation.

Thanks,

Jevan

4 REPLIES 4

former_member755502
Participant
0 Kudos

Hi,

I think it would be better if you divide the screen in three subscreen areas and place each table control in each of them. This way, I think it will be easy to hadle more than on table control wihtin the same screen. Dispaly wise it will not look any different.

Thank you.

Former Member
0 Kudos

Hi,

Possible cross-checks are as follows :

1. In PBO, while 'LOOP ... ENDLOOP' for each table control, check the values in their internal table.

2. Check out the table control field names with fields in internal table of workarea.

Regards,

R.Nagarajan.

Former Member
0 Kudos

hi,

create screen : 100 and define table control with name TC.

then double click on screen 100 u will get PBO and PAI events.

Under the PBO:

LOOP AT I_ITAB1

INTO WA_ITAB1

WITH CONTROL TC

CURSOR TC-CURRENT_LINE.

MODULE TC_GET_LINES.

ENDLOOP.

*----In the main program

*&SPWIZARD: LINES OF TABLECONTROL 'TC'

DATA: G_TC_LINES LIKE SY-LOOPC.

MODULE TC_GET_LINES OUTPUT.

G_TC_LINES = SY-LOOPC.

ENDMODULE.

Under the PAI :

*--no need to write anything between loop and endloop.

LOOP AT I_ITAB1.

CHAIN.

FIELD WA_ITAB1-MATNR.

FIELD WA_ITAB1-MAKTX.

FIELD WA_ITAB1-WERKS.

ENDCHAIN.

ENDLOOP.

MODULE USER_COMMAND_0100.

In this MODULE USER_COMMAND_0100. you can write your own code

TABLES: MARA.CONTROLS MATERIAL TYPE TABLEVIEW USING SCREEN 130.

TYPES: BEGIN OF ST_MARA,

MATNR TYPE MARA-MATNR,

ERSDA TYPE MARA-ERSDA,

ERNAM TYPE MARA-ERNAM,

LAEDA TYPE MARA-LAEDA,

END OF ST_MARA.

DATA: IT_ST TYPE TABLE OF ST_MARA,

WA_ST TYPE ST_MARA,

IT_MARA TYPE MARA,

WA_MARA TYPE MARA,

OK_CODE LIKE SY-UCOMM.

CALL SCREEN 130.

&----


*& Module V1 INPUT

&----


  • text

----


MODULE V1 INPUT.

CASE OK_CODE.

WHEN 'SAVE'.WA_ST-MATNR = MARA-MATNR.

WA_ST-ERSDA = MARA-ERSDA.

WA_ST-ERNAM = MARA-ERNAM.

WA_ST-LAEDA = MARA-LAEDA.

MOVE-CORRESPONDING WA_ST TO WA_MARA.

INSERT INTO MARA VALUES WA_MARA.WHEN 'DELETE'.WA_ST-MATNR = MARA-MATNR.

WA_ST-ERSDA = MARA-ERSDA.

WA_ST-ERNAM = MARA-ERNAM.

WA_ST-LAEDA = MARA-LAEDA.MOVE-CORRESPONDING WA_ST TO WA_MARA.DELETE MARA FROM WA_MARA.WHEN 'MODIFY'.WA_ST-MATNR = MARA-MATNR.

WA_ST-ERSDA = MARA-ERSDA.

WA_ST-ERNAM = MARA-ERNAM.

WA_ST-LAEDA = MARA-LAEDA.MOVE-CORRESPONDING WA_ST TO WA_MARA.MODIFY MARA FROM WA_MARA.

ENDCASE.

ENDMODULE. " V1 INPUT

&----


*& Module EXIT INPUT

&----


  • text

----


MODULE EXIT INPUT.

IF OK_CODE = 'EXIT'.

LEAVE PROGRAM.

ENDIF.

ENDMODULE. " EXIT INPUT

Former Member
0 Kudos

ANS