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: 

module_pool(messages)

Former Member
0 Kudos

hai all,

in my layout one table control with two colums.

iam giving entries like this.

1 10000

2 20000

30000 this entry not accept, at that time raise message error not fill first column.

give me solution.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

See the following report

DEMO_DYNPRO_TABLE_CONTROL_2

5 REPLIES 5

Former Member
0 Kudos

See the following report

DEMO_DYNPRO_TABLE_CONTROL_2

Former Member
0 Kudos
PAI.
Loop at ITAB.
Module table_ftest.
ENDLOOP.

Module table_ftest.
IF itab-field is initial.
Message 'XXX' type 'W'.
Endif.
ENDMODULE.

regards,

Gurpreet

0 Kudos

thanks very much.

I355602
Advisor
Advisor
0 Kudos

Hi,

Refer:-

it_zekpo is my internal table w/o header line,

wa_zekpo is work area.

Name of input/output fields on screen are:-

wa_zekpo-field1,

wa_zekpo-field2, and so on...

At screen flow-logic


PROCESS BEFORE OUTPUT.
*  MODULE status_8003.
 
  LOOP WITH CONTROL po_tb.
    MODULE read_data.
  ENDLOOP.
 
PROCESS AFTER INPUT.
*  MODULE user_command_8003.
 
  LOOP WITH CONTROL po_tb.
    MODULE modify_data.
  ENDLOOP.

In PBO


*&---------------------------------------------------------------------*
*&      Module  READ_DATA  OUTPUT
*&---------------------------------------------------------------------*
MODULE read_data OUTPUT.
  READ TABLE it_zekpo INTO wa_zekpo INDEX po_tb-current_line. "po_tb is table control name
 
  data : line_count type i.
 
  describe it_zekpo
  lines line_count.
 
  po_tb-lines = line_count + 10.
  "to increase the number of lines in table control dynamically
ENDMODULE.                 " READ_DATA  OUTPUT

In PAI


*&---------------------------------------------------------------------*
*&      Module  MODIFY_DATA  INPUT
*&---------------------------------------------------------------------*
MODULE MODIFY_DATA INPUT.

  IF wa-zekpo-ebeln is initial. "<--if first field is empty
    MESSAGE 'Fill first column entries' TYPE 'E'. "<--raise error message
  ELSE. "<--else modify internal table from table control
    MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tb-currentline.
    "this will modify the contents of existing line into internal table
  ENDIF.
ENDMODULE.                 " MODIFY_DATA  INPUT

Hope this helps you.

Regards,

Tarun

Former Member
0 Kudos

thanks.