2 years ago

#70472

test-img

Frank

Trying to fill empty fields by using IS INITAL

I am trying to update a certain part of the code, where the code is shown below.

    READ TABLE lt_cc_data ASSIGNING <ls_cc_data>
    WITH KEY qmnum = ls_refferal-qmnum.
    IF <ls_cc_data>-pruef is INITAL.            *>>>>>Statement that I added
    IF sy-subrc IS INITIAL.
      <ls_cc_data>-pruef = <ls_ccicons>-icon_id.
    ENDIF.
    ENDIF.

Before entering the statement that I have shown in the code, the program would enter in each qnum = ls_refferal-qmnum and fill the pruef field, however it did not take into account the cases when the qnum had the same values throughout the table. What I try to did is filling the pruef field only in those cases when the field is empty.

Being that I cannot test it due to lack of data in the development system, is the logic behind my solution correct and if not can someone give me an similar solution?

Thank you all in advance!


EDIT The code would look like this now:

 READ TABLE lt_cc_data ASSIGNING <ls_cc_data>
    WITH KEY qmnum = ls_refferal-qmnum.
    IF <ls_cc_data>-pruef is INITAL.            *>>>>>Statement that I added
      <ls_cc_data>-pruef = <ls_ccicons>-icon_id.
    ENDIF.

abap

0 Answers

Your Answer

Accepted video resources