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: 

unable to enable input after displaying a line in table control

Former Member
0 Kudos

HI Folks,

Here is my requirement:-

All fields of my table control are input enabled.

When I enter the field values and press enter I am generating the item no ()sequence no).

After executing pbo,field values along with item nos are displayed but the table control is getting disabled for the below empty rows.

I want to input  enable them to enter values for second, third....rows,

I used the following code in a module inside PBO. It doesnot work.

This code works only for the first row. How do I make it work for the entire coloumns

DATA wa_tabctrl TYPE cxtab_column .

   LOOP AT table_pp_cr-cols INTO wa_tabctrl.

     IF wa_tabctrl-index = '2'.

       wa_tabctrl-screen-input = '1'.

       MODIFY table_pp_cr-cols

          FROM wa_tabctrl.

     ENDIF.

   ENDLOOP.


Thanks and Regards,

Kawish

1 ACCEPTED SOLUTION

anubhab
Active Participant
0 Kudos

Hi,

   You can try the following:

PROCESS BEFORE OUTPUT.

  LOOP WITH CONTROL table_pp_cr.

    MODULE show_data_(your internal table).

  ENDLOOP.

MODULE show_data_(your internal table) OUTPUT.

  READ TABLE (your internal table) INDEX table_pp_cr-current_line.

  IF sy-subrc = 0.

      (transfer your internal table field values to screen field here)

  ELSE.

    CLEAR your internal table.

  ENDIF.

ENDMODULE.        

Module PAI

MODULE modify_(your internal table) INPUT.

(transfer screen values to internal table) 

MODIFY (your internal table) INDEX table_pp_cr-current_line.

  IF sy-subrc <> 0.

    CHECK (your internal table field) <> '  '.

    APPEND (your internal table).

  ENDIF.

ENDMODULE.  

Hope this will help you to solve the issue. Please let us know.

Regards,

Anubhab

2 REPLIES 2

Former Member
0 Kudos

In the PBO, add some blank lines to your table.

Rob

anubhab
Active Participant
0 Kudos

Hi,

   You can try the following:

PROCESS BEFORE OUTPUT.

  LOOP WITH CONTROL table_pp_cr.

    MODULE show_data_(your internal table).

  ENDLOOP.

MODULE show_data_(your internal table) OUTPUT.

  READ TABLE (your internal table) INDEX table_pp_cr-current_line.

  IF sy-subrc = 0.

      (transfer your internal table field values to screen field here)

  ELSE.

    CLEAR your internal table.

  ENDIF.

ENDMODULE.        

Module PAI

MODULE modify_(your internal table) INPUT.

(transfer screen values to internal table) 

MODIFY (your internal table) INDEX table_pp_cr-current_line.

  IF sy-subrc <> 0.

    CHECK (your internal table field) <> '  '.

    APPEND (your internal table).

  ENDIF.

ENDMODULE.  

Hope this will help you to solve the issue. Please let us know.

Regards,

Anubhab