Date: 201910
Local time of day: 0601-1200
Location: EWR.Airport, NJ
Flight conditions: VMC
Aircraft: B777 Undifferentiated or Other Model
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Takeoff / Launch
Airspace: Class B EWR
ATC / advisory: TRACON N90
Reporter organization: Air Carrier
Reporter function: Captain; Pilot Not Flying
Reporter qualification: Flight Crew Multiengine; Flight Crew Instrument; Flight Crew Air Transport Pilot (ATP)
Human factors: Troubleshooting; Human-Machine Interface; Confusion
Second reporter function: First Officer; Pilot Flying
Anomaly: Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance; Deviation / Discrepancy - Procedural Published Material / Policy
Detector: Person Flight Crew
When detected: In-flight
Result: Flight Crew Became Reoriented; Flight Crew FLC Overrode Automation
Contributing factors: Human Factors
Primary problem: Human Factors

Narrative: After receiving and loading a full FMC reroute at the gate; and verifying the route and departure RWY 22R and EWR 4 SID per checklist; we noticed the fight director commanding a right turn after takeoff. I knew from experience that was not correct; so asked the FO to stop the turn and we both agreed to go back to 219 runway heading via heading select. Upon contacting NY departure he asked what heading we were flying and I stated '220'. He said; 'all right; just turn right now to 340'; which we did; and proceeded normally. However; looking at the FMC; and ND; there was no EWR 4 departure info loaded which commands an immediate left turn to 190; then back right to 220 at 2.6 DME.


Second narrative: We received a CPDLC reroute shortly before our scheduled push. The reroute created the need for a new flight plan/release and subsequently created questions about our fuel load in relation to the flight plan time--the flight plan time had not changed from release 2 to release 3 but the fuel burn was over 2K more. ACARs messaging to dispatch; getting a new flight plan and loading the new flight plan in FD Pro and WSI served as a distraction and I poorly managed the workload. Knowing that base personnel were trying their best to get an on time departure I rushed and performed a poor briefing on the departure. Some miscommunications made me think the departure was loaded; but I failed to verify. Distractions with the flight plan issues carried over to our taxiout and I failed to realize the EWR 4 departure was not loaded when we uploaded our new routing -- a pilot bulletin cautions about this very issue. The before takeoff checklist should have caught this error; but when I completed the checklist; I either saw what I wanted to see or the departure was there and somehow got dropped out later. I feel like I saw EWR 4 and GAYEL during the before takeoff check; but I must have rushed and lost situational awareness as I completed the checklist.My errors were manifested on takeoff when we transitioned to LNAV and the steering was direct to GAYEL instead of the SID turn to 190 followed by a turn to 220. I initially banked right with the flight director; realized this was incorrect; and then immediately rolled out and queried the captain as to the correct heading (poor briefing and SA on the departure on my part). The Captain said fly 220. I basically flew straight out--I never made the initial turn to 190 on the SID. Departure asked what heading we were flying and we responded and were flying 220. Departure then gave us a turn to 340 and we continued on vectors.


Synopsis: Air carrier flight crew did not load the EWR 4 SID correctly; resulting in a course deviation.