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

read current line

Former Member
0 Likes
1,772

Hi Friends ,

In my table control if i click any line then i have to go to next screen based on the line i have clicked.

so, I need to capture the key fields to read the internal table for the get the value in next screen .

i am tring to do with

READ CURRENT LINE.

Addition:

... FIELD VALUE f1 INTO g1

...

fn INTO gn ...

which is not helping me ....

Can any one guide me how to read those values apart from get cursor values keyword

Thanks

Poornima

1 ACCEPTED SOLUTION
Read only

Former Member
1,141

Hi ..

go to gui status and under Recommended function key settings

put F2 as PICK and

then in user command module in PAI..

write



  WHEN co_pick.
      CLEAR ok_code.

      GET CURSOR LINE l_line.
      l_line = l_line + tabl_sc2-top_line - 1.
      READ TABLE internal table  INDEX l_line.


m not sure how to do it without cursor

regards

vivek

4 REPLIES 4
Read only

Former Member
0 Likes
1,141

Hi,

first you have to find the current position of the cursor:

GET CURSOR { { FIELD field [field_properties] }

| { LINE line } }.

then you read your internal table with that information

READ TABLE int_table index line.

Read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] if found helpful!!!

Edited by: Julius Bussche on Aug 11, 2008 10:36 AM

Read only

Former Member
1,142

Hi ..

go to gui status and under Recommended function key settings

put F2 as PICK and

then in user command module in PAI..

write



  WHEN co_pick.
      CLEAR ok_code.

      GET CURSOR LINE l_line.
      l_line = l_line + tabl_sc2-top_line - 1.
      READ TABLE internal table  INDEX l_line.


m not sure how to do it without cursor

regards

vivek

Read only

Former Member
0 Likes
1,141

Hi Poornima,

Use this...

GET CURSOR FIELD M1 VALUE M2.

where M1 is of type string and M2 is of the field type...

Then u'l hv the field value in M2...Pass this value to the next screen field..

Read only

Former Member
0 Likes
1,141

Thanks for the quick response .

Problem is solved .

Poornima