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

Get cursor not working in classical interactive report

Former Member
0 Likes
890

Hi,

i created one classical interactive report.in basic list whenever double click on any cell, it has to go to corresponding SAP transaction. For example double click on cell of salesorder number, it has to go to VA03 like that. for this purpose i used GET CURSOR FIELD v_filed VALUE v_value. But i unable to get filed name in variable v_field when double click on particular cell,i can get value in that cell. Please help me regarding this.

v_filed and v_value are of char of length 20.

Thanks

Madhavi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
733

hi

Please Check the following code.

Hide:wa-vbeln.

gv_fie(100),gv_val(100).
AT LINE-SELECTION.
  GET CURSOR FIELD gv_fie VALUE gv_val.
case gv_fie
 WHEN 'WA-VBELN'.
  SET PARAMETER ID 'AUN' FIELD wa-vbeln.
  CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
end case.

Debug the program.

Hi,

i created one classical interactive report.in basic list whenever double click on any cell, it has to go to corresponding SAP transaction. For example double click on cell of salesorder number, it has to go to VA03 like that. for this purpose i used GET CURSOR FIELD v_filed VALUE v_value. But i unable to get filed name in variable v_field when double click on particular cell,i can get value in that cell. Please help me regarding this.

v_filed and v_value are of char of length 20.

Thanks

Madhavi

4 REPLIES 4
Read only

Former Member
0 Likes
734

hi

Please Check the following code.

Hide:wa-vbeln.

gv_fie(100),gv_val(100).
AT LINE-SELECTION.
  GET CURSOR FIELD gv_fie VALUE gv_val.
case gv_fie
 WHEN 'WA-VBELN'.
  SET PARAMETER ID 'AUN' FIELD wa-vbeln.
  CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
end case.

Debug the program.

Read only

0 Likes
733

Hi,

Thanks alot for your reply. But by using Hide technique we can go to one transaction only. I need to go to different transactions depending upon cell user clicks.

here is my sample code.

GET CURSOR FIELD rv_field VALUE rv_value.

  • Detail report for the Billing document.

IF rv_field = c_vbeln.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = rv_value

IMPORTING

output = rv_value.

SET PARAMETER ID c_vf FIELD rv_value.

CALL TRANSACTION c_vf03 AND SKIP FIRST SCREEN.

  • Detail report for the sales document.

ELSEIF rv_field = c_vbeln1.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = rv_value

IMPORTING

output = rv_value.

SET PARAMETER ID c_aun FIELD rv_value.

CALL TRANSACTION c_va03 AND SKIP FIRST SCREEN.

  • Detail report for the Accounting document.

ELSEIF rv_field = c_belnr.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = rv_value

IMPORTING

output = rv_value.

SET PARAMETER ID c_bln FIELD rv_value.

CALL TRANSACTION c_fb03 AND SKIP FIRST SCREEN.

  • Detail report for the Material Number.

ELSEIF rv_field = c_matnr.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = rv_value

IMPORTING

output = rv_value.

SET PARAMETER ID c_mat FIELD rv_value.

CALL TRANSACTION c_mm03 AND SKIP FIRST SCREEN.

  • Detail report for the Customer Number.

ELSEIF rv_field = c_kunnr.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = rv_value

IMPORTING

output = rv_value.

SET PARAMETER ID c_kun FIELD rv_value.

CALL TRANSACTION c_xd03 AND SKIP FIRST SCREEN.

ENDIF.

CLEAR: rv_field, rv_value.

here i am not able to get field name in variable rv_filed

but i can get value in rv_value

plese do solution for this.

Thanks in advance

Madhavi

Read only

0 Likes
733

hi

In top of the program clear the variable.

data:rv_field(100).

clear :rv_field.

Change the length and try it .

[sample code|http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-SET+PARAMETER]

[sample code1|http://wiki.sdn.sap.com/wiki/display/Snippets/Interactivereportusinggetcursor]

Read only

0 Likes
733

Hi,

i solved my problem. Actully i used performs to diplay data in basic list. At that time i passed internal table with out header line and i taken local work are to get data from internal table.

Just like

Loop at itab into wa.

write: wa-vbeln.

.......

clear wa.

endloop.

in another perform i used GET CURSOR statement that's why it didn't recognise field name but it recognises field value.

so, i passed Work area while printing data. Then it works. Any how Dharma thanks alot for your suggesion.

Thanks

madhavi