US snack and cola maker PepsiCo has booked a 21% decline in second-quarter net profit.