2008 Jul 11 10:49 AM
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
2008 Jul 11 10:57 AM
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.
2008 Jul 11 11:00 AM
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
2008 Jul 11 11:02 AM
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
2008 Jul 11 11:04 AM
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.
2008 Jul 11 11:05 AM
HI vijay,
Remove the clear statements after AT LINE SELECTION .
Regards,
Bhumika
2008 Jul 11 11:07 AM
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
2008 Jul 11 11:09 AM
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