2008 Feb 26 8:14 AM
Hi anybody ,
i am getting an error 'Statement is not accessible'
for the below read statement. Can you suggest how can we replace this statement in Unicode System.
BEGIN OF t_rfrk OCCURS 0, "Referenzbelegkopf
rfbel LIKE vbrk-vbeln, "Referenzbelegnummer
waerk LIKE vbrk-waerk, "Belegwährung
END OF t_rfrk,
READ TABLE t_rfrk WITH KEY rfbel = t_vbrp-rfbel
BINARY SEARCH TRANSPORTING waerk.
CHECK sy-subrc IS INITIAL.
thanks in advance
Hi,
after end of declaration of an internal table you forgot to period, instead you put comma. Just check it.
the modified code would be as follows.
BEGIN OF t_rfrk OCCURS 0, "Referenzbelegkopf
rfbel LIKE vbrk-vbeln, "Referenzbelegnummer
waerk LIKE vbrk-waerk, "Belegwährung
END OF t_rfrk.
READ TABLE t_rfrk WITH KEY rfbel = t_vbrp-rfbel
BINARY SEARCH TRANSPORTING waerk.
CHECK sy-subrc IS INITIAL.
2008 Feb 26 8:19 AM
Hi,
after end of declaration of an internal table you forgot to period, instead you put comma. Just check it.
the modified code would be as follows.
BEGIN OF t_rfrk OCCURS 0, "Referenzbelegkopf
rfbel LIKE vbrk-vbeln, "Referenzbelegnummer
waerk LIKE vbrk-waerk, "Belegwährung
END OF t_rfrk.
READ TABLE t_rfrk WITH KEY rfbel = t_vbrp-rfbel
BINARY SEARCH TRANSPORTING waerk.
CHECK sy-subrc IS INITIAL.
2008 Feb 26 8:21 AM
Try using internal tables withhout header line like
TYPES: begin of ty_rfrk,
rfbel type vbrp-rfbel,
waerk type vbrk-waerk,
end of ty_rfrk.
DATA: it_rfrk type standard table of ty_rfrk,
ls_rfrk type ty_rfrk.
In the READ statement, try
READ TABLE <int-tbl> into <work-rea> WITH KEY... BINARY SEARCH. Hope this helps.
Thanks,
Balaji
2008 Feb 26 8:40 AM
Hi
You have not written the read in START-OF-SELECTION. Hence you are getting the stmt not accessible error. After data declaration, use the event START-OF-SELECTION and then give your read stmt.
This should work.
THanks
Vijay
PLZ reward points if helpful
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |