2022 Nov 30 2:47 PM
* LOOP AT it_mard where matnr = ls_mara-matnr and werks in p_werks . """""""commented on 30 nov
READ TABLE it_mard with key matnr = ls_mara-matnr werks = p_werks BINARY SEARCH.i am not getting how to write the read statement from the loop "werks " in the read statement . plzz help me getting this answer soon .
thanks reagards
Mohammed Mubashir.
2023 Jan 06 5:32 AM
There is no "parallel cursor" involved... It looks like you're trying to replace LOOP with reading a single record (?) and trying to use BINARY SEARCH to speed it up?
My guess is that you need to add INTO or TRANSPORTING NO FIELDS. This can be found in ABAP keyword documentation. I see that LOOP has no INTO either, so I guess it_mard has a header line. This must be a seriously old program if that's the case...
Not sure what is the actual goal here but I don't recommend using BINARY SEARCH and if you absolutely must, table needs to be sorted first. If you need faster performance then change the definition of IT_MARD table and use the best table type for the occasion. Of course, not getting too much unnecessary data into the table in the first place is a good option too.
Good luck and please read Help (F1) first before posting questions and try to include more details next time.
2023 Jan 06 6:17 AM
Hi mubashirbennishirur,
Please find below sample code for parallel cursor
Thanks
Tarun