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

Capturing User Action and populating Standard table

Former Member
0 Likes
401

Hi Friends ,

I have a requirement , its a classical report and in that based on the user action ( if the user checks a check box that is available in the output screen of the report and saves it) the value should be updated in a standard table as 'X'. I have appended the field in the standard table and now i need to write a logic at user command to populate the zfield that i have added in the table based on the user's input.

I need to capture the user's action into an internal table and then pass this value into a function module to update the standard table, Can someone suggest me how to proceed further on this issue ? Kindly let me know if you have any sample piece of code related to this scenario...

thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
369

DATA: date TYPE d, 
      flag TYPE c LENGTH 1, 
      wa   TYPE c LENGTH 10. 

START-OF-SELECTION. 
  date = sy-datum. 
  DO 10 TIMES. 
    date = date + sy-index. 
    WRITE: / flag AS CHECKBOX, (10) date. 
  ENDDO. 

AT LINE-SELECTION. 
  DO. 
    READ LINE sy-index FIELD VALUE flag 
                                   date INTO wa. 
    IF sy-subrc <> 0. 
      EXIT. 
    ELSEIF flag = 'X'. 
      WRITE / wa. 
    ENDIF. 
  ENDDO. 
1 REPLY 1
Read only

Former Member
0 Likes
370

DATA: date TYPE d, 
      flag TYPE c LENGTH 1, 
      wa   TYPE c LENGTH 10. 

START-OF-SELECTION. 
  date = sy-datum. 
  DO 10 TIMES. 
    date = date + sy-index. 
    WRITE: / flag AS CHECKBOX, (10) date. 
  ENDDO. 

AT LINE-SELECTION. 
  DO. 
    READ LINE sy-index FIELD VALUE flag 
                                   date INTO wa. 
    IF sy-subrc <> 0. 
      EXIT. 
    ELSEIF flag = 'X'. 
      WRITE / wa. 
    ENDIF. 
  ENDDO.