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: 

Capturing more than one field values using Read Line Statement

Former Member
0 Kudos

Hello Friends ,

I have a requirement that goes like this.. Its a classical report and once we give the input values and execute it will take you to the output screen that has three fields 1) Partner Number(from the input screen) , 2) Contract Number and 3) A checkbox. Now once the user checks or unchecks this checkbox and saves , the checkbox field in the database table should be updated based on the user action ( Both checked and unchecked user action should be captured). Now i am using event User command . In that i need to capture the user action and then update the DB table. I am using the Read line statement but i am not able to capture all the three fields from the output screen . Can someone suggest me how to proceed further on this ? If some one has a sample piece of code related to this requirement kindly send it across.

Thanks In Advance.

4 REPLIES 4

Former Member
0 Kudos

hi,

u can use get cursor command, press F1 and see, u will get required information.

this will solve ur problem, and also sy-lisel is useful to ur requirement.. this is useful for at line-selection.

Rgds.,

subash

Former Member
0 Kudos

Hi,

FORM alv_user_command USING r_ucomm LIKE sy-ucomm

rs_selfield TYPE slis_selfield .

READ TABLE g_t_final_header INTO l_r_z07l_stock1 INDEX

rs_selfield-tabindex.

PERFORM detail_list USING l_r_z07l_stock1.

ENDFORM. " alv_user_command

tabindex will have the Index number of the selected row, then u read the index of the table with READ..

Hope it helps!!

Regards,

Pavan

Former Member
0 Kudos

1)

Count the number of records in the Internal table .
    Say : w_index.

2)

Do w_index.  
     READ LINE sy-index FIELD VALUE Partner Number
                               Contract Number 
                               checkbox.
    Update the ZTABLE.
  ENDDO.

Hope this will resolve your issue.

Regards,

Gurpreet

former_member188685
Active Contributor
0 Kudos

Use F1 on Read line statement.