Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to logic correct append data

jandrivay
Participant
0 Likes
834

Hi All.
I have some problem to append my data. and it's my syntac.

....

it_data is table to display result.

and this is my data when execute.

how to append it_data without yellow highlight like this capture. ( i dont need the yellow data )


SPAN {
font-family: "Courier New";
font-size: 10pt;
color: #C0C0C0;
background: #16152B;
}
.L0S32 {
color: #FF00FF;
}
.L0S52 {
color: #009DE0;
}
.L0S55 {
color: #FF00FF;
}
.L0S70 {
color: #808080;
}
   LOOP AT it_idh.
    LOOP AT it_tcode WHERE tcode_grp EQ it_idh-tcode_grp

                       AND tmplt     EQ it_idh-tmplt.

      IF sy-subrc EQ 0.

        it_data-tcode = it_tcode-tcode.

        it_data-tdesc = it_tcode-descr.

      ENDIF.



      LOOP AT it_actvt WHERE tcode_grp EQ it_idh-tcode_grp

                      AND tcode_buzei EQ it_tcode-buzei.

        IF sy-subrc = 0.

          it_data-activity = it_actvt-actvt_descr.

        ENDIF.

      ENDLOOP.

      APPEND it_data.

      CLEAR it_tcode.

    ENDLOOP.
Append it_data.
1 ACCEPTED SOLUTION
Read only

Jelena_Perfiljeva
Active Contributor
732

It's not clear what criteria was used to determine which records are "yellow" but looks like these are duplicates?

If so then, obviously, you could look into removing some data from those internal tables mentioned in the code (it's not clear what's in them exactly). Or you could check before APPEND if a record already exists. Or just brutally SORT and DELETE ADJACENT DUPLICATES at the end. It really depends on the specific use case and data.

2 REPLIES 2
Read only

former_member1716
Active Contributor
0 Likes
732

Hello Hotman Jandri Vay Sianturi,

I hope this is your custom development, Can clarify below points?

--> Do you want to remove the data that is highlighted in Yellow

OR

--> You don't want the data to be highlighted in yellow at all

Also it would be helpful if you could give more details of your code, seeing the logic will help us better to understand!

Do not forget to paste the Code using CODE button!

Regards

Read only

Jelena_Perfiljeva
Active Contributor
733

It's not clear what criteria was used to determine which records are "yellow" but looks like these are duplicates?

If so then, obviously, you could look into removing some data from those internal tables mentioned in the code (it's not clear what's in them exactly). Or you could check before APPEND if a record already exists. Or just brutally SORT and DELETE ADJACENT DUPLICATES at the end. It really depends on the specific use case and data.