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: 

Table control ..

Former Member
0 Kudos

Hi,

I have used "GET CURSOR " command to get the field and value of the row on which i make a click.

it has 4 fields ( vbeln , col2 , col3 , col4)

But what i want is.. when i click on the row (anywhere on the row may be on col2 col3) i want to get the "vbeln" value of that row..

(Bcas GET CURSOR FIELD which gives me the column on which i click)

Can anybody give an idea to achieve this..

Thank u..

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Satya,

while defining the GET CURSOR for col2,col3,col4 also u give the field to be opened as u have given for vbeln i think it will solve your problem

Try this once.

Reward&thanks,

swaroop

4 REPLIES 4

Former Member
0 Kudos

Hi Satya,

while defining the GET CURSOR for col2,col3,col4 also u give the field to be opened as u have given for vbeln i think it will solve your problem

Try this once.

Reward&thanks,

swaroop

0 Kudos

Hi Swaroop,

Could u plz explain me a bit more specific..?

and more over i have not definined anything like GET CURSOR for col2 ,3,4.

I didnt get u..

Thank u.

0 Kudos

Hi Satya

What you can do is use GET CURSOR with LINE option.

It will give you the line number (row) which user has selected.

Then use this formula

Index = <TABLE_CONROL>-TOP_LINE + LINE (Line selected with GET CURSOR) - 1.

Then read your internal table used for display with "Index".

Else.

Get the line number as described above.

Then use the FM "DYNP_READ_VALUES" by passsing the field name as VBELN screen field name and STEPL as Line number as retrieved before in DYNPFIELDS parametes.

Reward if found useful !

~ Ranganath

Former Member
0 Kudos

Hi,

if you are using ALV ,this code will help you.

FORM sub_user_command USING ucomm TYPE sy-ucomm

sel TYPE slis_selfield.

DATA: ref_grid TYPE REF TO cl_gui_alv_grid.

DATA: count TYPE i ,

i_rows TYPE lvc_t_row .

DATA: lf_row_index TYPE lvc_index ,

i_selected_line_s TYPE lvc_s_row ,

l_vbeln TYPE vbeln .

*then insert the following code in your USER_COMMAND routine...

IF ref_grid IS INITIAL.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'

IMPORTING

e_grid = ref_grid.

ENDIF.

IF NOT ref_grid IS INITIAL.

CALL METHOD ref_grid->check_changed_data.

ENDIF.

CASE ucomm.

WHEN 'PDF'.

CALL METHOD ref_grid->get_selected_rows

IMPORTING

et_index_rows = i_rows.

LOOP AT i_rows

INTO i_selected_line_s.

lf_row_index = i_selected_line_s-index.

CLEAR i_selected_line_s.

READ TABLE it_itab

INTO wa_itab

INDEX lf_row_index.

IF sy-subrc EQ 0.

refresh:bdcmsgcoll,

bdcdata.

clear:l_vbeln.

MOVE wa_itab-vbeln TO l_vbeln.

ENDFORM.

if you are doing normal reporting,

then use the hotspot on all the fields and use the HIDE keyword on which you want to capture.

Even check the following links it will be useful.

Reports

http://www.sapgenie.com/abap/reports.htm

http://www.allsaplinks.com/material.html

http://www.sapdevelopment.co.uk/reporting/reportinghome.htm

http://www.sapfans.com/forums/viewtopic.php?t=58286

http://www.sapfans.com/forums/viewtopic.php?t=76490

http://www.sapfans.com/forums/viewtopic.php?t=20591

http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.

OOPS – OO ABAP

http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt

http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf

http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf

http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt

http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf

http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt

http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8

http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm

DIRLL DOWN AND INTERACTIVE REPORT

http://www.sap-img.com/abap/difference-between-drilldown-report-and-interactive-report.htm

Reward if usefull