2018 Aug 09 1:14 PM
Hi Expert,
Could you please provide me the code " How to use parallel cursor " using new abap syntax and also how to convert the multiple reads within loop into the new abap syntax .
Thanks in advance ,
Cheers.
Hi Expert,
Could you please provide me the code " How to use parallel cursor " using new abap syntax and also how to convert the multiple reads within loop into the new abap syntax .
Thanks in advance ,
Cheers.
2018 Aug 09 2:07 PM
Hi Nitin, Certainly, SAP transaction ABAPDOCU - ABAP Documentation and Examples will help you about it.
Regards,
2018 Aug 10 12:15 AM
Hi Nitin, example about parallel cursor algorithm...
...
SORT: lt_x[] by key field_a, lt_y[] by key field_a.
...
lv_index = 0.
LOOP AT lt_x[] INTO lw_x.
LOOP AT lt_y[] INTO lw_y FROM lv_index.
IF ( lw_y-field_a NE lw_x-field_a ).
lv_index = sy-tabix.
EXIT.
ENDIF.
...
ENDLOOP.
...
ENDLOOP.<br>
2018 Aug 10 6:59 AM
Thanks Roberto.
This syntax is know and already worked on it.
But i was actually looking for abap 7.50 .
For Example ..Below is the way to populate the internal table (replacement of Loop).
DATA(gt_citys) = VALUE ty_citys( FOR ls_ship IN gt_ships
WHERE ( route = ‘R0001’ ) ( ls_ship–city ) ).
*** So is there any way to replace the old parallel cursor syntaxes with the new syntax .
Regards,
Nitin
2018 Aug 09 5:13 PM
Parallel cursor technique hasn't been necessary since tables other than STANDARD were introducted into the ABAP langauge over 18 years ago.
2018 Aug 10 7:01 AM
Is it ?
But if we want to loop the internal table inside the loop , then we need to use the parallel cursor technique to avoid the unnecessary loops .
Regards,
Nitin
2018 Aug 10 9:32 AM
With HASHED tables (for example), the need to loop within a loop in this fashion can be made to disappear.
2018 Aug 10 12:17 AM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |