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: 

AT LINE SELECTION PROBLEM

Former Member
0 Kudos
193

Hi all

Am using the below code for at line selection but when i click in the first screen it is going to second screen but the values are not getting passed and the first screen is not skippped.

AT LINE-SELECTION .

CLEAR: gd_cur_fld, gd_cur_val.

GET CURSOR FIELD gd_cur_fld

VALUE gd_cur_val.

IF gd_cur_fld = 'IT_STATUS-BELNR'.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = gd_cur_val

IMPORTING

output = gd_cur_val.

READ TABLE it_status into wa_status WITH KEY belnr = gd_cur_val

BINARY SEARCH.

IF sy-subrc = 0.

SET PARAMETER ID 'BUK' FIELD wa_status-bukrs.

SET PARAMETER ID 'BLN' FIELD wa_status-belnr.

SET PARAMETER ID 'GJR' FIELD wa_status-fiscal_year.

CALL TRANSACTION 'FB04' and SKIP FIRST SCREEN.

ENDIF.

endif.

END-OF-SELECTION.

With Regards

Vijay

7 REPLIES 7

Former Member
0 Kudos
119

HI,

GET CURSOR FIELD gd_cur_fld VALUE gd_cur_val.

will get only the field in the list output on which you double click.

so the other fields are being initial all the time. so get the line number also and read the bukrs and gjahr from the internal table then use set parameters and call the transaction.

rgds,

bharat.

Former Member
0 Kudos
119

Hi,

Did you debug and see if the correct line is read from it_status tabl ? You are using Binary search, is ur table sorted in the correct manner ?

Alternatively ,why dont you use the HIDE statment to store the key fields of the values of the line

regards,

Advait

Former Member
0 Kudos
119

hiii

just debug your program & check that you are getting value at get cursor statement or not..i think you should remove CLEAR statement after AT LINE SELECTION.

regards

twinkal

andreas_mann3
Active Contributor
0 Kudos
119

combine it with hide.

loop at itab.

write:...

hide itab...

endloop.

...

at-line-selection.

DATA position(11).

GET CURSOR FIELD position. "in POSITION steht der Name des Feldes auf

CASE position.

WHEN 'POS-BELNR' .

SET PARAMETER ID 'BLN' FIELD pos-belnr.

SET PARAMETER ID 'BUK' FIELD pos-bukrs.

SET PARAMETER ID 'GJR' FIELD pos-gjahr.

CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.

...

A.

Former Member
0 Kudos
119

HI vijay,

Remove the clear statements after AT LINE SELECTION .

Regards,

Bhumika

0 Kudos
119

Hi

I removed the clear statment.But its not working.If i give the transaction FB03.Its working fine.But the client wants it as FB04.Please help.

Vijy

former_member216100
Participant
0 Kudos
119

it is not working because on the screen

on field RF01A-BELNR (FB04) is no get parameter

you can also see what is going on on FB04 when you do debugging so you can see that he do a check if FB04 is called or not...

What to do I dont know yet.... maybe someone else