Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

using transporting and without transporting

Hi friends,

can any one differenciate between the below 2 codes.

code :

data: i_vbak like vbak occurs 0 with header line.

data: i_vbap like vbap occurs 0 with header line.

*************************************************************************

a) Sort I_vbap by vbeln.

Loop at i_vbak.

read table i_vbap with key

vbeln = i_vbak-vbeln binary search.

If sy-subrc = 0 and i_vbap-posnr = u201800010u2019.

endif.

endloop.

*****************************************************************************

b) Sort I_vbap by vbeln.

Loop at i_vbak.

read table i_vbap transporting posnr with key

vbeln = i_vbak-vbeln binary search.

If sy-subrc = 0 and i_vbap-posnr = u201800010u2019.

endif.

endloop.

*******************************************************************************

what will happen if i use transporting and if i dont use transporting.

which one is preferable.

can any one suggest me.

Regards,

Priyanka.

Tags:
Former Member
Former Member replied

hiii

a) Sort I_vbap by vbeln.

Loop at i_vbak.

read table i_vbap with key

vbeln = i_vbak-vbeln binary search.

If sy-subrc = 0 and i_vbap-posnr = u201800010u2019.

endif.

endloop.

here when you use this logic using READ statement all the fields of i_vbap table will be fetched and then if condition is there then it will process further but here whole data of i_vbap table will be read.

b) Sort I_vbap by vbeln.

Loop at i_vbak.

read table i_vbap transporting posnr with key

vbeln = i_vbak-vbeln binary search.

If sy-subrc = 0 and i_vbap-posnr = u201800010u2019.

here when you use this logic using READ statement only POSNR field of i_vbap table will be fetched and then if condition is there then it will process further but here not whole data of i_vbap table will be read. so it will improve performance

regards

twinkal

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question