Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to update DBtable in table control (MPP) for selected lines.

Hi Folks,

I need to update DBtable from the table control after modification of  only multiple selected rows.

But my issue. any row if edited is being modified in DBtable.

Client does not want me to use Check box so im using Selcolumn in module pool table control.

Please help me in resolving the issue. Let me know if you have any queries

Thanks

Reddy

Former Member
replied

Hi Reddy,

Hope it helps.

For  Sel column.

Declare:

Data : SEL  TYPES XFELD in Structure.

Double click on the sel  field     give the structure name and field name as below in screen shoot.

In Flow logic.

PROCESS AFTER INPUT.

loop at it_tab.
    FIELD YTBLCTRL-SEL.
MODULE update.
ENDLOOP.


MODULE Updatedb.


In Editor.



MODULE UPDATE INPUT.

   MODIFY it_tab FROM YTBLCTRL INDEX tbc1-current_line.

   if ytblctrl-sel IS NOT INITIAL.
   lv_cnt = lv_cnt + 1.
   endif.

ENDMODULE
.



MODULE UPDATEDB INPUT.


Case sy-ucomm.


WHEN 'SAVE'.


if lv_cnt is NE '1'.


Message 'select more than one item.

else.

Update DB.

endif.

Endcase.


Regards,

Venkat.


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question