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

Push button in table control

Former Member
0 Likes
1,235

'Hi,

My requirement is,

I have a push button SAVE in table control for each line, when user press the push button that single line should come in display mode and it shuold be saved in databse.

Regards,

B V Rao

4 REPLIES 4
Read only

Former Member
0 Likes
600

Hai Bala,

1. Find the table index, when you select the particular row in table control

2. Move the selected index record to workarea from the internal table of the table control, when you press the save button

3. Disable the selected row using Loop At Screen, Screen-input = 0 and Modify Screen

I hope the above tips will help you to solve your problem.

Regards,

Harish

Read only

Former Member
0 Likes
600

hi try this..

refer to this link..

Here wa_itab is a work area which I have used for the table control.

PICK is the Mark field of type C which we generally use for selecting a particular Row.

&----


*& Module DEACTIVATE OUTPUT

&----


text

-


module DEACTIVATE output.

IF WA_ITAB-PICK = 'X'.

LOOP AT SCREEN.

if flg is initial.

IF SCREEN-NAME = 'WA_ITAB-PICK'.

screen-input = 1.

ELSE.

screen-input = 0.

ENDIF.

elseif flg = 'Y'.

if SCREEN-NAME = 'WA_ITAB-VBELN'

or screen-name = 'WA_ITAB-ERDAT'.

.

.

screen-INPUT = 1.

endif.

endif.

modify screen.

ENDLOOP.

ELSE.

LOOP AT SCREEN.

if flg is initial.

IF SCREEN-NAME = 'WA_ITAB-PICK'.

screen-input = 1.

ELSE.

screen-input = 0.

ENDIF.

ENDIF.

ENDLOOP.

ENDIF.

endmodule. " DEACTIVATE OUTPUT

Read only

Former Member
0 Likes
600

Hi,

Try use this way:


  IF ok_code = 'CB_SAV'.
LOOP AT SCREEN.
      IF screen-name EQ 'IT_ZMARA-MATNR'.
        screen-input = 0.
         ENDIF.
ENDLOOP.

    MODIFY zmara FROM TABLE it_zmara.
  ENDIF.

Thanks & Regards,

Krishna..

Read only

Former Member
0 Likes
600

hi bala,

CASE sy-ucomm.

WHEN 'SAVE'.

MOVE-CORRESPONDING itab TO zvbaK.

MODIFY zvbak.

MOVE-CORRESPONDING itab1 TO zvbaP.

MODIFY zvbap.

ITAB is internal table that u will give in table control columns

thanks

Sachin