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 in module pool program

Former Member
0 Kudos

Hi,

I have 2 screens 100 and 110 in my module pool program.

If I enter the hu_barcode value in the screen 100 and click enter control goes to screen 110 and appends the barcode value in the table control.Again if I enter a separate hu_barcode value in screen 110 and click enter that value also gets appended in table control of the same screen 110.

Now if I enter the hu_barcode value in screen 110 which I have entered for the first time in screen 100 that should not get appended in the table control as the value is already there in the table control.

How can I capture the values entered in table control?

I have given the following code in my program.But it is not working.

IF hu_barcode <> lv_exidv.

        APPEND wa_vekp TO tab_vekp.

      ENDIF.
      lv_exidv = wa_vekp-exidv.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

U need to insert a control in the loop of table control in PAI process, something like this:

code}PROCESS PAI.

LOOP AT ITAB.

FIELD BARCODE MODULE CHECK_BARCODE.

ENDLOOP.code}

MODULE CHECK_BARCODE.

   LOOP AT ITAB INTO WA WHERE BARCODE = BARCODE.
      IF SY-TABIX <> <table control>-current_line.
         ERROR = 'X'.
         EXIT.
     ENDIF.
  ENDLOOP.
  IF ERROR = 'X'.
------------> error message
  ENDIF.

ENDMODULE.

Max

1 REPLY 1

Former Member
0 Kudos

Hi

U need to insert a control in the loop of table control in PAI process, something like this:

code}PROCESS PAI.

LOOP AT ITAB.

FIELD BARCODE MODULE CHECK_BARCODE.

ENDLOOP.code}

MODULE CHECK_BARCODE.

   LOOP AT ITAB INTO WA WHERE BARCODE = BARCODE.
      IF SY-TABIX <> <table control>-current_line.
         ERROR = 'X'.
         EXIT.
     ENDIF.
  ENDLOOP.
  IF ERROR = 'X'.
------------> error message
  ENDIF.

ENDMODULE.

Max