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
509

Hi All,

i have to create a table control and in table control some questions are to be displayed.. for that i have filled an internal table in the main program now hw to call this table control in the main program and what code should i write in the pbo and pai for for table control.... plz help reagarding this..

Thanks & Regards

Ashu Singh

1 ACCEPTED SOLUTION
Read only

anversha_s
Active Contributor
0 Likes
489

hi,

Check this sample pgms

demo_dynpro_tabcont_loop

demo_dynpro_tabcont_loop_at

RSDEMO_TABLE_CONTROL

Regards,

Anversha

5 REPLIES 5
Read only

Former Member
0 Likes
489

Hi,

Plz check below example :

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

hope this helps.

thanx,

dhanashri.

Edited by: Dhanashri Pawar on Aug 25, 2008 8:20 AM

Read only

Former Member
0 Likes
489

HI

use table control with wizard and put ur internal table as table name..

then in PBO of that screen fetch the data .

regards

vivek

Read only

Former Member
0 Likes
489

I think It ll be in PAI.

Read only

Former Member
0 Likes
489

Hi,

U declare the internal table for ur tablecontrol and write ur code for fetching data from table...

Regards:

Prabu

Read only

anversha_s
Active Contributor
0 Likes
490

hi,

Check this sample pgms

demo_dynpro_tabcont_loop

demo_dynpro_tabcont_loop_at

RSDEMO_TABLE_CONTROL

Regards,

Anversha