Skip to Content

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

How to tranfer table Control Entries into an internal table.

Hi freinds

Plz tell me how can i transfter entries made in table control into an inertnal table.

so that I could save all entries of table control into database.

Regards

Rajesh

Tags:
Former Member
replied

Screen logic

PROCESS BEFORE OUTPUT.
* Statut 
  MODULE status_0210.
* drop down selections
  MODULE pbo_0210_posid.
* Attributes
  MODULE screen_0210.
* PBO FLOW LOGIC FOR TABLECONTROL 'TASK_210'
* MODULE TASK_210_CHANGE_TC_ATTR.
* MODULE TASK_210_CHANGE_COL_ATTR.
  LOOP AT   ctl_task
       WITH CONTROL task_210
       CURSOR task_210-current_line.

    MODULE task_210_attr.

    MODULE task_210_get_lines.
*   MODULE TASK_210_CHANGE_FIELD_ATTR
  ENDLOOP.

PROCESS AFTER INPUT.
* Exit 
  MODULE USER_COMMAND_0210 AT EXIT-COMMAND.
* action 
  MODULE time_210_user_command.
* MODULE TIME_210_CHANGE_TC_ATTR.
* MODULE TIME_210_CHANGE_COL_ATTR.
* PAI FLOW LOGIC FOR TABLECONTROL 'TASK_210'
  LOOP AT ctl_task.
* Check input
    CHAIN.
*   Control time
      FIELD  ctl_task-begzt MODULE task_210_begzt.
*     Order/op
      FIELD: ctl_task-raufnr, ctl_task-vornr
        MODULE task_210_aufnr_vornr.
*     Project
      FIELD  ctl_task-rproj
        MODULE task_210_posid.
*     global controls
      MODULE task_210_chain.
*   update table
      MODULE task_210_modify.
    ENDCHAIN.
*   Sélect lines
    FIELD  ctl_task-kz
      MODULE task_210_mark ON REQUEST.
  ENDLOOP.
* action  on control task
  MODULE task_210_user_command.
* whbne new record fill missing fields
  MODULE fields_210.
* MODULE TASK_210_CHANGE_TC_ATTR.
* MODULE TASK_210_CHANGE_COL_ATTR.
* Exit of following screen
  MODULE USER_COMMAND_0210.

PROCESS ON VALUE-REQUEST.
* Invite on oper, reduce selection
  FIELD ctl_task-vornr MODULE pai_0210_vornr_f4.

In main program

DATA:   ' ....
        ctl_task TYPE TABLE OF zzfsh_task WITH HEADER LINE,
* DECLARATION OF TABLECONTROL 'TASK_210' ITSELF
CONTROLS: task_210 TYPE TABLEVIEW USING SCREEN 0210.

In PAI modules

* INPUT MODULE FOR TABLECONTROL 'TASK_210': MODIFY TABLE
MODULE task_210_modify INPUT.
  IF ctl_task-raufnr IS INITIAL
  AND ctl_task-vornr IS INITIAL.
    CLEAR :ctl_task-raufpl,
           ctl_task-raplzl.
  ELSE.
    ctl_task-raufpl = afko-aufpl.
    ctl_task-raplzl = afvc-aplzl.
  ENDIF.
  MODIFY ctl_task
    INDEX task_210-current_line.
ENDMODULE.

Regards

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question