I need to solve an issue regarding read table statement. The code is as follows:
IF rab_sot IS NOT INITIAL.
READ TABLE tkomvd WITH KEY kschl = rab_sot ASSIGNING FIELD-SYMBOL(<ls_tkmovd>).
IF sy-subrc = 0.
script-bruttowert = script-kbetr_basis + <ls_tkomvd>-kwert.
The issue is that the variable rab_sot saves a condition value of YPWE. And in the read table, it should read the record in the table tkomvd for the kschl = YPWE. Now the issue is that on the part of the code <ls_tkomvd>-kwert, it takes a value from the table tkomvd that is not corresponding to the kschl of YPWE. Thus, the value of kwert is 150, while for the row in the table tkomvd where the kschl is YPWE the value should be 60.
May anyone now how can I fetch the corresponding row in the table tkomvd?
Please do tell me if you need some additional information.